diff options
author | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-04 20:01:37 +0000 |
---|---|---|
committer | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-04 20:01:37 +0000 |
commit | bae3069e31b61b1555f65272ec8973b2f4c56df5 (patch) | |
tree | 6edca4e598e62e1bbc87fc0a96ba99293d103686 /webkit/appcache/appcache_storage.h | |
parent | 5fd7738372b76c4a1951e6b842e6387cd09d2521 (diff) | |
download | chromium_src-bae3069e31b61b1555f65272ec8973b2f4c56df5.zip chromium_src-bae3069e31b61b1555f65272ec8973b2f4c56df5.tar.gz chromium_src-bae3069e31b61b1555f65272ec8973b2f4c56df5.tar.bz2 |
AppCache: Provide a way to override the default quota for an origin. The intent is to use this to support the 'unlimited_storage' privilege of Chrome Applications.
BUG=49993
TEST=AppCacheStorageImplTest.FailStoreGroup
Review URL: http://codereview.chromium.org/3083014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54949 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/appcache_storage.h')
-rw-r--r-- | webkit/appcache/appcache_storage.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/webkit/appcache/appcache_storage.h b/webkit/appcache/appcache_storage.h index 9b6596c..559237c 100644 --- a/webkit/appcache/appcache_storage.h +++ b/webkit/appcache/appcache_storage.h @@ -167,6 +167,11 @@ class AppCacheStorage { virtual void PurgeMemory() = 0; + // Maintain a collection of quota overrides in memory. + void SetOriginQuotaInMemory(const GURL& origin, int64 quota); + void ResetOriginQuotaInMemory(const GURL& origin); + int64 GetOriginQuotaInMemory(const GURL& origin); + // Generates unique storage ids for different object types. int64 NewCacheId() { return ++last_cache_id_; @@ -284,6 +289,11 @@ class AppCacheStorage { return ++last_response_id_; } + // Store quotas for extensions in memory, in order to prevent writing a row + // to quota_table_ every time an extention is loaded. + typedef std::map<GURL, int64> QuotaMap; + QuotaMap in_memory_quotas_; + // The last storage id used for different object types. int64 last_cache_id_; int64 last_group_id_; |