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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2215133002: Change signature of OnConnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup
Patch Set: . Created 4 years, 4 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/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 dfc936452cbec217cf9dd94545ebc41112090315..f6746da2bd5ad4ba53d7e9820e4c9453e2cbaf07 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -479,13 +479,13 @@ class RenderProcessHostImpl::ConnectionFilterImpl : public ConnectionFilter {
private:
// ConnectionFilter:
- bool OnConnect(shell::Connection* connection,
+ bool OnConnect(const shell::Identity& remote_identity,
+ shell::InterfaceRegistry* registry,
shell::Connector* connector) override {
if (!weak_factory_)
weak_factory_.reset(new base::WeakPtrFactory<ConnectionFilterImpl>(this));
// We only fulfill connections from the renderer we host.
- const shell::Identity& remote_identity = connection->GetRemoteIdentity();
if (child_identity_.name() != remote_identity.name() ||
child_identity_.instance() != remote_identity.instance()) {
return false;
@@ -496,11 +496,10 @@ class RenderProcessHostImpl::ConnectionFilterImpl : public ConnectionFilter {
for (auto& interface_name : interface_names) {
// Note that the added callbacks may outlive this object, which is
// destroyed in RPH::Cleanup().
- connection->GetInterfaceRegistry()->AddInterface(
- interface_name,
- base::Bind(&ConnectionFilterImpl::GetInterface,
- weak_factory_->GetWeakPtr(),
- interface_name));
+ registry->AddInterface(interface_name,
+ base::Bind(&ConnectionFilterImpl::GetInterface,
+ weak_factory_->GetWeakPtr(),
+ interface_name));
}
return true;
}
@@ -1098,7 +1097,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
void RenderProcessHostImpl::RegisterMojoInterfaces() {
std::unique_ptr<shell::InterfaceRegistry> registry(
- new shell::InterfaceRegistry(nullptr));
+ new shell::InterfaceRegistry);
#if defined(OS_ANDROID)
interface_registry_android_ =
InterfaceRegistryAndroid::Create(registry.get());
« no previous file with comments | « content/browser/mojo/mojo_child_connection.cc ('k') | content/browser/service_worker/embedded_worker_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698