| OLD | NEW | 
|---|
| 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  Loading... | 
| 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  Loading... | 
| 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_ | 
| OLD | NEW | 
|---|