| 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..04ec7b9ecc3c17a9f68b35c0a551ed652cfc3ec1 100644
|
| --- a/content/browser/fileapi/fileapi_message_filter.cc
|
| +++ b/content/browser/fileapi/fileapi_message_filter.cc
|
| @@ -452,12 +452,26 @@ void FileAPIMessageFilter::OnOpenFile(
|
| return;
|
| }
|
|
|
| + 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());
|
| +
|
| + if (quota_manager_proxy->quota_manager()->IsStorageUnlimited(
|
| + url.origin(), FileSystemTypeToQuotaStorageType(url.type()))) {
|
| + quota_policy = quota::kQuotaLimitTypeUnlimited;
|
| + } else {
|
| + quota_policy = quota::kQuotaLimitTypeLimited;
|
| + }
|
| +
|
| FileSystemOperation* operation = GetNewOperation(url, request_id);
|
| if (!operation)
|
| return;
|
| operation->OpenFile(
|
| url, file_flags, peer_handle(),
|
| - base::Bind(&FileAPIMessageFilter::DidOpenFile, this, request_id, path));
|
| + base::Bind(&FileAPIMessageFilter::DidOpenFile, this, request_id, path,
|
| + quota_policy));
|
| }
|
|
|
| void FileAPIMessageFilter::OnNotifyCloseFile(const GURL& path) {
|
| @@ -655,6 +669,7 @@ void FileAPIMessageFilter::DidReadDirectory(
|
|
|
| void FileAPIMessageFilter::DidOpenFile(int request_id,
|
| const GURL& path,
|
| + quota::QuotaLimitType quota_policy,
|
| base::PlatformFileError result,
|
| base::PlatformFile file,
|
| base::ProcessHandle peer_handle) {
|
| @@ -665,19 +680,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));
|
|
|