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

Unified Diff: chrome/installer/util/google_update_util.cc

Issue 759903002: Upgrade the windows specific version of LaunchProcess to avoid raw handles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review feedback Created 6 years 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
Index: chrome/installer/util/google_update_util.cc
diff --git a/chrome/installer/util/google_update_util.cc b/chrome/installer/util/google_update_util.cc
index 1b8c74d445966757499c2ccd21fabf1d4433b93e..cdad963967519db6d0d275868bf66a501239d757 100644
--- a/chrome/installer/util/google_update_util.cc
+++ b/chrome/installer/util/google_update_util.cc
@@ -89,13 +89,13 @@ bool GetUserLevelGoogleUpdateInstallCommandLine(base::string16* cmd_string) {
bool LaunchProcessAndWaitWithTimeout(const base::string16& cmd_string,
base::TimeDelta timeout) {
bool success = false;
- base::win::ScopedHandle process;
int exit_code = 0;
VLOG(0) << "Launching: " << cmd_string;
- if (!base::LaunchProcess(cmd_string, base::LaunchOptions(),
- &process)) {
+ base::Process process =
+ base::LaunchProcess(cmd_string, base::LaunchOptions());
+ if (!process.IsValid()) {
PLOG(ERROR) << "Failed to launch (" << cmd_string << ")";
- } else if (!base::WaitForExitCodeWithTimeout(process.Get(), &exit_code,
+ } else if (!base::WaitForExitCodeWithTimeout(process.Handle(), &exit_code,
timeout)) {
// The GetExitCodeProcess failed or timed-out.
LOG(ERROR) <<"Command (" << cmd_string << ") is taking more than "

Powered by Google App Engine
This is Rietveld 408576698