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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « chrome/renderer/BUILD.gn ('k') | components/crash.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 #include "components/dom_distiller/content/renderer/distillability_agent.h" 68 #include "components/dom_distiller/content/renderer/distillability_agent.h"
69 #include "components/dom_distiller/content/renderer/distiller_js_render_frame_ob server.h" 69 #include "components/dom_distiller/content/renderer/distiller_js_render_frame_ob server.h"
70 #include "components/dom_distiller/core/url_constants.h" 70 #include "components/dom_distiller/core/url_constants.h"
71 #include "components/error_page/common/localized_error.h" 71 #include "components/error_page/common/localized_error.h"
72 #include "components/network_hints/renderer/prescient_networking_dispatcher.h" 72 #include "components/network_hints/renderer/prescient_networking_dispatcher.h"
73 #include "components/page_load_metrics/renderer/metrics_render_frame_observer.h" 73 #include "components/page_load_metrics/renderer/metrics_render_frame_observer.h"
74 #include "components/password_manager/content/renderer/credential_manager_client .h" 74 #include "components/password_manager/content/renderer/credential_manager_client .h"
75 #include "components/pdf/renderer/pepper_pdf_host.h" 75 #include "components/pdf/renderer/pepper_pdf_host.h"
76 #include "components/plugins/renderer/mobile_youtube_plugin.h" 76 #include "components/plugins/renderer/mobile_youtube_plugin.h"
77 #include "components/signin/core/common/profile_management_switches.h" 77 #include "components/signin/core/common/profile_management_switches.h"
78 #include "components/startup_metric_utils/common/startup_metric_messages.h" 78 #include "components/startup_metric_utils/common/startup_metric.mojom.h"
79 #include "components/subresource_filter/content/renderer/subresource_filter_agen t.h" 79 #include "components/subresource_filter/content/renderer/subresource_filter_agen t.h"
80 #include "components/version_info/version_info.h" 80 #include "components/version_info/version_info.h"
81 #include "components/visitedlink/renderer/visitedlink_slave.h" 81 #include "components/visitedlink/renderer/visitedlink_slave.h"
82 #include "components/web_cache/renderer/web_cache_impl.h" 82 #include "components/web_cache/renderer/web_cache_impl.h"
83 #include "content/public/common/content_constants.h" 83 #include "content/public/common/content_constants.h"
84 #include "content/public/common/content_switches.h" 84 #include "content/public/common/content_switches.h"
85 #include "content/public/common/service_registry.h"
85 #include "content/public/common/url_constants.h" 86 #include "content/public/common/url_constants.h"
86 #include "content/public/renderer/plugin_instance_throttler.h" 87 #include "content/public/renderer/plugin_instance_throttler.h"
87 #include "content/public/renderer/render_frame.h" 88 #include "content/public/renderer/render_frame.h"
88 #include "content/public/renderer/render_thread.h" 89 #include "content/public/renderer/render_thread.h"
89 #include "content/public/renderer/render_view.h" 90 #include "content/public/renderer/render_view.h"
90 #include "content/public/renderer/render_view_visitor.h" 91 #include "content/public/renderer/render_view_visitor.h"
91 #include "extensions/common/constants.h" 92 #include "extensions/common/constants.h"
92 #include "ipc/ipc_sync_channel.h" 93 #include "ipc/ipc_sync_channel.h"
93 #include "net/base/net_errors.h" 94 #include "net/base/net_errors.h"
94 #include "ppapi/c/private/ppb_pdf.h" 95 #include "ppapi/c/private/ppb_pdf.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 printing::SetAgent(GetUserAgent()); 321 printing::SetAgent(GetUserAgent());
321 #endif 322 #endif
322 } 323 }
323 324
324 ChromeContentRendererClient::~ChromeContentRendererClient() { 325 ChromeContentRendererClient::~ChromeContentRendererClient() {
325 } 326 }
326 327
327 void ChromeContentRendererClient::RenderThreadStarted() { 328 void ChromeContentRendererClient::RenderThreadStarted() {
328 RenderThread* thread = RenderThread::Get(); 329 RenderThread* thread = RenderThread::Get();
329 330
330 thread->Send(new StartupMetricHostMsg_RecordRendererMainEntryTime( 331 {
331 main_entry_time_)); 332 startup_metric_utils::mojom::StartupMetricHostPtr startup_metric_host;
333 thread->GetServiceRegistry()->ConnectToRemoteService(
334 mojo::GetProxy(&startup_metric_host));
335 startup_metric_host->RecordRendererMainEntryTime(main_entry_time_);
336 }
332 337
333 chrome_observer_.reset(new ChromeRenderThreadObserver()); 338 chrome_observer_.reset(new ChromeRenderThreadObserver());
334 web_cache_impl_.reset(new web_cache::WebCacheImpl()); 339 web_cache_impl_.reset(new web_cache::WebCacheImpl());
335 340
336 #if defined(ENABLE_EXTENSIONS) 341 #if defined(ENABLE_EXTENSIONS)
337 ChromeExtensionsRendererClient::GetInstance()->RenderThreadStarted(); 342 ChromeExtensionsRendererClient::GetInstance()->RenderThreadStarted();
338 #endif 343 #endif
339 344
340 prescient_networking_dispatcher_.reset( 345 prescient_networking_dispatcher_.reset(
341 new network_hints::PrescientNetworkingDispatcher()); 346 new network_hints::PrescientNetworkingDispatcher());
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 // chrome.system.network.getNetworkInterfaces provides the same 1379 // chrome.system.network.getNetworkInterfaces provides the same
1375 // information. Also, the enforcement of sending and binding UDP is already done 1380 // information. Also, the enforcement of sending and binding UDP is already done
1376 // by chrome extension permission model. 1381 // by chrome extension permission model.
1377 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { 1382 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() {
1378 #if defined(ENABLE_EXTENSIONS) 1383 #if defined(ENABLE_EXTENSIONS)
1379 return !IsStandaloneExtensionProcess(); 1384 return !IsStandaloneExtensionProcess();
1380 #else 1385 #else
1381 return true; 1386 return true;
1382 #endif 1387 #endif
1383 } 1388 }
OLDNEW
« 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