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

Unified Diff: remoting/host/daemon_process_win.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/daemon_process_unittest.cc ('k') | remoting/host/desktop_process.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/daemon_process_win.cc
diff --git a/remoting/host/daemon_process_win.cc b/remoting/host/daemon_process_win.cc
index dd7959f491255f007806783bca9af070f5f5e0fa..94e8e333aa4f5ea633b63974d1ac4da3e95a58a6 100644
--- a/remoting/host/daemon_process_win.cc
+++ b/remoting/host/daemon_process_win.cc
@@ -23,6 +23,7 @@
#include "base/win/registry.h"
#include "base/win/scoped_handle.h"
#include "base/win/win_util.h"
+#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_message.h"
#include "ipc/ipc_message_macros.h"
#include "mojo/edk/embedder/scoped_ipc_support.h"
@@ -82,8 +83,7 @@ class DaemonProcessWin : public DaemonProcess {
void SendToNetwork(IPC::Message* message) override;
bool OnDesktopSessionAgentAttached(
int terminal_id,
- base::ProcessHandle desktop_process,
- IPC::PlatformFileForTransit desktop_pipe) override;
+ const IPC::ChannelHandle& desktop_pipe) override;
protected:
// DaemonProcess implementation.
@@ -174,25 +174,9 @@ void DaemonProcessWin::SendToNetwork(IPC::Message* message) {
bool DaemonProcessWin::OnDesktopSessionAgentAttached(
int terminal_id,
- base::ProcessHandle desktop_process,
- IPC::PlatformFileForTransit desktop_pipe) {
- // Prepare |desktop_process| handle for sending over to the network process.
- base::ProcessHandle desktop_process_for_transit;
- if (!DuplicateHandle(GetCurrentProcess(),
- desktop_process,
- network_process_.Get(),
- &desktop_process_for_transit,
- 0,
- FALSE,
- DUPLICATE_SAME_ACCESS)) {
- PLOG(ERROR) << "Failed to duplicate the desktop process handle";
- return false;
- }
-
- // |desktop_pipe| is a handle in the desktop process. It will be duplicated
- // by the network process directly from the desktop process.
+ const IPC::ChannelHandle& desktop_pipe) {
SendToNetwork(new ChromotingDaemonNetworkMsg_DesktopAttached(
- terminal_id, desktop_process_for_transit, desktop_pipe));
+ terminal_id, desktop_pipe));
return true;
}
« no previous file with comments | « remoting/host/daemon_process_unittest.cc ('k') | remoting/host/desktop_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698