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

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

Issue 19387002: Implement Worker-MainThread bridge for FileSystem API in Chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 5 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
Index: content/child/fileapi/file_system_dispatcher.cc
diff --git a/content/child/fileapi/file_system_dispatcher.cc b/content/child/fileapi/file_system_dispatcher.cc
index f2ba52745a071e004d1df645c52b2d886bcd6d7f..b7a13671cfeecb823528696e605368be8b352c83 100644
--- a/content/child/fileapi/file_system_dispatcher.cc
+++ b/content/child/fileapi/file_system_dispatcher.cc
@@ -6,6 +6,7 @@
#include "base/callback.h"
#include "base/file_util.h"
+#include "base/message_loop/message_loop_proxy.h"
#include "base/process/process.h"
#include "content/child/child_thread.h"
#include "content/common/fileapi/file_system_messages.h"
@@ -88,8 +89,9 @@ class FileSystemDispatcher::CallbackDispatcher {
void DidCreateSnapshotFile(
const base::PlatformFileInfo& file_info,
- const base::FilePath& platform_path) {
- snapshot_callback_.Run(file_info, platform_path);
+ const base::FilePath& platform_path,
+ int request_id) {
+ snapshot_callback_.Run(file_info, platform_path, request_id);
}
void DidReadDirectory(
@@ -363,10 +365,8 @@ void FileSystemDispatcher::OnDidCreateSnapshotFile(
const base::FilePath& platform_path) {
CallbackDispatcher* dispatcher = dispatchers_.Lookup(request_id);
DCHECK(dispatcher);
- dispatcher->DidCreateSnapshotFile(file_info, platform_path);
+ dispatcher->DidCreateSnapshotFile(file_info, platform_path, request_id);
dispatchers_.Remove(request_id);
- ChildThread::current()->Send(
- new FileSystemHostMsg_DidReceiveSnapshotFile(request_id));
}
void FileSystemDispatcher::OnDidReadDirectory(
« no previous file with comments | « content/child/fileapi/file_system_dispatcher.h ('k') | content/child/fileapi/webfilesystem_callback_adapters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698