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

Unified Diff: remoting/host/win/unprivileged_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/remoting_me2me_host.cc ('k') | remoting/host/win/wts_session_process_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/win/unprivileged_process_delegate.cc
diff --git a/remoting/host/win/unprivileged_process_delegate.cc b/remoting/host/win/unprivileged_process_delegate.cc
index c938561034d91e32291cfeaddb9bb04cd352de97..c9f00415107d6b597d39c84d6c03217fd19a321b 100644
--- a/remoting/host/win/unprivileged_process_delegate.cc
+++ b/remoting/host/win/unprivileged_process_delegate.cc
@@ -22,7 +22,6 @@
#include "base/strings/utf_string_conversions.h"
#include "base/synchronization/lock.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_message.h"
@@ -287,14 +286,11 @@ void UnprivilegedProcessDelegate::LaunchProcess(
const std::string mojo_child_token = mojo::edk::GenerateRandomToken();
const std::string mojo_message_pipe_token = mojo::edk::GenerateRandomToken();
- std::unique_ptr<IPC::ChannelProxy> server =
- base::MakeUnique<IPC::ChannelProxy>(this, io_task_runner_);
- IPC::AttachmentBroker::GetGlobal()->RegisterCommunicationChannel(
- server.get(), io_task_runner_);
- server->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> server = IPC::ChannelProxy::Create(
+ mojo::edk::CreateParentMessagePipe(mojo_message_pipe_token,
+ mojo_child_token)
+ .release(),
+ IPC::Channel::MODE_SERVER, this, io_task_runner_);
base::CommandLine command_line(target_command_->argv());
command_line.AppendSwitchASCII(kMojoPipeToken, mojo_message_pipe_token);
@@ -338,12 +334,6 @@ void UnprivilegedProcessDelegate::Send(IPC::Message* message) {
void UnprivilegedProcessDelegate::CloseChannel() {
DCHECK(CalledOnValidThread());
-
- if (!channel_)
- return;
-
- IPC::AttachmentBroker::GetGlobal()->DeregisterCommunicationChannel(
- channel_.get());
channel_.reset();
}
« no previous file with comments | « remoting/host/remoting_me2me_host.cc ('k') | remoting/host/win/wts_session_process_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698