Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(825)

Unified Diff: net/http/http_network_layer.h

Issue 118100: Avoid doing concurrent DNS resolves of the same hostname (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Get compiling on mac Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/http/http_network_layer.h
===================================================================
--- net/http/http_network_layer.h (revision 18213)
+++ net/http/http_network_layer.h (working copy)
@@ -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 @@
// 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 @@
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_;

Powered by Google App Engine
This is Rietveld 408576698