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

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

Issue 11410019: ********** Chromium Blob hacking (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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: 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,

Powered by Google App Engine
This is Rietveld 408576698