Chromium Code Reviews| Index: chrome/browser/net/predictor.h |
| diff --git a/chrome/browser/net/predictor.h b/chrome/browser/net/predictor.h |
| index 300e341ca52b1eb2c869d7f434f91d4db4795870..9ecffd1de7d637df3e668da0263eede7236e6e10 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> |
| @@ -279,10 +278,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; |
| @@ -332,8 +327,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 |
| @@ -435,14 +428,13 @@ 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 |
|
eroman
2016/05/31 20:45:27
nit: Queue --> Queues (feel free to save that for
Charlie Harrison
2016/05/31 21:14:47
Done.
|
| - // to the queued instance, otherwise return NULL. If the proxy advisor is |
| + // to the queued instance, otherwise return nullptr. If the proxy advisor is |
| // enabled, and |url| is likely to be proxied, the hostname will not be |
| // queued as the browser is not expected to fetch it directly. |
| UrlInfo* AppendToResolutionQueue(const GURL& url, |
| @@ -517,7 +509,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_; |
| @@ -535,9 +527,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_; |