| Index: remoting/host/desktop_process.cc
|
| diff --git a/remoting/host/desktop_process.cc b/remoting/host/desktop_process.cc
|
| index bd0aa5ac075810872bb15e7ebb53261c1fc59790..749fd657f619dc9ab9b40cc05cd7822b1c387332 100644
|
| --- a/remoting/host/desktop_process.cc
|
| +++ b/remoting/host/desktop_process.cc
|
| @@ -147,10 +147,14 @@
|
| IPC::ChannelProxy::Create(daemon_channel_name_, IPC::Channel::MODE_CLIENT,
|
| this, io_task_runner.get());
|
|
|
| - IPC::AttachmentBrokerUnprivileged::CreateBrokerIfNeeded();
|
| - IPC::AttachmentBroker* broker = IPC::AttachmentBroker::GetGlobal();
|
| - if (broker && !broker->IsPrivilegedBroker())
|
| - broker->DesignateBrokerCommunicationChannel(daemon_channel_.get());
|
| + // Attachment broker may be already created in tests.
|
| + if (!IPC::AttachmentBroker::GetGlobal())
|
| + attachment_broker_ = IPC::AttachmentBrokerUnprivileged::CreateBroker();
|
| +
|
| + if (attachment_broker_) {
|
| + attachment_broker_->DesignateBrokerCommunicationChannel(
|
| + daemon_channel_.get());
|
| + }
|
|
|
| // Pass |desktop_pipe| to the daemon.
|
| daemon_channel_->Send(
|
|
|