| Index: remoting/host/desktop_session_proxy.cc
|
| diff --git a/remoting/host/desktop_session_proxy.cc b/remoting/host/desktop_session_proxy.cc
|
| index 6f228f83853cab0351db8f0d253a98a9a0d3ed8e..2e924d5b2423f3c2841226cf4db644365b621d11 100644
|
| --- a/remoting/host/desktop_session_proxy.cc
|
| +++ b/remoting/host/desktop_session_proxy.cc
|
| @@ -218,33 +218,17 @@ void DesktopSessionProxy::OnChannelError() {
|
| }
|
|
|
| bool DesktopSessionProxy::AttachToDesktop(
|
| - base::Process desktop_process,
|
| - IPC::PlatformFileForTransit desktop_pipe) {
|
| + const IPC::ChannelHandle& desktop_pipe) {
|
| DCHECK(caller_task_runner_->BelongsToCurrentThread());
|
| DCHECK(!desktop_channel_);
|
| - DCHECK(!desktop_process_.IsValid());
|
|
|
| // Ignore the attach notification if the client session has been disconnected
|
| // already.
|
| if (!client_session_control_.get())
|
| return false;
|
|
|
| - desktop_process_ = std::move(desktop_process);
|
| -
|
| -#if defined(OS_WIN)
|
| - base::win::ScopedHandle pipe(desktop_pipe.GetHandle());
|
| - IPC::ChannelHandle desktop_channel_handle(pipe.Get());
|
| -#elif defined(OS_POSIX)
|
| - // On posix: |desktop_pipe| is a valid file descriptor.
|
| - DCHECK(desktop_pipe.auto_close);
|
| -
|
| - IPC::ChannelHandle desktop_channel_handle(std::string(), desktop_pipe);
|
| -#else
|
| -#error Unsupported platform.
|
| -#endif
|
| -
|
| // Connect to the desktop process.
|
| - desktop_channel_ = IPC::ChannelProxy::Create(desktop_channel_handle,
|
| + desktop_channel_ = IPC::ChannelProxy::Create(desktop_pipe,
|
| IPC::Channel::MODE_CLIENT, this,
|
| io_task_runner_.get());
|
|
|
| @@ -264,9 +248,6 @@ void DesktopSessionProxy::DetachFromDesktop() {
|
| desktop_channel_.reset();
|
| desktop_session_id_ = UINT32_MAX;
|
|
|
| - if (desktop_process_.IsValid())
|
| - desktop_process_.Close();
|
| -
|
| shared_buffers_.clear();
|
|
|
| // Generate fake responses to keep the video capturer in sync.
|
|
|