Index: chrome/browser/file_system/file_system_dispatcher_host.cc |
=================================================================== |
--- chrome/browser/file_system/file_system_dispatcher_host.cc (revision 61078) |
+++ chrome/browser/file_system/file_system_dispatcher_host.cc (working copy) |
@@ -238,9 +238,11 @@ |
fileapi::FileSystemOperation* write = |
operations_.Lookup(request_id_to_cancel); |
if (write) { |
- write->Cancel(); |
- Send(new ViewMsg_FileSystem_DidSucceed(request_id)); |
+ // The cancel will eventually send both the write failure and the cancel |
+ // success. |
+ write->Cancel(GetNewOperation(request_id)); |
} else { |
+ // The write already finished; report that we failed to stop it. |
Send(new ViewMsg_FileSystem_DidFail( |
request_id, base::PLATFORM_FILE_ERROR_INVALID_OPERATION)); |
} |