Index: content/common/fileapi/file_system_dispatcher.cc |
=================================================================== |
--- content/common/fileapi/file_system_dispatcher.cc (revision 171309) |
+++ content/common/fileapi/file_system_dispatcher.cc (working copy) |
@@ -185,13 +185,13 @@ |
bool FileSystemDispatcher::Write( |
const GURL& path, |
- const GURL& blob_url, |
+ const std::string& blob_uuid, |
int64 offset, |
int* request_id_out, |
fileapi::FileSystemCallbackDispatcher* dispatcher) { |
int request_id = dispatchers_.Add(dispatcher); |
if (!ChildThread::current()->Send( |
- new FileSystemHostMsg_Write(request_id, path, blob_url, offset))) { |
+ new FileSystemHostMsg_Write(request_id, path, blob_uuid, offset))) { |
dispatchers_.Remove(request_id); // destroys |dispatcher| |
return false; |
} |
@@ -251,13 +251,12 @@ |
} |
bool FileSystemDispatcher::CreateSnapshotFile( |
- const GURL& blob_url, |
const GURL& file_path, |
fileapi::FileSystemCallbackDispatcher* dispatcher) { |
int request_id = dispatchers_.Add(dispatcher); |
if (!ChildThread::current()->Send( |
new FileSystemHostMsg_CreateSnapshotFile( |
- request_id, blob_url, file_path))) { |
+ request_id, file_path))) { |
dispatchers_.Remove(request_id); // destroys |dispatcher| |
return false; |
} |
@@ -293,6 +292,18 @@ |
dispatchers_.Remove(request_id); |
} |
+void FileSystemDispatcher::OnDidCreateSnapshotFile( |
+ int request_id, const base::PlatformFileInfo& file_info, |
+ const 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, |