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

Unified Diff: content/browser/renderer_host/render_process_host_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/browser/renderer_host/render_process_host_impl.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: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 8fc8bdeb97538e04529e7856dc95019caa594a9c..6cfdebce66af35aa3ed0b435200b089b076f1568 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1193,10 +1193,6 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
auto registry = base::MakeUnique<service_manager::InterfaceRegistry>(
service_manager::mojom::kServiceManager_ConnectorSpec);
- channel_->AddAssociatedInterface(
- base::Bind(&RenderProcessHostImpl::OnRouteProviderRequest,
- base::Unretained(this)));
-
channel_->AddAssociatedInterfaceForIOThread(
base::Bind(&IndexedDBDispatcherHost::AddBinding, indexed_db_factory_));
@@ -2065,6 +2061,21 @@ bool RenderProcessHostImpl::OnMessageReceived(const IPC::Message& msg) {
return listener->OnMessageReceived(msg);
}
+void RenderProcessHostImpl::OnAssociatedInterfaceRequest(
+ const std::string& interface_name,
+ mojo::ScopedInterfaceEndpointHandle handle) {
+ if (interface_name == mojom::RouteProvider::Name_) {
+ if (route_provider_binding_.is_bound())
+ return;
+ 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 RenderProcessHostImpl::OnChannelConnected(int32_t peer_pid) {
channel_connected_ = true;
if (IsReady()) {
@@ -2653,13 +2664,6 @@ void RenderProcessHostImpl::CreateSharedRendererHistogramAllocator() {
shm_handle, metrics_allocator_->shared_memory()->mapped_size()));
}
-void RenderProcessHostImpl::OnRouteProviderRequest(
- mojom::RouteProviderAssociatedRequest request) {
- if (route_provider_binding_.is_bound())
- return;
- route_provider_binding_.Bind(std::move(request));
-}
-
void RenderProcessHostImpl::ProcessDied(bool already_dead,
RendererClosedDetails* known_details) {
// Our child process has died. If we didn't expect it, it's a crash.
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/child/child_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698