Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1006)

Unified Diff: webkit/tools/test_shell/simple_file_writer.cc

Issue 8999017: Add CreateFileSystemOperation() method to FileSystemContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased from patch 9016020 Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/tools/test_shell/simple_file_writer.cc
diff --git a/webkit/tools/test_shell/simple_file_writer.cc b/webkit/tools/test_shell/simple_file_writer.cc
index b90dc81e177b2fd6aa1aefaf61b3222f6bf12832..220c4965bd140486850371f3ce4b98f4c28f8a9e 100644
--- a/webkit/tools/test_shell/simple_file_writer.cc
+++ b/webkit/tools/test_shell/simple_file_writer.cc
@@ -10,13 +10,13 @@
#include "net/url_request/url_request_context.h"
#include "webkit/fileapi/file_system_callback_dispatcher.h"
#include "webkit/fileapi/file_system_context.h"
-#include "webkit/fileapi/file_system_operation.h"
+#include "webkit/fileapi/file_system_operation_interface.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
using fileapi::FileSystemCallbackDispatcher;
using fileapi::FileSystemContext;
-using fileapi::FileSystemOperation;
+using fileapi::FileSystemOperationInterface;
using fileapi::WebFileWriterBase;
using WebKit::WebFileWriterClient;
using WebKit::WebString;
@@ -52,7 +52,7 @@ class SimpleFileWriter::IOThreadProxy
return;
}
DCHECK(!operation_);
- operation_ = GetNewOperation();
+ operation_ = GetNewOperation(path);
operation_->Truncate(path, offset);
}
@@ -65,7 +65,7 @@ class SimpleFileWriter::IOThreadProxy
}
DCHECK(request_context_);
DCHECK(!operation_);
- operation_ = GetNewOperation();
+ operation_ = GetNewOperation(path);
operation_->Write(request_context_, path, blob_url, offset);
}
@@ -127,10 +127,10 @@ class SimpleFileWriter::IOThreadProxy
scoped_refptr<IOThreadProxy> proxy_;
};
- FileSystemOperation* GetNewOperation() {
+ FileSystemOperationInterface* GetNewOperation(const GURL& path) {
// The FileSystemOperation takes ownership of the CallbackDispatcher.
- return new FileSystemOperation(new CallbackDispatcher(this),
- io_thread_, file_system_context_.get());
+ return file_system_context_->CreateFileSystemOperation(
+ path, new CallbackDispatcher(this), io_thread_);
}
void DidSucceed() {
@@ -178,7 +178,7 @@ class SimpleFileWriter::IOThreadProxy
base::WeakPtr<SimpleFileWriter> simple_writer_;
// Only used on the io thread.
- FileSystemOperation* operation_;
+ FileSystemOperationInterface* operation_;
scoped_refptr<FileSystemContext> file_system_context_;
};

Powered by Google App Engine
This is Rietveld 408576698