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

Unified Diff: content/child/child_thread_impl.cc

Issue 2755813002: Begin to wean child processes off reliance on a persistent service_manager::Connection to the brows… (Closed)
Patch Set: . Created 3 years, 9 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/child/push_messaging/push_provider.cc » ('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 458604f431af855cc781862bbec924b85e2ad701..1369ba4faf3cfaf89b07dee0f7800ce4a86b1837 100644
--- a/content/child/child_thread_impl.cc
+++ b/content/child/child_thread_impl.cc
@@ -454,13 +454,10 @@ void ChildThreadImpl::Init(const Options& options) {
// When connect_to_browser is true, we obtain interfaces from the browser
// process by connecting to it, rather than from the incoming interface
// provider. Exposed interfaces are subject to manifest capability spec.
- service_manager::InterfaceProvider* remote_interfaces = nullptr;
if (options.connect_to_browser) {
browser_connection_ =
service_manager_connection_->GetConnector()->Connect(
mojom::kBrowserServiceName);
- } else {
- remote_interfaces = GetRemoteInterfaces();
}
// TODO(rockot): Remove this once all child-to-browser interface connections
@@ -468,7 +465,7 @@ void ChildThreadImpl::Init(const Options& options) {
// InterfaceProvider, and all exposed interfaces are exposed via a
// ConnectionFilter.
service_manager_connection_->SetupInterfaceRequestProxies(
- GetInterfaceRegistry(), remote_interfaces);
+ GetInterfaceRegistry(), nullptr);
}
sync_message_filter_ = channel_->CreateSyncMessageFilter();
@@ -507,7 +504,7 @@ void ChildThreadImpl::Init(const Options& options) {
channel_->AddFilter(new ChildMemoryMessageFilter());
memory_instrumentation::MemoryDumpManagerDelegateImpl::Config config(
- GetRemoteInterfaces());
+ GetConnector(), mojom::kBrowserServiceName);
auto delegate =
base::MakeUnique<memory_instrumentation::MemoryDumpManagerDelegateImpl>(
config);
@@ -652,13 +649,8 @@ service_manager::InterfaceRegistry* ChildThreadImpl::GetInterfaceRegistry() {
return interface_registry_.get();
}
-service_manager::InterfaceProvider* ChildThreadImpl::GetRemoteInterfaces() {
- if (browser_connection_)
- return browser_connection_->GetRemoteInterfaces();
-
- if (!remote_interfaces_.get())
- remote_interfaces_.reset(new service_manager::InterfaceProvider);
- return remote_interfaces_.get();
+service_manager::Connector* ChildThreadImpl::GetConnector() {
+ return service_manager_connection_->GetConnector();
}
const service_manager::ServiceInfo&
« no previous file with comments | « content/child/child_thread_impl.h ('k') | content/child/push_messaging/push_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698