summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-14 06:37:19 +0000
committerdumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-14 06:37:19 +0000
commit33cb70a2617d1e8f3ecbcd38717e0df62d99379d (patch)
treebe97db6213756d780e12ca8c7c6640cce94eb5b1
parentd21b78b5aaaa1b022eda95c4e2beb52ef3250f66 (diff)
downloadchromium_src-33cb70a2617d1e8f3ecbcd38717e0df62d99379d.zip
chromium_src-33cb70a2617d1e8f3ecbcd38717e0df62d99379d.tar.gz
chromium_src-33cb70a2617d1e8f3ecbcd38717e0df62d99379d.tar.bz2
Revert 31999 - Enable HTML5 DBs by default (except in incognito mode).
TEST=none BUG=none Review URL: http://codereview.chromium.org/397001 TBR=michael@chromium.org Review URL: http://codereview.chromium.org/397004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32001 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/renderer_host/browser_render_process_host.cc20
-rw-r--r--chrome/browser/tab_contents/render_view_host_delegate_helper.cc2
-rw-r--r--chrome/common/chrome_switches.cc6
-rw-r--r--chrome/common/chrome_switches.h2
-rw-r--r--chrome/renderer/render_thread.cc2
5 files changed, 21 insertions, 11 deletions
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc
index 0837847..200fecf 100644
--- a/chrome/browser/renderer_host/browser_render_process_host.cc
+++ b/chrome/browser/renderer_host/browser_render_process_host.cc
@@ -315,6 +315,8 @@ bool BrowserRenderProcessHost::Init(bool is_extensions_process) {
CommandLine cmd_line(renderer_path);
cmd_line.AppendSwitchWithValue(switches::kProcessChannelID,
ASCIIToWide(channel_id));
+ if (is_extensions_process)
+ cmd_line.AppendSwitch(switches::kEnableDatabases);
bool has_cmd_prefix;
AppendRendererCommandLine(&cmd_line, &has_cmd_prefix);
@@ -558,7 +560,6 @@ void BrowserRenderProcessHost::PropogateBrowserCommandLineToRenderer(
switches::kDisableDesktopNotifications,
switches::kDisableWebSockets,
switches::kDisableLocalStorage,
- switches::kDisableDatabases,
switches::kEnableSessionStorage,
switches::kDisableSharedWorkers,
switches::kEnableApplicationCache,
@@ -571,6 +572,12 @@ void BrowserRenderProcessHost::PropogateBrowserCommandLineToRenderer(
#endif
};
+ // Propagate the following switches to the renderer command line (along
+ // with any associated values) only if we're not in incognito mode.
+ static const char* const not_otr_switch_names[] = {
+ switches::kEnableDatabases,
+ };
+
for (size_t i = 0; i < arraysize(switch_names); ++i) {
if (browser_cmd.HasSwitch(switch_names[i])) {
renderer_cmd->AppendSwitchWithValue(switch_names[i],
@@ -578,10 +585,13 @@ void BrowserRenderProcessHost::PropogateBrowserCommandLineToRenderer(
}
}
- // Disable databases in incognito mode.
- if (profile()->IsOffTheRecord() &&
- !browser_cmd.HasSwitch(switches::kDisableDatabases)) {
- renderer_cmd->AppendSwitch(switches::kDisableDatabases);
+ if (!profile()->IsOffTheRecord()) {
+ for (size_t i = 0; i < arraysize(not_otr_switch_names); ++i) {
+ if (browser_cmd.HasSwitch(not_otr_switch_names[i])) {
+ renderer_cmd->AppendSwitchWithValue(not_otr_switch_names[i],
+ browser_cmd.GetSwitchValueASCII(not_otr_switch_names[i]));
+ }
+ }
}
}
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 b57175c..3827a45 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
@@ -182,7 +182,7 @@ WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs(
web_prefs.local_storage_enabled =
!command_line.HasSwitch(switches::kDisableLocalStorage);
web_prefs.databases_enabled =
- !command_line.HasSwitch(switches::kDisableDatabases);
+ command_line.HasSwitch(switches::kEnableDatabases);
web_prefs.experimental_webgl_enabled =
command_line.HasSwitch(switches::kEnableExperimentalWebGL);
}
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index f0f1442..30a598f 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -75,9 +75,6 @@ const char kDisableByteRangeSupport[] = "disable-byte-range-support";
// Disables the custom JumpList on Windows 7.
const char kDisableCustomJumpList[] = "disable-custom-jumplist";
-// Disables HTML5 DB support.
-const char kDisableDatabases[] = "disable-databases";
-
// Disables desktop notifications (default enabled on windows).
const char kDisableDesktopNotifications[] = "disable-desktop-notifications";
@@ -174,6 +171,9 @@ const char kEnableApplicationCache[] = "enable-application-cache";
// Enables the benchmarking extensions.
const char kEnableBenchmarking[] = "enable-benchmarking";
+// Enables HTML5 DB support.
+const char kEnableDatabases[] = "enable-databases";
+
// Enables extension APIs that are in development.
const char kEnableExperimentalExtensionApis[] =
"enable-experimental-extension-apis";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 6ac369f..b95d3c9 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -36,7 +36,6 @@ extern const char kDisableAltWinstation[];
extern const char kDisableAudio[];
extern const char kDisableByteRangeSupport[];
extern const char kDisableCustomJumpList[];
-extern const char kDisableDatabases[];
extern const char kDisableDesktopNotifications[];
extern const char kDisableDevTools[];
extern const char kDisableExtensions[];
@@ -65,6 +64,7 @@ extern const char kDomAutomationController[];
extern const char kDumpHistogramsOnExit[];
extern const char kEnableApplicationCache[];
extern const char kEnableBenchmarking[];
+extern const char kEnableDatabases[];
extern const char kEnableExperimentalExtensionApis[];
extern const char kEnableExperimentalWebGL[];
extern const char kEnableExtensionTimelineApi[];
diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc
index b82976e..7779a01 100644
--- a/chrome/renderer/render_thread.cc
+++ b/chrome/renderer/render_thread.cc
@@ -562,7 +562,7 @@ void RenderThread::EnsureWebKitInitialized() {
!command_line.HasSwitch(switches::kDisableWebSockets));
WebRuntimeFeatures::enableDatabase(
- !command_line.HasSwitch(switches::kDisableDatabases));
+ command_line.HasSwitch(switches::kEnableDatabases));
WebRuntimeFeatures::enableApplicationCache(
command_line.HasSwitch(switches::kEnableApplicationCache));