Chromium Code Reviews| Index: webkit/fileapi/local_file_system_operation.cc |
| diff --git a/webkit/fileapi/local_file_system_operation.cc b/webkit/fileapi/local_file_system_operation.cc |
| index 1bd0e521ad7e0d225328cfff44e74122a8cbaa1d..03514990c8e42769990795bc73c7b7ac160d4d74 100644 |
| --- a/webkit/fileapi/local_file_system_operation.cc |
| +++ b/webkit/fileapi/local_file_system_operation.cc |
| @@ -331,7 +331,8 @@ void LocalFileSystemOperation::OpenFile(const FileSystemURL& url, |
| (base::PLATFORM_FILE_ENUMERATE | base::PLATFORM_FILE_TEMPORARY | |
| base::PLATFORM_FILE_HIDDEN))) { |
| callback.Run(base::PLATFORM_FILE_ERROR_FAILED, |
| - base::PlatformFile(), base::ProcessHandle()); |
| + base::kInvalidPlatformFileValue, |
| + base::kNullProcessHandle); |
| return; |
| } |
| if (file_flags & |
| @@ -342,13 +343,17 @@ void LocalFileSystemOperation::OpenFile(const FileSystemURL& url, |
| base::PLATFORM_FILE_WRITE_ATTRIBUTES)) { |
| base::PlatformFileError result = SetUp(url, OPERATION_MODE_WRITE); |
| if (result != base::PLATFORM_FILE_OK) { |
| - callback.Run(result, base::PlatformFile(), base::ProcessHandle()); |
| + callback.Run(result, |
| + base::kInvalidPlatformFileValue, |
| + base::kNullProcessHandle); |
| return; |
| } |
| } else { |
| base::PlatformFileError result = SetUp(url, OPERATION_MODE_READ); |
| if (result != base::PLATFORM_FILE_OK) { |
| - callback.Run(result, base::PlatformFile(), base::ProcessHandle()); |
| + callback.Run(result, |
| + base::kInvalidPlatformFileValue, |
| + base::kNullProcessHandle); |
| return; |
| } |
| } |
| @@ -562,12 +567,21 @@ void LocalFileSystemOperation::GetUsageAndQuotaThenRunTask( |
| // If we don't have the quota manager or the requested filesystem type |
| // does not support quota, we should be able to let it go. |
| operation_context()->set_allowed_bytes_growth(kint64max); |
| + operation_context()->set_quota_limit_type(quota::kQuotaLimitTypeUnlimited); |
| task.Run(); |
| return; |
| } |
| DCHECK(quota_manager_proxy); |
| DCHECK(quota_manager_proxy->quota_manager()); |
| + if (quota_manager_proxy->quota_manager()->IsStorageUnlimited( |
| + url.origin(), |
| + FileSystemTypeToQuotaStorageType(url.type()))) { |
| + operation_context()->set_quota_limit_type(quota::kQuotaLimitTypeUnlimited); |
| + } else { |
| + operation_context()->set_quota_limit_type(quota::kQuotaLimitTypeLimited); |
| + } |
|
kinuko
2013/04/26 07:00:25
Can we do this in SandboxMountPointProvider::Creat
tzik
2013/04/26 07:17:59
Done.
|
| + |
| quota_manager_proxy->quota_manager()->GetUsageAndQuota( |
| url.origin(), |
| FileSystemTypeToQuotaStorageType(url.type()), |