Chromium Code Reviews| Index: chrome/browser/predictors/resource_prefetch_predictor.h |
| diff --git a/chrome/browser/predictors/resource_prefetch_predictor.h b/chrome/browser/predictors/resource_prefetch_predictor.h |
| index 5bfc2bc4d502b698076f17c5160745a061895500..fae829c734aa83f2bd5bc2d4f7333f27ebfb05b1 100644 |
| --- a/chrome/browser/predictors/resource_prefetch_predictor.h |
| +++ b/chrome/browser/predictors/resource_prefetch_predictor.h |
| @@ -43,6 +43,10 @@ constexpr char kResourcePrefetchPredictorPrecisionHistogram[] = |
| "ResourcePrefetchPredictor.LearningPrecision"; |
| constexpr char kResourcePrefetchPredictorRecallHistogram[] = |
| "ResourcePrefetchPredictor.LearningRecall"; |
| +constexpr char kResourcePrefetchPredictorCountHistogram[] = |
| + "ResourcePrefetchPredictor.LearningCount"; |
| +constexpr char kResourcePrefetchPredictorPrefetchingDurationHistogram[] = |
| + "ResourcePrefetchPredictor.PrefetchingDuration"; |
| } // namespace internal |
| class TestObserver; |
| @@ -210,6 +214,8 @@ class ResourcePrefetchPredictor |
| FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTest, GetPrefetchData); |
| FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTest, |
| TestPrecisionRecallHistograms); |
| + FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTest, |
| + TestPrefetchingDurationHistogram); |
| enum InitializationState { |
| NOT_INITIALIZED = 0, |
| @@ -283,7 +289,7 @@ class ResourcePrefetchPredictor |
| void OnHistoryAndCacheLoaded(); |
| // Removes data for navigations where the onload never fired. Will cleanup |
| - // inflight_navigations_. |
| + // inflight_navigations_ and inflight_prefetchings_. |
|
Benoit L
2017/02/09 02:24:52
nit: s/prefetchings/prefetches/
alexilin
2017/02/09 15:50:19
Done.
|
| void CleanupAbandonedNavigations(const NavigationID& navigation_id); |
| // Deletes all URLs from the predictor database, the caches and removes all |
| @@ -364,6 +370,7 @@ class ResourcePrefetchPredictor |
| std::unique_ptr<RedirectDataMap> url_redirect_table_cache_; |
| std::unique_ptr<RedirectDataMap> host_redirect_table_cache_; |
| + std::map<GURL, base::TimeTicks> inflight_prefetchings_; |
|
Benoit L
2017/02/09 02:24:52
nit: ditto, for the renaming.
alexilin
2017/02/09 15:50:19
Done.
|
| NavigationMap inflight_navigations_; |
| ScopedObserver<history::HistoryService, history::HistoryServiceObserver> |