summaryrefslogtreecommitdiffstats
path: root/webkit/appcache/appcache_storage.h
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/appcache/appcache_storage.h')
-rw-r--r--webkit/appcache/appcache_storage.h10
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_;