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

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

Issue 2321083002: [NoStatePrefetch] Add performance histograms. (Closed)
Patch Set: Review comments 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
« no previous file with comments | « chrome/browser/prerender/prerender_contents.cc ('k') | chrome/browser/prerender/prerender_histograms.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..7fdc187567504a42fc24806be46898132a984016 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 GetFirstContentfulPaintHistogramName(
+ Origin origin,
+ bool is_wash,
+ bool is_no_store,
+ base::TimeDelta prefetch_age);
+
private:
base::TimeTicks GetCurrentTimeTicks() const;
« no previous file with comments | « chrome/browser/prerender/prerender_contents.cc ('k') | chrome/browser/prerender/prerender_histograms.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698