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

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

Issue 29339112: Issue 3716 - Split up files stored in storage.local (Closed)
Patch Set: Make sure we don't leak chunks. Edit comments. Simplify safari storage. Created March 31, 2016, 6:33 p.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') | safari/ext/background.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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 }); 535 });
536 536
537 537
538 /* Storage */ 538 /* Storage */
539 539
540 ext.storage = { 540 ext.storage = {
541 get: function(keys, callback) 541 get: function(keys, callback)
542 { 542 {
543 chrome.storage.local.get(keys, callback); 543 chrome.storage.local.get(keys, callback);
544 }, 544 },
545 set: function(key, value, callback) 545 set: function(items, callback)
546 { 546 {
547 let items = {};
548 items[key] = value;
549 chrome.storage.local.set(items, callback); 547 chrome.storage.local.set(items, callback);
550 }, 548 },
551 remove: function(key, callback) 549 remove: function(key, callback)
552 { 550 {
553 chrome.storage.local.remove(key, callback); 551 chrome.storage.local.remove(key, callback);
554 }, 552 },
555 onChanged: chrome.storage.onChanged 553 onChanged: chrome.storage.onChanged
556 }; 554 };
557 555
558 /* Options */ 556 /* Options */
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 afterTabLoaded(callback)(createdWindow.tabs[0]); 598 afterTabLoaded(callback)(createdWindow.tabs[0]);
601 }); 599 });
602 } 600 }
603 else 601 else
604 { 602 {
605 ext.pages.open(createData.url, callback); 603 ext.pages.open(createData.url, callback);
606 } 604 }
607 } 605 }
608 }; 606 };
609 })(); 607 })();
OLDNEW
« no previous file with comments | « no previous file | lib/io.js » ('j') | safari/ext/background.js » ('J')

Powered by Google App Engine
This is Rietveld