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

Unified Diff: remoting/host/ipc_desktop_environment.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/ipc_desktop_environment.h ('k') | remoting/host/ipc_desktop_environment_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/ipc_desktop_environment.cc
diff --git a/remoting/host/ipc_desktop_environment.cc b/remoting/host/ipc_desktop_environment.cc
index a5d58089c7a491683242f6d764015b85c8a2ce2a..9cafaf932a1e3f28706f01d9a844942330a2b619 100644
--- a/remoting/host/ipc_desktop_environment.cc
+++ b/remoting/host/ipc_desktop_environment.cc
@@ -12,6 +12,7 @@
#include "base/process/process_handle.h"
#include "base/single_thread_task_runner.h"
#include "build/build_config.h"
+#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_sender.h"
#include "remoting/host/audio_capturer.h"
#include "remoting/host/chromoting_messages.h"
@@ -165,26 +166,21 @@ void IpcDesktopEnvironmentFactory::SetScreenResolution(
void IpcDesktopEnvironmentFactory::OnDesktopSessionAgentAttached(
int terminal_id,
- base::ProcessHandle desktop_process_handle,
- IPC::PlatformFileForTransit desktop_pipe) {
+ const IPC::ChannelHandle& desktop_pipe) {
if (!caller_task_runner_->BelongsToCurrentThread()) {
- caller_task_runner_->PostTask(FROM_HERE, base::Bind(
- &IpcDesktopEnvironmentFactory::OnDesktopSessionAgentAttached,
- base::Unretained(this), terminal_id, desktop_process_handle,
- desktop_pipe));
+ caller_task_runner_->PostTask(
+ FROM_HERE,
+ base::Bind(&IpcDesktopEnvironmentFactory::OnDesktopSessionAgentAttached,
+ base::Unretained(this), terminal_id, desktop_pipe));
return;
}
- base::Process desktop_process(desktop_process_handle);
ActiveConnectionsList::iterator i = active_connections_.find(terminal_id);
if (i != active_connections_.end()) {
i->second->DetachFromDesktop();
- i->second->AttachToDesktop(std::move(desktop_process), desktop_pipe);
+ i->second->AttachToDesktop(desktop_pipe);
} else {
-#if defined(OS_POSIX)
- DCHECK(desktop_pipe.auto_close);
- base::File pipe_closer(IPC::PlatformFileForTransitToFile(desktop_pipe));
-#endif // defined(OS_POSIX)
+ mojo::ScopedMessagePipeHandle closer(desktop_pipe.mojo_handle);
}
}
« no previous file with comments | « remoting/host/ipc_desktop_environment.h ('k') | remoting/host/ipc_desktop_environment_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698