Index: remoting/host/remoting_me2me_host.cc |
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc |
index a4a5bc3b874f5948f8681f717f73f6a6fd0ba3e7..2d4e5c750162602e698af7c5f4cae36dd8b50326 100644 |
--- a/remoting/host/remoting_me2me_host.cc |
+++ b/remoting/host/remoting_me2me_host.cc |
@@ -20,6 +20,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" |
@@ -315,6 +316,8 @@ class HostProcess : public ConfigWatcher::Delegate, |
scoped_ptr<ChromotingHostContext> context_; |
+ scoped_ptr<IPC::AttachmentBrokerUnprivileged> attachment_broker_; |
Sergey Ulanov
2015/12/12 06:41:33
Why do we need attachment broker now, but didn't n
erikchen
2015/12/18 19:14:10
An attachment broker is needed in each process tha
|
+ |
// Accessed on the UI thread. |
scoped_ptr<IPC::ChannelProxy> daemon_channel_; |
@@ -405,6 +408,8 @@ HostProcess::HostProcess(scoped_ptr<ChromotingHostContext> context, |
int* exit_code_out, |
ShutdownWatchdog* shutdown_watchdog) |
: context_(context.Pass()), |
+ attachment_broker_(IPC::AttachmentBrokerUnprivileged::CreateBroker() |
+ .release()), |
Sergey Ulanov
2015/12/12 06:41:33
don't need release() here
erikchen
2015/12/18 19:14:10
Done.
|
state_(HOST_STARTING), |
use_service_account_(false), |
enable_vp9_(false), |
@@ -471,6 +476,9 @@ bool HostProcess::InitWithCommandLine(const base::CommandLine* cmd_line) { |
IPC::Channel::MODE_CLIENT, |
this, |
context_->network_task_runner()); |
+ attachment_broker_->DesignateBrokerCommunicationChannel( |
Sergey Ulanov
2015/12/12 06:41:33
Comments for IPC::AttachmentBrokerUnprivileged::Cr
erikchen
2015/12/18 19:14:10
good point. Added a conditional.
|
+ daemon_channel_.get()); |
+ |
#else // !defined(REMOTING_MULTI_PROCESS) |
// Connect to the daemon process. |
std::string channel_name = |
@@ -479,6 +487,8 @@ 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()); |
+ attachment_broker_->DesignateBrokerCommunicationChannel( |
+ daemon_channel_.get()); |
} |
if (cmd_line->HasSwitch(kHostConfigSwitchName)) { |