| Index: chrome/browser/net/predictor.h
|
| diff --git a/chrome/browser/net/predictor.h b/chrome/browser/net/predictor.h
|
| index 85b8d1894cd031b11c8304931530d0df54cfec86..d9df615d670efc33b0cc4c9546e1b3f460dfa031 100644
|
| --- a/chrome/browser/net/predictor.h
|
| +++ b/chrome/browser/net/predictor.h
|
| @@ -49,6 +49,7 @@ class WaitableEvent;
|
| namespace net {
|
| class HostResolver;
|
| class SSLConfigService;
|
| +class ProxyService;
|
| class TransportSecurityState;
|
| class URLRequestContextGetter;
|
| }
|
| @@ -318,6 +319,10 @@ class Predictor {
|
| FRIEND_TEST_ALL_PREFIXES(PredictorTest, SingleLookupTestWithDisabledAdvisor);
|
| FRIEND_TEST_ALL_PREFIXES(PredictorTest, SingleLookupTestWithEnabledAdvisor);
|
| FRIEND_TEST_ALL_PREFIXES(PredictorTest, TestSimplePreconnectAdvisor);
|
| + FRIEND_TEST_ALL_PREFIXES(PredictorTest, NoProxyService);
|
| + FRIEND_TEST_ALL_PREFIXES(PredictorTest, ProxyDefinitelyEnabled);
|
| + FRIEND_TEST_ALL_PREFIXES(PredictorTest, ProxyDefinitelyNotEnabled);
|
| + FRIEND_TEST_ALL_PREFIXES(PredictorTest, ProxyMaybeEnabled);
|
| friend class WaitForResolutionHelper; // For testing.
|
|
|
| class LookupRequest;
|
| @@ -501,6 +506,13 @@ class Predictor {
|
| UrlInfo::ResolutionMotivation motivation,
|
| bool is_preconnect);
|
|
|
| + // If we can determine immediately (i.e. synchronously) that requests to this
|
| + // URL would likely go through a proxy, then return true. Otherwise, return
|
| + // false. This is used to avoid issuing DNS requests when a fixed proxy
|
| + // configuration is in place, which improves efficiency, and is also important
|
| + // if the unproxied DNS may contain incorrect entries.
|
| + bool WouldLikelyProxyURL(const GURL& url);
|
| +
|
| // Applies the HSTS redirect for |url|, if any.
|
| GURL GetHSTSRedirectOnIOThread(const GURL& url);
|
|
|
| @@ -558,6 +570,9 @@ class Predictor {
|
| // redirects).
|
| net::SSLConfigService* ssl_config_service_;
|
|
|
| + // The ProxyService, used to determine whether preresolve is useful.
|
| + net::ProxyService* proxy_service_;
|
| +
|
| // 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.
|
|
|