diff options
author | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-12 00:49:38 +0000 |
---|---|---|
committer | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-12 00:49:38 +0000 |
commit | 8a00f00ab5d68ffcc998fd04d2ca343af7cdf190 (patch) | |
tree | fd464ba49db4271c76c1cf8f769a22120ad631af /net/http/http_network_layer.h | |
parent | 77ae132c1bfdd986228b6f1c0d8c63baa441afdf (diff) | |
download | chromium_src-8a00f00ab5d68ffcc998fd04d2ca343af7cdf190.zip chromium_src-8a00f00ab5d68ffcc998fd04d2ca343af7cdf190.tar.gz chromium_src-8a00f00ab5d68ffcc998fd04d2ca343af7cdf190.tar.bz2 |
* Avoid doing concurrent DNS resolves of the same hostname in HostResolver.
* Add a 1 minute cache for host resolves.
* Refactor HostResolver to handle multiple requests.
* Make HostResolver a dependency of URLRequestContext. operate the HostResolver
in async mode for proxy resolver (bridging to IO thread).
TEST=unittests
BUG=13163
Review URL: http://codereview.chromium.org/118100
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18236 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_network_layer.h')
-rw-r--r-- | net/http/http_network_layer.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/net/http/http_network_layer.h b/net/http/http_network_layer.h index 2011a6c..acee57e 100644 --- a/net/http/http_network_layer.h +++ b/net/http/http_network_layer.h @@ -11,14 +11,16 @@ namespace net { +class HostResolver; class HttpNetworkSession; class ProxyInfo; class ProxyService; class HttpNetworkLayer : public HttpTransactionFactory { public: - // |proxy_service| must remain valid for the lifetime of HttpNetworkLayer. - explicit HttpNetworkLayer(ProxyService* proxy_service); + // |proxy_service| and |host_resolver| must remain valid for the lifetime of + // HttpNetworkLayer. + HttpNetworkLayer(HostResolver* host_resolver, ProxyService* proxy_service); // Construct a HttpNetworkLayer with an existing HttpNetworkSession which // contains a valid ProxyService. explicit HttpNetworkLayer(HttpNetworkSession* session); @@ -26,7 +28,8 @@ class HttpNetworkLayer : public HttpTransactionFactory { // This function hides the details of how a network layer gets instantiated // and allows other implementations to be substituted. - static HttpTransactionFactory* CreateFactory(ProxyService* proxy_service); + static HttpTransactionFactory* CreateFactory(HostResolver* host_resolver, + ProxyService* proxy_service); // Create a transaction factory that instantiate a network layer over an // existing network session. Network session contains some valuable // information (e.g. authentication data) that we want to share across @@ -43,6 +46,9 @@ class HttpNetworkLayer : public HttpTransactionFactory { HttpNetworkSession* GetSession(); private: + // The host resolver being used for the session. + HostResolver* host_resolver_; + // The proxy service being used for the session. ProxyService* proxy_service_; |