Commit 2d12a462 authored by rvargas's avatar rvargas Committed by Commit bot

Update browser/first_run to use the new version of LaunchProcess.

BUG=417532

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

Cr-Commit-Position: refs/heads/master@{#308369}
parent c8d3f9f9
...@@ -46,7 +46,6 @@ bool LaunchSetupForEula(const base::FilePath::StringType& value, ...@@ -46,7 +46,6 @@ bool LaunchSetupForEula(const base::FilePath::StringType& value,
return false; return false;
exe_dir = exe_dir.Append(installer::kInstallerDir); exe_dir = exe_dir.Append(installer::kInstallerDir);
base::FilePath exe_path = exe_dir.Append(installer::kSetupExe); base::FilePath exe_path = exe_dir.Append(installer::kSetupExe);
base::ProcessHandle ph;
CommandLine cl(CommandLine::NO_PROGRAM); CommandLine cl(CommandLine::NO_PROGRAM);
cl.AppendSwitchNative(installer::switches::kShowEula, value); cl.AppendSwitchNative(installer::switches::kShowEula, value);
...@@ -67,11 +66,11 @@ bool LaunchSetupForEula(const base::FilePath::StringType& value, ...@@ -67,11 +66,11 @@ bool LaunchSetupForEula(const base::FilePath::StringType& value,
CommandLine setup_path(exe_path); CommandLine setup_path(exe_path);
setup_path.AppendArguments(cl, false); setup_path.AppendArguments(cl, false);
base::Process process =
base::LaunchProcess(setup_path, base::LaunchOptions());
int exit_code = 0; int exit_code = 0;
if (!base::LaunchProcess(setup_path, base::LaunchOptions(), &ph) || if (!process.IsValid() || !process.WaitForExit(&exit_code))
!base::WaitForExitCode(ph, &exit_code)) {
return false; return false;
}
*ret_code = exit_code; *ret_code = exit_code;
return true; return true;
......
...@@ -159,7 +159,7 @@ bool RelaunchChromeHelper(const CommandLine& command_line, ...@@ -159,7 +159,7 @@ bool RelaunchChromeHelper(const CommandLine& command_line,
relaunch_mode != RELAUNCH_MODE_METRO && relaunch_mode != RELAUNCH_MODE_METRO &&
relaunch_mode != RELAUNCH_MODE_DESKTOP) relaunch_mode != RELAUNCH_MODE_DESKTOP)
return base::LaunchProcess(chrome_exe_command_line, return base::LaunchProcess(chrome_exe_command_line,
base::LaunchOptions(), NULL); base::LaunchOptions()).IsValid();
// On Windows 8 we always use the delegate_execute for re-launching chrome. // On Windows 8 we always use the delegate_execute for re-launching chrome.
// On Windows 7 we use delegate_execute for re-launching chrome into Windows // On Windows 7 we use delegate_execute for re-launching chrome into Windows
......
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