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

Unified Diff: content/browser/browser_child_process_host_impl.cc

Issue 2766263009: Convert content ConnectionFilter to OnBindInterface (Closed)
Patch Set: . Created 3 years, 8 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
Index: content/browser/browser_child_process_host_impl.cc
diff --git a/content/browser/browser_child_process_host_impl.cc b/content/browser/browser_child_process_host_impl.cc
index dfc904bb56348ee54eca5681d9ee69ce6b489b4d..788aee0d9f5048d65578a96aa0804e841d4f9a3f 100644
--- a/content/browser/browser_child_process_host_impl.cc
+++ b/content/browser/browser_child_process_host_impl.cc
@@ -90,21 +90,6 @@ void NotifyProcessKilled(const ChildProcessData& data, int exit_code) {
observer.BrowserChildProcessKilled(data, exit_code);
}
-class ConnectionFilterImpl : public ConnectionFilter {
- public:
- ConnectionFilterImpl() {}
-
- private:
- // ConnectionFilter:
- bool OnConnect(const service_manager::Identity& remote_identity,
- service_manager::InterfaceRegistry* registry,
- service_manager::Connector* connector) override {
- return true;
- }
-
- DISALLOW_COPY_AND_ASSIGN(ConnectionFilterImpl);
-};
-
} // namespace
BrowserChildProcessHost* BrowserChildProcessHost::Create(
@@ -188,12 +173,6 @@ BrowserChildProcessHostImpl::BrowserChildProcessHostImpl(
base::ThreadTaskRunnerHandle::Get()));
}
- // May be null during test execution.
- if (ServiceManagerConnection::GetForProcess()) {
- ServiceManagerConnection::GetForProcess()->AddConnectionFilter(
- base::MakeUnique<ConnectionFilterImpl>());
- }
-
// Create a persistent memory segment for subprocess histograms.
CreateMetricsAllocator();
}
@@ -315,13 +294,14 @@ void BrowserChildProcessHostImpl::AddFilter(BrowserMessageFilter* filter) {
child_process_host_->AddFilter(filter->GetFilter());
}
-service_manager::InterfaceProvider*
-BrowserChildProcessHostImpl::GetRemoteInterfaces() {
+void BrowserChildProcessHostImpl::BindInterface(
+ const std::string& interface_name,
+ mojo::ScopedMessagePipeHandle interface_pipe) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (!child_connection_)
- return nullptr;
+ return;
- return child_connection_->GetRemoteInterfaces();
+ child_connection_->BindInterface(interface_name, std::move(interface_pipe));
}
void BrowserChildProcessHostImpl::HistogramBadMessageTerminated(
« no previous file with comments | « content/browser/browser_child_process_host_impl.h ('k') | content/browser/dom_storage/local_storage_context_mojo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698