diff options
author | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-09 22:15:06 +0000 |
---|---|---|
committer | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-09 22:15:06 +0000 |
commit | 062c625092d733875cc37706769b60c636f314ec (patch) | |
tree | 49c59a2a49ce879312dd10d4a880c919a2bfe90b /webkit/quota | |
parent | 76a5e002ec3f398702fa73ce54badaded5b36fce (diff) | |
download | chromium_src-062c625092d733875cc37706769b60c636f314ec.zip chromium_src-062c625092d733875cc37706769b60c636f314ec.tar.gz chromium_src-062c625092d733875cc37706769b60c636f314ec.tar.bz2 |
Revert r84649 and r84671: "Move MockQuotaManager out of anonymous namespace to
fix build" and "Notify the quota manager when write operation is made in
FileSystem API."
FileSystemExtensionApiTest.FileBrowserTest is consistently crashing on chrome OS.
TBR=kinuko
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84699 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, 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>; |