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

Unified Diff: chrome/browser/net/predictor.h

Issue 16514008: Add metrics for calculating precision/recall of link navigation pre-connect triggers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 7 years, 6 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/net/predictor.h
diff --git a/chrome/browser/net/predictor.h b/chrome/browser/net/predictor.h
index b56a62bdf913840cb937999a953b3be0569b9036..a1f44150c7321eb5415c7e186e9e68d2dcfb472f 100644
--- a/chrome/browser/net/predictor.h
+++ b/chrome/browser/net/predictor.h
@@ -238,7 +238,14 @@ class Predictor {
UrlInfo::ResolutionMotivation motivation,
int count);
- void RecordPreconnectNavigationStats(const GURL& url);
+ // May be called from either the IO or UI thread and will PostTask
+ // to the IO thread if necessary.
+ void RecordPreconnectTrigger(const GURL& url);
+
+ void RecordPreconnectTriggerOnIOThread(const GURL& url);
cbentzel 2013/06/24 01:46:46 This should be in private - not a part of the inte
kouhei (in TOK) 2013/06/24 05:51:09 Done.
+
+ void RecordPreconnectNavigationStat(const GURL& url,
+ const GURL& original_url);
// ------------- End IO thread methods.
@@ -509,7 +516,8 @@ class Predictor {
// The time when the last preconnection was requested to a search service.
base::TimeTicks last_omnibox_preconnect_;
- TimedCache recent_preconnects_;
+ class PreconnectUsage;
+ scoped_ptr<PreconnectUsage> preconnect_usage_;
// For each URL that we might navigate to (that we've "learned about")
// we have a Referrer list. Each Referrer list has all hostnames we might

Powered by Google App Engine
This is Rietveld 408576698