Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(298)

Unified Diff: apps/app_host/app_host_main.cc

Issue 12674028: Report text output and exit code for command-line operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Forgotten review responses. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « apps/app_host/DEPS ('k') | apps/app_host/operation_launcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « apps/app_host/DEPS ('k') | apps/app_host/operation_launcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698