diff options
author | arindam@chromium.org <arindam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-26 20:00:31 +0000 |
---|---|---|
committer | arindam@chromium.org <arindam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-26 20:00:31 +0000 |
commit | 04e5be3837d175ad9bba54d8c111d380459c5f39 (patch) | |
tree | 116c9334cee4f200dcaa9a0a38716985b93eaa8b /net/http/http_network_transaction.h | |
parent | 791f74e8cd6eb1204b04c23e6378daeb4f688ee6 (diff) | |
download | chromium_src-04e5be3837d175ad9bba54d8c111d380459c5f39.zip chromium_src-04e5be3837d175ad9bba54d8c111d380459c5f39.tar.gz chromium_src-04e5be3837d175ad9bba54d8c111d380459c5f39.tar.bz2 |
Refactoring using_proxy_, using_tunnel_, using_socks_proxy_ into a single enum ProxyConfig in HttpNetworkTransaction.
Fixing http://crbug.com/14982
In case of SOCKS proxies we set the url to append to the group name so that the socks endpoint is at the target server and not the socks proxy server and so can be effectively reused by the socket pool.
BUG=14982
TEST=unittests
Review URL: http://codereview.chromium.org/146026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19404 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_network_transaction.h')
-rw-r--r-- | net/http/http_network_transaction.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/net/http/http_network_transaction.h b/net/http/http_network_transaction.h index 9e6d53f..63ac243 100644 --- a/net/http/http_network_transaction.h +++ b/net/http/http_network_transaction.h @@ -116,6 +116,13 @@ class HttpNetworkTransaction : public HttpTransaction { STATE_NONE }; + enum ProxyMode { + kDirectConnection, // If using a direct connection + kHTTPProxy, // If using a proxy for HTTP (not HTTPS) + kHTTPProxyUsingTunnel, // If using a tunnel for HTTPS + kSOCKSProxy, // If using a SOCKS proxy + }; + void DoCallback(int result); void OnIOComplete(int result); @@ -307,9 +314,7 @@ class HttpNetworkTransaction : public HttpTransaction { bool reused_socket_; bool using_ssl_; // True if handling a HTTPS request - bool using_proxy_; // True if using a proxy for HTTP (not HTTPS) - bool using_tunnel_; // True if using a tunnel for HTTPS - bool using_socks_proxy_; // True if using a SOCKS proxy + ProxyMode proxy_mode_; // True while establishing a tunnel. This allows the HTTP CONNECT // request/response to reuse the STATE_WRITE_HEADERS, |