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

Unified Diff: remoting/host/desktop_session_proxy.cc

Issue 2451953002: Use ChannelMojo between the remoting network and desktop processes. (Closed)
Patch Set: Created 4 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 | « remoting/host/desktop_session_proxy.h ('k') | remoting/host/desktop_session_win.h » ('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 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.
« no previous file with comments | « remoting/host/desktop_session_proxy.h ('k') | remoting/host/desktop_session_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698