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

Unified Diff: lib/prefs.js

Issue 29570614: Issue 5028 - Use browser namespace (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Fix indentation Created Oct. 9, 2017, 3:50 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
===================================================================
--- a/lib/prefs.js
+++ b/lib/prefs.js
@@ -314,25 +314,25 @@
overrides[keyToPref(key)] = items[key];
resolve();
});
});
let managedLoaded = new Promise(resolve =>
{
- if (require("info").platform == "chromium" && "managed" in chrome.storage)
+ if (require("info").platform == "chromium" && "managed" in browser.storage)
{
- chrome.storage.managed.get(null, items =>
+ browser.storage.managed.get(null, items =>
{
- // Opera doesn't support chrome.storage.managed, but instead simply
- // removing the API, Opera sets chrome.runtime.lastError when using it.
+ // Opera doesn't support browser.storage.managed, but instead simply
+ // removing the API, Opera sets browser.runtime.lastError when using it.
// So we have to retrieve that error, to prevent it from showing up
// in the console.
- chrome.runtime.lastError;
+ browser.runtime.lastError;
for (let key in items)
defaults[key] = items[key];
resolve();
});
}
else
« 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