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

Unified Diff: components/nacl/broker/nacl_broker_listener.cc

Issue 2434103002: Remove uses of AttachmentBroker from //content and //components/nacl. (Closed)
Patch Set: Created 4 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 | « no previous file | components/nacl/loader/nacl_listener.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 978d061876c13f56847588323622ba31878071ca..c928b001063d414fde356e6c168d477cf0d21078 100644
--- a/components/nacl/broker/nacl_broker_listener.cc
+++ b/components/nacl/broker/nacl_broker_listener.cc
@@ -23,7 +23,6 @@
#include "content/public/common/content_switches.h"
#include "content/public/common/mojo_channel_switches.h"
#include "content/public/common/sandbox_init.h"
-#include "ipc/attachment_broker_unprivileged.h"
#include "ipc/ipc_channel.h"
#include "mojo/edk/embedder/embedder.h"
#include "mojo/edk/embedder/platform_channel_pair.h"
@@ -38,15 +37,9 @@ void SendReply(IPC::Channel* channel, int32_t pid, bool result) {
} // namespace
-NaClBrokerListener::NaClBrokerListener() {
- IPC::AttachmentBrokerUnprivileged::CreateBrokerIfNeeded();
-}
+NaClBrokerListener::NaClBrokerListener() = default;
-NaClBrokerListener::~NaClBrokerListener() {
- IPC::AttachmentBroker* broker = IPC::AttachmentBroker::GetGlobal();
- if (broker && !broker->IsPrivilegedBroker() && channel_)
- broker->DeregisterBrokerCommunicationChannel(channel_.get());
-}
+NaClBrokerListener::~NaClBrokerListener() = default;
void NaClBrokerListener::Listen() {
mojo::ScopedMessagePipeHandle handle(
@@ -57,9 +50,6 @@ void NaClBrokerListener::Listen() {
IPC::ChannelHandle channel_handle(handle.release());
channel_ = IPC::Channel::CreateClient(channel_handle, this);
- IPC::AttachmentBroker* broker = IPC::AttachmentBroker::GetGlobal();
- if (broker && !broker->IsPrivilegedBroker())
- broker->RegisterBrokerCommunicationChannel(channel_.get());
CHECK(channel_->Connect());
run_loop_.Run();
}
« no previous file with comments | « no previous file | components/nacl/loader/nacl_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698