Index: components/nacl/broker/nacl_broker_listener.cc |
diff --git a/components/nacl/broker/nacl_broker_listener.cc b/components/nacl/broker/nacl_broker_listener.cc |
index 78da409e0abe7e3fa0e3c0b3b40a1789e4e82731..cb104058082acf4b120eae0c92599ed514475122 100644 |
--- a/components/nacl/broker/nacl_broker_listener.cc |
+++ b/components/nacl/broker/nacl_broker_listener.cc |
@@ -32,7 +32,8 @@ |
} // namespace |
NaClBrokerListener::NaClBrokerListener() { |
- IPC::AttachmentBrokerUnprivileged::CreateBrokerIfNeeded(); |
+ attachment_broker_.reset( |
+ IPC::AttachmentBrokerUnprivileged::CreateBroker().release()); |
} |
NaClBrokerListener::~NaClBrokerListener() { |
@@ -43,9 +44,8 @@ |
base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
switches::kProcessChannelID); |
channel_ = IPC::Channel::CreateClient(channel_name, this); |
- IPC::AttachmentBroker* global = IPC::AttachmentBroker::GetGlobal(); |
- if (global && !global->IsPrivilegedBroker()) |
- global->DesignateBrokerCommunicationChannel(channel_.get()); |
+ if (attachment_broker_.get()) |
+ attachment_broker_->DesignateBrokerCommunicationChannel(channel_.get()); |
CHECK(channel_->Connect()); |
base::MessageLoop::current()->Run(); |
} |