diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-21 22:44:04 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-21 22:44:04 +0000 |
commit | 4d4a5164794bd100ef49451cf1c48d0d57823f41 (patch) | |
tree | 9fbd5adf983a0ee908afc989a51bc7554cc9e5fc /net/http/http_stream.h | |
parent | 4f5732a4da9058df1dd5c65f48d79414ce47fb76 (diff) | |
download | chromium_src-4d4a5164794bd100ef49451cf1c48d0d57823f41.zip chromium_src-4d4a5164794bd100ef49451cf1c48d0d57823f41.tar.gz chromium_src-4d4a5164794bd100ef49451cf1c48d0d57823f41.tar.bz2 |
Eliminate HttpStreamHandle. The name confused me.
HttpStreamHandle was a combination of an HttpStream and a
scoped_ptr<ClientSocketHandle>. This let it manage the transport socket if
so desired. I think that the HttpStream should be in charge of managing this.
* HttpBasicStream should always release it to the pool when done, but perhaps
disconnect it first.
* HttpPipelinedStream (or whatever we name it) should know not to disconnect
the transport socket or whatever. It should return it to the pipeline stream
manager.
* SPDY subtypes of HttpStream do not manage the transport socket. They let the
SpdySession handle it.
Since the ownership pattern varies based on the HttpStream subtype, I think
letting a HttpStreamHandle class perhaps control it is confusing. It's better
for the subtype to know what it's supposed to do.
There was only one hangup here, the HttpProxyClientSocket, since it might need
to Disconnect() and then re-Connect() the transport socket. It was using an
HttpBasicStream, which, with my change, would own the transport socket handle.
I fixed this by making the HttpProxyClientSocket create an HttpStreamParser
instead, which does not own the transport socket handle.
Review URL: http://codereview.chromium.org/3133029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60117 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_stream.h')
-rw-r--r-- | net/http/http_stream.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/http/http_stream.h b/net/http/http_stream.h index 9981e09..211267d 100644 --- a/net/http/http_stream.h +++ b/net/http/http_stream.h @@ -5,7 +5,10 @@ // HttpStream is an interface for reading and writing data to an HttpStream that // keeps the client agnostic of the actual underlying transport layer. This // provides an abstraction for both a basic http stream as well as http -// pipelining implementations. +// pipelining implementations. The HttpStream subtype is expected to manage the +// underlying transport appropriately. For example, a non-pipelined HttpStream +// would return the transport socket to the pool for reuse. SPDY streams on the +// other hand leave the transport socket management to the SpdySession. #ifndef NET_HTTP_HTTP_STREAM_H_ #define NET_HTTP_HTTP_STREAM_H_ |