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

Unified Diff: lib/prefs.js

Issue 29338481: Issue 3705 - Don't rely on info.platform when checking for availability of the chrome.* API (Closed)
Patch Set: Created March 17, 2016, 6:54 a.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/notificationHelper.js ('k') | webrequest.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
@@ -236,7 +236,7 @@
});
let managedLoaded = new Promise(resolve => {
- if (require("info").platform == "chromium" && "managed" in chrome.storage)
+ if (typeof chrome == "object" && "managed" in chrome.storage)
{
chrome.storage.managed.get(null, function(items)
{
« no previous file with comments | « lib/notificationHelper.js ('k') | webrequest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld