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

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: 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
« no previous file with comments | « webkit/fileapi/file_system_context.h ('k') | webkit/fileapi/file_system_dir_url_request_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..286f5a85424ae975e8bd134ca90a0ff2279163bb 100644
--- a/webkit/fileapi/file_system_context.cc
+++ b/webkit/fileapi/file_system_context.cc
@@ -183,19 +183,26 @@ 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;
+ }
tzik 2012/09/06 05:59:07 Could you insert below? if (error_code) *error_c
return mount_point_provider->CreateFileSystemOperation(url, this);
}
webkit_blob::FileStreamReader* FileSystemContext::CreateFileStreamReader(
const FileSystemURL& url,
int64 offset) {
+
if (!url.is_valid())
return NULL;
FileSystemMountPointProvider* mount_point_provider =
« no previous file with comments | « webkit/fileapi/file_system_context.h ('k') | webkit/fileapi/file_system_dir_url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698