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

Unified Diff: lib/prefs.js

Issue 29452181: Noissue - Merge current tip to Edge bookmark (Closed)
Patch Set: Created May 30, 2017, 3:49 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/publicSuffixList.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/prefs.js
===================================================================
--- a/lib/prefs.js
+++ b/lib/prefs.js
@@ -1,6 +1,6 @@
/*
* This file is part of Adblock Plus <https://adblockplus.org/>,
- * Copyright (C) 2006-2016 Eyeo GmbH
+ * Copyright (C) 2006-2017 eyeo GmbH
*
* Adblock Plus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
@@ -116,7 +116,8 @@
*/
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 @@
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,8 +272,9 @@
});
});
- let managedLoaded = new Promise(resolve => {
- if (typeof chrome == "object" && "managed" in chrome.storage)
+ let managedLoaded = new Promise(resolve =>
+ {
+ if (require("info").platform == "chromium" && "managed" in chrome.storage)
{
chrome.storage.managed.get(null, items =>
{
« no previous file with comments | « lib/popupBlocker.js ('k') | lib/publicSuffixList.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld