diff options
author | hidehiko@chromium.org <hidehiko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-27 14:39:32 +0000 |
---|---|---|
committer | hidehiko@chromium.org <hidehiko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-27 14:39:32 +0000 |
commit | db35109625b2deb56899389d381003aa07448e6c (patch) | |
tree | 297680747cc2240f3b210f5f87184087e3a4f292 /webkit/browser/fileapi/local_file_system_operation.cc | |
parent | 15ce384fde9be34c54a15fcf784c229ce3a236e6 (diff) | |
download | chromium_src-db35109625b2deb56899389d381003aa07448e6c.zip chromium_src-db35109625b2deb56899389d381003aa07448e6c.tar.gz chromium_src-db35109625b2deb56899389d381003aa07448e6c.tar.bz2 |
Let LocalFileSystemOperation::SyncGetPlatformPath failed if context returns NULL for GetFileUtil.
This is a part of {Local,Remote}FileSystemOperation merging. After the merging
the context may not support GetFileUtil(). In such a case, lets the method fail.
Returned error code should be the same one for the current
RemoteFileSystemOperation case.
BUG=110121
TEST=Ran unit_tests
Review URL: https://chromiumcodereview.appspot.com/18016002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208918 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/browser/fileapi/local_file_system_operation.cc')
-rw-r--r-- | webkit/browser/fileapi/local_file_system_operation.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/webkit/browser/fileapi/local_file_system_operation.cc b/webkit/browser/fileapi/local_file_system_operation.cc index 4d5aec4..8e5287f 100644 --- a/webkit/browser/fileapi/local_file_system_operation.cc +++ b/webkit/browser/fileapi/local_file_system_operation.cc @@ -239,14 +239,16 @@ LocalFileSystemOperation::AsLocalFileSystemOperation() { return this; } -void LocalFileSystemOperation::SyncGetPlatformPath( +base::PlatformFileError LocalFileSystemOperation::SyncGetPlatformPath( const FileSystemURL& url, base::FilePath* platform_path) { DCHECK(SetPendingOperationType(kOperationGetLocalPath)); FileSystemFileUtil* file_util = file_system_context()->GetFileUtil( url.type()); - DCHECK(file_util); + if (!file_util) + return base::PLATFORM_FILE_ERROR_INVALID_OPERATION; file_util->GetLocalFilePath(operation_context_.get(), url, platform_path); + return base::PLATFORM_FILE_OK; } void LocalFileSystemOperation::CreateSnapshotFile( |