Index: chrome/browser/net/predictor.h |
diff --git a/chrome/browser/net/predictor.h b/chrome/browser/net/predictor.h |
index 8161a3616beb5eebdbc4427cf1e978ccaa0b306d..00a1e12b0d2e96fb6b84d6df721b5268053af756 100644 |
--- a/chrome/browser/net/predictor.h |
+++ b/chrome/browser/net/predictor.h |
@@ -29,6 +29,7 @@ |
#include "base/memory/scoped_ptr.h" |
#include "base/memory/weak_ptr.h" |
#include "chrome/browser/net/referrer.h" |
+#include "chrome/browser/net/timed_cache.h" |
#include "chrome/browser/net/url_info.h" |
#include "chrome/common/net/predictor_common.h" |
#include "net/base/host_port_pair.h" |
@@ -220,6 +221,18 @@ class Predictor { |
void EnablePredictorOnIOThread(bool enable); |
+ // May be called from either the IO or UI thread and will PostTask |
+ // to the IO thread if necessary. |
+ void PreconnectUrl(const GURL& url, const GURL& first_party_for_cookies, |
+ UrlInfo::ResolutionMotivation motivation, int count); |
+ |
+ void PreconnectUrlOnIOThread(const GURL& url, |
+ const GURL& first_party_for_cookies, |
+ UrlInfo::ResolutionMotivation motivation, |
+ int count); |
+ |
+ void RecordPreconnectNavigationStats(const GURL& url); |
+ |
// ------------- End IO thread methods. |
// The following methods may be called on either the IO or UI threads. |
@@ -489,6 +502,8 @@ class Predictor { |
// The time when the last preconnection was requested to a search service. |
base::TimeTicks last_omnibox_preconnect_; |
+ TimedCache recent_preconnects_; |
+ |
// 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 |
// need to pre-resolve or pre-connect to when there is a navigation to the |