diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-21 18:40:55 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-21 18:40:55 +0000 |
commit | ad74a59d383e658187ae48d084c7a65145d84449 (patch) | |
tree | a60b8e2f9abf54efab891fcb589c7c865ecc7a17 /net/http/http_proxy_client_socket_pool.cc | |
parent | 9cf72aecda4f6c4279cbe397e6c133bbebb8c642 (diff) | |
download | chromium_src-ad74a59d383e658187ae48d084c7a65145d84449.zip chromium_src-ad74a59d383e658187ae48d084c7a65145d84449.tar.gz chromium_src-ad74a59d383e658187ae48d084c7a65145d84449.tar.bz2 |
More net/ reordering.
In addition to the normal method reordering, this patch also deinlines
net/base/test_completion_callback.h and places the compiled code in the
net_test_support target. Minimization of that header also required adding
includes in a few unit tests.
BUG=68682
TEST=compiles
Review URL: http://codereview.chromium.org/6341004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72162 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 | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/net/http/http_proxy_client_socket_pool.cc b/net/http/http_proxy_client_socket_pool.cc index d2e3ccb..3129133 100644 --- a/net/http/http_proxy_client_socket_pool.cc +++ b/net/http/http_proxy_client_socket_pool.cc @@ -105,12 +105,11 @@ LoadState HttpProxyConnectJob::GetLoadState() const { } } -int HttpProxyConnectJob::ConnectInternal() { - if (params_->tcp_params()) - next_state_ = STATE_TCP_CONNECT; - else - next_state_ = STATE_SSL_CONNECT; - return DoLoop(OK); +void HttpProxyConnectJob::GetAdditionalErrorState(ClientSocketHandle * handle) { + if (error_response_info_.cert_request_info) { + handle->set_ssl_error_response_info(error_response_info_); + handle->set_is_ssl_error(true); + } } void HttpProxyConnectJob::OnIOComplete(int result) { @@ -248,11 +247,33 @@ int HttpProxyConnectJob::DoSSLConnectComplete(int result) { return result; } -void HttpProxyConnectJob::GetAdditionalErrorState(ClientSocketHandle * handle) { - if (error_response_info_.cert_request_info) { - handle->set_ssl_error_response_info(error_response_info_); - handle->set_is_ssl_error(true); +int HttpProxyConnectJob::DoHttpProxyConnect() { + next_state_ = STATE_HTTP_PROXY_CONNECT_COMPLETE; + const HostResolver::RequestInfo& tcp_destination = params_->destination(); + const HostPortPair& proxy_server = tcp_destination.host_port_pair(); + + // Add a HttpProxy connection on top of the tcp socket. + transport_socket_.reset( + new HttpProxyClientSocket(transport_socket_handle_.release(), + params_->request_url(), + params_->user_agent(), + params_->endpoint(), + proxy_server, + params_->http_auth_cache(), + params_->http_auth_handler_factory(), + params_->tunnel(), + using_spdy_, + params_->ssl_params() != NULL)); + return transport_socket_->Connect(&callback_); +} + +int HttpProxyConnectJob::DoHttpProxyConnectComplete(int result) { + if (result == OK || result == ERR_PROXY_AUTH_REQUESTED || + result == ERR_HTTPS_PROXY_TUNNEL_RESPONSE) { + set_socket(transport_socket_.release()); } + + return result; } int HttpProxyConnectJob::DoSpdyProxyCreateStream() { @@ -303,33 +324,12 @@ int HttpProxyConnectJob::DoSpdyProxyCreateStreamComplete(int result) { return transport_socket_->Connect(&callback_); } -int HttpProxyConnectJob::DoHttpProxyConnect() { - next_state_ = STATE_HTTP_PROXY_CONNECT_COMPLETE; - const HostResolver::RequestInfo& tcp_destination = params_->destination(); - const HostPortPair& proxy_server = tcp_destination.host_port_pair(); - - // Add a HttpProxy connection on top of the tcp socket. - transport_socket_.reset( - new HttpProxyClientSocket(transport_socket_handle_.release(), - params_->request_url(), - params_->user_agent(), - params_->endpoint(), - proxy_server, - params_->http_auth_cache(), - params_->http_auth_handler_factory(), - params_->tunnel(), - using_spdy_, - params_->ssl_params() != NULL)); - return transport_socket_->Connect(&callback_); -} - -int HttpProxyConnectJob::DoHttpProxyConnectComplete(int result) { - if (result == OK || result == ERR_PROXY_AUTH_REQUESTED || - result == ERR_HTTPS_PROXY_TUNNEL_RESPONSE) { - set_socket(transport_socket_.release()); - } - - return result; +int HttpProxyConnectJob::ConnectInternal() { + if (params_->tcp_params()) + next_state_ = STATE_TCP_CONNECT; + else + next_state_ = STATE_SSL_CONNECT; + return DoLoop(OK); } HttpProxyClientSocketPool:: |