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

Unified Diff: components/nacl/loader/nacl_listener.cc

Issue 1704743002: Revert of Clean up public interface of AttachmentBrokerUnprivileged. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « components/nacl/loader/nacl_listener.h ('k') | content/child/child_thread_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/loader/nacl_listener.cc
diff --git a/components/nacl/loader/nacl_listener.cc b/components/nacl/loader/nacl_listener.cc
index 01c8c24d1f5984366ac44569a160b7238c89ea00..fae25366e0d89450600f9cefa15b2f917783f709 100644
--- a/components/nacl/loader/nacl_listener.cc
+++ b/components/nacl/loader/nacl_listener.cc
@@ -196,7 +196,8 @@
#endif
main_loop_(NULL),
is_started_(false) {
- IPC::AttachmentBrokerUnprivileged::CreateBrokerIfNeeded();
+ attachment_broker_.reset(
+ IPC::AttachmentBrokerUnprivileged::CreateBroker().release());
io_thread_.StartWithOptions(
base::Thread::Options(base::MessageLoop::TYPE_IO, 0));
DCHECK(g_listener == NULL);
@@ -257,9 +258,8 @@
filter_ = channel_->CreateSyncMessageFilter();
channel_->AddFilter(new FileTokenMessageFilter());
channel_->Init(channel_name, IPC::Channel::MODE_CLIENT, true);
- IPC::AttachmentBroker* global = IPC::AttachmentBroker::GetGlobal();
- if (global && !global->IsPrivilegedBroker())
- global->RegisterBrokerCommunicationChannel(channel_.get());
+ if (attachment_broker_.get())
+ attachment_broker_->DesignateBrokerCommunicationChannel(channel_.get());
main_loop_ = base::MessageLoop::current();
main_loop_->Run();
}
« no previous file with comments | « components/nacl/loader/nacl_listener.h ('k') | content/child/child_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698