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

Unified Diff: content/common/child_process_host_impl.cc

Issue 2143893007: Remove attachment brokering from non-NaCl child processes. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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 | « content/child/child_thread_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/child_process_host_impl.cc
diff --git a/content/common/child_process_host_impl.cc b/content/common/child_process_host_impl.cc
index 1dc475da37204b298226e7500c7f1b674a74a6e3..6bdb01233ef8f0ee470f8a9608d96e3917a9a990 100644
--- a/content/common/child_process_host_impl.cc
+++ b/content/common/child_process_host_impl.cc
@@ -26,8 +26,6 @@
#include "content/public/common/content_paths.h"
#include "content/public/common/content_switches.h"
#include "gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.h"
-#include "ipc/attachment_broker.h"
-#include "ipc/attachment_broker_privileged.h"
#include "ipc/ipc_channel.h"
#include "ipc/ipc_channel_mojo.h"
#include "ipc/ipc_logging.h"
@@ -89,19 +87,6 @@ ChildProcessHostImpl::ChildProcessHostImpl(ChildProcessHostDelegate* delegate)
#if defined(OS_WIN)
AddFilter(new FontCacheDispatcher());
#endif
-
-#if USE_ATTACHMENT_BROKER
-#if defined(OS_MACOSX)
- // On Mac, the privileged AttachmentBroker needs a reference to the Mach port
- // Provider, which is only available in the chrome/ module. The attachment
- // broker must already be created.
- DCHECK(IPC::AttachmentBroker::GetGlobal());
-#else
- // Construct the privileged attachment broker early in the life cycle of a
- // child process.
- IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded();
-#endif // defined(OS_MACOSX)
-#endif // USE_ATTACHMENT_BROKER
}
ChildProcessHostImpl::~ChildProcessHostImpl() {
@@ -111,10 +96,6 @@ ChildProcessHostImpl::~ChildProcessHostImpl() {
if (!channel_)
return;
-#if USE_ATTACHMENT_BROKER
- IPC::AttachmentBroker::GetGlobal()->DeregisterCommunicationChannel(
- channel_.get());
-#endif
for (size_t i = 0; i < filters_.size(); ++i) {
filters_[i]->OnChannelClosing();
filters_[i]->OnFilterRemoved();
@@ -157,17 +138,8 @@ std::string ChildProcessHostImpl::CreateChannel() {
}
bool ChildProcessHostImpl::InitChannel() {
-#if USE_ATTACHMENT_BROKER
- IPC::AttachmentBroker::GetGlobal()->RegisterCommunicationChannel(
- channel_.get(), base::MessageLoopForIO::current()->task_runner());
-#endif
- if (!channel_->Connect()) {
-#if USE_ATTACHMENT_BROKER
- IPC::AttachmentBroker::GetGlobal()->DeregisterCommunicationChannel(
- channel_.get());
-#endif
+ if (!channel_->Connect())
return false;
- }
for (size_t i = 0; i < filters_.size(); ++i)
filters_[i]->OnFilterAdded(channel_.get());
« no previous file with comments | « content/child/child_thread_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698