| Index: chrome/browser/prerender/prerender_histograms.h
|
| diff --git a/chrome/browser/prerender/prerender_histograms.h b/chrome/browser/prerender/prerender_histograms.h
|
| index 7fdc187567504a42fc24806be46898132a984016..ae66db172d175e62eddc5edbec5f8c236401e8db 100644
|
| --- a/chrome/browser/prerender/prerender_histograms.h
|
| +++ b/chrome/browser/prerender/prerender_histograms.h
|
| @@ -52,6 +52,12 @@ class PrerenderHistograms {
|
| NavigationType navigation_type,
|
| const GURL& url);
|
|
|
| + // Record that a first contentful paint occured, and whether we were able to
|
| + // successfuly record the perceived FCP.
|
| + void RecordPerceivedFirstContentfulPaintStatus(Origin origin,
|
| + bool successful,
|
| + bool was_hidden);
|
| +
|
| // Records, in a histogram, the percentage of the page load time that had
|
| // elapsed by the time it is swapped in. Values outside of [0, 1.0] are
|
| // invalid and ignored.
|
| @@ -121,26 +127,22 @@ 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);
|
| + // Records the time to first contentful paint with respect to a possible
|
| + // prefetch of the page. The time to first contentful paint with respect to
|
| + // the navigation start is recorded (even if the page was prererendered in
|
| + // advance of navigation start). One of several histograms is used, depending
|
| + // on whether this URL could have been prefetched before the navigation
|
| + // leading to the paint.
|
| + void RecordPrefetchFirstContentfulPaintTime(Origin origin,
|
| + bool is_no_store,
|
| + bool was_hidden,
|
| + base::TimeDelta time,
|
| + base::TimeDelta prefetch_age);
|
|
|
| private:
|
| + // The suffix used for first contentful paint visibility.
|
| + static std::string FirstContentfulPaintHiddenName(bool was_hidden);
|
| +
|
| base::TimeTicks GetCurrentTimeTicks() const;
|
|
|
| // Returns the time elapsed since the last prerender happened.
|
|
|