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 090a5539d984ca5aeeb50ab3269dac2aad32dcc5..aa8933f4096e2d5398092f1db90e0915e6a61e47 100644 |
| --- a/chrome/browser/prerender/prerender_manager.cc |
| +++ b/chrome/browser/prerender/prerender_manager.cc |
| @@ -615,15 +615,15 @@ void PrerenderManager::RecordNoStateFirstContentfulPaint(const GURL& url, |
| std::remove_if(prefetches_.begin(), prefetches_.end(), |
| [url](const NavigationRecord& r) { return r.url == url; }), |
| prefetches_.end()); |
| -} |
| -void PrerenderManager::RecordPerceivedFirstContentfulPaint( |
| - content::WebContents* web_contents, |
| - base::TimeDelta first_contentful_paint) { |
| for (auto& observer : observers_) { |
| observer->OnFirstContentfulPaint(); |
|
pasko
2016/11/18 15:56:56
can we notify observers just after recording histo
mattcary
2016/11/18 16:13:27
SGTM. I moved it to the end of the function for a
|
| } |
| +} |
| +void PrerenderManager::RecordPerceivedFirstContentfulPaint( |
| + content::WebContents* web_contents, |
| + base::TimeDelta first_contentful_paint) { |
| PrerenderTabHelper* tab_helper = |
| PrerenderTabHelper::FromWebContents(web_contents); |
| DCHECK(tab_helper); |
| @@ -638,6 +638,10 @@ void PrerenderManager::RecordPerceivedFirstContentfulPaint( |
| histograms_->RecordPerceivedFirstContentfulPaintStatus(tab_helper->origin(), |
| false); |
| } |
| + |
| + for (auto& observer : observers_) { |
|
pasko
2016/11/18 15:56:56
this moved too, does anything depend on firing it
mattcary
2016/11/18 16:13:27
I moved this to be consistent with the other FCP (
|
| + observer->OnFirstContentfulPaint(); |
| + } |
| } |
| // static |