summaryrefslogtreecommitdiffstats
path: root/net/http/http_proxy_client_socket.h
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-21 22:44:04 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-21 22:44:04 +0000
commit4d4a5164794bd100ef49451cf1c48d0d57823f41 (patch)
tree9fbd5adf983a0ee908afc989a51bc7554cc9e5fc /net/http/http_proxy_client_socket.h
parent4f5732a4da9058df1dd5c65f48d79414ce47fb76 (diff)
downloadchromium_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_proxy_client_socket.h')
-rw-r--r--net/http/http_proxy_client_socket.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/http/http_proxy_client_socket.h b/net/http/http_proxy_client_socket.h
index e80f697..11e0dc5 100644
--- a/net/http/http_proxy_client_socket.h
+++ b/net/http/http_proxy_client_socket.h
@@ -25,9 +25,11 @@ namespace net {
class AddressList;
class ClientSocketHandle;
+class GrowableIOBuffer;
class HttpAuthCache;
class HttpAuthHandleFactory;
class HttpStream;
+class HttpStreamParser;
class IOBuffer;
class HttpProxyClientSocket : public ClientSocket {
@@ -138,7 +140,8 @@ class HttpProxyClientSocket : public ClientSocket {
HttpRequestInfo request_;
HttpResponseInfo response_;
- scoped_ptr<HttpStream> http_stream_;
+ scoped_refptr<GrowableIOBuffer> parser_buf_;
+ scoped_ptr<HttpStreamParser> http_stream_parser_;
scoped_refptr<IOBuffer> drain_buf_;
// Stores the underlying socket.