| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_HTTP_HTTP_NETWORK_SESSION_H_ | 5 #ifndef NET_HTTP_HTTP_NETWORK_SESSION_H_ |
| 6 #define NET_HTTP_HTTP_NETWORK_SESSION_H_ | 6 #define NET_HTTP_HTTP_NETWORK_SESSION_H_ |
| 7 | 7 |
| 8 #include "base/ref_counted.h" | 8 #include "base/ref_counted.h" |
| 9 #include "net/base/client_socket_pool.h" | 9 #include "net/base/client_socket_pool.h" |
| 10 #include "net/base/ssl_config_service.h" | 10 #include "net/base/ssl_config_service.h" |
| 11 #include "net/http/http_auth_cache.h" | 11 #include "net/http/http_auth_cache.h" |
| 12 | 12 |
| 13 namespace net { | 13 namespace net { |
| 14 | 14 |
| 15 class ClientSocketFactory; |
| 15 class ProxyService; | 16 class ProxyService; |
| 16 | 17 |
| 17 // This class holds session objects used by HttpNetworkTransaction objects. | 18 // This class holds session objects used by HttpNetworkTransaction objects. |
| 18 class HttpNetworkSession : public base::RefCounted<HttpNetworkSession> { | 19 class HttpNetworkSession : public base::RefCounted<HttpNetworkSession> { |
| 19 public: | 20 public: |
| 20 explicit HttpNetworkSession(ProxyService* proxy_service) | 21 HttpNetworkSession(ProxyService* proxy_service, |
| 21 : connection_pool_(new ClientSocketPool(max_sockets_per_group_)), | 22 ClientSocketFactory* client_socket_factory) |
| 23 : connection_pool_(new ClientSocketPool( |
| 24 max_sockets_per_group_, client_socket_factory)), |
| 22 proxy_service_(proxy_service) { | 25 proxy_service_(proxy_service) { |
| 23 DCHECK(proxy_service); | 26 DCHECK(proxy_service); |
| 24 } | 27 } |
| 25 | 28 |
| 26 HttpAuthCache* auth_cache() { return &auth_cache_; } | 29 HttpAuthCache* auth_cache() { return &auth_cache_; } |
| 27 ClientSocketPool* connection_pool() { return connection_pool_; } | 30 ClientSocketPool* connection_pool() { return connection_pool_; } |
| 28 ProxyService* proxy_service() { return proxy_service_; } | 31 ProxyService* proxy_service() { return proxy_service_; } |
| 29 #if defined(OS_WIN) | 32 #if defined(OS_WIN) |
| 30 SSLConfigService* ssl_config_service() { return &ssl_config_service_; } | 33 SSLConfigService* ssl_config_service() { return &ssl_config_service_; } |
| 31 #endif | 34 #endif |
| (...skipping 11 matching lines...) Expand all Loading... |
| 43 ProxyService* proxy_service_; | 46 ProxyService* proxy_service_; |
| 44 #if defined(OS_WIN) | 47 #if defined(OS_WIN) |
| 45 // TODO(port): Port the SSLConfigService class to Linux and Mac OS X. | 48 // TODO(port): Port the SSLConfigService class to Linux and Mac OS X. |
| 46 SSLConfigService ssl_config_service_; | 49 SSLConfigService ssl_config_service_; |
| 47 #endif | 50 #endif |
| 48 }; | 51 }; |
| 49 | 52 |
| 50 } // namespace net | 53 } // namespace net |
| 51 | 54 |
| 52 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_ | 55 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_ |
| OLD | NEW |