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

Unified Diff: chrome/browser/first_run/upgrade_util_win.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: Fix chrome build 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/browser/first_run/upgrade_util_win.cc
diff --git a/chrome/browser/first_run/upgrade_util_win.cc b/chrome/browser/first_run/upgrade_util_win.cc
index ff19c0479d7af3528e03c702e7762c9e35861e9a..1a489a859bf74ee4d73754bab48c80a5bf544caf 100644
--- a/chrome/browser/first_run/upgrade_util_win.cc
+++ b/chrome/browser/first_run/upgrade_util_win.cc
@@ -258,13 +258,13 @@ bool SwapNewChromeExeIfPresent() {
std::wstring rename_cmd;
if (key.ReadValue(google_update::kRegRenameCmdField,
&rename_cmd) == ERROR_SUCCESS) {
- base::win::ScopedHandle handle;
base::LaunchOptions options;
options.wait = true;
options.start_hidden = true;
- if (base::LaunchProcess(rename_cmd, options, &handle)) {
+ base::Process process = base::LaunchProcess(rename_cmd, options);
+ if (process.IsValid()) {
DWORD exit_code;
- ::GetExitCodeProcess(handle.Get(), &exit_code);
+ ::GetExitCodeProcess(process.Handle(), &exit_code);
if (exit_code == installer::RENAME_SUCCESSFUL)
return true;
}
« no previous file with comments | « chrome/browser/extensions/api/messaging/native_process_launcher_win.cc ('k') | chrome/browser/ui/views/uninstall_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698