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

Unified Diff: background.js

Issue 5719985141841920: issue #331 - Remove localStorage to FileSystem migration code (Closed)
Patch Set: Created Aug. 14, 2014, 3:46 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 | « no previous file | lib/filesystem/io.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: background.js
===================================================================
--- a/background.js
+++ b/background.js
@@ -59,8 +59,6 @@
{
if (action == "load")
{
- var importingOldData = importOldData();
-
var addonVersion = require("info").addonVersion;
var prevVersion = ext.storage.currentVersion;
@@ -75,8 +73,7 @@
{
seenDataCorruption = prevVersion && FilterStorage.firstRun;
ext.storage.currentVersion = addonVersion;
- if (!importingOldData)
- addSubscription(prevVersion);
+ addSubscription(prevVersion);
}
if (canUseChromeNotifications)
@@ -153,30 +150,6 @@
}
/**
- * Old versions for Opera stored patterns.ini in the localStorage object, this
- * will import it into FilterStorage properly.
- * @return {Boolean} true if data import is in progress
- */
-function importOldData()
-{
- if ("patterns.ini" in localStorage)
- {
- FilterStorage.loadFromDisk(localStorage["patterns.ini"]);
-
- var remove = [];
- for (var key in localStorage)
- if (key.indexOf("patterns.ini") == 0 || key.indexOf("patterns-backup") == 0)
- remove.push(key);
- for (var i = 0; i < remove.length; i++)
- delete localStorage[remove[i]];
-
- return true;
- }
- else
- return false;
-}
-
-/**
* This function is called on an extension update. It will add the default
* filter subscription if necessary.
*/
« no previous file with comments | « no previous file | lib/filesystem/io.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld