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(); |
}); |
}, |