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

Unified Diff: remoting/host/ipc_util_win.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 | « remoting/host/desktop_process.cc ('k') | remoting/host/remoting_me2me_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/ipc_util_win.cc
diff --git a/remoting/host/ipc_util_win.cc b/remoting/host/ipc_util_win.cc
index 5da5f8264fe1fe7ecf00894b889a766e376a1f59..f7f57a6cb8e6271f9036c68ab1ec4dca8dce7d34 100644
--- a/remoting/host/ipc_util_win.cc
+++ b/remoting/host/ipc_util_win.cc
@@ -59,10 +59,13 @@ bool CreateConnectedIpcChannel(
// Wrap the pipe into an IPC channel.
std::unique_ptr<IPC::ChannelProxy> server(
new IPC::ChannelProxy(listener, io_task_runner));
- IPC::AttachmentBroker::GetGlobal()->RegisterCommunicationChannel(
- server.get(), io_task_runner);
+ IPC::AttachmentBroker* broker = IPC::AttachmentBroker::GetGlobal();
+ DCHECK(broker) << "No AttachmentBroker registered.";
+ if (broker->IsPrivilegedBroker()) {
+ broker->RegisterCommunicationChannel(server.get(), io_task_runner);
+ }
server->Init(IPC::ChannelHandle(pipe.Get()), IPC::Channel::MODE_SERVER,
- true);
+ /*create_pipe_now=*/true);
// Convert the channel name to the pipe name.
std::string pipe_name(kChromePipeNamePrefix);
« no previous file with comments | « remoting/host/desktop_process.cc ('k') | remoting/host/remoting_me2me_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698