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

Unified Diff: chrome/renderer/chrome_content_renderer_client.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 | « chrome/gpu/chrome_content_gpu_client.cc ('k') | chrome/renderer/chrome_render_thread_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_content_renderer_client.cc
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index af761dcb5b2b5b1a0549e096fb8ad7aa82879132..54da6a309ee4f897f222b19ab9e825014b009b97 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -87,6 +87,7 @@
#include "components/web_cache/renderer/web_cache_impl.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/content_switches.h"
+#include "content/public/common/service_names.mojom.h"
#include "content/public/common/url_constants.h"
#include "content/public/renderer/plugin_instance_throttler.h"
#include "content/public/renderer/render_frame.h"
@@ -102,7 +103,7 @@
#include "ppapi/features/features.h"
#include "ppapi/shared_impl/ppapi_switches.h"
#include "printing/features/features.h"
-#include "services/service_manager/public/cpp/interface_provider.h"
+#include "services/service_manager/public/cpp/connector.h"
#include "third_party/WebKit/public/platform/URLConversion.h"
#include "third_party/WebKit/public/platform/WebCache.h"
#include "third_party/WebKit/public/platform/WebCachePolicy.h"
@@ -358,13 +359,15 @@ void ChromeContentRendererClient::RenderThreadStarted() {
{
startup_metric_utils::mojom::StartupMetricHostPtr startup_metric_host;
- thread->GetRemoteInterfaces()->GetInterface(&startup_metric_host);
+ thread->GetConnector()->BindInterface(content::mojom::kBrowserServiceName,
+ &startup_metric_host);
startup_metric_host->RecordRendererMainEntryTime(main_entry_time_);
}
#if defined(OS_WIN)
if (base::FeatureList::IsEnabled(features::kModuleDatabase)) {
- thread->GetRemoteInterfaces()->GetInterface(&module_event_sink_);
+ thread->GetConnector()->BindInterface(content::mojom::kBrowserServiceName,
+ &module_event_sink_);
// Rebind the ModuleEventSink so that it can be accessed on the IO thread.
module_event_sink_.Bind(module_event_sink_.PassInterface(),
@@ -1359,15 +1362,19 @@ ChromeContentRendererClient::CreateBrowserPluginDelegate(
void ChromeContentRendererClient::RecordRappor(const std::string& metric,
const std::string& sample) {
- if (!rappor_recorder_)
- RenderThread::Get()->GetRemoteInterfaces()->GetInterface(&rappor_recorder_);
+ if (!rappor_recorder_) {
+ RenderThread::Get()->GetConnector()->BindInterface(
+ content::mojom::kBrowserServiceName, &rappor_recorder_);
+ }
rappor_recorder_->RecordRappor(metric, sample);
}
void ChromeContentRendererClient::RecordRapporURL(const std::string& metric,
const GURL& url) {
- if (!rappor_recorder_)
- RenderThread::Get()->GetRemoteInterfaces()->GetInterface(&rappor_recorder_);
+ if (!rappor_recorder_) {
+ RenderThread::Get()->GetConnector()->BindInterface(
+ content::mojom::kBrowserServiceName, &rappor_recorder_);
+ }
rappor_recorder_->RecordRapporURL(metric, url);
}
« no previous file with comments | « chrome/gpu/chrome_content_gpu_client.cc ('k') | chrome/renderer/chrome_render_thread_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698