| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 const std::string& ssl_session_cache_shard, | 183 const std::string& ssl_session_cache_shard, |
| 184 ClientSocketFactory* client_socket_factory, | 184 ClientSocketFactory* client_socket_factory, |
| 185 TransportClientSocketPool* transport_pool, | 185 TransportClientSocketPool* transport_pool, |
| 186 SOCKSClientSocketPool* socks_pool, | 186 SOCKSClientSocketPool* socks_pool, |
| 187 HttpProxyClientSocketPool* http_proxy_pool, | 187 HttpProxyClientSocketPool* http_proxy_pool, |
| 188 SSLConfigService* ssl_config_service, | 188 SSLConfigService* ssl_config_service, |
| 189 NetLog* net_log); | 189 NetLog* net_log); |
| 190 | 190 |
| 191 virtual ~SSLClientSocketPool(); | 191 virtual ~SSLClientSocketPool(); |
| 192 | 192 |
| 193 // ClientSocketPool methods: | 193 // ClientSocketPool implementation. |
| 194 virtual int RequestSocket(const std::string& group_name, | 194 virtual int RequestSocket(const std::string& group_name, |
| 195 const void* connect_params, | 195 const void* connect_params, |
| 196 RequestPriority priority, | 196 RequestPriority priority, |
| 197 ClientSocketHandle* handle, | 197 ClientSocketHandle* handle, |
| 198 OldCompletionCallback* callback, | 198 const CompletionCallback& callback, |
| 199 const BoundNetLog& net_log) OVERRIDE; | 199 const BoundNetLog& net_log) OVERRIDE; |
| 200 | 200 |
| 201 virtual void RequestSockets(const std::string& group_name, | 201 virtual void RequestSockets(const std::string& group_name, |
| 202 const void* params, | 202 const void* params, |
| 203 int num_sockets, | 203 int num_sockets, |
| 204 const BoundNetLog& net_log) OVERRIDE; | 204 const BoundNetLog& net_log) OVERRIDE; |
| 205 | 205 |
| 206 virtual void CancelRequest(const std::string& group_name, | 206 virtual void CancelRequest(const std::string& group_name, |
| 207 ClientSocketHandle* handle) OVERRIDE; | 207 ClientSocketHandle* handle) OVERRIDE; |
| 208 | 208 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 231 | 231 |
| 232 virtual base::DictionaryValue* GetInfoAsValue( | 232 virtual base::DictionaryValue* GetInfoAsValue( |
| 233 const std::string& name, | 233 const std::string& name, |
| 234 const std::string& type, | 234 const std::string& type, |
| 235 bool include_nested_pools) const OVERRIDE; | 235 bool include_nested_pools) const OVERRIDE; |
| 236 | 236 |
| 237 virtual base::TimeDelta ConnectionTimeout() const OVERRIDE; | 237 virtual base::TimeDelta ConnectionTimeout() const OVERRIDE; |
| 238 | 238 |
| 239 virtual ClientSocketPoolHistograms* histograms() const OVERRIDE; | 239 virtual ClientSocketPoolHistograms* histograms() const OVERRIDE; |
| 240 | 240 |
| 241 // LayeredPool methods: | 241 // LayeredPool implementation. |
| 242 virtual bool CloseOneIdleConnection() OVERRIDE; | 242 virtual bool CloseOneIdleConnection() OVERRIDE; |
| 243 | 243 |
| 244 private: | 244 private: |
| 245 typedef ClientSocketPoolBase<SSLSocketParams> PoolBase; | 245 typedef ClientSocketPoolBase<SSLSocketParams> PoolBase; |
| 246 | 246 |
| 247 // SSLConfigService::Observer methods: | 247 // SSLConfigService::Observer implementation. |
| 248 | 248 |
| 249 // When the user changes the SSL config, we flush all idle sockets so they | 249 // When the user changes the SSL config, we flush all idle sockets so they |
| 250 // won't get re-used. | 250 // won't get re-used. |
| 251 virtual void OnSSLConfigChanged() OVERRIDE; | 251 virtual void OnSSLConfigChanged() OVERRIDE; |
| 252 | 252 |
| 253 class SSLConnectJobFactory : public PoolBase::ConnectJobFactory { | 253 class SSLConnectJobFactory : public PoolBase::ConnectJobFactory { |
| 254 public: | 254 public: |
| 255 SSLConnectJobFactory( | 255 SSLConnectJobFactory( |
| 256 TransportClientSocketPool* transport_pool, | 256 TransportClientSocketPool* transport_pool, |
| 257 SOCKSClientSocketPool* socks_pool, | 257 SOCKSClientSocketPool* socks_pool, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 const scoped_refptr<SSLConfigService> ssl_config_service_; | 293 const scoped_refptr<SSLConfigService> ssl_config_service_; |
| 294 | 294 |
| 295 DISALLOW_COPY_AND_ASSIGN(SSLClientSocketPool); | 295 DISALLOW_COPY_AND_ASSIGN(SSLClientSocketPool); |
| 296 }; | 296 }; |
| 297 | 297 |
| 298 REGISTER_SOCKET_PARAMS_FOR_POOL(SSLClientSocketPool, SSLSocketParams); | 298 REGISTER_SOCKET_PARAMS_FOR_POOL(SSLClientSocketPool, SSLSocketParams); |
| 299 | 299 |
| 300 } // namespace net | 300 } // namespace net |
| 301 | 301 |
| 302 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ | 302 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ |
| OLD | NEW |