diff options
author | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-26 00:28:43 +0000 |
---|---|---|
committer | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-26 00:28:43 +0000 |
commit | 19eb8015c483fff874bf1eddb80bd26cf4167f33 (patch) | |
tree | be896411dde17d24eb8dbcd67e7b4c5cad2ef1b6 /webkit/appcache/appcache_storage_impl.cc | |
parent | f02074331bddc7d89b20e6b3a8fb934e6891207c (diff) | |
download | chromium_src-19eb8015c483fff874bf1eddb80bd26cf4167f33.zip chromium_src-19eb8015c483fff874bf1eddb80bd26cf4167f33.tar.gz chromium_src-19eb8015c483fff874bf1eddb80bd26cf4167f33.tar.bz2 |
Add an accessor for an ExtensionSpecialStoragePolicy to the Profile class
and use it in the extension service, data remover, and storage subsystems.
BUG=52357
TEST=extension_service_unittest.cc
Review URL: http://codereview.chromium.org/6551028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76126 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/appcache_storage_impl.cc')
-rw-r--r-- | webkit/appcache/appcache_storage_impl.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/webkit/appcache/appcache_storage_impl.cc b/webkit/appcache/appcache_storage_impl.cc index 8d21105..0f78b77 100644 --- a/webkit/appcache/appcache_storage_impl.cc +++ b/webkit/appcache/appcache_storage_impl.cc @@ -22,6 +22,7 @@ #include "webkit/appcache/appcache_response.h" #include "webkit/appcache/appcache_service.h" #include "webkit/appcache/appcache_thread.h" +#include "webkit/quota/special_storage_policy.h" namespace { // Helper with no return value for use with NewRunnableFunction. @@ -410,8 +411,7 @@ AppCacheStorageImpl::StoreGroupAndCacheTask::StoreGroupAndCacheTask( AppCacheStorageImpl* storage, AppCacheGroup* group, AppCache* newest_cache) : StoreOrLoadTask(storage), group_(group), cache_(newest_cache), success_(false), would_exceed_quota_(false), - quota_override_( - storage->GetOriginQuotaInMemory(group->manifest_url().GetOrigin())) { + quota_override_(-1) { group_record_.group_id = group->group_id(); group_record_.manifest_url = group->manifest_url(); group_record_.origin = group_record_.manifest_url.GetOrigin(); @@ -419,6 +419,12 @@ AppCacheStorageImpl::StoreGroupAndCacheTask::StoreGroupAndCacheTask( group, &cache_record_, &entry_records_, &fallback_namespace_records_, &online_whitelist_records_); + + if (storage->service()->special_storage_policy() && + storage->service()->special_storage_policy()->IsStorageUnlimited( + group_record_.origin)) { + quota_override_ = kint64max; + } } void AppCacheStorageImpl::StoreGroupAndCacheTask::Run() { |