diff options
author | nick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-02 22:03:12 +0000 |
---|---|---|
committer | nick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-02 22:03:12 +0000 |
commit | 58a496f954596fc8720777c14213f4a35533147e (patch) | |
tree | 65b4220a7f685e08eab9a94d73629f6405e59a73 /net/http/http_proxy_client_socket_pool.cc | |
parent | 4d299ea9d1a3d8a582cc96bf8efb5e84f09b77d7 (diff) | |
download | chromium_src-58a496f954596fc8720777c14213f4a35533147e.zip chromium_src-58a496f954596fc8720777c14213f4a35533147e.tar.gz chromium_src-58a496f954596fc8720777c14213f4a35533147e.tar.bz2 |
Revert 54405 - Fix late binding induced mismatch of Socket and AuthController
[Reason for revert: large spike in crash rate on reliability bots]
ClientSocketPool treats all pending SocketParams as interchangeable. Therefore they can not contain any connection specific data. This only affects the Http Proxy tunnel case. The lowest risk change to fix this problem is to create the HttpAuthController in the HttpProxyClientSocket. If we get a 407 and need to restart the Tunnel, the pending HttpProxyClientSocket is returned to the HttpNetworkTransaction in the additional error state of the connection and then complete the auth in a pair of states in the HttpNetworkTransaction. This reintroduces a dependency between tunnel setup and the HttpNetworkTransaction, but that will need to be fixed at a later date.
BUG=49493,50822
TEST=existing unit tests + manually visiting many SSL sites through a kerberized http proxy.
Review URL: http://codereview.chromium.org/3058013
TBR=vandebo@chromium.org
Review URL: http://codereview.chromium.org/3056040
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54616 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_proxy_client_socket_pool.cc')
-rw-r--r-- | net/http/http_proxy_client_socket_pool.cc | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/net/http/http_proxy_client_socket_pool.cc b/net/http/http_proxy_client_socket_pool.cc index 783c10f..a142576 100644 --- a/net/http/http_proxy_client_socket_pool.cc +++ b/net/http/http_proxy_client_socket_pool.cc @@ -7,7 +7,6 @@ #include "base/time.h" #include "googleurl/src/gurl.h" #include "net/base/net_errors.h" -#include "net/http/http_network_session.h" #include "net/http/http_proxy_client_socket.h" #include "net/socket/client_socket_factory.h" #include "net/socket/client_socket_handle.h" @@ -19,12 +18,12 @@ HttpProxySocketParams::HttpProxySocketParams( const scoped_refptr<TCPSocketParams>& proxy_server, const GURL& request_url, HostPortPair endpoint, - scoped_refptr<HttpNetworkSession> session, + scoped_refptr<HttpAuthController> auth_controller, bool tunnel) : tcp_params_(proxy_server), request_url_(request_url), endpoint_(endpoint), - session_(session), + auth_controller_(auth_controller), tunnel_(tunnel) { } @@ -134,22 +133,19 @@ int HttpProxyConnectJob::DoTCPConnectComplete(int result) { int HttpProxyConnectJob::DoHttpProxyConnect() { next_state_ = kStateHttpProxyConnectComplete; - const HostResolver::RequestInfo& tcp_destination = - params_->tcp_params()->destination(); - HostPortPair proxy_server(tcp_destination.hostname(), - tcp_destination.port()); // Add a HttpProxy connection on top of the tcp socket. socket_.reset(new HttpProxyClientSocket(tcp_socket_handle_.release(), params_->request_url(), params_->endpoint(), - proxy_server, - params_->session(), + params_->auth_controller(), params_->tunnel())); return socket_->Connect(&callback_); } int HttpProxyConnectJob::DoHttpProxyConnectComplete(int result) { + DCHECK_NE(result, ERR_RETRY_CONNECTION); + if (result == OK || result == ERR_PROXY_AUTH_REQUESTED) set_socket(socket_.release()); |