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

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

Issue 29339112: Issue 3716 - Split up files stored in storage.local (Closed)
Left Patch Set: Modify Safari storage. Refactor chunk name creation. Add comments. Created March 31, 2016, 1:53 p.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 | « lib/prefs.js ('k') | no next file » | 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 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 var key = keys[i]; 701 var key = keys[i];
702 if (key in settings) 702 if (key in settings)
703 items[key] = settings[key]; 703 items[key] = settings[key];
704 } 704 }
705 705
706 setTimeout(callback, 0, items); 706 setTimeout(callback, 0, items);
707 }, 707 },
708 set: function(items, callback) 708 set: function(items, callback)
709 { 709 {
710 for (let key in items) 710 for (let key in items)
711 { 711 safari.extension.settings[key] = items[key];
712 if (items.hasOwnProperty(key))
Sebastian Noack 2016/03/31 14:08:53 I think it's safe to just skip this check. We neve
713 {
714 safari.extension.settings[key] = items[key];
715 }
716 }
717 if (callback) 712 if (callback)
718 setTimeout(callback, 0); 713 setTimeout(callback);
719 }, 714 },
720 remove: function(key, callback) 715 remove: function(key, callback)
721 { 716 {
722 delete safari.extension.settings[key]; 717 delete safari.extension.settings[key];
723 718
724 if (callback) 719 if (callback)
725 setTimeout(callback, 0); 720 setTimeout(callback, 0);
726 }, 721 },
727 onChanged: new ext._EventTarget() 722 onChanged: new ext._EventTarget()
728 }; 723 };
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 /* Windows */ 762 /* Windows */
768 ext.windows = { 763 ext.windows = {
769 // Safari doesn't provide as rich a windows API as Chrome does, so instead 764 // Safari doesn't provide as rich a windows API as Chrome does, so instead
770 // of chrome.windows.create we have to fall back to just opening a new tab. 765 // of chrome.windows.create we have to fall back to just opening a new tab.
771 create: function(createData, callback) 766 create: function(createData, callback)
772 { 767 {
773 ext.pages.open(createData.url, callback); 768 ext.pages.open(createData.url, callback);
774 } 769 }
775 }; 770 };
776 })(); 771 })();
LEFTRIGHT
« lib/prefs.js ('k') | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld