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

Unified Diff: content/child/child_thread_impl.cc

Issue 2653973002: Remove associated interface registration from ChannelProxy (Closed)
Patch Set: Created 3 years, 11 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.h ('k') | content/common/associated_interface_registry_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_thread_impl.cc
diff --git a/content/child/child_thread_impl.cc b/content/child/child_thread_impl.cc
index 2666ba2c2a5b78b534bf7b09cbdacc06485924c0..dd7af7188c898918f0360249e82df489c97de486 100644
--- a/content/child/child_thread_impl.cc
+++ b/content/child/child_thread_impl.cc
@@ -538,10 +538,6 @@ void ChildThreadImpl::Init(const Options& options) {
channel_->AddFilter(startup_filter);
}
- channel_->AddAssociatedInterface(
- base::Bind(&ChildThreadImpl::OnRouteProviderRequest,
- base::Unretained(this)));
-
ConnectChannel();
// This must always be done after ConnectChannel, because ConnectChannel() may
@@ -754,6 +750,20 @@ bool ChildThreadImpl::OnMessageReceived(const IPC::Message& msg) {
return router_.OnMessageReceived(msg);
}
+void ChildThreadImpl::OnAssociatedInterfaceRequest(
+ const std::string& interface_name,
+ mojo::ScopedInterfaceEndpointHandle handle) {
+ if (interface_name == mojom::RouteProvider::Name_) {
+ DCHECK(!route_provider_binding_.is_bound());
+ mojom::RouteProviderAssociatedRequest request;
+ request.Bind(std::move(handle));
+ route_provider_binding_.Bind(std::move(request));
+ } else {
+ LOG(ERROR) << "Request for unknown Channel-associated interface: "
+ << interface_name;
+ }
+}
+
void ChildThreadImpl::StartServiceManagerConnection() {
DCHECK(service_manager_connection_);
service_manager_connection_->Start();
@@ -842,12 +852,6 @@ void ChildThreadImpl::EnsureConnected() {
base::Process::Current().Terminate(0, false);
}
-void ChildThreadImpl::OnRouteProviderRequest(
- mojom::RouteProviderAssociatedRequest request) {
- DCHECK(!route_provider_binding_.is_bound());
- route_provider_binding_.Bind(std::move(request));
-}
-
void ChildThreadImpl::GetRoute(
int32_t routing_id,
mojom::AssociatedInterfaceProviderAssociatedRequest request) {
« no previous file with comments | « content/child/child_thread_impl.h ('k') | content/common/associated_interface_registry_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698