summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/extensions/extension_storage_apitest.cc9
-rw-r--r--chrome/browser/renderer_host/render_view_host.cc12
-rw-r--r--chrome/browser/tab_contents/render_view_host_delegate_helper.cc8
3 files changed, 23 insertions, 6 deletions
diff --git a/chrome/browser/extensions/extension_storage_apitest.cc b/chrome/browser/extensions/extension_storage_apitest.cc
new file mode 100644
index 0000000..b75cc0e
--- /dev/null
+++ b/chrome/browser/extensions/extension_storage_apitest.cc
@@ -0,0 +1,9 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/extensions/extension_apitest.h"
+
+IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Storage) {
+ ASSERT_TRUE(RunExtensionTest("storage")) << message_;
+}
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc
index d028db5..7206dfc 100644
--- a/chrome/browser/renderer_host/render_view_host.cc
+++ b/chrome/browser/renderer_host/render_view_host.cc
@@ -208,10 +208,20 @@ bool RenderViewHost::CreateRenderView() {
modal_dialog_event.event = modal_dialog_event_handle;
#endif
+ // Force local storage to be enabled for extensions. This is so that we can
+ // enable extensions by default before databases, if necessary.
+ // TODO(aa): This should be removed when local storage and databases are
+ // enabled by default (bugs 4359 and 4360).
+ WebPreferences webkit_prefs = delegate_->GetWebkitPrefs();
+ if (delegate_->GetURL().SchemeIs(chrome::kExtensionScheme)) {
+ webkit_prefs.local_storage_enabled = true;
+ webkit_prefs.databases_enabled = true;
+ }
+
Send(new ViewMsg_New(GetNativeViewId(),
modal_dialog_event,
delegate_->GetRendererPrefs(),
- delegate_->GetWebkitPrefs(),
+ webkit_prefs,
routing_id()));
// Set the alternate error page, which is profile specific, in the renderer.
diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
index 5146caf..184fc5e 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
@@ -179,12 +179,10 @@ WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs(
web_prefs.application_cache_enabled =
command_line.HasSwitch(switches::kEnableApplicationCache);
- // NOTE: We imply local storage enabledness for extensions because the
- // extensions team is beta testing local storage and we like to live on the
- // edge.
web_prefs.local_storage_enabled =
- command_line.HasSwitch(switches::kEnableLocalStorage) ||
- command_line.HasSwitch(switches::kEnableExtensions);
+ command_line.HasSwitch(switches::kEnableLocalStorage);
+ web_prefs.databases_enabled =
+ command_line.HasSwitch(switches::kEnableDatabases);
web_prefs.session_storage_enabled =
command_line.HasSwitch(switches::kEnableSessionStorage);
}