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

Unified Diff: webkit/fileapi/file_system_context.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: Fixed bug where OK return code wasn't returned upon success 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/file_system_context.cc
diff --git a/webkit/fileapi/file_system_context.cc b/webkit/fileapi/file_system_context.cc
index b28d893caa20578446e59f846eb48bb6ae5c40bb..6cad07292ca4d51afce84329d0ddfed44277d251 100644
--- a/webkit/fileapi/file_system_context.cc
+++ b/webkit/fileapi/file_system_context.cc
@@ -183,19 +183,29 @@ void FileSystemContext::DeleteFileSystem(
}
FileSystemOperation* FileSystemContext::CreateFileSystemOperation(
- const FileSystemURL& url) {
- if (!url.is_valid())
+ const FileSystemURL& url, PlatformFileError* error_code) {
+ if (!url.is_valid()) {
+ if (error_code)
+ *error_code = base::PLATFORM_FILE_ERROR_INVALID_URL;
return NULL;
+ }
FileSystemMountPointProvider* mount_point_provider =
GetMountPointProvider(url.type());
- if (!mount_point_provider)
+ if (!mount_point_provider) {
+ if (error_code)
+ *error_code = base::PLATFORM_FILE_ERROR_FAILED;
return NULL;
+ }
+
+ if (error_code)
+ *error_code = base::PLATFORM_FILE_OK;
return mount_point_provider->CreateFileSystemOperation(url, this);
}
webkit_blob::FileStreamReader* FileSystemContext::CreateFileStreamReader(
const FileSystemURL& url,
int64 offset) {
+
kinuko 2012/09/06 09:15:10 nit: please remove this empty line
calvinlo 2012/09/06 11:19:32 Done.
if (!url.is_valid())
return NULL;
FileSystemMountPointProvider* mount_point_provider =

Powered by Google App Engine
This is Rietveld 408576698