Chromium Code Reviews| Index: chrome/browser/net/predictor.h |
| diff --git a/chrome/browser/net/predictor.h b/chrome/browser/net/predictor.h |
| index 53ea6323ca8a610e9bbcc57faba79fa4666ee3c4..20af1749dddb726df8e44da0df2c17c80ba3e3e1 100644 |
| --- a/chrome/browser/net/predictor.h |
| +++ b/chrome/browser/net/predictor.h |
| @@ -75,7 +75,9 @@ class PredictorObserver { |
| virtual void OnPreconnectUrl(const GURL& original_url, |
| const GURL& first_party_for_cookies, |
| UrlInfo::ResolutionMotivation motivation, |
| - int count) = 0; |
| + int count) {} |
| + virtual void OnLearnFromNavigation(const GURL& referring_url, |
| + const GURL& target_url) {} |
| }; |
| // Predictor is constructed during Profile construction (on the UI thread), |
| @@ -307,6 +309,10 @@ class Predictor { |
| return predictor_enabled_; |
| } |
| + // Used only for testing. |
| + void set_preconnect_enabled(bool preconnect_enabled) { |
|
mmenke
2016/04/15 15:44:02
set_preconnect_enabled_for_test
There's a clang c
Charlie Harrison
2016/04/20 12:36:42
Done.
|
| + preconnect_enabled_ = preconnect_enabled; |
| + } |
|
mmenke
2016/04/15 15:44:02
This doesn't seem threadsafe - this is accessed on
Charlie Harrison
2016/04/20 12:36:42
Hmmm. I can try that in another CL to see if anyth
mmenke
2016/04/22 16:29:24
We can't really selectively add the flag - every s
|
| private: |
| FRIEND_TEST_ALL_PREFIXES(PredictorTest, BenefitLookupTest); |
| @@ -564,7 +570,7 @@ class Predictor { |
| // Are we currently using preconnection, rather than just DNS resolution, for |
| // subresources and omni-box search URLs. |
| // This is false if and only if disabled by a command line switch. |
| - const bool preconnect_enabled_; |
| + bool preconnect_enabled_; |
| // Most recent suggestion from Omnibox provided via AnticipateOmniboxUrl(). |
| std::string last_omnibox_host_; |