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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2132603002: [page_load_metrics] Add a NavigationThrottle for richer abort metrics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clamy@ review Created 4 years, 5 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/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 64036022fb276951403b1cccbbb2cb1c4f24d8a3..bea621a69ec3b676680e1ebe1233469c4284c5cc 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -125,6 +125,7 @@
#include "components/google/core/browser/google_util.h"
#include "components/metrics/client_info.h"
#include "components/net_log/chrome_net_log.h"
+#include "components/page_load_metrics/browser/metrics_navigation_throttle.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/scoped_user_pref_update.h"
@@ -2905,6 +2906,11 @@ ScopedVector<content::NavigationThrottle>
ChromeContentBrowserClient::CreateThrottlesForNavigation(
content::NavigationHandle* handle) {
ScopedVector<content::NavigationThrottle> throttles;
+ if (handle->IsInMainFrame()) {
+ throttles.push_back(
+ page_load_metrics::MetricsNavigationThrottle::Create(handle));
+ }
+
#if defined(OS_ANDROID)
// TODO(davidben): This is insufficient to integrate with prerender properly.
// https://crbug.com/370595

Powered by Google App Engine
This is Rietveld 408576698