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

Side by Side Diff: lib/filesystem/io.js

Issue 5732725684174848: Use safari.extension.settings instead of localStorage and WebSQL (Closed)
Patch Set: Created March 12, 2014, 2:11 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/ext/background.js ('k') | lib/prefs.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2013 Eyeo GmbH 3 * Copyright (C) 2006-2013 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 return; 65 return;
66 } 66 }
67 67
68 if ("spec" in file && /^defaults\b/.test(file.spec)) 68 if ("spec" in file && /^defaults\b/.test(file.spec))
69 { 69 {
70 // Code attempts to read the default patterns.ini, we don't have that. 70 // Code attempts to read the default patterns.ini, we don't have that.
71 // Make sure to execute first-run actions instead. 71 // Make sure to execute first-run actions instead.
72 var Utils = require("utils").Utils; 72 var Utils = require("utils").Utils;
73 Utils.runAsync(function() 73 Utils.runAsync(function()
74 { 74 {
75 if (localStorage.currentVersion) 75 if (ext.storage.currentVersion)
76 seenDataCorruption = true; 76 seenDataCorruption = true;
77 delete localStorage.currentVersion; 77 delete ext.storage.currentVersion;
78 callback(null); 78 callback(null);
79 }); 79 });
80 return; 80 return;
81 } 81 }
82 82
83 this._getFileEntry(file, false, function(fs, fileEntry) 83 this._getFileEntry(file, false, function(fs, fileEntry)
84 { 84 {
85 fileEntry.file(function(file) 85 fileEntry.file(function(file)
86 { 86 {
87 var reader = new FileReader(); 87 var reader = new FileReader();
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 callback(null, { 208 callback(null, {
209 exists: true, 209 exists: true,
210 isDirectory: fileEntry.isDirectory, 210 isDirectory: fileEntry.isDirectory,
211 isFile: fileEntry.isFile, 211 isFile: fileEntry.isFile,
212 lastModified: metadata.modificationTime.getTime() 212 lastModified: metadata.modificationTime.getTime()
213 }); 213 });
214 }, callback); 214 }, callback);
215 }, callback); 215 }, callback);
216 } 216 }
217 }; 217 };
OLDNEW
« no previous file with comments | « chrome/ext/background.js ('k') | lib/prefs.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld