summaryrefslogtreecommitdiffstats
path: root/webkit/quota
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/quota')
-rw-r--r--webkit/quota/quota_database_unittest.cc15
-rw-r--r--webkit/quota/quota_manager.h24
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>;