summaryrefslogtreecommitdiffstats
path: root/net/http/http_proxy_client_socket_pool.cc
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-16 20:53:01 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-16 20:53:01 +0000
commitf7fcceefed4e4817f3fca6fdd2156136662ae39b (patch)
tree49f5d7736c5031f1a7036182f623cacfe6014186 /net/http/http_proxy_client_socket_pool.cc
parent92c6d20388d078771d35a56cfa4b54e080df40d0 (diff)
downloadchromium_src-f7fcceefed4e4817f3fca6fdd2156136662ae39b.zip
chromium_src-f7fcceefed4e4817f3fca6fdd2156136662ae39b.tar.gz
chromium_src-f7fcceefed4e4817f3fca6fdd2156136662ae39b.tar.bz2
Add a new net error code for when the load failure was due to connecting to a bad proxy server.
Prior to this change, users would likely have seen one of these errors on failure to connect through a proxy server: ERR_NAME_NOT_RESOLVED ERR_ADDRESS_UNREACHABLE ERR_CONNECTION_REFUSED ERR_CONNECTION_TIMED_OUT ERR_CONNECTION_FAILED Whereas now any host resolve or tcp connect error will map to: ERR_PROXY_UNREACHABLE This error code will allow selecting a more suitable error page. BUG=53477 Review URL: http://codereview.chromium.org/3360025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59710 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.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/http/http_proxy_client_socket_pool.cc b/net/http/http_proxy_client_socket_pool.cc
index 42722d2..13f4519 100644
--- a/net/http/http_proxy_client_socket_pool.cc
+++ b/net/http/http_proxy_client_socket_pool.cc
@@ -155,7 +155,7 @@ int HttpProxyConnectJob::DoTCPConnect() {
int HttpProxyConnectJob::DoTCPConnectComplete(int result) {
if (result != OK)
- return result;
+ return ERR_PROXY_CONNECTION_FAILED;
// Reset the timer to just the length of time allowed for HttpProxy handshake
// so that a fast TCP connection plus a slow HttpProxy failure doesn't take
@@ -180,6 +180,8 @@ int HttpProxyConnectJob::DoSSLConnectComplete(int result) {
params_->ssl_params()->load_flags() & LOAD_IGNORE_ALL_CERT_ERRORS)
result = OK;
if (result < 0) {
+ // TODO(eroman): return ERR_PROXY_CONNECTION_FAILED if failed with the
+ // TCP connection.
if (transport_socket_handle_->socket())
transport_socket_handle_->socket()->Disconnect();
return result;