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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 2022413002: Convert startup_metric_utils to use mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@message-mojom-magic
Patch Set: only create the target startup_metric_utils_win on windows Created 4 years, 6 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/renderer/BUILD.gn ('k') | components/crash.gypi » ('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 efba19801dc7af0390ae964e0a15768093417523..c0a4a7f546bb91019200e2ac4ffc215b836df8ab 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -75,13 +75,14 @@
#include "components/pdf/renderer/pepper_pdf_host.h"
#include "components/plugins/renderer/mobile_youtube_plugin.h"
#include "components/signin/core/common/profile_management_switches.h"
-#include "components/startup_metric_utils/common/startup_metric_messages.h"
+#include "components/startup_metric_utils/common/startup_metric.mojom.h"
#include "components/subresource_filter/content/renderer/subresource_filter_agent.h"
#include "components/version_info/version_info.h"
#include "components/visitedlink/renderer/visitedlink_slave.h"
#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_registry.h"
#include "content/public/common/url_constants.h"
#include "content/public/renderer/plugin_instance_throttler.h"
#include "content/public/renderer/render_frame.h"
@@ -327,8 +328,12 @@ ChromeContentRendererClient::~ChromeContentRendererClient() {
void ChromeContentRendererClient::RenderThreadStarted() {
RenderThread* thread = RenderThread::Get();
- thread->Send(new StartupMetricHostMsg_RecordRendererMainEntryTime(
- main_entry_time_));
+ {
+ startup_metric_utils::mojom::StartupMetricHostPtr startup_metric_host;
+ thread->GetServiceRegistry()->ConnectToRemoteService(
+ mojo::GetProxy(&startup_metric_host));
+ startup_metric_host->RecordRendererMainEntryTime(main_entry_time_);
+ }
chrome_observer_.reset(new ChromeRenderThreadObserver());
web_cache_impl_.reset(new web_cache::WebCacheImpl());
« no previous file with comments | « chrome/renderer/BUILD.gn ('k') | components/crash.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698