Commit fe867d30 authored by skare@chromium.org's avatar skare@chromium.org

Use CommandLine when launching Chrome from gcapi. Path may contain spaces for some partners.

BUG=

Review URL: https://codereview.chromium.org/447673004

Cr-Commit-Position: refs/heads/master@{#289338}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289338 0039d316-1c4b-4281-b951-d872f2087c98
parent 03aac594
...@@ -503,18 +503,21 @@ BOOL __stdcall LaunchGoogleChrome() { ...@@ -503,18 +503,21 @@ BOOL __stdcall LaunchGoogleChrome() {
} }
} }
CommandLine chrome_command(chrome_exe_path);
bool ret = false; bool ret = false;
ScopedComPtr<IProcessLauncher> ipl; ScopedComPtr<IProcessLauncher> ipl;
if (SUCCEEDED(ipl.CreateInstance(__uuidof(ProcessLauncherClass), if (SUCCEEDED(ipl.CreateInstance(__uuidof(ProcessLauncherClass),
NULL, NULL,
CLSCTX_LOCAL_SERVER))) { CLSCTX_LOCAL_SERVER))) {
if (SUCCEEDED(ipl->LaunchCmdLine(chrome_exe_path.value().c_str()))) if (SUCCEEDED(ipl->LaunchCmdLine(
chrome_command.GetCommandLineString().c_str())))
ret = true; ret = true;
ipl.Release(); ipl.Release();
} else { } else {
// Couldn't get Omaha's process launcher, Omaha may not be installed at // Couldn't get Omaha's process launcher, Omaha may not be installed at
// system level. Try just running Chrome instead. // system level. Try just running Chrome instead.
ret = base::LaunchProcess(chrome_exe_path.value(), ret = base::LaunchProcess(chrome_command.GetCommandLineString(),
base::LaunchOptions(), base::LaunchOptions(),
NULL); NULL);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment