summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authordumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-14 05:31:14 +0000
committerdumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-14 05:31:14 +0000
commit8b0311aff72bd14293fa31cae7c225809fc565bb (patch)
treef1392c332c051aee0f437970aca0999211a519da /chrome/browser
parent65f5ef4785c30ad960c8bc194d6d61f3e553e935 (diff)
downloadchromium_src-8b0311aff72bd14293fa31cae7c225809fc565bb.zip
chromium_src-8b0311aff72bd14293fa31cae7c225809fc565bb.tar.gz
chromium_src-8b0311aff72bd14293fa31cae7c225809fc565bb.tar.bz2
Enable HTML5 DBs by default (except in incognito mode).
TEST=none BUG=none Review URL: http://codereview.chromium.org/397001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31999 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-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
2 files changed, 6 insertions, 16 deletions
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc
index 200fecf..0837847 100644
--- a/chrome/browser/renderer_host/browser_render_process_host.cc
+++ b/chrome/browser/renderer_host/browser_render_process_host.cc
@@ -315,8 +315,6 @@ 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);
@@ -560,6 +558,7 @@ void BrowserRenderProcessHost::PropogateBrowserCommandLineToRenderer(
switches::kDisableDesktopNotifications,
switches::kDisableWebSockets,
switches::kDisableLocalStorage,
+ switches::kDisableDatabases,
switches::kEnableSessionStorage,
switches::kDisableSharedWorkers,
switches::kEnableApplicationCache,
@@ -572,12 +571,6 @@ 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],
@@ -585,13 +578,10 @@ void BrowserRenderProcessHost::PropogateBrowserCommandLineToRenderer(
}
}
- 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]));
- }
- }
+ // Disable databases in incognito mode.
+ if (profile()->IsOffTheRecord() &&
+ !browser_cmd.HasSwitch(switches::kDisableDatabases)) {
+ renderer_cmd->AppendSwitch(switches::kDisableDatabases);
}
}
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 3827a45..b57175c 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::kEnableDatabases);
+ !command_line.HasSwitch(switches::kDisableDatabases);
web_prefs.experimental_webgl_enabled =
command_line.HasSwitch(switches::kEnableExperimentalWebGL);
}