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

Unified Diff: remoting/host/desktop_process.cc

Issue 1679763002: Clean up public interface of AttachmentBrokerUnprivileged. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from tsepez. Created 4 years, 10 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
Index: remoting/host/desktop_process.cc
diff --git a/remoting/host/desktop_process.cc b/remoting/host/desktop_process.cc
index 749fd657f619dc9ab9b40cc05cd7822b1c387332..e395c23f6aa74754c5451821dbf1bb948a7e1dab 100644
--- a/remoting/host/desktop_process.cc
+++ b/remoting/host/desktop_process.cc
@@ -147,14 +147,10 @@ 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());
- }
+ IPC::AttachmentBrokerUnprivileged::CreateBrokerIfNeeded();
+ IPC::AttachmentBroker* global = IPC::AttachmentBroker::GetGlobal();
Sergey Ulanov 2016/02/10 19:36:35 nit: call this broker instead of global.
erikchen 2016/02/10 21:04:46 Done.
+ if (global && !global->IsPrivilegedBroker())
+ global->DesignateBrokerCommunicationChannel(daemon_channel_.get());
// Pass |desktop_pipe| to the daemon.
daemon_channel_->Send(

Powered by Google App Engine
This is Rietveld 408576698