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

Unified Diff: remoting/host/desktop_process.cc

Issue 1634933007: remoting: Add AttachmentBroker for daemon and desktop processes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months 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/desktop_process.h ('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/desktop_process.cc
diff --git a/remoting/host/desktop_process.cc b/remoting/host/desktop_process.cc
index b74c94da5bd82688188504d6b8b199ada35ff776..749fd657f619dc9ab9b40cc05cd7822b1c387332 100644
--- a/remoting/host/desktop_process.cc
+++ b/remoting/host/desktop_process.cc
@@ -17,6 +17,7 @@
#include "base/message_loop/message_loop.h"
#include "base/strings/string_util.h"
#include "build/build_config.h"
+#include "ipc/attachment_broker_unprivileged.h"
#include "ipc/ipc_channel_proxy.h"
#include "remoting/base/auto_thread.h"
#include "remoting/base/auto_thread_task_runner.h"
@@ -146,6 +147,15 @@ bool DesktopProcess::Start(
IPC::ChannelProxy::Create(daemon_channel_name_, IPC::Channel::MODE_CLIENT,
this, io_task_runner.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(
new ChromotingDesktopDaemonMsg_DesktopAttached(desktop_pipe));
« no previous file with comments | « remoting/host/desktop_process.h ('k') | remoting/host/win/unprivileged_process_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698