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

Unified Diff: components/page_load_metrics/browser/page_load_metrics_observer.h

Issue 1900343003: Provide currently_committed_url to PageLoadMetricsObservers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 8 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 | « components/page_load_metrics/browser/metrics_web_contents_observer_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/page_load_metrics/browser/page_load_metrics_observer.h
diff --git a/components/page_load_metrics/browser/page_load_metrics_observer.h b/components/page_load_metrics/browser/page_load_metrics_observer.h
index 659eaa59b3bcfc3ac24489b0effe1f0b272e39cd..d828c0c7074352bf7830a68917022115647d783c 100644
--- a/components/page_load_metrics/browser/page_load_metrics_observer.h
+++ b/components/page_load_metrics/browser/page_load_metrics_observer.h
@@ -97,8 +97,16 @@ class PageLoadMetricsObserver {
public:
virtual ~PageLoadMetricsObserver() {}
- // The page load started, with the given navigation handle.
- virtual void OnStart(content::NavigationHandle* navigation_handle) {}
+ // The page load started, with the given navigation handle. Note that OnStart
+ // is called for same-page navigations. Implementers of OnStart that only want
+ // to process non-same-page navigations should also check to see that the page
+ // load committed via OnCommit or committed_url in
+ // PageLoadExtraInfo. currently_committed_url contains the URL of the
+ // committed page load at the time the navigation for navigation_handle was
+ // initiated, or the empty URL if there was no committed page load at the time
+ // the navigation was initiated.
+ virtual void OnStart(content::NavigationHandle* navigation_handle,
+ const GURL& currently_committed_url) {}
// OnRedirect is triggered when a page load redirects to another URL.
// The navigation handle holds relevant data for the navigation, but will
« no previous file with comments | « components/page_load_metrics/browser/metrics_web_contents_observer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698