summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-31 08:22:13 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-31 08:22:13 +0000
commit72654a6bdb78772bc94082dd84f0b7facb21dc7e (patch)
treea46e02eca2e9e5dc13c78f5e31df756a499d1058 /webkit
parent29328c606509c3ad53ea52d6c5c212a0f1ae9da0 (diff)
downloadchromium_src-72654a6bdb78772bc94082dd84f0b7facb21dc7e.zip
chromium_src-72654a6bdb78772bc94082dd84f0b7facb21dc7e.tar.gz
chromium_src-72654a6bdb78772bc94082dd84f0b7facb21dc7e.tar.bz2
Always enable quota storage API
BUG=61676 TEST=QuotaManagerTest.* Review URL: http://codereview.chromium.org/7083020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87283 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/quota/quota_manager.cc7
-rw-r--r--webkit/quota/quota_manager.h1
-rw-r--r--webkit/quota/quota_manager_unittest.cc2
3 files changed, 5 insertions, 5 deletions
diff --git a/webkit/quota/quota_manager.cc b/webkit/quota/quota_manager.cc
index 845fdfc..dc530eb 100644
--- a/webkit/quota/quota_manager.cc
+++ b/webkit/quota/quota_manager.cc
@@ -805,6 +805,7 @@ QuotaManager::QuotaManager(bool is_incognito,
proxy_(new QuotaManagerProxy(
ALLOW_THIS_IN_INITIALIZER_LIST(this), io_thread)),
db_disabled_(false),
+ eviction_disabled_(false),
io_thread_(io_thread),
db_thread_(db_thread),
need_initialize_origins_(false),
@@ -1197,11 +1198,7 @@ void QuotaManager::DidInitializeTemporaryGlobalQuota(int64 quota) {
db_disabled_ ? kQuotaErrorInvalidAccess : kQuotaStatusOk,
kStorageTypeTemporary, quota);
- if (db_disabled_)
- return;
-
- // TODO(kinuko): Remove this switch when we turn on eviction by default.
- if (!CommandLine::ForCurrentProcess()->HasSwitch(kEnableQuotaEviction))
+ if (db_disabled_ || eviction_disabled_)
return;
if (!need_initialize_origins_) {
diff --git a/webkit/quota/quota_manager.h b/webkit/quota/quota_manager.h
index 3d6b285..706bec8 100644
--- a/webkit/quota/quota_manager.h
+++ b/webkit/quota/quota_manager.h
@@ -275,6 +275,7 @@ class QuotaManager : public QuotaTaskObserver,
scoped_refptr<QuotaManagerProxy> proxy_;
bool db_disabled_;
+ bool eviction_disabled_;
scoped_refptr<base::MessageLoopProxy> io_thread_;
scoped_refptr<base::MessageLoopProxy> db_thread_;
mutable scoped_ptr<QuotaDatabase> database_;
diff --git a/webkit/quota/quota_manager_unittest.cc b/webkit/quota/quota_manager_unittest.cc
index 0ededdb..4df5787 100644
--- a/webkit/quota/quota_manager_unittest.cc
+++ b/webkit/quota/quota_manager_unittest.cc
@@ -49,6 +49,8 @@ class QuotaManagerTest : public testing::Test {
MessageLoopProxy::CreateForCurrentThread(),
MessageLoopProxy::CreateForCurrentThread(),
mock_special_storage_policy_);
+ // Don't (automatically) start the eviction for testing.
+ quota_manager_->eviction_disabled_ = true;
additional_callback_count_ = 0;
}