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

Unified Diff: remoting/host/win/wts_session_process_delegate.cc

Issue 71013004: Base: Remove Receive() from ScopedHandle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add constructor 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
Index: remoting/host/win/wts_session_process_delegate.cc
diff --git a/remoting/host/win/wts_session_process_delegate.cc b/remoting/host/win/wts_session_process_delegate.cc
index 8cb7325a24600d7a80092f0d1b2332cae63ef645..0b91283ccdcbe40d960d44dd402ff069cf3e4b0b 100644
--- a/remoting/host/win/wts_session_process_delegate.cc
+++ b/remoting/host/win/wts_session_process_delegate.cc
@@ -513,11 +513,11 @@ void WtsSessionProcessDelegate::Core::ReportProcessLaunched(
// query information about the process and duplicate handles.
DWORD desired_access =
SYNCHRONIZE | PROCESS_DUP_HANDLE | PROCESS_QUERY_INFORMATION;
- ScopedHandle limited_handle;
+ HANDLE temp_handle;
if (!DuplicateHandle(GetCurrentProcess(),
worker_process_,
GetCurrentProcess(),
- limited_handle.Receive(),
+ &temp_handle,
desired_access,
FALSE,
0)) {
@@ -525,6 +525,8 @@ void WtsSessionProcessDelegate::Core::ReportProcessLaunched(
ReportFatalError();
return;
}
+ ScopedHandle limited_handle;
+ limited_handle.Set(temp_handle);
event_handler_->OnProcessLaunched(limited_handle.Pass());
}

Powered by Google App Engine
This is Rietveld 408576698