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..096cba4af7264bf95f23d90d52bc0ac8e64e9bbc 100644 |
--- a/apps/app_host/app_host_main.cc |
+++ b/apps/app_host/app_host_main.cc |
@@ -5,14 +5,15 @@ |
#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" |
+ |
gab
2013/03/28 03:06:06
nit: Remove extra empty line.
|
int APIENTRY wWinMain(HINSTANCE, HINSTANCE, wchar_t*, int) { |
base::AtExitManager exit_manager; |
@@ -39,15 +40,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. |
robertshield
2013/03/28 02:38:03
grammar nit: for -> for a
|
- 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(); |
+ 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."; |
gab
2013/03/28 03:06:06
Does this need to make it in Release builds or is
erikwright (departed)
2013/04/18 17:43:04
This is not a NOTREACHED scenario. Things out of o
|
+ return 1; |
gab
2013/03/28 03:06:06
This should be a constant return code, no?
|
+ } |
app_host::EnsureAppHostUpToDate(); |
- return !launch_result; |
+ return exit_code; |
} |