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

Unified Diff: win8/delegate_execute/chrome_util.cc

Issue 71013004: Base: Remove Receive() from ScopedHandle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix delegate_execute for google_chrome_build Created 7 years, 1 month 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 | « tools/gn/function_exec_script.cc ('k') | win8/delegate_execute/command_execute_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: win8/delegate_execute/chrome_util.cc
diff --git a/win8/delegate_execute/chrome_util.cc b/win8/delegate_execute/chrome_util.cc
index dec23f7797eac8a8d607a1ebbdab508ccc56dcdd..3695b3331fbb15834477be3de5c61d1c327f8e16 100644
--- a/win8/delegate_execute/chrome_util.cc
+++ b/win8/delegate_execute/chrome_util.cc
@@ -103,7 +103,7 @@ void UpdateChromeIfNeeded(const base::FilePath& chrome_exe) {
if (IsBrowserRunning(chrome_exe) || !NewChromeExeExists(chrome_exe))
return;
- base::ProcessHandle process_handle = base::kNullProcessHandle;
+ base::win::ScopedHandle process_handle;
if (InstallUtil::IsPerUserInstall(chrome_exe.value().c_str())) {
// Read the update command from the registry.
@@ -119,7 +119,6 @@ void UpdateChromeIfNeeded(const base::FilePath& chrome_exe) {
&process_handle)) {
AtlTrace("%hs. Failed to launch command to finalize update; "
"error %u.\n", __FUNCTION__, ::GetLastError());
- process_handle = base::kNullProcessHandle;
}
}
} else {
@@ -140,16 +139,16 @@ void UpdateChromeIfNeeded(const base::FilePath& chrome_exe) {
AtlTrace("%hs. Failed to launch command to finalize update; "
"hr=0x%X.\n", __FUNCTION__, hr);
} else {
- process_handle = reinterpret_cast<base::ProcessHandle>(handle);
+ process_handle.Set(reinterpret_cast<base::ProcessHandle>(handle));
}
}
}
// Wait for the update to complete and report the results.
- if (process_handle != base::kNullProcessHandle) {
+ if (process_handle.IsValid()) {
int exit_code = 0;
// WaitForExitCode will close the handle in all cases.
- if (!base::WaitForExitCode(process_handle, &exit_code)) {
+ if (!base::WaitForExitCode(process_handle.Take(), &exit_code)) {
AtlTrace("%hs. Failed to get result when finalizing update.\n",
__FUNCTION__);
} else if (exit_code != installer::RENAME_SUCCESSFUL) {
« no previous file with comments | « tools/gn/function_exec_script.cc ('k') | win8/delegate_execute/command_execute_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698