From 588c54b003dce8809d2b649cbbeddf15b9ba234b Mon Sep 17 00:00:00 2001 From: "mdm@chromium.org" <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> Date: Fri, 18 Sep 2009 21:45:54 +0000 Subject: [PATCH] Move the --type=plugin and --plugin-path arguments to the beginning of the argument list for plugin processes. BUG=22262 TEST=none Review URL: http://codereview.chromium.org/212021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26627 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/plugin_process_host.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc index 1ae4e25b0f6dd..e78f2391e36c4 100644 --- a/chrome/browser/plugin_process_host.cc +++ b/chrome/browser/plugin_process_host.cc @@ -344,6 +344,13 @@ bool PluginProcessHost::Init(const WebPluginInfo& info, } CommandLine cmd_line(exe_path); + // Put the process type and plugin path first so they're easier to see + // in process listings using native process management tools. + cmd_line.AppendSwitchWithValue(switches::kProcessType, + switches::kPluginProcess); + cmd_line.AppendSwitchWithValue(switches::kPluginPath, + info.path.ToWStringHack()); + if (logging::DialogsAreSuppressed()) cmd_line.AppendSwitch(switches::kNoErrorDialogs); @@ -397,15 +404,9 @@ bool PluginProcessHost::Init(const WebPluginInfo& info, DCHECK(!data_dir.empty()); cmd_line.AppendSwitchWithValue(switches::kPluginDataDir, data_dir); - cmd_line.AppendSwitchWithValue(switches::kProcessType, - switches::kPluginProcess); - cmd_line.AppendSwitchWithValue(switches::kProcessChannelID, ASCIIToWide(channel_id())); - cmd_line.AppendSwitchWithValue(switches::kPluginPath, - info.path.ToWStringHack()); - SetCrashReporterCommandLine(&cmd_line); base::ProcessHandle process = 0; -- GitLab