Index: apps/app_host/app_host_main.cc |
diff --git a/apps/app_host/app_host_main.cc b/apps/app_host/app_host_main.cc |
index cf0fd265e5de09646884d69f83e63f8ec267c6af..ca782bc752ae151c548f84938cb4b292b16e98ca 100644 |
--- a/apps/app_host/app_host_main.cc |
+++ b/apps/app_host/app_host_main.cc |
@@ -5,12 +5,12 @@ |
#include <windows.h> |
#include "apps/app_host/binaries_installer.h" |
+#include "apps/app_host/operation_launcher.h" |
#include "apps/app_host/update.h" |
#include "base/at_exit.h" |
#include "base/command_line.h" |
#include "base/files/file_path.h" |
#include "base/logging.h" |
-#include "base/process_util.h" |
#include "chrome/installer/launcher_support/chrome_launcher_support.h" |
int APIENTRY wWinMain(HINSTANCE, HINSTANCE, wchar_t*, int) { |
@@ -39,15 +39,17 @@ int APIENTRY wWinMain(HINSTANCE, HINSTANCE, wchar_t*, int) { |
CommandLine chrome_exe_command_line(chrome_exe); |
chrome_exe_command_line.AppendArguments( |
*CommandLine::ForCurrentProcess(), false); |
- // Launch Chrome before checking for update, for faster user experience. |
- bool launch_result = base::LaunchProcess(chrome_exe_command_line, |
- base::LaunchOptions(), NULL); |
- if (launch_result) |
- LOG(INFO) << "Delegated to Chrome executable at " << chrome_exe.value(); |
- else |
- LOG(INFO) << "Failed to launch Chrome executable at " << chrome_exe.value(); |
+ |
+ // Launch Chrome before checking for an update, for a faster user experience. |
+ DWORD exit_code = 0; |
+ if (!app_host::LaunchOperation(chrome_exe_command_line, |
+ ::GetStdHandle(STD_OUTPUT_HANDLE), |
+ &exit_code)) { |
+ LOG(ERROR) << "Failed to delegate to Chrome."; |
+ return 1; |
+ } |
app_host::EnsureAppHostUpToDate(); |
- return !launch_result; |
+ return exit_code; |
} |