| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 ClientSocketPool::RespectLimits respect_limits, | 98 ClientSocketPool::RespectLimits respect_limits, |
| 99 const scoped_refptr<SSLSocketParams>& params, | 99 const scoped_refptr<SSLSocketParams>& params, |
| 100 const base::TimeDelta& timeout_duration, | 100 const base::TimeDelta& timeout_duration, |
| 101 TransportClientSocketPool* transport_pool, | 101 TransportClientSocketPool* transport_pool, |
| 102 SOCKSClientSocketPool* socks_pool, | 102 SOCKSClientSocketPool* socks_pool, |
| 103 HttpProxyClientSocketPool* http_proxy_pool, | 103 HttpProxyClientSocketPool* http_proxy_pool, |
| 104 ClientSocketFactory* client_socket_factory, | 104 ClientSocketFactory* client_socket_factory, |
| 105 const SSLClientSocketContext& context, | 105 const SSLClientSocketContext& context, |
| 106 Delegate* delegate, | 106 Delegate* delegate, |
| 107 NetLog* net_log) | 107 NetLog* net_log) |
| 108 : ConnectJob(group_name, | 108 : ConnectJob( |
| 109 timeout_duration, | 109 group_name, |
| 110 priority, | 110 timeout_duration, |
| 111 respect_limits, | 111 priority, |
| 112 delegate, | 112 respect_limits, |
| 113 BoundNetLog::Make(net_log, NetLogSourceType::CONNECT_JOB)), | 113 delegate, |
| 114 NetLogWithSource::Make(net_log, NetLogSourceType::CONNECT_JOB)), |
| 114 params_(params), | 115 params_(params), |
| 115 transport_pool_(transport_pool), | 116 transport_pool_(transport_pool), |
| 116 socks_pool_(socks_pool), | 117 socks_pool_(socks_pool), |
| 117 http_proxy_pool_(http_proxy_pool), | 118 http_proxy_pool_(http_proxy_pool), |
| 118 client_socket_factory_(client_socket_factory), | 119 client_socket_factory_(client_socket_factory), |
| 119 context_(context.cert_verifier, | 120 context_(context.cert_verifier, |
| 120 context.channel_id_service, | 121 context.channel_id_service, |
| 121 context.transport_security_state, | 122 context.transport_security_state, |
| 122 context.cert_transparency_verifier, | 123 context.cert_transparency_verifier, |
| 123 context.ct_policy_enforcer, | 124 context.ct_policy_enforcer, |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 const { | 587 const { |
| 587 return timeout_; | 588 return timeout_; |
| 588 } | 589 } |
| 589 | 590 |
| 590 int SSLClientSocketPool::RequestSocket(const std::string& group_name, | 591 int SSLClientSocketPool::RequestSocket(const std::string& group_name, |
| 591 const void* socket_params, | 592 const void* socket_params, |
| 592 RequestPriority priority, | 593 RequestPriority priority, |
| 593 RespectLimits respect_limits, | 594 RespectLimits respect_limits, |
| 594 ClientSocketHandle* handle, | 595 ClientSocketHandle* handle, |
| 595 const CompletionCallback& callback, | 596 const CompletionCallback& callback, |
| 596 const BoundNetLog& net_log) { | 597 const NetLogWithSource& net_log) { |
| 597 const scoped_refptr<SSLSocketParams>* casted_socket_params = | 598 const scoped_refptr<SSLSocketParams>* casted_socket_params = |
| 598 static_cast<const scoped_refptr<SSLSocketParams>*>(socket_params); | 599 static_cast<const scoped_refptr<SSLSocketParams>*>(socket_params); |
| 599 | 600 |
| 600 return base_.RequestSocket(group_name, *casted_socket_params, priority, | 601 return base_.RequestSocket(group_name, *casted_socket_params, priority, |
| 601 respect_limits, handle, callback, net_log); | 602 respect_limits, handle, callback, net_log); |
| 602 } | 603 } |
| 603 | 604 |
| 604 void SSLClientSocketPool::RequestSockets( | 605 void SSLClientSocketPool::RequestSockets(const std::string& group_name, |
| 605 const std::string& group_name, | 606 const void* params, |
| 606 const void* params, | 607 int num_sockets, |
| 607 int num_sockets, | 608 const NetLogWithSource& net_log) { |
| 608 const BoundNetLog& net_log) { | |
| 609 const scoped_refptr<SSLSocketParams>* casted_params = | 609 const scoped_refptr<SSLSocketParams>* casted_params = |
| 610 static_cast<const scoped_refptr<SSLSocketParams>*>(params); | 610 static_cast<const scoped_refptr<SSLSocketParams>*>(params); |
| 611 | 611 |
| 612 base_.RequestSockets(group_name, *casted_params, num_sockets, net_log); | 612 base_.RequestSockets(group_name, *casted_params, num_sockets, net_log); |
| 613 } | 613 } |
| 614 | 614 |
| 615 void SSLClientSocketPool::CancelRequest(const std::string& group_name, | 615 void SSLClientSocketPool::CancelRequest(const std::string& group_name, |
| 616 ClientSocketHandle* handle) { | 616 ClientSocketHandle* handle) { |
| 617 base_.CancelRequest(group_name, handle); | 617 base_.CancelRequest(group_name, handle); |
| 618 } | 618 } |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 if (base_.CloseOneIdleSocket()) | 693 if (base_.CloseOneIdleSocket()) |
| 694 return true; | 694 return true; |
| 695 return base_.CloseOneIdleConnectionInHigherLayeredPool(); | 695 return base_.CloseOneIdleConnectionInHigherLayeredPool(); |
| 696 } | 696 } |
| 697 | 697 |
| 698 void SSLClientSocketPool::OnSSLConfigChanged() { | 698 void SSLClientSocketPool::OnSSLConfigChanged() { |
| 699 FlushWithError(ERR_NETWORK_CHANGED); | 699 FlushWithError(ERR_NETWORK_CHANGED); |
| 700 } | 700 } |
| 701 | 701 |
| 702 } // namespace net | 702 } // namespace net |
| OLD | NEW |