diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-11 00:51:02 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-11 00:51:02 +0000 |
commit | 961306dca553f6e7b5262e384317a73351a77985 (patch) | |
tree | dbba7e1e9d1774eaf03c5254bbeb71a42c914fda /chrome/browser/plugin_process_host.cc | |
parent | d04d10a3b93b428d5e4fe636be4ab6ffd94424d9 (diff) | |
download | chromium_src-961306dca553f6e7b5262e384317a73351a77985.zip chromium_src-961306dca553f6e7b5262e384317a73351a77985.tar.gz chromium_src-961306dca553f6e7b5262e384317a73351a77985.tar.bz2 |
Back out r22981, it may have caused Windows test failures.
Review URL: http://codereview.chromium.org/164298
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22992 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/plugin_process_host.cc')
-rw-r--r-- | chrome/browser/plugin_process_host.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc index 9a81b94..3c5f169 100644 --- a/chrome/browser/plugin_process_host.cc +++ b/chrome/browser/plugin_process_host.cc @@ -335,10 +335,11 @@ bool PluginProcessHost::Init(const WebPluginInfo& info, // build command line for plugin, we have to quote the plugin's path to deal // with spaces. - std::wstring exe_path = GetChildPath(); - if (exe_path.empty()) { + const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); + std::wstring exe_path = + browser_command_line.GetSwitchValue(switches::kBrowserSubprocessPath); + if (exe_path.empty() && !PathService::Get(base::FILE_EXE, &exe_path)) return false; - } CommandLine cmd_line(exe_path); if (logging::DialogsAreSuppressed()) @@ -367,8 +368,6 @@ bool PluginProcessHost::Init(const WebPluginInfo& info, switches::kEnableStatsTable, }; - const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); - for (size_t i = 0; i < arraysize(switch_names); ++i) { if (browser_command_line.HasSwitch(switch_names[i])) { cmd_line.AppendSwitchWithValue( |