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

Unified Diff: ipc/attachment_broker_mac_unittest.cc

Issue 1414603003: ipc: Move AttachmentBrokerPrivileged singleton logic into ipc/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor formatting. Created 5 years, 2 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 | « ipc/attachment_broker.cc ('k') | ipc/attachment_broker_privileged.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/attachment_broker_mac_unittest.cc
diff --git a/ipc/attachment_broker_mac_unittest.cc b/ipc/attachment_broker_mac_unittest.cc
index 09dfe8489f766abc80031446f098976aa61e0dc2..6ca4fc0367a4c4855f0009541c3e78a11073b025 100644
--- a/ipc/attachment_broker_mac_unittest.cc
+++ b/ipc/attachment_broker_mac_unittest.cc
@@ -455,7 +455,7 @@ using OnMessageReceivedCallback = void (*)(IPC::Sender* sender,
// These objects are globally accessible, and are expected to outlive all IPC
// Channels.
struct ChildProcessGlobals {
- IPC::AttachmentBrokerPrivilegedMac broker;
+ scoped_ptr<IPC::AttachmentBrokerPrivilegedMac> broker;
MockPortProvider port_provider;
base::mac::ScopedMachSendRight server_task_port;
};
@@ -479,8 +479,9 @@ scoped_ptr<ChildProcessGlobals> CommonChildProcessSetUp() {
IPC::ReceiveMachPort(client_port.get()));
scoped_ptr<ChildProcessGlobals> globals(new ChildProcessGlobals);
+ globals->broker.reset(
+ new IPC::AttachmentBrokerPrivilegedMac(&globals->port_provider));
globals->port_provider.InsertEntry(getppid(), server_task_port.get());
- globals->broker.set_port_provider(&globals->port_provider);
globals->server_task_port.reset(server_task_port.release());
return globals;
}
@@ -497,7 +498,7 @@ int CommonPrivilegedProcessMain(OnMessageReceivedCallback callback,
scoped_ptr<IPC::Channel> channel(IPC::Channel::CreateClient(
IPCTestBase::GetChannelName(channel_name), &listener));
- globals->broker.RegisterCommunicationChannel(channel.get());
+ globals->broker->RegisterCommunicationChannel(channel.get());
CHECK(channel->Connect());
while (true) {
« no previous file with comments | « ipc/attachment_broker.cc ('k') | ipc/attachment_broker_privileged.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698