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

Unified Diff: remoting/host/desktop_session_proxy.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 | « printing/backend/win_helper.h ('k') | remoting/host/setup/daemon_installer_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/desktop_session_proxy.cc
diff --git a/remoting/host/desktop_session_proxy.cc b/remoting/host/desktop_session_proxy.cc
index 9e52f8d6dbcf35299b2ded382a83c176bb100462..058a2f46a6be24cc6757f0ef96ae721105fd1bc7 100644
--- a/remoting/host/desktop_session_proxy.cc
+++ b/remoting/host/desktop_session_proxy.cc
@@ -230,9 +230,9 @@ bool DesktopSessionProxy::AttachToDesktop(
#if defined(OS_WIN)
// On Windows: |desktop_process| is a valid handle, but |desktop_pipe| needs
// to be duplicated from the desktop process.
- base::win::ScopedHandle pipe;
+ HANDLE temp_handle;
if (!DuplicateHandle(desktop_process_, desktop_pipe, GetCurrentProcess(),
- pipe.Receive(), 0, FALSE, DUPLICATE_SAME_ACCESS)) {
+ &temp_handle, 0, FALSE, DUPLICATE_SAME_ACCESS)) {
LOG_GETLASTERROR(ERROR) << "Failed to duplicate the desktop-to-network"
" pipe handle";
@@ -240,6 +240,7 @@ bool DesktopSessionProxy::AttachToDesktop(
base::CloseProcessHandle(desktop_process);
return false;
}
+ base::win::ScopedHandle pipe(temp_handle);
IPC::ChannelHandle desktop_channel_handle(pipe);
« no previous file with comments | « printing/backend/win_helper.h ('k') | remoting/host/setup/daemon_installer_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698