diff options
author | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-09 18:43:19 +0000 |
---|---|---|
committer | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-09 18:43:19 +0000 |
commit | 3277ef148b7c7975ec2b75b0bb18a1deef5ec85b (patch) | |
tree | 9f7e7f1fcf0d39c3697bf72cc30b1eecc3fa9ada /webkit/quota | |
parent | cc3c7c09ea79fea70a7db1a083018fc9781b1a57 (diff) | |
download | chromium_src-3277ef148b7c7975ec2b75b0bb18a1deef5ec85b.zip chromium_src-3277ef148b7c7975ec2b75b0bb18a1deef5ec85b.tar.gz chromium_src-3277ef148b7c7975ec2b75b0bb18a1deef5ec85b.tar.bz2 |
Notify the quota manager when write operation is made in FileSystem API.
BUG=74841
TEST=QuotaFileUtilTest.*
Review URL: http://codereview.chromium.org/6903067
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84649 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/quota')
-rw-r--r-- | webkit/quota/quota_database_unittest.cc | 15 | ||||
-rw-r--r-- | webkit/quota/quota_manager.h | 24 |
2 files changed, 13 insertions, 26 deletions
diff --git a/webkit/quota/quota_database_unittest.cc b/webkit/quota/quota_database_unittest.cc index ccbe74f..5e2f2d6 100644 --- a/webkit/quota/quota_database_unittest.cc +++ b/webkit/quota/quota_database_unittest.cc @@ -10,21 +10,6 @@ #include "googleurl/src/gurl.h" #include "webkit/quota/quota_database.h" -namespace { - -const base::Time kZeroTime; - -class TestErrorDelegate : public sql::ErrorDelegate { - public: - virtual ~TestErrorDelegate() { } - virtual int OnError( - int error, sql::Connection* connection, sql::Statement* stmt) { - return error; - } -}; - -} // namespace - namespace quota { TEST(QuotaDatabaseTest, LazyOpen) { diff --git a/webkit/quota/quota_manager.h b/webkit/quota/quota_manager.h index eb8d70f..949f1e2 100644 --- a/webkit/quota/quota_manager.h +++ b/webkit/quota/quota_manager.h @@ -81,6 +81,16 @@ class QuotaManager : public QuotaTaskObserver, const static int64 kIncognitoDefaultTemporaryQuota; + protected: + // Called by clients via proxy. + // QuotaClients must call this method whenever they have made any + // modifications that change the amount of data stored in their storage. + // This method is declared as virtual only to allow test code to override. + virtual void NotifyStorageModified(QuotaClient::ID client_id, + const GURL& origin, + StorageType type, + int64 delta); + private: class InitializeTask; class TemporaryGlobalQuotaUpdateTask; @@ -107,14 +117,6 @@ class QuotaManager : public QuotaTaskObserver, // The client must remain valid until OnQuotaManagerDestored is called. void RegisterClient(QuotaClient* client); - // Called by clients via proxy. - // QuotaClients must call this method whenever they have made any - // modifications that change the amount of data stored in their storage. - void NotifyStorageModified(QuotaClient::ID client_id, - const GURL& origin, - StorageType type, - int64 delta); - UsageTracker* GetUsageTracker(StorageType type) const; void DidGetTemporaryGlobalQuota(int64 quota); @@ -160,9 +162,9 @@ class QuotaManagerProxy public: void RegisterClient(QuotaClient* client); void NotifyStorageModified(QuotaClient::ID client_id, - const GURL& origin, - StorageType type, - int64 delta); + const GURL& origin, + StorageType type, + int64 delta); private: friend class QuotaManager; friend class base::RefCountedThreadSafe<QuotaManagerProxy>; |