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

Unified Diff: lib/prefs.js

Issue 29374674: Issue 4864 - Start using ESLint for adblockpluschrome (Closed)
Patch Set: Rebased Created March 17, 2017, 12:41 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/popupBlocker.js ('k') | lib/requestBlocker.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/prefs.js
diff --git a/lib/prefs.js b/lib/prefs.js
index 632e3aa03936d8d10a02cfbc8ecd92b58f9721af..33b2a92f962367f2b3d9d750e72609f7f68c5f24 100644
--- a/lib/prefs.js
+++ b/lib/prefs.js
@@ -116,7 +116,8 @@ defaults.notificationurl = "https://notification.adblockplus.org/notification.js
*/
defaults.blocked_total = 0;
/**
- * Whether to show a badge in the toolbar icon indicating the number of blocked ads.
+ * Whether to show a badge in the toolbar icon indicating the number
+ * of blocked ads.
*
* @type {boolean}
*/
@@ -260,7 +261,8 @@ function init()
let prefs = Object.keys(defaults);
prefs.forEach(addPreference);
- let localLoaded = new Promise(resolve => {
+ let localLoaded = new Promise(resolve =>
+ {
ext.storage.get(prefs.map(prefToKey), items =>
{
for (let key in items)
@@ -270,7 +272,8 @@ function init()
});
});
- let managedLoaded = new Promise(resolve => {
+ let managedLoaded = new Promise(resolve =>
+ {
if (require("info").platform == "chromium" && "managed" in chrome.storage)
{
chrome.storage.managed.get(null, items =>
@@ -288,9 +291,7 @@ function init()
});
}
else
- {
resolve();
- }
});
function onLoaded()
« no previous file with comments | « lib/popupBlocker.js ('k') | lib/requestBlocker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld