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

Unified Diff: chrome/browser/prerender/prerender_histograms.h

Issue 2321083002: [NoStatePrefetch] Add performance histograms. (Closed)
Patch Set: Added browser test 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/prerender/prerender_histograms.h
diff --git a/chrome/browser/prerender/prerender_histograms.h b/chrome/browser/prerender/prerender_histograms.h
index 77f9f3549b81665cd30231bc71d9e8ad487edf3b..42f1a299feded7f0ae0ef74cd5cc2a6075010826 100644
--- a/chrome/browser/prerender/prerender_histograms.h
+++ b/chrome/browser/prerender/prerender_histograms.h
@@ -121,6 +121,25 @@ class PrerenderHistograms {
bool is_main_resource,
int redirect_count) const;
+ // Records the time to first contentful paint.
+ // Must not be called for prefetch loads (which are never rendered anyway).
+ // |is_no_store| must be true if the main resource has a "no-store" cache
+ // control HTTP header.
+ // |prefetch_age| must be zero if the page was not prefetched.
+ void RecordFirstContentfulPaint(Origin origin,
+ bool is_no_store,
+ base::TimeDelta time,
+ base::TimeDelta prefetch_age);
+
+ // Returns the name of the histogram used to record the time to first
+ // contentful paint.
+ // Exposed for testing.
+ static std::string GetFirstContentfulPaintHistogrameName(
Bryan McQuade 2016/09/19 16:35:02 GetFirstContentfulPaintHistogrameName -> GetFirstC
+ Origin origin,
+ bool is_wash,
+ bool is_no_store,
+ base::TimeDelta prefetch_age);
+
private:
base::TimeTicks GetCurrentTimeTicks() const;

Powered by Google App Engine
This is Rietveld 408576698