| 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_SSL_CLIENT_SOCKET_POOL_H_ | 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ |
| 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ | 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "net/base/privacy_mode.h" | 13 #include "net/base/privacy_mode.h" |
| 14 #include "net/http/http_response_info.h" | 14 #include "net/http/http_response_info.h" |
| 15 #include "net/socket/client_socket_pool.h" | 15 #include "net/socket/client_socket_pool.h" |
| 16 #include "net/socket/client_socket_pool_base.h" | 16 #include "net/socket/client_socket_pool_base.h" |
| 17 #include "net/socket/client_socket_pool_histograms.h" | |
| 18 #include "net/socket/ssl_client_socket.h" | 17 #include "net/socket/ssl_client_socket.h" |
| 19 #include "net/ssl/ssl_config_service.h" | 18 #include "net/ssl/ssl_config_service.h" |
| 20 | 19 |
| 21 namespace net { | 20 namespace net { |
| 22 | 21 |
| 23 class CertPolicyEnforcer; | 22 class CertPolicyEnforcer; |
| 24 class CertVerifier; | 23 class CertVerifier; |
| 25 class ClientSocketFactory; | 24 class ClientSocketFactory; |
| 26 class ConnectJobFactory; | 25 class ConnectJobFactory; |
| 27 class CTVerifier; | 26 class CTVerifier; |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 : public ClientSocketPool, | 175 : public ClientSocketPool, |
| 177 public HigherLayeredPool, | 176 public HigherLayeredPool, |
| 178 public SSLConfigService::Observer { | 177 public SSLConfigService::Observer { |
| 179 public: | 178 public: |
| 180 typedef SSLSocketParams SocketParams; | 179 typedef SSLSocketParams SocketParams; |
| 181 | 180 |
| 182 // Only the pools that will be used are required. i.e. if you never | 181 // Only the pools that will be used are required. i.e. if you never |
| 183 // try to create an SSL over SOCKS socket, |socks_pool| may be NULL. | 182 // try to create an SSL over SOCKS socket, |socks_pool| may be NULL. |
| 184 SSLClientSocketPool(int max_sockets, | 183 SSLClientSocketPool(int max_sockets, |
| 185 int max_sockets_per_group, | 184 int max_sockets_per_group, |
| 186 ClientSocketPoolHistograms* histograms, | |
| 187 CertVerifier* cert_verifier, | 185 CertVerifier* cert_verifier, |
| 188 ChannelIDService* channel_id_service, | 186 ChannelIDService* channel_id_service, |
| 189 TransportSecurityState* transport_security_state, | 187 TransportSecurityState* transport_security_state, |
| 190 CTVerifier* cert_transparency_verifier, | 188 CTVerifier* cert_transparency_verifier, |
| 191 CertPolicyEnforcer* cert_policy_enforcer, | 189 CertPolicyEnforcer* cert_policy_enforcer, |
| 192 const std::string& ssl_session_cache_shard, | 190 const std::string& ssl_session_cache_shard, |
| 193 ClientSocketFactory* client_socket_factory, | 191 ClientSocketFactory* client_socket_factory, |
| 194 TransportClientSocketPool* transport_pool, | 192 TransportClientSocketPool* transport_pool, |
| 195 SOCKSClientSocketPool* socks_pool, | 193 SOCKSClientSocketPool* socks_pool, |
| 196 HttpProxyClientSocketPool* http_proxy_pool, | 194 HttpProxyClientSocketPool* http_proxy_pool, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 LoadState GetLoadState(const std::string& group_name, | 228 LoadState GetLoadState(const std::string& group_name, |
| 231 const ClientSocketHandle* handle) const override; | 229 const ClientSocketHandle* handle) const override; |
| 232 | 230 |
| 233 base::DictionaryValue* GetInfoAsValue( | 231 base::DictionaryValue* GetInfoAsValue( |
| 234 const std::string& name, | 232 const std::string& name, |
| 235 const std::string& type, | 233 const std::string& type, |
| 236 bool include_nested_pools) const override; | 234 bool include_nested_pools) const override; |
| 237 | 235 |
| 238 base::TimeDelta ConnectionTimeout() const override; | 236 base::TimeDelta ConnectionTimeout() const override; |
| 239 | 237 |
| 240 ClientSocketPoolHistograms* histograms() const override; | |
| 241 | |
| 242 // LowerLayeredPool implementation. | 238 // LowerLayeredPool implementation. |
| 243 bool IsStalled() const override; | 239 bool IsStalled() const override; |
| 244 | 240 |
| 245 void AddHigherLayeredPool(HigherLayeredPool* higher_pool) override; | 241 void AddHigherLayeredPool(HigherLayeredPool* higher_pool) override; |
| 246 | 242 |
| 247 void RemoveHigherLayeredPool(HigherLayeredPool* higher_pool) override; | 243 void RemoveHigherLayeredPool(HigherLayeredPool* higher_pool) override; |
| 248 | 244 |
| 249 // HigherLayeredPool implementation. | 245 // HigherLayeredPool implementation. |
| 250 bool CloseOneIdleConnection() override; | 246 bool CloseOneIdleConnection() override; |
| 251 | 247 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 HttpProxyClientSocketPool* const http_proxy_pool_; | 291 HttpProxyClientSocketPool* const http_proxy_pool_; |
| 296 PoolBase base_; | 292 PoolBase base_; |
| 297 const scoped_refptr<SSLConfigService> ssl_config_service_; | 293 const scoped_refptr<SSLConfigService> ssl_config_service_; |
| 298 | 294 |
| 299 DISALLOW_COPY_AND_ASSIGN(SSLClientSocketPool); | 295 DISALLOW_COPY_AND_ASSIGN(SSLClientSocketPool); |
| 300 }; | 296 }; |
| 301 | 297 |
| 302 } // namespace net | 298 } // namespace net |
| 303 | 299 |
| 304 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ | 300 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ |
| OLD | NEW |