Chromium Code Reviews| 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 = |