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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 1312213010: PageLoadMetrics renderer and browser implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Relax DCHECK constraints slightly for tests Created 5 years, 3 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: 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 a7323cea1cd522c1f9443b76f8820260882f5184..779a8a4cb55243d3705dd389a118073b3d0f2d88 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -62,6 +62,7 @@
#include "components/nacl/renderer/ppb_nacl_private.h"
#include "components/nacl/renderer/ppb_nacl_private_impl.h"
#include "components/network_hints/renderer/prescient_networking_dispatcher.h"
+#include "components/page_load_metrics/renderer/metrics_render_frame_observer.h"
#include "components/password_manager/content/renderer/credential_manager_client.h"
#include "components/pdf/renderer/pepper_pdf_host.h"
#include "components/plugins/renderer/mobile_youtube_plugin.h"
@@ -564,6 +565,12 @@ void ChromeContentRendererClient::RenderFrameCreated(
new NetErrorHelper(render_frame);
}
+ if (render_frame->GetWebFrame()->parent() == nullptr) {
+ // Only attach MainRenderFrameObserver to the main frame, since
+ // we only want to log page load metrics for the main frame.
+ new page_load_metrics::MetricsRenderFrameObserver(render_frame);
+ }
+
PasswordAutofillAgent* password_autofill_agent =
new PasswordAutofillAgent(render_frame);
PasswordGenerationAgent* password_generation_agent =
« no previous file with comments | « chrome/renderer/DEPS ('k') | components/BUILD.gn » ('j') | components/page_load_metrics/OWNERS » ('J')

Powered by Google App Engine
This is Rietveld 408576698