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

Unified Diff: chrome/browser/predictors/resource_prefetcher_manager.cc

Issue 2688633002: predictors: Add prefetching hit/miss histograms. (Closed)
Patch Set: Add units. Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/predictors/resource_prefetcher_manager.cc
diff --git a/chrome/browser/predictors/resource_prefetcher_manager.cc b/chrome/browser/predictors/resource_prefetcher_manager.cc
index 7130038ed5e8470a3f9c7a435a834c05b81d6806..434c1492e8343689f45285e1968ee3bc5e45faa1 100644
--- a/chrome/browser/predictors/resource_prefetcher_manager.cc
+++ b/chrome/browser/predictors/resource_prefetcher_manager.cc
@@ -79,14 +79,16 @@ void ResourcePrefetcherManager::MaybeRemovePrefetch(
}
void ResourcePrefetcherManager::ResourcePrefetcherFinished(
- ResourcePrefetcher* resource_prefetcher) {
+ ResourcePrefetcher* resource_prefetcher,
+ std::unique_ptr<ResourcePrefetcher::PrefetcherStats> stats) {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
const GURL& main_frame_url = resource_prefetcher->main_frame_url();
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(&ResourcePrefetchPredictor::OnPrefetchingFinished,
- base::Unretained(predictor_), main_frame_url));
+ base::Unretained(predictor_), main_frame_url,
+ base::Passed(std::move(stats))));
const std::string key = main_frame_url.host();
auto it = prefetcher_map_.find(key);

Powered by Google App Engine
This is Rietveld 408576698