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

Unified Diff: lib/io.js

Issue 29570614: Issue 5028 - Use browser namespace (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Update adblockplusui dependency Created Oct. 17, 2017, 1:02 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/icon.js ('k') | lib/notificationHelper.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/io.js
===================================================================
--- a/lib/io.js
+++ b/lib/io.js
@@ -58,18 +58,18 @@
}
function removeFile(fileName)
{
return new Promise((resolve, reject) =>
{
ext.storage.remove(fileToKey(fileName), () =>
{
- if (chrome.runtime.lastError)
- reject(chrome.runtime.lastError.message);
+ if (browser.runtime.lastError)
+ reject(browser.runtime.lastError.message);
else
resolve();
});
});
}
exports.IO =
{
@@ -132,18 +132,18 @@
renameFile(fromFile, newName)
{
return loadFile(fromFile).then(entry =>
{
return new Promise((resolve, reject) =>
{
ext.storage.set(fileToKey(newName), entry, () =>
{
- if (chrome.runtime.lastError)
- reject(chrome.runtime.lastError.message);
+ if (browser.runtime.lastError)
+ reject(browser.runtime.lastError.message);
else
resolve();
});
});
}).then(() => removeFile(fromFile));
},
/**
« no previous file with comments | « lib/icon.js ('k') | lib/notificationHelper.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld