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

Side by Side Diff: chrome/browser/prerender/prerender_manager.h

Issue 2782503004: Prerender: clarify how FCP works in non-prerendered cases (Closed)
Patch Set: clarified the comment a little Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/page_load_metrics/observers/prerender_page_load_metrics_observer.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_
6 #define CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 bool is_main_resource, 191 bool is_main_resource,
192 bool is_redirect, 192 bool is_redirect,
193 bool is_no_store); 193 bool is_no_store);
194 194
195 // Called when a NoStatePrefetch resource has been loaded. This is called only 195 // Called when a NoStatePrefetch resource has been loaded. This is called only
196 // once per resource, when all redirects have been resolved. 196 // once per resource, when all redirects have been resolved.
197 void RecordPrefetchRedirectCount(Origin origin, 197 void RecordPrefetchRedirectCount(Origin origin,
198 bool is_main_resource, 198 bool is_main_resource,
199 int redirect_count); 199 int redirect_count);
200 200
201 // Records the time to first contentful paint for loads that previously had a 201 // Called to record the time to First Contentful Paint for all pages that were
202 // no state prefetch load. Must not be called for prefetch loads themselves 202 // not prerendered.
203 // (which are never rendered anyway). |is_no_store| must be true if the main 203 //
204 // resource has a "no-store" cache control HTTP header. 204 // As part of recording, determines whether the load had previously matched
205 // the criteria for triggering a NoStatePrefetch. In the prerendering
206 // experimental group such triggering makes the page prerendered, while in the
207 // group doing only 'simple loads' it would have been a noop.
208 //
209 // Must not be called for prefetch loads themselves (which are never painted
210 // anyway). The |is_no_store| must be true iff the main resource has a
211 // "no-store" cache control HTTP header. The |was_hidden| tells whether the
212 // the page was hidden at least once between starting the load and registering
213 // the FCP.
205 void RecordNoStateFirstContentfulPaint(const GURL& url, 214 void RecordNoStateFirstContentfulPaint(const GURL& url,
206 bool is_no_store, 215 bool is_no_store,
207 bool was_hidden, 216 bool was_hidden,
208 base::TimeDelta time); 217 base::TimeDelta time);
209 218
210 // Records the perceived first contentful paint time for a prerendered page. 219 // Records the perceived first contentful paint time for a prerendered page.
211 // The actual load may have started prior to navigation due to prerender 220 // The actual load may have started prior to navigation due to prerender
212 // hints. The FCP ticks is in absolute time; this has the disadvantage that 221 // hints. The FCP ticks is in absolute time; this has the disadvantage that
213 // the histogram will mix browser and renderer ticks, but there seems to be no 222 // the histogram will mix browser and renderer ticks, but there seems to be no
214 // way around that. 223 // way around that.
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 std::vector<std::unique_ptr<PrerenderManagerObserver>> observers_; 639 std::vector<std::unique_ptr<PrerenderManagerObserver>> observers_;
631 640
632 base::WeakPtrFactory<PrerenderManager> weak_factory_; 641 base::WeakPtrFactory<PrerenderManager> weak_factory_;
633 642
634 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); 643 DISALLOW_COPY_AND_ASSIGN(PrerenderManager);
635 }; 644 };
636 645
637 } // namespace prerender 646 } // namespace prerender
638 647
639 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ 648 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/page_load_metrics/observers/prerender_page_load_metrics_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698