| 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_HISTOGRAMS_H_ | 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_HISTOGRAMS_H_ |
| 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_HISTOGRAMS_H_ | 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_HISTOGRAMS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 uint8 experiment_id, | 72 uint8 experiment_id, |
| 73 PrerenderContents::MatchCompleteStatus mc_status, | 73 PrerenderContents::MatchCompleteStatus mc_status, |
| 74 FinalStatus final_status) const; | 74 FinalStatus final_status) const; |
| 75 | 75 |
| 76 // To be called when a new prerender is added. | 76 // To be called when a new prerender is added. |
| 77 void RecordPrerender(Origin origin, const GURL& url); | 77 void RecordPrerender(Origin origin, const GURL& url); |
| 78 | 78 |
| 79 // To be called when a new prerender is started. | 79 // To be called when a new prerender is started. |
| 80 void RecordPrerenderStarted(Origin origin) const; | 80 void RecordPrerenderStarted(Origin origin) const; |
| 81 | 81 |
| 82 // To be called when we know how many prerenders are running after starting |
| 83 // a prerender. |
| 84 void RecordConcurrency(size_t prerender_count) const; |
| 85 |
| 82 // Called when we swap in a prerender. | 86 // Called when we swap in a prerender. |
| 83 void RecordUsedPrerender(Origin origin) const; | 87 void RecordUsedPrerender(Origin origin) const; |
| 84 | 88 |
| 85 // Record the time since a page was recently visited. | 89 // Record the time since a page was recently visited. |
| 86 void RecordTimeSinceLastRecentVisit(base::TimeDelta time) const; | 90 void RecordTimeSinceLastRecentVisit(base::TimeDelta time) const; |
| 87 | 91 |
| 88 // Record a percentage of pixels of the final page already in place at | 92 // Record a percentage of pixels of the final page already in place at |
| 89 // swap-in. | 93 // swap-in. |
| 90 void RecordFractionPixelsFinalAtSwapin(double fraction) const; | 94 void RecordFractionPixelsFinalAtSwapin(double fraction) const; |
| 91 | 95 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 // start recording events before the first prerender occurs. | 142 // start recording events before the first prerender occurs. |
| 139 bool seen_any_pageload_; | 143 bool seen_any_pageload_; |
| 140 bool seen_pageload_started_after_prerender_; | 144 bool seen_pageload_started_after_prerender_; |
| 141 | 145 |
| 142 DISALLOW_COPY_AND_ASSIGN(PrerenderHistograms); | 146 DISALLOW_COPY_AND_ASSIGN(PrerenderHistograms); |
| 143 }; | 147 }; |
| 144 | 148 |
| 145 } // namespace prerender | 149 } // namespace prerender |
| 146 | 150 |
| 147 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_HISTOGRAMS_H_ | 151 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_HISTOGRAMS_H_ |
| OLD | NEW |