summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-29 00:35:52 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-29 00:35:52 +0000
commit2f6a84d65c72e6fc4ff602523dda40aaa574a826 (patch)
tree9067d31dd3cc4e76d50f8dbf8db48a7da34e1ecf /webkit/glue
parent16aebd6af9a3d7b79241558e3d388833d859be25 (diff)
downloadchromium_src-2f6a84d65c72e6fc4ff602523dda40aaa574a826.zip
chromium_src-2f6a84d65c72e6fc4ff602523dda40aaa574a826.tar.gz
chromium_src-2f6a84d65c72e6fc4ff602523dda40aaa574a826.tar.bz2
Force databases and localstorage to be enabled extensions.
We were already doing this, this change modifies the mechanism. Before we were relying on the presence of the --enable-extensions flag, but as we are getting ready to remove that on dev, we needed something else. This forces local storage and database to be enabled on chrome-extension:// pages. Also, change the way database enabling works in general to be more like the way local storage works, just for consistency. Will remove old, unnecessary WebKit API in an upstream change. erikkay: extensions stuff dumi: database stuff jorlow: local storage stuff BUG=19511 Review URL: http://codereview.chromium.org/173306 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24841 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/webpreferences.cc3
-rw-r--r--webkit/glue/webpreferences.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/webkit/glue/webpreferences.cc b/webkit/glue/webpreferences.cc
index e14788e..785bdbf 100644
--- a/webkit/glue/webpreferences.cc
+++ b/webkit/glue/webpreferences.cc
@@ -48,6 +48,7 @@ void WebPreferences::Apply(WebView* web_view) const {
settings->setDownloadableBinaryFontsEnabled(remote_fonts_enabled);
settings->setXSSAuditorEnabled(xss_auditor_enabled);
settings->setLocalStorageEnabled(local_storage_enabled);
+ settings->setDatabasesEnabled(WebKit::databasesEnabled() || databases_enabled);
settings->setSessionStorageEnabled(session_storage_enabled);
settings->setOfflineWebApplicationCacheEnabled(application_cache_enabled);
@@ -63,8 +64,6 @@ void WebPreferences::Apply(WebView* web_view) const {
// Turn this on to cause WebCore to paint the resize corner for us.
settings->setShouldPaintCustomScrollbars(true);
- settings->setDatabasesEnabled(WebKit::databasesEnabled());
-
// Mitigate attacks from local HTML files by not granting file:// URLs
// universal access.
settings->setAllowUniversalAccessFromFileURLs(false);
diff --git a/webkit/glue/webpreferences.h b/webkit/glue/webpreferences.h
index c48339fa..f0ab0bb 100644
--- a/webkit/glue/webpreferences.h
+++ b/webkit/glue/webpreferences.h
@@ -45,6 +45,7 @@ struct WebPreferences {
bool remote_fonts_enabled;
bool xss_auditor_enabled;
bool local_storage_enabled;
+ bool databases_enabled;
bool session_storage_enabled;
bool application_cache_enabled;
@@ -85,6 +86,7 @@ struct WebPreferences {
remote_fonts_enabled(false),
xss_auditor_enabled(false),
local_storage_enabled(false),
+ databases_enabled(false),
session_storage_enabled(false),
application_cache_enabled(false),
user_style_sheet_enabled(false) {