diff options
author | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-19 05:56:38 +0000 |
---|---|---|
committer | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-19 05:56:38 +0000 |
commit | 8e6441caa3adedf373b8ff80bb1fb48caff81556 (patch) | |
tree | 4a37d2fe5aaa3aad04b01171feb04e329c7e0383 /net/socket/client_socket_handle.h | |
parent | 33f275a2e2e703c58f514af8efe963e2e29792f9 (diff) | |
download | chromium_src-8e6441caa3adedf373b8ff80bb1fb48caff81556.zip chromium_src-8e6441caa3adedf373b8ff80bb1fb48caff81556.tar.gz chromium_src-8e6441caa3adedf373b8ff80bb1fb48caff81556.tar.bz2 |
Extract connection logic from HttpNetworkTransaction into a new
HttpStreamFactory. The HttpNetworkTransaction now deals exclusively with
streams rather than connections directly. This cut the size of HTN roughly in
in half.
The HttpNetworkTransaction is still responsible for all proxy and server
authentication functions. This is because the streams may come and go - we
could create a stream, have the server declare auth is needed, and then the
next attempt would be on a different stream. So Auth belongs on the HNT.
The HNT no longer has direct access to the connection itself; instead, it
only knows of an HttpStream.
The StreamRequest, however, is responsible for determining whether the
connection needs to use a proxy, whether AlternateProtocols are available, and
whether the connection should be SPDY or HTTP.
Other changes:
- moved some static configuration methods from HNT to HttpStreamFactory.
- added some methods to the HttpStream.
BUG=none
TEST=all
Review URL: http://codereview.chromium.org/3171002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56646 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/client_socket_handle.h')
-rw-r--r-- | net/socket/client_socket_handle.h | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/net/socket/client_socket_handle.h b/net/socket/client_socket_handle.h index a3de0d6..c9d636b 100644 --- a/net/socket/client_socket_handle.h +++ b/net/socket/client_socket_handle.h @@ -147,19 +147,6 @@ class ClientSocketHandle { return UNUSED_IDLE; } } - bool ShouldResendFailedRequest(int error) const { - // NOTE: we resend a request only if we reused a keep-alive connection. - // This automatically prevents an infinite resend loop because we'll run - // out of the cached keep-alive connections eventually. - if ( // We used a socket that was never idle. - reuse_type() == ClientSocketHandle::UNUSED || - // We used an unused, idle socket and got a error that wasn't a TCP RST. - (reuse_type() == ClientSocketHandle::UNUSED_IDLE && - (error != OK && error != ERR_CONNECTION_RESET))) { - return false; - } - return true; - } private: // Called on asynchronous completion of an Init() request. |