| Index: remoting/host/remoting_me2me_host.cc
|
| diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc
|
| index 6628902f238862048fd1b3a06dc8ebcb133e85bf..9b6aa41bfa6563d4d1b808cfd0bccd9e5f88e671 100644
|
| --- a/remoting/host/remoting_me2me_host.cc
|
| +++ b/remoting/host/remoting_me2me_host.cc
|
| @@ -25,6 +25,7 @@
|
| #include "base/strings/stringize_macros.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "build/build_config.h"
|
| +#include "ipc/attachment_broker_unprivileged.h"
|
| #include "ipc/ipc_channel.h"
|
| #include "ipc/ipc_channel_proxy.h"
|
| #include "ipc/ipc_listener.h"
|
| @@ -381,6 +382,8 @@ class HostProcess : public ConfigWatcher::Delegate,
|
|
|
| scoped_ptr<ChromotingHostContext> context_;
|
|
|
| + scoped_ptr<IPC::AttachmentBrokerUnprivileged> attachment_broker_;
|
| +
|
| // Accessed on the UI thread.
|
| scoped_ptr<IPC::ChannelProxy> daemon_channel_;
|
|
|
| @@ -471,6 +474,7 @@ HostProcess::HostProcess(scoped_ptr<ChromotingHostContext> context,
|
| int* exit_code_out,
|
| ShutdownWatchdog* shutdown_watchdog)
|
| : context_(std::move(context)),
|
| + attachment_broker_(IPC::AttachmentBrokerUnprivileged::CreateBroker()),
|
| state_(HOST_STARTING),
|
| use_service_account_(false),
|
| enable_vp9_(false),
|
| @@ -537,6 +541,11 @@ bool HostProcess::InitWithCommandLine(const base::CommandLine* cmd_line) {
|
| IPC::Channel::MODE_CLIENT,
|
| this,
|
| context_->network_task_runner());
|
| + if (attachment_broker_) {
|
| + attachment_broker_->DesignateBrokerCommunicationChannel(
|
| + daemon_channel_.get());
|
| + }
|
| +
|
| #else // !defined(REMOTING_MULTI_PROCESS)
|
| // Connect to the daemon process.
|
| std::string channel_name =
|
| @@ -545,6 +554,10 @@ bool HostProcess::InitWithCommandLine(const base::CommandLine* cmd_line) {
|
| daemon_channel_ =
|
| IPC::ChannelProxy::Create(channel_name, IPC::Channel::MODE_CLIENT, this,
|
| context_->network_task_runner().get());
|
| + if (attachment_broker_) {
|
| + attachment_broker_->DesignateBrokerCommunicationChannel(
|
| + daemon_channel_.get());
|
| + }
|
| }
|
|
|
| if (cmd_line->HasSwitch(kHostConfigSwitchName)) {
|
|
|