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 "net/base/net_errors.h" | 7 #include "net/base/net_errors.h" |
8 #include "net/base/ssl_cert_request_info.h" | 8 #include "net/base/ssl_cert_request_info.h" |
9 #include "net/http/http_proxy_client_socket.h" | 9 #include "net/http/http_proxy_client_socket.h" |
10 #include "net/http/http_proxy_client_socket_pool.h" | 10 #include "net/http/http_proxy_client_socket_pool.h" |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 | 233 |
234 // Extract the information needed to prompt for the proxy authentication. | 234 // Extract the information needed to prompt for the proxy authentication. |
235 // so that when ClientSocketPoolBaseHelper calls |GetAdditionalErrorState|, | 235 // so that when ClientSocketPoolBaseHelper calls |GetAdditionalErrorState|, |
236 // we can easily set the state. | 236 // we can easily set the state. |
237 if (result == ERR_PROXY_AUTH_REQUESTED) | 237 if (result == ERR_PROXY_AUTH_REQUESTED) |
238 error_response_info_ = *tunnel_socket->GetResponseInfo(); | 238 error_response_info_ = *tunnel_socket->GetResponseInfo(); |
239 | 239 |
240 if (result < 0) | 240 if (result < 0) |
241 return result; | 241 return result; |
242 | 242 |
243 DCHECK(tunnel_socket->IsConnected()); | |
244 next_state_ = STATE_SSL_CONNECT; | 243 next_state_ = STATE_SSL_CONNECT; |
245 return result; | 244 return result; |
246 } | 245 } |
247 | 246 |
248 void SSLConnectJob::GetAdditionalErrorState(ClientSocketHandle * handle) { | 247 void SSLConnectJob::GetAdditionalErrorState(ClientSocketHandle * handle) { |
249 // Headers in |error_response_info_| indicate a proxy tunnel setup | 248 // Headers in |error_response_info_| indicate a proxy tunnel setup |
250 // problem. See DoTunnelConnectComplete. | 249 // problem. See DoTunnelConnectComplete. |
251 if (error_response_info_.headers) { | 250 if (error_response_info_.headers) { |
252 handle->set_pending_http_proxy_connection( | 251 handle->set_pending_http_proxy_connection( |
253 transport_socket_handle_.release()); | 252 transport_socket_handle_.release()); |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 const std::string& group_name) const { | 424 const std::string& group_name) const { |
426 return base_.IdleSocketCountInGroup(group_name); | 425 return base_.IdleSocketCountInGroup(group_name); |
427 } | 426 } |
428 | 427 |
429 LoadState SSLClientSocketPool::GetLoadState( | 428 LoadState SSLClientSocketPool::GetLoadState( |
430 const std::string& group_name, const ClientSocketHandle* handle) const { | 429 const std::string& group_name, const ClientSocketHandle* handle) const { |
431 return base_.GetLoadState(group_name, handle); | 430 return base_.GetLoadState(group_name, handle); |
432 } | 431 } |
433 | 432 |
434 } // namespace net | 433 } // namespace net |
OLD | NEW |