diff options
author | dumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-27 01:22:44 +0000 |
---|---|---|
committer | dumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-27 01:22:44 +0000 |
commit | 24b538ac49c0283fe6475f00aaab5bdc76b9f11c (patch) | |
tree | f1ff81c7810283b35660f223f2a2b91785468fd9 /webkit/database/database_tracker.h | |
parent | 5cce744c391924ef39aca8c2f9b27e377a69b464 (diff) | |
download | chromium_src-24b538ac49c0283fe6475f00aaab5bdc76b9f11c.zip chromium_src-24b538ac49c0283fe6475f00aaab5bdc76b9f11c.tar.gz chromium_src-24b538ac49c0283fe6475f00aaab5bdc76b9f11c.tar.bz2 |
Reset the default quota limit for extensions to 5MB, but add a
unlimited_quota permission that extensions can use to request
unlimited quota.
TEST=ExtensionsServiceTest.StorageQuota
BUG=27688
Review URL: http://codereview.chromium.org/660113
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40190 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/database/database_tracker.h')
-rw-r--r-- | webkit/database/database_tracker.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/webkit/database/database_tracker.h b/webkit/database/database_tracker.h index 785cd98..90c9ebc 100644 --- a/webkit/database/database_tracker.h +++ b/webkit/database/database_tracker.h @@ -124,7 +124,10 @@ class DatabaseTracker bool GetAllOriginsInfo(std::vector<OriginInfo>* origins_info); void SetOriginQuota(const string16& origin_identifier, int64 new_quota); + void SetOriginQuotaInMemory(const string16& origin_identifier, + int64 new_quota); + int64 GetDefaultQuota() { return default_quota_; } // Sets the default quota for all origins. Should be used in tests only. void SetDefaultQuota(int64 quota); @@ -216,6 +219,10 @@ class DatabaseTracker // Default quota for all origins; changed only by tests int64 default_quota_; + // Store quotas for extensions in memory, in order to prevent writing a row + // to quota_table_ every time an extention is loaded. + std::map<string16, int64> in_memory_quotas_; + FRIEND_TEST(DatabaseTrackerTest, TestIt); }; |