OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
10 #include "net/base/host_port_pair.h" | 10 #include "net/base/host_port_pair.h" |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 http_proxy_params->destination().priority(), &callback_, | 249 http_proxy_params->destination().priority(), &callback_, |
250 http_proxy_pool_, net_log()); | 250 http_proxy_pool_, net_log()); |
251 } | 251 } |
252 | 252 |
253 int SSLConnectJob::DoTunnelConnectComplete(int result) { | 253 int SSLConnectJob::DoTunnelConnectComplete(int result) { |
254 // Extract the information needed to prompt for appropriate proxy | 254 // Extract the information needed to prompt for appropriate proxy |
255 // authentication so that when ClientSocketPoolBaseHelper calls | 255 // authentication so that when ClientSocketPoolBaseHelper calls |
256 // |GetAdditionalErrorState|, we can easily set the state. | 256 // |GetAdditionalErrorState|, we can easily set the state. |
257 if (result == ERR_SSL_CLIENT_AUTH_CERT_NEEDED) { | 257 if (result == ERR_SSL_CLIENT_AUTH_CERT_NEEDED) { |
258 error_response_info_ = transport_socket_handle_->ssl_error_response_info(); | 258 error_response_info_ = transport_socket_handle_->ssl_error_response_info(); |
259 } else if (result == ERR_PROXY_AUTH_REQUESTED) { | 259 } else if (result == ERR_PROXY_AUTH_REQUESTED || |
| 260 result == ERR_HTTPS_PROXY_TUNNEL_RESPONSE) { |
260 ClientSocket* socket = transport_socket_handle_->socket(); | 261 ClientSocket* socket = transport_socket_handle_->socket(); |
261 HttpProxyClientSocket* tunnel_socket = | 262 HttpProxyClientSocket* tunnel_socket = |
262 static_cast<HttpProxyClientSocket*>(socket); | 263 static_cast<HttpProxyClientSocket*>(socket); |
263 error_response_info_ = *tunnel_socket->GetResponseInfo(); | 264 error_response_info_ = *tunnel_socket->GetConnectResponseInfo(); |
264 } | 265 } |
265 if (result < 0) | 266 if (result < 0) |
266 return result; | 267 return result; |
267 | 268 |
268 next_state_ = STATE_SSL_CONNECT; | 269 next_state_ = STATE_SSL_CONNECT; |
269 return result; | 270 return result; |
270 } | 271 } |
271 | 272 |
272 void SSLConnectJob::GetAdditionalErrorState(ClientSocketHandle * handle) { | 273 void SSLConnectJob::GetAdditionalErrorState(ClientSocketHandle * handle) { |
273 // Headers in |error_response_info_| indicate a proxy tunnel setup | 274 // Headers in |error_response_info_| indicate a proxy tunnel setup |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 list->Append(http_proxy_pool_->GetInfoAsValue("http_proxy_pool", | 515 list->Append(http_proxy_pool_->GetInfoAsValue("http_proxy_pool", |
515 "http_proxy_pool", | 516 "http_proxy_pool", |
516 true)); | 517 true)); |
517 } | 518 } |
518 dict->Set("nested_pools", list); | 519 dict->Set("nested_pools", list); |
519 } | 520 } |
520 return dict; | 521 return dict; |
521 } | 522 } |
522 | 523 |
523 } // namespace net | 524 } // namespace net |
OLD | NEW |