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

Unified Diff: content/common/fileapi/file_system_dispatcher.cc

Issue 12084077: FileSystem mods: Changes to snapshot file creation to remove dependencies on blobs. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 10 months 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
« no previous file with comments | « content/common/fileapi/file_system_dispatcher.h ('k') | content/common/fileapi/file_system_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/fileapi/file_system_dispatcher.cc
===================================================================
--- content/common/fileapi/file_system_dispatcher.cc (revision 182366)
+++ content/common/fileapi/file_system_dispatcher.cc (working copy)
@@ -251,12 +251,25 @@
}
bool FileSystemDispatcher::CreateSnapshotFile(
+ const GURL& file_path,
+ fileapi::FileSystemCallbackDispatcher* dispatcher) {
+ int request_id = dispatchers_.Add(dispatcher);
+ if (!ChildThread::current()->Send(
+ new FileSystemHostMsg_CreateSnapshotFile(
+ request_id, file_path))) {
+ dispatchers_.Remove(request_id); // destroys |dispatcher|
+ return false;
+ }
+ return true;
+}
+
+bool FileSystemDispatcher::CreateSnapshotFile_Deprecated(
const GURL& blob_url,
const GURL& file_path,
fileapi::FileSystemCallbackDispatcher* dispatcher) {
int request_id = dispatchers_.Add(dispatcher);
if (!ChildThread::current()->Send(
- new FileSystemHostMsg_CreateSnapshotFile(
+ new FileSystemHostMsg_CreateSnapshotFile_Deprecated(
request_id, blob_url, file_path))) {
dispatchers_.Remove(request_id); // destroys |dispatcher|
return false;
@@ -293,6 +306,18 @@
dispatchers_.Remove(request_id);
}
+void FileSystemDispatcher::OnDidCreateSnapshotFile(
+ int request_id, const base::PlatformFileInfo& file_info,
+ const base::FilePath& platform_path) {
+ fileapi::FileSystemCallbackDispatcher* dispatcher =
+ dispatchers_.Lookup(request_id);
+ DCHECK(dispatcher);
+ dispatcher->DidCreateSnapshotFile(file_info, platform_path);
+ dispatchers_.Remove(request_id);
+ ChildThread::current()->Send(
+ new FileSystemHostMsg_DidReceiveSnapshotFile(request_id));
+}
+
void FileSystemDispatcher::OnDidReadDirectory(
int request_id,
const std::vector<base::FileUtilProxy::Entry>& entries,
« no previous file with comments | « content/common/fileapi/file_system_dispatcher.h ('k') | content/common/fileapi/file_system_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698