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

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: styling only (no logic change) Created 7 years, 5 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 3e6a2e3287e7eba6526540600aa4a1c7618b6b56..e58e51635d4a6a13fe3a28e1339b4ab64010a91b 100644
--- a/chrome/browser/net/predictor.h
+++ b/chrome/browser/net/predictor.h
@@ -238,7 +238,16 @@ 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
jar (doing other things) 2013/08/01 22:56:47 nit: (personal?) I think it is a bad pattern to pr
kouhei (in TOK) 2013/08/02 06:18:03 I changed so that callers PostTask to IOThread.
+ // to the IO thread if necessary.
+ void RecordPreconnectTrigger(const GURL& url);
+
+ void RecordPreconnectNavigationStat(const std::vector<GURL>& url_chain,
+ bool is_subresource);
+
+ // May be called from either the IO or UI thread and will PostTask
jar (doing other things) 2013/08/01 22:56:47 nit: same comment on pattern as above.
kouhei (in TOK) 2013/08/02 06:18:03 Done.
+ // to the IO thread if necessary.
+ void RecordLinkNavigation(const GURL& url);
// ------------- End IO thread methods.
@@ -453,6 +462,10 @@ class Predictor {
// continue with them shortly (i.e., it yeilds and continues).
void IncrementalTrimReferrers(bool trim_all_now);
+ void RecordPreconnectTriggerOnIOThread(const GURL& url);
+
+ void RecordLinkNavigationOnIOThread(const GURL& url);
jar (doing other things) 2013/08/01 22:56:47 So you have this method... it is just IMO nicer to
kouhei (in TOK) 2013/08/02 06:18:03 Done.
+
// ------------- End IO thread methods.
scoped_ptr<InitialObserver> initial_observer_;
@@ -509,7 +522,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