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

Side by Side Diff: net/http/http_network_transaction.cc

Issue 567030: Add specific error codes for when SOCKS connect fails.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rename ERR_SOCKS_CONNECT_* --> ERR_SOCKS_CONNECTION_* Created 10 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/base/net_error_list.h ('k') | net/socket/socks5_client_socket.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/http/http_network_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/scoped_ptr.h" 8 #include "base/scoped_ptr.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/field_trial.h" 10 #include "base/field_trial.h"
(...skipping 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after
1578 switch (error) { 1578 switch (error) {
1579 case ERR_NAME_NOT_RESOLVED: 1579 case ERR_NAME_NOT_RESOLVED:
1580 case ERR_INTERNET_DISCONNECTED: 1580 case ERR_INTERNET_DISCONNECTED:
1581 case ERR_ADDRESS_UNREACHABLE: 1581 case ERR_ADDRESS_UNREACHABLE:
1582 case ERR_CONNECTION_CLOSED: 1582 case ERR_CONNECTION_CLOSED:
1583 case ERR_CONNECTION_RESET: 1583 case ERR_CONNECTION_RESET:
1584 case ERR_CONNECTION_REFUSED: 1584 case ERR_CONNECTION_REFUSED:
1585 case ERR_CONNECTION_ABORTED: 1585 case ERR_CONNECTION_ABORTED:
1586 case ERR_TIMED_OUT: 1586 case ERR_TIMED_OUT:
1587 case ERR_TUNNEL_CONNECTION_FAILED: 1587 case ERR_TUNNEL_CONNECTION_FAILED:
1588 case ERR_SOCKS_CONNECTION_FAILED:
1588 break; 1589 break;
1590 case ERR_SOCKS_CONNECTION_HOST_UNREACHABLE:
1591 // Remap the SOCKS-specific "host unreachable" error to a more
1592 // generic error code (This way consumers like the link doctor
1593 // can substitute the error page).
1594 //
1595 // Note that if the host resolving was done by the
1596 // SOCSK5 proxy, we can't differentiate between a proxy-side
1597 // "host not found" versus a proxy-side "address unreachable" error, and
1598 // will report both of these failures as ERR_ADDRESS_UNREACHABLE.
1599 return ERR_ADDRESS_UNREACHABLE;
1589 default: 1600 default:
1590 return error; 1601 return error;
1591 } 1602 }
1592 1603
1593 if (request_->load_flags & LOAD_BYPASS_PROXY) { 1604 if (request_->load_flags & LOAD_BYPASS_PROXY) {
1594 return error; 1605 return error;
1595 } 1606 }
1596 1607
1597 int rv = session_->proxy_service()->ReconsiderProxyAfterError( 1608 int rv = session_->proxy_service()->ReconsiderProxyAfterError(
1598 request_->url, &proxy_info_, &io_callback_, &pac_request_, load_log_); 1609 request_->url, &proxy_info_, &io_callback_, &pac_request_, load_log_);
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
1878 AuthChallengeInfo* auth_info = new AuthChallengeInfo; 1889 AuthChallengeInfo* auth_info = new AuthChallengeInfo;
1879 auth_info->is_proxy = target == HttpAuth::AUTH_PROXY; 1890 auth_info->is_proxy = target == HttpAuth::AUTH_PROXY;
1880 auth_info->host_and_port = ASCIIToWide(GetHostAndPort(auth_origin)); 1891 auth_info->host_and_port = ASCIIToWide(GetHostAndPort(auth_origin));
1881 auth_info->scheme = ASCIIToWide(auth_handler_[target]->scheme()); 1892 auth_info->scheme = ASCIIToWide(auth_handler_[target]->scheme());
1882 // TODO(eroman): decode realm according to RFC 2047. 1893 // TODO(eroman): decode realm according to RFC 2047.
1883 auth_info->realm = ASCIIToWide(auth_handler_[target]->realm()); 1894 auth_info->realm = ASCIIToWide(auth_handler_[target]->realm());
1884 response_.auth_challenge = auth_info; 1895 response_.auth_challenge = auth_info;
1885 } 1896 }
1886 1897
1887 } // namespace net 1898 } // namespace net
OLDNEW
« no previous file with comments | « net/base/net_error_list.h ('k') | net/socket/socks5_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698