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

Delta Between Two Patch Sets: chrome/ext/background.js

Issue 29339112: Issue 3716 - Split up files stored in storage.local (Closed)
Left Patch Set: Created March 30, 2016, 4:50 a.m.
Right Patch Set: Remove the trailing comma. Created April 1, 2016, 1:14 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | lib/io.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 {
547 let items = {};
548 items[key] = value;
549 chrome.storage.local.set(items, callback);
550 },
551 setMultiple: function(items, callback)
Sebastian Noack 2016/03/30 12:06:37 Rather than adding yet another method here, I woul
552 { 546 {
553 chrome.storage.local.set(items, callback); 547 chrome.storage.local.set(items, callback);
554 }, 548 },
555 remove: function(key, callback) 549 remove: function(key, callback)
556 { 550 {
557 chrome.storage.local.remove(key, callback); 551 chrome.storage.local.remove(key, callback);
558 }, 552 },
559 onChanged: chrome.storage.onChanged 553 onChanged: chrome.storage.onChanged
560 }; 554 };
561 555
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 afterTabLoaded(callback)(createdWindow.tabs[0]); 598 afterTabLoaded(callback)(createdWindow.tabs[0]);
605 }); 599 });
606 } 600 }
607 else 601 else
608 { 602 {
609 ext.pages.open(createData.url, callback); 603 ext.pages.open(createData.url, callback);
610 } 604 }
611 } 605 }
612 }; 606 };
613 })(); 607 })();
LEFTRIGHT
« no previous file | lib/io.js » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld