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

Unified Diff: webkit/fileapi/sandbox_file_stream_writer.cc

Issue 10920087: Update callers of CreateFileSystemOperation so more detailed error codes can be returned. Where app… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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: webkit/fileapi/sandbox_file_stream_writer.cc
diff --git a/webkit/fileapi/sandbox_file_stream_writer.cc b/webkit/fileapi/sandbox_file_stream_writer.cc
index 01b44d4b74fcd8fa93486f156b27a81b22515a54..f3ad146b39df862e22301c8e647aaaff7be79b7f 100644
--- a/webkit/fileapi/sandbox_file_stream_writer.cc
+++ b/webkit/fileapi/sandbox_file_stream_writer.cc
@@ -67,8 +67,12 @@ int SandboxFileStreamWriter::Write(
if (local_file_writer_.get())
return WriteInternal(buf, buf_len, callback);
+ base::PlatformFileError error_code;
FileSystemOperation* operation =
- file_system_context_->CreateFileSystemOperation(url_);
+ file_system_context_->CreateFileSystemOperation(url_, &error_code);
+ if (error_code != base::PLATFORM_FILE_OK)
+ return net::PlatformFileErrorToNetError(error_code);
+
DCHECK(operation);
net::CompletionCallback write_task =
base::Bind(&SandboxFileStreamWriter::DidInitializeForWrite,

Powered by Google App Engine
This is Rietveld 408576698