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

Unified Diff: remoting/host/remoting_me2me_host.cc

Issue 1509063003: Remoting: Remove references to POSIX shared memory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp57_base
Patch Set: Rebase. Created 5 years 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_desktop_environment_unittest.cc ('k') | no next file » | 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 6628902f238862048fd1b3a06dc8ebcb133e85bf..9b6aa41bfa6563d4d1b808cfd0bccd9e5f88e671 100644
--- a/remoting/host/remoting_me2me_host.cc
+++ b/remoting/host/remoting_me2me_host.cc
@@ -25,6 +25,7 @@
#include "base/strings/stringize_macros.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
+#include "ipc/attachment_broker_unprivileged.h"
#include "ipc/ipc_channel.h"
#include "ipc/ipc_channel_proxy.h"
#include "ipc/ipc_listener.h"
@@ -381,6 +382,8 @@ class HostProcess : public ConfigWatcher::Delegate,
scoped_ptr<ChromotingHostContext> context_;
+ scoped_ptr<IPC::AttachmentBrokerUnprivileged> attachment_broker_;
+
// Accessed on the UI thread.
scoped_ptr<IPC::ChannelProxy> daemon_channel_;
@@ -471,6 +474,7 @@ HostProcess::HostProcess(scoped_ptr<ChromotingHostContext> context,
int* exit_code_out,
ShutdownWatchdog* shutdown_watchdog)
: context_(std::move(context)),
+ attachment_broker_(IPC::AttachmentBrokerUnprivileged::CreateBroker()),
state_(HOST_STARTING),
use_service_account_(false),
enable_vp9_(false),
@@ -537,6 +541,11 @@ bool HostProcess::InitWithCommandLine(const base::CommandLine* cmd_line) {
IPC::Channel::MODE_CLIENT,
this,
context_->network_task_runner());
+ if (attachment_broker_) {
+ attachment_broker_->DesignateBrokerCommunicationChannel(
+ daemon_channel_.get());
+ }
+
#else // !defined(REMOTING_MULTI_PROCESS)
// Connect to the daemon process.
std::string channel_name =
@@ -545,6 +554,10 @@ bool HostProcess::InitWithCommandLine(const base::CommandLine* cmd_line) {
daemon_channel_ =
IPC::ChannelProxy::Create(channel_name, IPC::Channel::MODE_CLIENT, this,
context_->network_task_runner().get());
+ if (attachment_broker_) {
+ attachment_broker_->DesignateBrokerCommunicationChannel(
+ daemon_channel_.get());
+ }
}
if (cmd_line->HasSwitch(kHostConfigSwitchName)) {
« no previous file with comments | « remoting/host/ipc_desktop_environment_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698