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 #include "net/socket/ssl_client_socket_pool.h" | 5 #include "net/socket/ssl_client_socket_pool.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 | 251 |
252 int SSLConnectJob::DoTunnelConnectComplete(int result) { | 252 int SSLConnectJob::DoTunnelConnectComplete(int result) { |
253 // Extract the information needed to prompt for appropriate proxy | 253 // Extract the information needed to prompt for appropriate proxy |
254 // authentication so that when ClientSocketPoolBaseHelper calls | 254 // authentication so that when ClientSocketPoolBaseHelper calls |
255 // |GetAdditionalErrorState|, we can easily set the state. | 255 // |GetAdditionalErrorState|, we can easily set the state. |
256 if (result == ERR_SSL_CLIENT_AUTH_CERT_NEEDED) { | 256 if (result == ERR_SSL_CLIENT_AUTH_CERT_NEEDED) { |
257 error_response_info_ = transport_socket_handle_->ssl_error_response_info(); | 257 error_response_info_ = transport_socket_handle_->ssl_error_response_info(); |
258 } else if (result == ERR_PROXY_AUTH_REQUESTED || | 258 } else if (result == ERR_PROXY_AUTH_REQUESTED || |
259 result == ERR_HTTPS_PROXY_TUNNEL_RESPONSE) { | 259 result == ERR_HTTPS_PROXY_TUNNEL_RESPONSE) { |
260 StreamSocket* socket = transport_socket_handle_->socket(); | 260 StreamSocket* socket = transport_socket_handle_->socket(); |
261 HttpProxyClientSocket* tunnel_socket = | 261 ProxyClientSocket* tunnel_socket = |
262 static_cast<HttpProxyClientSocket*>(socket); | 262 static_cast<ProxyClientSocket*>(socket); |
263 error_response_info_ = *tunnel_socket->GetConnectResponseInfo(); | 263 error_response_info_ = *tunnel_socket->GetConnectResponseInfo(); |
264 } | 264 } |
265 if (result < 0) | 265 if (result < 0) |
266 return result; | 266 return result; |
267 | 267 |
268 next_state_ = STATE_SSL_CONNECT; | 268 next_state_ = STATE_SSL_CONNECT; |
269 return result; | 269 return result; |
270 } | 270 } |
271 | 271 |
272 int SSLConnectJob::DoSSLConnect() { | 272 int SSLConnectJob::DoSSLConnect() { |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 Flush(); | 617 Flush(); |
618 } | 618 } |
619 | 619 |
620 bool SSLClientSocketPool::CloseOneIdleConnection() { | 620 bool SSLClientSocketPool::CloseOneIdleConnection() { |
621 if (base_.CloseOneIdleSocket()) | 621 if (base_.CloseOneIdleSocket()) |
622 return true; | 622 return true; |
623 return base_.CloseOneIdleConnectionInLayeredPool(); | 623 return base_.CloseOneIdleConnectionInLayeredPool(); |
624 } | 624 } |
625 | 625 |
626 } // namespace net | 626 } // namespace net |
OLD | NEW |