OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SOCKET_CLIENT_SOCKET_POOL_MANAGER_IMPL_H_ | 5 #ifndef NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_IMPL_H_ |
6 #define NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_IMPL_H_ | 6 #define NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_IMPL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
15 #include "base/template_util.h" | 15 #include "base/template_util.h" |
16 #include "base/threading/non_thread_safe.h" | 16 #include "base/threading/non_thread_safe.h" |
17 #include "net/base/cert_database.h" | 17 #include "net/base/cert_database.h" |
| 18 #include "net/http/http_network_session.h" |
18 #include "net/socket/client_socket_pool_histograms.h" | 19 #include "net/socket/client_socket_pool_histograms.h" |
19 #include "net/socket/client_socket_pool_manager.h" | 20 #include "net/socket/client_socket_pool_manager.h" |
20 | 21 |
21 namespace net { | 22 namespace net { |
22 | 23 |
23 class CertVerifier; | 24 class CertVerifier; |
24 class ClientSocketFactory; | 25 class ClientSocketFactory; |
25 class ClientSocketPoolHistograms; | 26 class ClientSocketPoolHistograms; |
26 class HttpProxyClientSocketPool; | 27 class HttpProxyClientSocketPool; |
27 class HostResolver; | 28 class HostResolver; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 public: | 60 public: |
60 ClientSocketPoolManagerImpl(NetLog* net_log, | 61 ClientSocketPoolManagerImpl(NetLog* net_log, |
61 ClientSocketFactory* socket_factory, | 62 ClientSocketFactory* socket_factory, |
62 HostResolver* host_resolver, | 63 HostResolver* host_resolver, |
63 CertVerifier* cert_verifier, | 64 CertVerifier* cert_verifier, |
64 ServerBoundCertService* server_bound_cert_service, | 65 ServerBoundCertService* server_bound_cert_service, |
65 TransportSecurityState* transport_security_state, | 66 TransportSecurityState* transport_security_state, |
66 SSLHostInfoFactory* ssl_host_info_factory, | 67 SSLHostInfoFactory* ssl_host_info_factory, |
67 const std::string& ssl_session_cache_shard, | 68 const std::string& ssl_session_cache_shard, |
68 ProxyService* proxy_service, | 69 ProxyService* proxy_service, |
69 SSLConfigService* ssl_config_service); | 70 SSLConfigService* ssl_config_service, |
| 71 HttpNetworkSession::SocketPoolType pool_type); |
70 virtual ~ClientSocketPoolManagerImpl(); | 72 virtual ~ClientSocketPoolManagerImpl(); |
71 | 73 |
72 virtual void FlushSocketPools() OVERRIDE; | 74 virtual void FlushSocketPools() OVERRIDE; |
73 virtual void CloseIdleSockets() OVERRIDE; | 75 virtual void CloseIdleSockets() OVERRIDE; |
74 | 76 |
75 virtual TransportClientSocketPool* GetTransportSocketPool() OVERRIDE; | 77 virtual TransportClientSocketPool* GetTransportSocketPool() OVERRIDE; |
76 | 78 |
77 virtual SSLClientSocketPool* GetSSLSocketPool() OVERRIDE; | 79 virtual SSLClientSocketPool* GetSSLSocketPool() OVERRIDE; |
78 | 80 |
79 virtual SOCKSClientSocketPool* GetSocketPoolForSOCKSProxy( | 81 virtual SOCKSClientSocketPool* GetSocketPoolForSOCKSProxy( |
(...skipping 26 matching lines...) Expand all Loading... |
106 NetLog* const net_log_; | 108 NetLog* const net_log_; |
107 ClientSocketFactory* const socket_factory_; | 109 ClientSocketFactory* const socket_factory_; |
108 HostResolver* const host_resolver_; | 110 HostResolver* const host_resolver_; |
109 CertVerifier* const cert_verifier_; | 111 CertVerifier* const cert_verifier_; |
110 ServerBoundCertService* const server_bound_cert_service_; | 112 ServerBoundCertService* const server_bound_cert_service_; |
111 TransportSecurityState* const transport_security_state_; | 113 TransportSecurityState* const transport_security_state_; |
112 SSLHostInfoFactory* const ssl_host_info_factory_; | 114 SSLHostInfoFactory* const ssl_host_info_factory_; |
113 const std::string ssl_session_cache_shard_; | 115 const std::string ssl_session_cache_shard_; |
114 ProxyService* const proxy_service_; | 116 ProxyService* const proxy_service_; |
115 const scoped_refptr<SSLConfigService> ssl_config_service_; | 117 const scoped_refptr<SSLConfigService> ssl_config_service_; |
| 118 const HttpNetworkSession::SocketPoolType pool_type_; |
116 | 119 |
117 // Note: this ordering is important. | 120 // Note: this ordering is important. |
118 | 121 |
119 ClientSocketPoolHistograms transport_pool_histograms_; | 122 ClientSocketPoolHistograms transport_pool_histograms_; |
120 scoped_ptr<TransportClientSocketPool> transport_socket_pool_; | 123 scoped_ptr<TransportClientSocketPool> transport_socket_pool_; |
121 | 124 |
122 ClientSocketPoolHistograms ssl_pool_histograms_; | 125 ClientSocketPoolHistograms ssl_pool_histograms_; |
123 scoped_ptr<SSLClientSocketPool> ssl_socket_pool_; | 126 scoped_ptr<SSLClientSocketPool> ssl_socket_pool_; |
124 | 127 |
125 ClientSocketPoolHistograms transport_for_socks_pool_histograms_; | 128 ClientSocketPoolHistograms transport_for_socks_pool_histograms_; |
(...skipping 16 matching lines...) Expand all Loading... |
142 | 145 |
143 ClientSocketPoolHistograms ssl_socket_pool_for_proxies_histograms_; | 146 ClientSocketPoolHistograms ssl_socket_pool_for_proxies_histograms_; |
144 SSLSocketPoolMap ssl_socket_pools_for_proxies_; | 147 SSLSocketPoolMap ssl_socket_pools_for_proxies_; |
145 | 148 |
146 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolManagerImpl); | 149 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolManagerImpl); |
147 }; | 150 }; |
148 | 151 |
149 } // namespace net | 152 } // namespace net |
150 | 153 |
151 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_IMPL_H_ | 154 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_IMPL_H_ |
OLD | NEW |