From d13c32787737f1822202802f062c41c38b90e5f5 Mon Sep 17 00:00:00 2001 From: "willchan@chromium.org" Date: Thu, 4 Feb 2010 00:24:51 +0000 Subject: Pass the NetworkChangeNotifier to HostResolver. This requires the following refactors: (1) NetworkChangeNotifier moves out of HttpNetworkSession into IOThread. (2) HostResolver gets initialized with NetworkChangeNotifier. (3) NetworkChangeNotifier needs to get passed into HttpCache and HttpNetworkSession (required updating a lot of files). (4) NetworkChangeNotifier is no longer reference counted. It is owned by IOThread. (5) IOThread gains a new struct: Globals. It can only be used on the io thread. (6) ChromeURLRequestContextFactory uses IOThread::Globals to initialize ChromeURLRequest objects with the host resolver and network change notifier. BUG=26159 Review URL: http://codereview.chromium.org/552117 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38052 0039d316-1c4b-4281-b951-d872f2087c98 --- net/http/http_network_layer.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'net/http/http_network_layer.h') diff --git a/net/http/http_network_layer.h b/net/http/http_network_layer.h index 4dbf9a4..38c10c7 100644 --- a/net/http/http_network_layer.h +++ b/net/http/http_network_layer.h @@ -17,15 +17,17 @@ class ClientSocketFactory; class FlipSessionPool; class HostResolver; class HttpNetworkSession; +class NetworkChangeNotifier; class ProxyInfo; class ProxyService; class SSLConfigService; class HttpNetworkLayer : public HttpTransactionFactory { public: - // |socket_factory|, |proxy_service| and |host_resolver| must remain valid - // for the lifetime of HttpNetworkLayer. + // |socket_factory|, |network_change_notifier|, |proxy_service| and + // |host_resolver| must remain valid for the lifetime of HttpNetworkLayer. HttpNetworkLayer(ClientSocketFactory* socket_factory, + NetworkChangeNotifier* network_change_notifier, HostResolver* host_resolver, ProxyService* proxy_service, SSLConfigService* ssl_config_service); // Construct a HttpNetworkLayer with an existing HttpNetworkSession which @@ -36,6 +38,7 @@ 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( + NetworkChangeNotifier* network_change_notifier, HostResolver* host_resolver, ProxyService* proxy_service, SSLConfigService* ssl_config_service); @@ -65,6 +68,8 @@ class HttpNetworkLayer : public HttpTransactionFactory { // The factory we will use to create network sockets. ClientSocketFactory* socket_factory_; + NetworkChangeNotifier* network_change_notifier_; + // The host resolver and proxy service that will be used when lazily // creating |session_|. scoped_refptr host_resolver_; -- cgit v1.1