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

Unified Diff: webkit/fileapi/local_file_system_operation.cc

Issue 14265022: [Quota][FileAPI] Add quota policy to FileSystemOperationContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: drop unused #include Created 7 years, 8 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_operation_context.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()),
« no previous file with comments | « webkit/fileapi/file_system_operation_context.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698