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) { |