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

Unified Diff: chrome/ext/background.js

Issue 5251132066627584: Issue 1488 - Add pre-configurable preference to suppress first run page (Closed)
Patch Set: Created March 19, 2015, 2:24 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
Index: chrome/ext/background.js
===================================================================
--- a/chrome/ext/background.js
+++ b/chrome/ext/background.js
@@ -518,19 +518,20 @@
// Migrate localStorage to chrome.storage.local,
// ignoring unkown and inavlid preferences.
- migratePrefs: function(mapFunc)
+ migratePrefs: function(hooks)
{
var items = {};
for (let key in localStorage)
{
- var item = mapFunc(key, localStorage[key]);
+ var item = hooks.map(key, localStorage[key]);
if (item)
items[item.key] = item.value;
}
chrome.storage.local.set(items, function() {
localStorage.clear();
+ hooks.done();
});
},

Powered by Google App Engine
This is Rietveld