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

Unified Diff: remoting/host/remoting_me2me_host.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_util_win.cc ('k') | remoting/host/win/unprivileged_process_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/remoting_me2me_host.cc
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc
index 32bf2e95c597add936ea8e36c73bdf5a16f49562..cc3a68571494e90309a4ffb225347714f9560672 100644
--- a/remoting/host/remoting_me2me_host.cc
+++ b/remoting/host/remoting_me2me_host.cc
@@ -28,7 +28,6 @@
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "components/policy/policy_constants.h"
-#include "ipc/attachment_broker_unprivileged.h"
#include "ipc/ipc_channel.h"
#include "ipc/ipc_channel_proxy.h"
#include "ipc/ipc_listener.h"
@@ -469,17 +468,11 @@ bool HostProcess::InitWithCommandLine(const base::CommandLine* cmd_line) {
*cmd_line));
// Connect to the daemon process.
- daemon_channel_.reset(
- new IPC::ChannelProxy(this, context_->network_task_runner()));
- IPC::AttachmentBrokerUnprivileged::CreateBrokerIfNeeded();
- IPC::AttachmentBroker* broker = IPC::AttachmentBroker::GetGlobal();
- if (broker && !broker->IsPrivilegedBroker())
- broker->RegisterBrokerCommunicationChannel(daemon_channel_.get());
- daemon_channel_->Init(mojo::edk::CreateChildMessagePipe(
- cmd_line->GetSwitchValueASCII(kMojoPipeToken))
- .release(),
- IPC::Channel::MODE_CLIENT,
- /*create_pipe_now=*/true);
+ daemon_channel_ = IPC::ChannelProxy::Create(
+ mojo::edk::CreateChildMessagePipe(
+ cmd_line->GetSwitchValueASCII(kMojoPipeToken))
+ .release(),
+ IPC::Channel::MODE_CLIENT, this, context_->network_task_runner());
#else // !defined(REMOTING_MULTI_PROCESS)
if (cmd_line->HasSwitch(kHostConfigSwitchName)) {
@@ -862,10 +855,6 @@ void HostProcess::ShutdownOnUiThread() {
policy_watcher_.reset();
#if defined(REMOTING_MULTI_PROCESS)
- IPC::AttachmentBroker* broker = IPC::AttachmentBroker::GetGlobal();
- if (broker && !broker->IsPrivilegedBroker()) {
- broker->DeregisterBrokerCommunicationChannel(daemon_channel_.get());
- }
daemon_channel_.reset();
#endif // defined(REMOTING_MULTI_PROCESS)
« no previous file with comments | « remoting/host/ipc_util_win.cc ('k') | remoting/host/win/unprivileged_process_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698