diff options
Diffstat (limited to 'chrome/browser/renderer_host/browser_render_process_host.cc')
-rw-r--r-- | chrome/browser/renderer_host/browser_render_process_host.cc | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc index e9bfedb..c13d592 100644 --- a/chrome/browser/renderer_host/browser_render_process_host.cc +++ b/chrome/browser/renderer_host/browser_render_process_host.cc @@ -316,8 +316,6 @@ bool BrowserRenderProcessHost::Init(bool is_extensions_process, scoped_ptr<CommandLine> cmd_line(new CommandLine(renderer_path)); cmd_line->AppendSwitchWithValue(switches::kProcessChannelID, ASCIIToWide(channel_id)); - if (is_extensions_process) - cmd_line->AppendSwitch(switches::kEnableDatabases); AppendRendererCommandLine(cmd_line.get()); // Spawn the child process asynchronously to avoid blocking the UI thread. @@ -508,6 +506,7 @@ void BrowserRenderProcessHost::PropogateBrowserCommandLineToRenderer( switches::kEnableBenchmarking, switches::kInternalNaCl, switches::kDisableByteRangeSupport, + switches::kDisableDatabases, switches::kDisableDesktopNotifications, switches::kDisableWebSockets, switches::kDisableLocalStorage, @@ -523,12 +522,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], @@ -536,13 +529,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); } } |