| 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; | |
| 16 class ProxyService; | 15 class ProxyService; |
| 17 | 16 |
| 18 // This class holds session objects used by HttpNetworkTransaction objects. | 17 // This class holds session objects used by HttpNetworkTransaction objects. |
| 19 class HttpNetworkSession : public base::RefCounted<HttpNetworkSession> { | 18 class HttpNetworkSession : public base::RefCounted<HttpNetworkSession> { |
| 20 public: | 19 public: |
| 21 HttpNetworkSession(ProxyService* proxy_service, | 20 explicit HttpNetworkSession(ProxyService* proxy_service) |
| 22 ClientSocketFactory* client_socket_factory) | 21 : connection_pool_(new ClientSocketPool(max_sockets_per_group_)), |
| 23 : connection_pool_(new ClientSocketPool( | |
| 24 max_sockets_per_group_, client_socket_factory)), | |
| 25 proxy_service_(proxy_service) { | 22 proxy_service_(proxy_service) { |
| 26 DCHECK(proxy_service); | 23 DCHECK(proxy_service); |
| 27 } | 24 } |
| 28 | 25 |
| 29 HttpAuthCache* auth_cache() { return &auth_cache_; } | 26 HttpAuthCache* auth_cache() { return &auth_cache_; } |
| 30 ClientSocketPool* connection_pool() { return connection_pool_; } | 27 ClientSocketPool* connection_pool() { return connection_pool_; } |
| 31 ProxyService* proxy_service() { return proxy_service_; } | 28 ProxyService* proxy_service() { return proxy_service_; } |
| 32 #if defined(OS_WIN) | 29 #if defined(OS_WIN) |
| 33 SSLConfigService* ssl_config_service() { return &ssl_config_service_; } | 30 SSLConfigService* ssl_config_service() { return &ssl_config_service_; } |
| 34 #endif | 31 #endif |
| (...skipping 11 matching lines...) Expand all Loading... |
| 46 ProxyService* proxy_service_; | 43 ProxyService* proxy_service_; |
| 47 #if defined(OS_WIN) | 44 #if defined(OS_WIN) |
| 48 // TODO(port): Port the SSLConfigService class to Linux and Mac OS X. | 45 // TODO(port): Port the SSLConfigService class to Linux and Mac OS X. |
| 49 SSLConfigService ssl_config_service_; | 46 SSLConfigService ssl_config_service_; |
| 50 #endif | 47 #endif |
| 51 }; | 48 }; |
| 52 | 49 |
| 53 } // namespace net | 50 } // namespace net |
| 54 | 51 |
| 55 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_ | 52 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_ |
| OLD | NEW |