Chromium Code Reviews| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 70 // Record a final status of a prerendered page in a histogram. | 70 // Record a final status of a prerendered page in a histogram. |
| 71 void RecordFinalStatus(Origin origin, | 71 void RecordFinalStatus(Origin origin, |
| 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, size_t prerender_count) const; |
|
dominich
2012/07/19 16:04:38
the max in config is an unsigned int (32-bit) but
gavinp
2012/07/23 18:35:21
Done.
| |
| 81 | 81 |
| 82 // Called when we swap in a prerender. | 82 // Called when we swap in a prerender. |
| 83 void RecordUsedPrerender(Origin origin) const; | 83 void RecordUsedPrerender(Origin origin) const; |
| 84 | 84 |
| 85 // Record the time since a page was recently visited. | 85 // Record the time since a page was recently visited. |
| 86 void RecordTimeSinceLastRecentVisit(base::TimeDelta time) const; | 86 void RecordTimeSinceLastRecentVisit(base::TimeDelta time) const; |
| 87 | 87 |
| 88 // Record a percentage of pixels of the final page already in place at | 88 // Record a percentage of pixels of the final page already in place at |
| 89 // swap-in. | 89 // swap-in. |
| 90 void RecordFractionPixelsFinalAtSwapin(double fraction) const; | 90 void RecordFractionPixelsFinalAtSwapin(double fraction) const; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 138 // start recording events before the first prerender occurs. | 138 // start recording events before the first prerender occurs. |
| 139 bool seen_any_pageload_; | 139 bool seen_any_pageload_; |
| 140 bool seen_pageload_started_after_prerender_; | 140 bool seen_pageload_started_after_prerender_; |
| 141 | 141 |
| 142 DISALLOW_COPY_AND_ASSIGN(PrerenderHistograms); | 142 DISALLOW_COPY_AND_ASSIGN(PrerenderHistograms); |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 } // namespace prerender | 145 } // namespace prerender |
| 146 | 146 |
| 147 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_HISTOGRAMS_H_ | 147 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_HISTOGRAMS_H_ |
| OLD | NEW |