Chromium Code Reviews| Index: chrome/browser/extensions/app_host/app_host_main.cc |
| diff --git a/chrome/browser/extensions/app_host/app_host_main.cc b/chrome/browser/extensions/app_host/app_host_main.cc |
| index 10d044a57cbf93c2e524ceead7b669a8763e726d..0c91a0f0b9b11ece015ea791d76a7a42b9f7601f 100644 |
| --- a/chrome/browser/extensions/app_host/app_host_main.cc |
| +++ b/chrome/browser/extensions/app_host/app_host_main.cc |
| @@ -8,6 +8,7 @@ |
| #include "base/logging.h" |
| #include "base/process_util.h" |
| #include "chrome/browser/extensions/app_host/binaries_installer.h" |
| +#include "chrome/browser/extensions/app_host/update.h" |
| #include "chrome/installer/launcher_support/chrome_launcher_support.h" |
| int main(int /* argc */, char* /* argv[] */) { |
| @@ -17,7 +18,6 @@ int main(int /* argc */, char* /* argv[] */) { |
| CommandLine::Init(0, NULL); |
| FilePath chrome_exe(chrome_launcher_support::GetAnyChromePath()); |
| - |
| if (chrome_exe.empty()) { |
| LOG(INFO) << "No Chrome executable could be found. Let's install it."; |
| HRESULT hr = app_host::InstallBinaries(); |
| @@ -37,14 +37,16 @@ int main(int /* argc */, char* /* argv[] */) { |
| CommandLine chrome_exe_command_line(chrome_exe); |
| chrome_exe_command_line.AppendArguments( |
| *CommandLine::ForCurrentProcess(), false); |
| - |
| - if (base::LaunchProcess(chrome_exe_command_line, |
| - base::LaunchOptions(), |
| - NULL)) { |
| + // Launch Chrome before checking for update, for faster user experience. |
| + bool launch_result = base::LaunchProcess(chrome_exe_command_line, |
| + base::LaunchOptions(), |
| + NULL); |
|
grt (UTC plus 2)
2012/09/14 14:26:52
ping: move this to the previous line, please.
huangs
2012/09/14 16:34:23
Done.
|
| + if (launch_result) |
| LOG(INFO) << "Delegated to Chrome executable at " << chrome_exe.value(); |
| - return 0; |
| - } else { |
| + else |
| LOG(INFO) << "Failed to launch Chrome executable at " << chrome_exe.value(); |
| - return 1; |
| - } |
| + |
| + app_host::LaunchAppHostUpdate(); |
| + |
| + return !launch_result; |
| } |