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

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: PostTask Browser thr / add histograms.xml 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
« no previous file with comments | « chrome/browser/net/connect_interceptor.cc ('k') | chrome/browser/net/predictor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/predictor.h
diff --git a/chrome/browser/net/predictor.h b/chrome/browser/net/predictor.h
index b56a62bdf913840cb937999a953b3be0569b9036..0b083801337075e8eb5c0c299b041ccb0c3e7f13 100644
--- a/chrome/browser/net/predictor.h
+++ b/chrome/browser/net/predictor.h
@@ -233,12 +233,21 @@ class Predictor {
void PreconnectUrl(const GURL& url, const GURL& first_party_for_cookies,
UrlInfo::ResolutionMotivation motivation, int count);
+ // May be called from either the IO or UI thread and will PostTask
cbentzel 2013/06/24 10:48:39 Is this comment correct? The name of it seems to i
kouhei (in TOK) 2013/06/25 03:33:50 Sorry I put this by mistake. Thank you for pointin
+ // to the IO thread if necessary.
void PreconnectUrlOnIOThread(const GURL& url,
const GURL& first_party_for_cookies,
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);
+
+ // May be called from either the IO or UI thread and will PostTask
+ // to the IO thread if necessary.
+ void RecordPreconnectNavigationStat(const GURL& url,
+ const GURL& original_url);
// ------------- End IO thread methods.
@@ -453,6 +462,11 @@ class Predictor {
// continue with them shortly (i.e., it yeilds and continues).
void IncrementalTrimReferrers(bool trim_all_now);
+ void RecordPreconnectTriggerOnIOThread(const GURL& url);
+
+ void RecordPreconnectNavigationStatOnIOThread(const GURL& url,
+ const GURL& original_url);
+
// ------------- End IO thread methods.
scoped_ptr<InitialObserver> initial_observer_;
@@ -509,7 +523,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
« no previous file with comments | « chrome/browser/net/connect_interceptor.cc ('k') | chrome/browser/net/predictor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698