diff options
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, 26 insertions, 13 deletions
diff --git a/webkit/quota/quota_database_unittest.cc b/webkit/quota/quota_database_unittest.cc index 5e2f2d6..ccbe74f 100644 --- a/webkit/quota/quota_database_unittest.cc +++ b/webkit/quota/quota_database_unittest.cc @@ -10,6 +10,21 @@ #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 949f1e2..eb8d70f 100644 --- a/webkit/quota/quota_manager.h +++ b/webkit/quota/quota_manager.h @@ -81,16 +81,6 @@ 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; @@ -117,6 +107,14 @@ 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); @@ -162,9 +160,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>; |