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

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: Fix compile error 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 2dafb589f2841271341cf92cd0db6485d3286812..a12e00e743293460cc9269fe76503569fd511e7f 100644
--- a/webkit/fileapi/sandbox_file_stream_writer.cc
+++ b/webkit/fileapi/sandbox_file_stream_writer.cc
@@ -66,8 +66,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,
« no previous file with comments | « webkit/fileapi/media/native_media_file_util_unittest.cc ('k') | webkit/tools/test_shell/simple_file_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698