| Index: webkit/fileapi/sandbox_mount_point_provider.cc
|
| diff --git a/webkit/fileapi/sandbox_mount_point_provider.cc b/webkit/fileapi/sandbox_mount_point_provider.cc
|
| index ab7b158eb3a7b9d38737979ef40669688579d8d6..1734da4a4696738fa56feb73e46063abf46c2086 100644
|
| --- a/webkit/fileapi/sandbox_mount_point_provider.cc
|
| +++ b/webkit/fileapi/sandbox_mount_point_provider.cc
|
| @@ -297,7 +297,7 @@ void ValidateRootOnFileThread(
|
| FilePath root_path =
|
| file_util->GetDirectoryForOriginAndType(
|
| origin_url, type, create, error_ptr);
|
| - if (root_path.empty()) {
|
| + if (*error_ptr != base::PLATFORM_FILE_OK) {
|
| UMA_HISTOGRAM_ENUMERATION(kOpenFileSystemLabel,
|
| kCreateDirectoryError,
|
| kFileSystemErrorMax);
|
| @@ -386,10 +386,7 @@ SandboxMountPointProvider::GetFileSystemRootPathOnFileThread(
|
| if (!IsAllowedScheme(origin_url))
|
| return FilePath();
|
|
|
| - MigrateIfNeeded(sandbox_file_util_.get(), old_base_path());
|
| -
|
| - return sandbox_file_util_->GetDirectoryForOriginAndType(
|
| - origin_url, type, create);
|
| + return GetBaseDirectoryForOriginAndType(origin_url, type, create);
|
| }
|
|
|
| bool SandboxMountPointProvider::IsAccessAllowed(const GURL& origin_url,
|
| @@ -482,8 +479,12 @@ FilePath SandboxMountPointProvider::GetBaseDirectoryForOriginAndType(
|
|
|
| MigrateIfNeeded(sandbox_file_util_.get(), old_base_path());
|
|
|
| - return sandbox_file_util_->GetDirectoryForOriginAndType(
|
| - origin_url, type, create);
|
| + base::PlatformFileError error = base::PLATFORM_FILE_OK;
|
| + FilePath path = sandbox_file_util_->GetDirectoryForOriginAndType(
|
| + origin_url, type, create, &error);
|
| + if (error != base::PLATFORM_FILE_OK)
|
| + return FilePath();
|
| + return path;
|
| }
|
|
|
| bool SandboxMountPointProvider::DeleteOriginDataOnFileThread(
|
|
|