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

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: Attach the throttle first so it gets all notifications before any DEFERs 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 889c4b9faa487a5c7d665e4f10b0730f3c0347c7..9111fca39b41bd309a5c22883080be830c6136d0 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -126,6 +126,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"
@@ -2920,6 +2921,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