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

Unified Diff: remoting/host/remoting_me2me_host.cc

Issue 1903663004: IPC: Fix attachment brokering race condition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase (scoped_ptr->std::unique_ptr) 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/ipc_util_win.cc ('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/remoting_me2me_host.cc
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc
index a370b7fe9c205bd1959894c822cd2946685c5a59..0c20c2f4baeff1f370bfcac25df819c68a4795bd 100644
--- a/remoting/host/remoting_me2me_host.cc
+++ b/remoting/host/remoting_me2me_host.cc
@@ -473,15 +473,13 @@ bool HostProcess::InitWithCommandLine(const base::CommandLine* cmd_line) {
#endif // defined(OS_POSIX)
// Connect to the daemon process.
- daemon_channel_ = IPC::ChannelProxy::Create(channel_handle,
- IPC::Channel::MODE_CLIENT,
- this,
- context_->network_task_runner());
-
+ daemon_channel_.reset(
+ new IPC::ChannelProxy(this, context_->network_task_runner()));
IPC::AttachmentBrokerUnprivileged::CreateBrokerIfNeeded();
IPC::AttachmentBroker* broker = IPC::AttachmentBroker::GetGlobal();
if (broker && !broker->IsPrivilegedBroker())
broker->RegisterBrokerCommunicationChannel(daemon_channel_.get());
+ daemon_channel_->Init(channel_handle, IPC::Channel::MODE_CLIENT, true);
#else // !defined(REMOTING_MULTI_PROCESS)
if (cmd_line->HasSwitch(kHostConfigSwitchName)) {
« no previous file with comments | « remoting/host/ipc_util_win.cc ('k') | remoting/host/win/unprivileged_process_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698