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

Unified Diff: net/socket/ssl_client_socket_pool.cc

Issue 3066031: Merge 54714 - Recommit 54405 - Fix late binding induced mismatch of Socket an... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/472/src/
Patch Set: Fix merge problems Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/socket/ssl_client_socket_pool.h ('k') | net/socket/ssl_client_socket_pool_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket_pool.cc
diff --git a/net/socket/ssl_client_socket_pool.cc b/net/socket/ssl_client_socket_pool.cc
index 267d2fe10cbda3c086c632200c59032abf2e6a02..a7c5cc93c5c38ba1075107699b7d106a106f7120 100644
--- a/net/socket/ssl_client_socket_pool.cc
+++ b/net/socket/ssl_client_socket_pool.cc
@@ -101,11 +101,6 @@ LoadState SSLConnectJob::GetLoadState() const {
}
int SSLConnectJob::ConnectInternal() {
- DetermineFirstState();
- return DoLoop(OK);
-}
-
-void SSLConnectJob::DetermineFirstState() {
switch (params_->proxy()) {
case ProxyServer::SCHEME_DIRECT:
next_state_ = STATE_TCP_CONNECT;
@@ -121,6 +116,7 @@ void SSLConnectJob::DetermineFirstState() {
NOTREACHED() << "unknown proxy type";
break;
}
+ return DoLoop(OK);
}
void SSLConnectJob::OnIOComplete(int result) {
@@ -212,6 +208,7 @@ int SSLConnectJob::DoSOCKSConnectComplete(int result) {
int SSLConnectJob::DoTunnelConnect() {
DCHECK(http_proxy_pool_.get());
next_state_ = STATE_TUNNEL_CONNECT_COMPLETE;
+
transport_socket_handle_.reset(new ClientSocketHandle());
scoped_refptr<HttpProxySocketParams> http_proxy_params =
params_->http_proxy_params();
@@ -226,12 +223,6 @@ int SSLConnectJob::DoTunnelConnectComplete(int result) {
HttpProxyClientSocket* tunnel_socket =
static_cast<HttpProxyClientSocket*>(socket);
- if (result == ERR_RETRY_CONNECTION) {
- DetermineFirstState();
- transport_socket_handle_->socket()->Disconnect();
- return OK;
- }
-
// Extract the information needed to prompt for the proxy authentication.
// so that when ClientSocketPoolBaseHelper calls |GetAdditionalErrorState|,
// we can easily set the state.
@@ -241,20 +232,17 @@ int SSLConnectJob::DoTunnelConnectComplete(int result) {
if (result < 0)
return result;
- if (tunnel_socket->NeedsRestartWithAuth()) {
- // We must have gotten an 'idle' tunnel socket that is waiting for auth.
- // The HttpAuthController should have new credentials, we just need
- // to retry.
- next_state_ = STATE_TUNNEL_CONNECT_COMPLETE;
- return tunnel_socket->RestartWithAuth(&callback_);
- }
-
+ DCHECK(tunnel_socket->IsConnected());
next_state_ = STATE_SSL_CONNECT;
return result;
}
void SSLConnectJob::GetAdditionalErrorState(ClientSocketHandle * handle) {
- handle->set_ssl_error_response_info(error_response_info_);
+ if (error_response_info_.headers) {
+ handle->set_ssl_error_response_info(error_response_info_);
+ handle->set_pending_http_proxy_connection(
+ transport_socket_handle_.release());
+ }
if (!ssl_connect_start_time_.is_null())
handle->set_is_ssl_error(true);
}
« no previous file with comments | « net/socket/ssl_client_socket_pool.h ('k') | net/socket/ssl_client_socket_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698