Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: net/socket/ssl_client_socket_pool.cc

Issue 3107036: Fix a crash where we are checking IsConnected(). If you look into the ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: nits, extra EXPECTS() in test cases added Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« net/http/http_stream_parser.cc ('K') | « net/socket/socks_client_socket.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698