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

Unified Diff: content/browser/file_system/file_system_dispatcher_host.cc

Issue 9016020: Cleanup FileSystemOperation for preparing for adding FSO-factory method (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more cleanup around ValidateFileSystemRoot 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: content/browser/file_system/file_system_dispatcher_host.cc
diff --git a/content/browser/file_system/file_system_dispatcher_host.cc b/content/browser/file_system/file_system_dispatcher_host.cc
index 7034be2806940199b9bfae98af950f3dfb56f980..3f75e343ad18d66bf1f2fca194ff0c0d650b9528 100644
--- a/content/browser/file_system/file_system_dispatcher_host.cc
+++ b/content/browser/file_system/file_system_dispatcher_host.cc
@@ -30,7 +30,6 @@ using content::UserMetricsAction;
using fileapi::FileSystemCallbackDispatcher;
using fileapi::FileSystemFileUtil;
using fileapi::FileSystemOperation;
-using fileapi::FileSystemOperationContext;
class BrowserFileSystemCallbackDispatcher
: public FileSystemCallbackDispatcher {
@@ -171,7 +170,9 @@ void FileSystemDispatcherHost::OnOpen(
} else if (type == fileapi::kFileSystemTypePersistent) {
content::RecordAction(UserMetricsAction("OpenFileSystemPersistent"));
}
- GetNewOperation(request_id)->OpenFileSystem(origin_url, type, create);
+ context_->OpenFileSystem(origin_url, type, create,
+ new BrowserFileSystemCallbackDispatcher(
+ this, request_id));
}
void FileSystemDispatcherHost::OnMove(
@@ -254,7 +255,7 @@ void FileSystemDispatcherHost::OnCancel(
if (write) {
// The cancel will eventually send both the write failure and the cancel
// success.
- write->Cancel(GetNewOperation(request_id));
+ write->Cancel(new BrowserFileSystemCallbackDispatcher(this, request_id));
} else {
// The write already finished; report that we failed to stop it.
Send(new FileSystemMsg_DidFail(
@@ -318,6 +319,5 @@ FileSystemOperation* FileSystemDispatcherHost::GetNewOperation(
}
void FileSystemDispatcherHost::UnregisterOperation(int request_id) {
- DCHECK(operations_.Lookup(request_id));
operations_.Remove(request_id);
}

Powered by Google App Engine
This is Rietveld 408576698