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

Unified Diff: lib/filesystem/io.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 | « background.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/filesystem/io.js
===================================================================
--- a/lib/filesystem/io.js
+++ b/lib/filesystem/io.js
@@ -50,21 +50,6 @@
readFromFile: function(file, listener, callback, timeLineID)
{
- // Hack to allow importing old data
- if (typeof file == "string")
- {
- var Utils = require("utils").Utils;
- Utils.runAsync(function()
- {
- var lines = file.split(/[\r\n]+/);
- for (var i = 0; i < lines.length; i++)
- listener.process(lines[i]);
- listener.process(null);
- callback(null);
- }.bind(this));
- return;
- }
-
this._getFileEntry(file, false, function(fs, fileEntry)
{
fileEntry.file(function(file)
@@ -180,19 +165,6 @@
statFile: function(file, callback)
{
- // Hack to allow importing old data
- if (typeof file == "string")
- {
- var Utils = require("utils").Utils;
- Utils.runAsync(callback.bind(null, null, {
- exists: true,
- isDirectory: false,
- isFile: true,
- lastModified: 0
- }));
- return;
- }
-
// This needs to use Utils.runAsync(), otherwise FilterStorage might
// initialize too early - see #337.
require("utils").Utils.runAsync(function() {
« no previous file with comments | « background.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld