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

Unified Diff: remoting/host/win/wts_session_process_delegate.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/win/unprivileged_process_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/win/wts_session_process_delegate.cc
diff --git a/remoting/host/win/wts_session_process_delegate.cc b/remoting/host/win/wts_session_process_delegate.cc
index e9f1ef05993dd14892f227faf377bd0937bd286b..780531c0e674f70698b203a6e155d828ad4b8e4f 100644
--- a/remoting/host/win/wts_session_process_delegate.cc
+++ b/remoting/host/win/wts_session_process_delegate.cc
@@ -20,7 +20,6 @@
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/win/scoped_handle.h"
-#include "ipc/attachment_broker.h"
#include "ipc/ipc_channel.h"
#include "ipc/ipc_channel_proxy.h"
#include "ipc/ipc_listener.h"
@@ -256,8 +255,6 @@ void WtsSessionProcessDelegate::Core::CloseChannel() {
if (!channel_)
return;
- IPC::AttachmentBroker::GetGlobal()->DeregisterCommunicationChannel(
- channel_.get());
channel_.reset();
elevated_server_handle_.reset();
elevated_launcher_pid_ = base::kNullProcessId;
@@ -365,14 +362,11 @@ void WtsSessionProcessDelegate::Core::DoLaunchProcess() {
const std::string mojo_message_pipe_token = mojo::edk::GenerateRandomToken();
mojo_child_token_ = mojo::edk::GenerateRandomToken();
- std::unique_ptr<IPC::ChannelProxy> channel(
- new IPC::ChannelProxy(this, io_task_runner_));
- IPC::AttachmentBroker::GetGlobal()->RegisterCommunicationChannel(
- channel.get(), io_task_runner_);
- channel->Init(mojo::edk::CreateParentMessagePipe(mojo_message_pipe_token,
- mojo_child_token_)
- .release(),
- IPC::Channel::MODE_SERVER, /*create_pipe_now=*/true);
+ std::unique_ptr<IPC::ChannelProxy> channel = IPC::ChannelProxy::Create(
+ mojo::edk::CreateParentMessagePipe(mojo_message_pipe_token,
+ mojo_child_token_)
+ .release(),
+ IPC::Channel::MODE_SERVER, this, io_task_runner_);
command_line.AppendSwitchASCII(kMojoPipeToken, mojo_message_pipe_token);
std::unique_ptr<mojo::edk::PlatformChannelPair> normal_mojo_channel;
« no previous file with comments | « remoting/host/win/unprivileged_process_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698