Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: chrome/ext/background.js

Issue 29350042: Issue 4023 - Move storage of subscription lists to localStorage (Closed)
Patch Set: Created Aug. 22, 2016, 9:24 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | lib/io.js » ('j') | lib/io.js » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 }); 565 });
566 566
567 567
568 /* Storage */ 568 /* Storage */
569 569
570 ext.storage = { 570 ext.storage = {
571 get: function(keys, callback) 571 get: function(keys, callback)
572 { 572 {
573 chrome.storage.local.get(keys, callback); 573 chrome.storage.local.get(keys, callback);
574 }, 574 },
575 set: function(key, value, callback) 575 set: function(items, callback)
576 { 576 {
577 let items = {};
578 items[key] = value;
579 chrome.storage.local.set(items, callback); 577 chrome.storage.local.set(items, callback);
580 }, 578 },
581 remove: function(key, callback) 579 remove: function(key, callback)
582 { 580 {
583 chrome.storage.local.remove(key, callback); 581 chrome.storage.local.remove(key, callback);
584 }, 582 },
585 onChanged: chrome.storage.onChanged 583 onChanged: chrome.storage.onChanged
586 }; 584 };
587 585
588 /* Options */ 586 /* Options */
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 afterTabLoaded(callback)(createdWindow.tabs[0]); 628 afterTabLoaded(callback)(createdWindow.tabs[0]);
631 }); 629 });
632 } 630 }
633 else 631 else
634 { 632 {
635 ext.pages.open(createData.url, callback); 633 ext.pages.open(createData.url, callback);
636 } 634 }
637 } 635 }
638 }; 636 };
639 })(); 637 })();
OLDNEW
« no previous file with comments | « no previous file | lib/io.js » ('j') | lib/io.js » ('J')

Powered by Google App Engine
This is Rietveld