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

Unified Diff: net/socket/ssl_client_socket_pool.cc

Issue 3039028: Make HttpAuthController not reference counted. (Closed)
Patch Set: 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/socket_test_util.cc ('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 3fd960c8a5f83e1c216ed6197000f308ea35ffa6..46474c1a2658675c5808edee10ba6664638812ac 100644
--- a/net/socket/ssl_client_socket_pool.cc
+++ b/net/socket/ssl_client_socket_pool.cc
@@ -228,6 +228,8 @@ int SSLConnectJob::DoTunnelConnectComplete(int result) {
if (result == ERR_RETRY_CONNECTION) {
DetermineFirstState();
+ params_->http_proxy_params()->set_auth_controller(
+ tunnel_socket->ReleaseAuthController());
transport_socket_handle_->socket()->Disconnect();
return OK;
}
@@ -246,7 +248,14 @@ int SSLConnectJob::DoTunnelConnectComplete(int result) {
// The HttpAuthController should have new credentials, we just need
// to retry.
next_state_ = STATE_TUNNEL_CONNECT_COMPLETE;
- return tunnel_socket->RestartWithAuth(&callback_);
+ scoped_ptr<HttpAuthController> auth(
+ params_->http_proxy_params()->ReleaseAuthController());
+ const HttpAuth::Identity& auth_credentials = auth->AuthIdentity();
+ DCHECK_EQ(auth_credentials.source, HttpAuth::IDENT_SRC_EXTERNAL);
+ DCHECK(!auth_credentials.invalid);
+ return tunnel_socket->RestartWithAuth(auth_credentials.username,
+ auth_credentials.password,
+ &callback_);
}
next_state_ = STATE_SSL_CONNECT;
« no previous file with comments | « net/socket/socket_test_util.cc ('k') | net/socket/ssl_client_socket_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698