| 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 #include "net/socket/ssl_client_socket_pool.h" | 5 #include "net/socket/ssl_client_socket_pool.h" |
| 6 | 6 |
| 7 #include <openssl/ssl.h> | 7 #include <openssl/ssl.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 ClientSocketPool::RespectLimits respect_limits, | 99 ClientSocketPool::RespectLimits respect_limits, |
| 100 const scoped_refptr<SSLSocketParams>& params, | 100 const scoped_refptr<SSLSocketParams>& params, |
| 101 const base::TimeDelta& timeout_duration, | 101 const base::TimeDelta& timeout_duration, |
| 102 TransportClientSocketPool* transport_pool, | 102 TransportClientSocketPool* transport_pool, |
| 103 SOCKSClientSocketPool* socks_pool, | 103 SOCKSClientSocketPool* socks_pool, |
| 104 HttpProxyClientSocketPool* http_proxy_pool, | 104 HttpProxyClientSocketPool* http_proxy_pool, |
| 105 ClientSocketFactory* client_socket_factory, | 105 ClientSocketFactory* client_socket_factory, |
| 106 const SSLClientSocketContext& context, | 106 const SSLClientSocketContext& context, |
| 107 Delegate* delegate, | 107 Delegate* delegate, |
| 108 NetLog* net_log) | 108 NetLog* net_log) |
| 109 : ConnectJob(group_name, | 109 : ConnectJob( |
| 110 timeout_duration, | 110 group_name, |
| 111 priority, | 111 timeout_duration, |
| 112 respect_limits, | 112 priority, |
| 113 delegate, | 113 respect_limits, |
| 114 BoundNetLog::Make(net_log, NetLogSourceType::CONNECT_JOB)), | 114 delegate, |
| 115 NetLogWithSource::Make(net_log, NetLogSourceType::CONNECT_JOB)), |
| 115 params_(params), | 116 params_(params), |
| 116 transport_pool_(transport_pool), | 117 transport_pool_(transport_pool), |
| 117 socks_pool_(socks_pool), | 118 socks_pool_(socks_pool), |
| 118 http_proxy_pool_(http_proxy_pool), | 119 http_proxy_pool_(http_proxy_pool), |
| 119 client_socket_factory_(client_socket_factory), | 120 client_socket_factory_(client_socket_factory), |
| 120 context_(context.cert_verifier, | 121 context_(context.cert_verifier, |
| 121 context.channel_id_service, | 122 context.channel_id_service, |
| 122 context.transport_security_state, | 123 context.transport_security_state, |
| 123 context.cert_transparency_verifier, | 124 context.cert_transparency_verifier, |
| 124 context.ct_policy_enforcer, | 125 context.ct_policy_enforcer, |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 const { | 577 const { |
| 577 return timeout_; | 578 return timeout_; |
| 578 } | 579 } |
| 579 | 580 |
| 580 int SSLClientSocketPool::RequestSocket(const std::string& group_name, | 581 int SSLClientSocketPool::RequestSocket(const std::string& group_name, |
| 581 const void* socket_params, | 582 const void* socket_params, |
| 582 RequestPriority priority, | 583 RequestPriority priority, |
| 583 RespectLimits respect_limits, | 584 RespectLimits respect_limits, |
| 584 ClientSocketHandle* handle, | 585 ClientSocketHandle* handle, |
| 585 const CompletionCallback& callback, | 586 const CompletionCallback& callback, |
| 586 const BoundNetLog& net_log) { | 587 const NetLogWithSource& net_log) { |
| 587 const scoped_refptr<SSLSocketParams>* casted_socket_params = | 588 const scoped_refptr<SSLSocketParams>* casted_socket_params = |
| 588 static_cast<const scoped_refptr<SSLSocketParams>*>(socket_params); | 589 static_cast<const scoped_refptr<SSLSocketParams>*>(socket_params); |
| 589 | 590 |
| 590 return base_.RequestSocket(group_name, *casted_socket_params, priority, | 591 return base_.RequestSocket(group_name, *casted_socket_params, priority, |
| 591 respect_limits, handle, callback, net_log); | 592 respect_limits, handle, callback, net_log); |
| 592 } | 593 } |
| 593 | 594 |
| 594 void SSLClientSocketPool::RequestSockets( | 595 void SSLClientSocketPool::RequestSockets(const std::string& group_name, |
| 595 const std::string& group_name, | 596 const void* params, |
| 596 const void* params, | 597 int num_sockets, |
| 597 int num_sockets, | 598 const NetLogWithSource& net_log) { |
| 598 const BoundNetLog& net_log) { | |
| 599 const scoped_refptr<SSLSocketParams>* casted_params = | 599 const scoped_refptr<SSLSocketParams>* casted_params = |
| 600 static_cast<const scoped_refptr<SSLSocketParams>*>(params); | 600 static_cast<const scoped_refptr<SSLSocketParams>*>(params); |
| 601 | 601 |
| 602 base_.RequestSockets(group_name, *casted_params, num_sockets, net_log); | 602 base_.RequestSockets(group_name, *casted_params, num_sockets, net_log); |
| 603 } | 603 } |
| 604 | 604 |
| 605 void SSLClientSocketPool::CancelRequest(const std::string& group_name, | 605 void SSLClientSocketPool::CancelRequest(const std::string& group_name, |
| 606 ClientSocketHandle* handle) { | 606 ClientSocketHandle* handle) { |
| 607 base_.CancelRequest(group_name, handle); | 607 base_.CancelRequest(group_name, handle); |
| 608 } | 608 } |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 683 if (base_.CloseOneIdleSocket()) | 683 if (base_.CloseOneIdleSocket()) |
| 684 return true; | 684 return true; |
| 685 return base_.CloseOneIdleConnectionInHigherLayeredPool(); | 685 return base_.CloseOneIdleConnectionInHigherLayeredPool(); |
| 686 } | 686 } |
| 687 | 687 |
| 688 void SSLClientSocketPool::OnSSLConfigChanged() { | 688 void SSLClientSocketPool::OnSSLConfigChanged() { |
| 689 FlushWithError(ERR_NETWORK_CHANGED); | 689 FlushWithError(ERR_NETWORK_CHANGED); |
| 690 } | 690 } |
| 691 | 691 |
| 692 } // namespace net | 692 } // namespace net |
| OLD | NEW |