summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host/browser_render_process_host.cc
diff options
context:
space:
mode:
authormdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-22 01:13:47 +0000
committermdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-22 01:13:47 +0000
commit6d448fb84d83dafb6b340d4a2ba52add03b54643 (patch)
treeb784c59a39b8d72ca325befdd664e6eadcdf59d3 /chrome/browser/renderer_host/browser_render_process_host.cc
parenta677f2b546d2034b459d40e6d0f24977e9b9ade3 (diff)
downloadchromium_src-6d448fb84d83dafb6b340d4a2ba52add03b54643.zip
chromium_src-6d448fb84d83dafb6b340d4a2ba52add03b54643.tar.gz
chromium_src-6d448fb84d83dafb6b340d4a2ba52add03b54643.tar.bz2
Put the --type switch back as the first for renderers, for easy identification.
BUG=28421 TEST=run ps auxw, see that --type is the first switch to renderer processes Review URL: http://codereview.chromium.org/414071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32766 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/browser_render_process_host.cc')
-rw-r--r--chrome/browser/renderer_host/browser_render_process_host.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc
index 3cbed6a..db701ab 100644
--- a/chrome/browser/renderer_host/browser_render_process_host.cc
+++ b/chrome/browser/renderer_host/browser_render_process_host.cc
@@ -310,12 +310,12 @@ bool BrowserRenderProcessHost::Init(bool is_extensions_process,
OnProcessLaunched(); // Fake a callback that the process is ready.
} else {
- // Build command line for renderer, we have to quote the executable name to
- // deal with spaces.
+ // Build command line for renderer. We call AppendRendererCommandLine()
+ // first so the process type argument will appear first.
CommandLine* cmd_line = new CommandLine(renderer_path);
+ AppendRendererCommandLine(cmd_line);
cmd_line->AppendSwitchWithValue(switches::kProcessChannelID,
ASCIIToWide(channel_id));
- AppendRendererCommandLine(cmd_line);
// Spawn the child process asynchronously to avoid blocking the UI thread.
child_process_.reset(new ChildProcessLauncher(
@@ -422,9 +422,6 @@ void BrowserRenderProcessHost::ResetVisitedLinks() {
void BrowserRenderProcessHost::AppendRendererCommandLine(
CommandLine* command_line) const {
- if (logging::DialogsAreSuppressed())
- command_line->AppendSwitch(switches::kNoErrorDialogs);
-
// Pass the process type first, so it shows first in process listings.
// Extensions use a special pseudo-process type to make them distinguishable,
// even though they're just renderers.
@@ -432,6 +429,9 @@ void BrowserRenderProcessHost::AppendRendererCommandLine(
extension_process_ ? switches::kExtensionProcess :
switches::kRendererProcess);
+ if (logging::DialogsAreSuppressed())
+ command_line->AppendSwitch(switches::kNoErrorDialogs);
+
// Now send any options from our own command line we want to propogate.
const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
PropogateBrowserCommandLineToRenderer(browser_command_line, command_line);