Chromium Code Reviews| Index: chrome/browser/prerender/prerender_manager.cc |
| diff --git a/chrome/browser/prerender/prerender_manager.cc b/chrome/browser/prerender/prerender_manager.cc |
| index 4d9f1adcbf5b3add7ef4b07e474bba16551fddc4..afe65ef76e6510b2105c0dab4129daccee4676ad 100644 |
| --- a/chrome/browser/prerender/prerender_manager.cc |
| +++ b/chrome/browser/prerender/prerender_manager.cc |
| @@ -600,21 +600,23 @@ void PrerenderManager::RecordPrerenderFirstContentfulPaint( |
| DCHECK(tab_helper); |
| base::TimeDelta prefetch_age; |
| - // The origin at prefetch is superceeded by the tab_helper origin for the |
| - // histogram recording, below. |
| - GetPrefetchInformation(url, &prefetch_age, nullptr); |
| + Origin origin; |
| + // The tab_helper origin is arguably more accurate, but in order to be |
| + // consistent with other prefetch TTFCP histograms, the origin from |
| + // GetPrefetchInformation is used instead. |
| + GetPrefetchInformation(url, &prefetch_age, &origin); |
| OnPrefetchUsed(url); |
| base::TimeTicks swap_ticks = tab_helper->swap_ticks(); |
| bool fcp_recorded = false; |
| if (!swap_ticks.is_null() && !first_contentful_paint.is_null()) { |
|
pasko
2017/03/24 16:10:30
this is only recorded when swap happened (!swap_ti
mattcary
2017/03/27 07:52:05
Or, it could perhaps be that my logic on the clien
pasko
2017/03/27 17:32:57
Sorry, I misread. We are recording "Reference" wit
|
| histograms_->RecordPrefetchFirstContentfulPaintTime( |
| - tab_helper->origin(), is_no_store, was_hidden, |
| - first_contentful_paint - swap_ticks, prefetch_age); |
| + origin, is_no_store, was_hidden, first_contentful_paint - swap_ticks, |
| + prefetch_age); |
| fcp_recorded = true; |
| } |
| - histograms_->RecordPerceivedFirstContentfulPaintStatus( |
| - tab_helper->origin(), fcp_recorded, was_hidden); |
| + histograms_->RecordPerceivedFirstContentfulPaintStatus(origin, fcp_recorded, |
| + was_hidden); |
| for (auto& observer : observers_) { |
| observer->OnFirstContentfulPaint(); |