diff options
author | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-31 08:22:13 +0000 |
---|---|---|
committer | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-31 08:22:13 +0000 |
commit | 72654a6bdb78772bc94082dd84f0b7facb21dc7e (patch) | |
tree | a46e02eca2e9e5dc13c78f5e31df756a499d1058 | |
parent | 29328c606509c3ad53ea52d6c5c212a0f1ae9da0 (diff) | |
download | chromium_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
-rw-r--r-- | content/browser/renderer_host/browser_render_process_host.cc | 1 | ||||
-rw-r--r-- | content/common/content_switches.cc | 3 | ||||
-rw-r--r-- | content/common/content_switches.h | 1 | ||||
-rw-r--r-- | content/renderer/render_thread.cc | 3 | ||||
-rw-r--r-- | webkit/quota/quota_manager.cc | 7 | ||||
-rw-r--r-- | webkit/quota/quota_manager.h | 1 | ||||
-rw-r--r-- | webkit/quota/quota_manager_unittest.cc | 2 |
7 files changed, 6 insertions, 12 deletions
diff --git a/content/browser/renderer_host/browser_render_process_host.cc b/content/browser/renderer_host/browser_render_process_host.cc index 6a5e0fb..bb909a7 100644 --- a/content/browser/renderer_host/browser_render_process_host.cc +++ b/content/browser/renderer_host/browser_render_process_host.cc @@ -573,7 +573,6 @@ void BrowserRenderProcessHost::PropagateBrowserCommandLineToRenderer( switches::kEnableP2PApi, #endif switches::kEnablePepperTesting, - switches::kEnableQuota, switches::kEnableRemoting, switches::kEnableResourceContentSettings, #if defined(OS_MACOSX) diff --git a/content/common/content_switches.cc b/content/common/content_switches.cc index 444b0ce..264d2aa 100644 --- a/content/common/content_switches.cc +++ b/content/common/content_switches.cc @@ -151,9 +151,6 @@ const char kEnableMonitorProfile[] = "enable-monitor-profile"; // Enable caching of pre-parsed JS script data. See http://crbug.com/32407. const char kEnablePreparsedJsCaching[] = "enable-preparsed-js-caching"; -// Enable quota support for storage API. -const char kEnableQuota[] = "enable-quota"; - // Cause the OS X sandbox write to syslog every time an access to a resource // is denied by the sandbox. const char kEnableSandboxLogging[] = "enable-sandbox-logging"; diff --git a/content/common/content_switches.h b/content/common/content_switches.h index 1677a1e..26a9766 100644 --- a/content/common/content_switches.h +++ b/content/common/content_switches.h @@ -54,7 +54,6 @@ extern const char kEnableGPUPlugin[]; extern const char kEnableLogging[]; extern const char kEnableMonitorProfile[]; extern const char kEnablePreparsedJsCaching[]; -extern const char kEnableQuota[]; extern const char kEnableSandboxLogging[]; extern const char kEnableSeccompSandbox[]; extern const char kEnableStatsTable[]; diff --git a/content/renderer/render_thread.cc b/content/renderer/render_thread.cc index 2ab88fe..0e75b48 100644 --- a/content/renderer/render_thread.cc +++ b/content/renderer/render_thread.cc @@ -603,8 +603,7 @@ void RenderThread::EnsureWebKitInitialized() { WebRuntimeFeatures::enableJavaScriptI18NAPI( !command_line.HasSwitch(switches::kDisableJavaScriptI18NAPI)); - WebRuntimeFeatures::enableQuota( - command_line.HasSwitch(switches::kEnableQuota)); + WebRuntimeFeatures::enableQuota(true); FOR_EACH_OBSERVER(RenderProcessObserver, observers_, WebKitInitialized()); } 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; } |