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

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

Issue 3599011: Add truncate and cancel for FileWriter; write and tests will come in later CL... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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
« no previous file with comments | « base/file_util_proxy.cc ('k') | chrome/common/file_system/file_system_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
« no previous file with comments | « base/file_util_proxy.cc ('k') | chrome/common/file_system/file_system_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698