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

Unified Diff: content/browser/loader/resource_loader.cc

Issue 1921613003: Count successes of link rel=prefetch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove braces Created 4 years, 8 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
« no previous file with comments | « no previous file | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/resource_loader.cc
diff --git a/content/browser/loader/resource_loader.cc b/content/browser/loader/resource_loader.cc
index ddb25cc1af61fb752ebeb01ce3da333058859ebd..3be9bf4fc8b42861d0d0d12671b35133c698ec0a 100644
--- a/content/browser/loader/resource_loader.cc
+++ b/content/browser/loader/resource_loader.cc
@@ -744,6 +744,9 @@ void ResourceLoader::RecordHistograms() {
}
UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX);
+ } else if (request_->response_info().unused_since_prefetch) {
+ TimeDelta total_time = base::TimeTicks::Now() - request_->creation_time();
+ UMA_HISTOGRAM_TIMES("Net.Prefetch.TimeSpentOnPrefetchHit", total_time);
}
}
« no previous file with comments | « no previous file | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698