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

Unified Diff: remoting/host/setup/daemon_installer_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
« no previous file with comments | « content/zygote/zygote_linux.cc ('k') | win8/delegate_execute/chrome_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/setup/daemon_installer_win.cc
diff --git a/remoting/host/setup/daemon_installer_win.cc b/remoting/host/setup/daemon_installer_win.cc
index 39f2986cb7846514b7309d424b84dd41c3a8e878..2968ce113c4695b3d3840bf6e15b03e5cb8020d4 100644
--- a/remoting/host/setup/daemon_installer_win.cc
+++ b/remoting/host/setup/daemon_installer_win.cc
@@ -102,7 +102,7 @@ class DaemonCommandLineInstallerWin
private:
// Handle of the launched process.
- base::win::ScopedHandle process_;
+ base::Process process_;
// Used to determine when the launched process terminates.
base::win::ObjectWatcher process_watcher_;
@@ -300,13 +300,14 @@ void DaemonCommandLineInstallerWin::Install() {
kOmahaLanguage));
base::LaunchOptions options;
- if (!base::LaunchProcess(command_line, options, &process_)) {
+ process_ = base::LaunchProcess(command_line, options);
+ if (!process_.IsValid()) {
result = GetLastError();
Done(HRESULT_FROM_WIN32(result));
return;
}
- if (!process_watcher_.StartWatching(process_.Get(), this)) {
+ if (!process_watcher_.StartWatching(process_.Handle(), this)) {
result = GetLastError();
Done(HRESULT_FROM_WIN32(result));
return;
@@ -316,7 +317,7 @@ void DaemonCommandLineInstallerWin::Install() {
void DaemonCommandLineInstallerWin::OnObjectSignaled(HANDLE object) {
// Check if the updater process returned success.
DWORD exit_code;
- if (GetExitCodeProcess(process_.Get(), &exit_code) && exit_code == 0) {
+ if (GetExitCodeProcess(process_.Handle(), &exit_code) && exit_code == 0) {
Done(S_OK);
} else {
Done(E_FAIL);
« no previous file with comments | « content/zygote/zygote_linux.cc ('k') | win8/delegate_execute/chrome_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698