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

Unified Diff: remoting/host/desktop_process.cc

Issue 1925263002: Fixing an AttachmentBroker problem which broke the windows host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changing the log statement to a DCHECK Created 4 years, 8 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 | « no previous file | remoting/host/ipc_util_win.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 525e1f66bb73b54783c6d3f78c2147e4ec8be031..e3ff18ceba7d485822b52a1d994e63f75434d826 100644
--- a/remoting/host/desktop_process.cc
+++ b/remoting/host/desktop_process.cc
@@ -102,6 +102,8 @@ bool DesktopProcess::Start(
DCHECK(!desktop_environment_factory_);
DCHECK(desktop_environment_factory);
+ IPC::AttachmentBrokerUnprivileged::CreateBrokerIfNeeded();
+
desktop_environment_factory_ = std::move(desktop_environment_factory);
// Launch the audio capturing thread.
@@ -141,11 +143,12 @@ bool DesktopProcess::Start(
// Connect to the daemon.
daemon_channel_.reset(new IPC::ChannelProxy(this, io_task_runner.get()));
- IPC::AttachmentBrokerUnprivileged::CreateBrokerIfNeeded();
IPC::AttachmentBroker* broker = IPC::AttachmentBroker::GetGlobal();
- if (broker && !broker->IsPrivilegedBroker())
+ if (broker && !broker->IsPrivilegedBroker()) {
broker->RegisterBrokerCommunicationChannel(daemon_channel_.get());
- daemon_channel_->Init(daemon_channel_name_, IPC::Channel::MODE_CLIENT, true);
+ }
+ daemon_channel_->Init(daemon_channel_name_, IPC::Channel::MODE_CLIENT,
+ /*create_pipe_now=*/true);
// Pass |desktop_pipe| to the daemon.
daemon_channel_->Send(
« no previous file with comments | « no previous file | remoting/host/ipc_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698