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

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

Issue 2350473002: [page_load_metrics] Add support for chrome:// urls and add extensions observer (Closed)
Patch Set: fix about:blank check Created 4 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/browser/page_load_metrics/page_load_metrics_observer.h
diff --git a/chrome/browser/page_load_metrics/page_load_metrics_observer.h b/chrome/browser/page_load_metrics/page_load_metrics_observer.h
index 9262a358aa96cea00330c86a143f83aa89708c66..9620c2b236c6340192ba1c4173e7f25a2b0eb76e 100644
--- a/chrome/browser/page_load_metrics/page_load_metrics_observer.h
+++ b/chrome/browser/page_load_metrics/page_load_metrics_observer.h
@@ -124,12 +124,22 @@ struct PageLoadExtraInfo {
const PageLoadMetadata metadata;
};
+enum TrackingPolicy {
+ TRACK,
+ IGNORE,
+};
+
// Interface for PageLoadMetrics observers. All instances of this class are
// owned by the PageLoadTracker tracking a page load.
class PageLoadMetricsObserver {
public:
virtual ~PageLoadMetricsObserver() {}
+ // Called before OnStart and OnCommit. If the method returns false, no further
+ // callbacks will occur in the observer.
+ virtual TrackingPolicy ShouldTrackLoad(
Bryan McQuade 2016/09/20 18:40:38 i think a boolean is ok here - the method name is
Charlie Harrison 2016/09/20 22:46:23 rdevlin recommended this on the doc. Fine to nix i
+ 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

Powered by Google App Engine
This is Rietveld 408576698