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

Unified Diff: content/browser/fileapi/fileapi_message_filter.cc

Issue 14265022: [Quota][FileAPI] Add quota policy to FileSystemOperationContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: drop .gitmodule change 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
Index: content/browser/fileapi/fileapi_message_filter.cc
diff --git a/content/browser/fileapi/fileapi_message_filter.cc b/content/browser/fileapi/fileapi_message_filter.cc
index d735e312d8e7da80effd8068bcb697c98ca26f8f..4d220d4d21786655e4b76454b0a2237345ff652e 100644
--- a/content/browser/fileapi/fileapi_message_filter.cc
+++ b/content/browser/fileapi/fileapi_message_filter.cc
@@ -657,7 +657,8 @@ void FileAPIMessageFilter::DidOpenFile(int request_id,
const GURL& path,
base::PlatformFileError result,
base::PlatformFile file,
- base::ProcessHandle peer_handle) {
+ base::ProcessHandle peer_handle,
+ quota::QuotaLimitType quota_policy) {
if (result == base::PLATFORM_FILE_OK) {
IPC::PlatformFileForTransit file_for_transit =
file != base::kInvalidPlatformFileValue ?
@@ -665,19 +666,6 @@ void FileAPIMessageFilter::DidOpenFile(int request_id,
IPC::InvalidPlatformFileForTransit();
open_filesystem_urls_.insert(path);
- quota::QuotaLimitType quota_policy = quota::kQuotaLimitTypeUnknown;
- quota::QuotaManagerProxy* quota_manager_proxy =
- context_->quota_manager_proxy();
- CHECK(quota_manager_proxy);
- CHECK(quota_manager_proxy->quota_manager());
- FileSystemURL url = context_->CrackURL(path);
- if (quota_manager_proxy->quota_manager()->IsStorageUnlimited(
- url.origin(), FileSystemTypeToQuotaStorageType(url.type()))) {
- quota_policy = quota::kQuotaLimitTypeUnlimited;
- } else {
- quota_policy = quota::kQuotaLimitTypeLimited;
- }
-
Send(new FileSystemMsg_DidOpenFile(request_id,
file_for_transit,
quota_policy));

Powered by Google App Engine
This is Rietveld 408576698