| Index: chrome/browser/net/predictor.h
|
| diff --git a/chrome/browser/net/predictor.h b/chrome/browser/net/predictor.h
|
| index 78348757f3461ffee28a6a258b9efa6a81acc602..214f36cb0141df78647636e5807cef3953426bd8 100644
|
| --- a/chrome/browser/net/predictor.h
|
| +++ b/chrome/browser/net/predictor.h
|
| @@ -25,7 +25,6 @@
|
| #include <map>
|
| #include <memory>
|
| #include <queue>
|
| -#include <set>
|
| #include <string>
|
| #include <vector>
|
|
|
| @@ -277,10 +276,6 @@ class Predictor {
|
| static GURL CanonicalizeUrl(const GURL& url);
|
|
|
| // Used for testing.
|
| - void SetHostResolver(net::HostResolver* host_resolver) {
|
| - host_resolver_ = host_resolver;
|
| - }
|
| - // Used for testing.
|
| void SetTransportSecurityState(
|
| net::TransportSecurityState* transport_security_state) {
|
| transport_security_state_ = transport_security_state;
|
| @@ -316,6 +311,11 @@ class Predictor {
|
| return url_request_context_getter_.get();
|
| }
|
|
|
| + void set_url_request_context_getter_for_test(
|
| + scoped_refptr<net::URLRequestContextGetter> getter) {
|
| + url_request_context_getter_.swap(getter);
|
| + }
|
| +
|
| private:
|
| FRIEND_TEST_ALL_PREFIXES(PredictorBrowserTest,
|
| ShutdownWhenResolutionIsPendingTest);
|
| @@ -335,8 +335,6 @@ class Predictor {
|
| friend class WaitForResolutionHelper; // For testing.
|
| friend class PredictorBrowserTest;
|
|
|
| - class LookupRequest;
|
| -
|
| // A simple priority queue for handling host names.
|
| // Some names that are queued up have |motivation| that requires very rapid
|
| // handling. For example, a sub-resource name lookup MUST be done before the
|
| @@ -457,11 +455,10 @@ class Predictor {
|
| const GURL& first_party_for_cookies);
|
|
|
| // Access method for use by async lookup request to pass resolution result.
|
| - void OnLookupFinished(LookupRequest* request, const GURL& url, bool found);
|
| + void OnLookupFinished(const GURL& url, int result);
|
|
|
| // Underlying method for both async and synchronous lookup to update state.
|
| - void LookupFinished(LookupRequest* request,
|
| - const GURL& url, bool found);
|
| + void LookupFinished(const GURL& url, bool found);
|
|
|
| // Queue hostname for resolution. If queueing was done, return the pointer
|
| // to the queued instance, otherwise return NULL. If the proxy advisor is
|
| @@ -539,7 +536,7 @@ class Predictor {
|
| // results_ contains information for existing/prior prefetches.
|
| Results results_;
|
|
|
| - std::set<LookupRequest*> pending_lookups_;
|
| + size_t num_pending_lookups_;
|
|
|
| // For testing, to verify that we don't exceed the limit.
|
| size_t peak_pending_lookups_;
|
| @@ -557,9 +554,6 @@ class Predictor {
|
| // reduction mode, and discard all queued (but not yet assigned) resolutions.
|
| const base::TimeDelta max_dns_queue_delay_;
|
|
|
| - // The host resolver we warm DNS entries for.
|
| - net::HostResolver* host_resolver_;
|
| -
|
| // The TransportSecurityState instance we query HSTS redirects from.
|
| net::TransportSecurityState* transport_security_state_;
|
|
|
|
|