summaryrefslogtreecommitdiffstats
path: root/net/http/http_stream_handle.cc
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_stream_handle.cc
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_stream_handle.cc')
-rw-r--r--net/http/http_stream_handle.cc82
1 files changed, 0 insertions, 82 deletions
diff --git a/net/http/http_stream_handle.cc b/net/http/http_stream_handle.cc
deleted file mode 100644
index d2ad0f0..0000000
--- a/net/http/http_stream_handle.cc
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "net/http/http_stream_handle.h"
-
-namespace net {
-
-HttpStreamHandle::HttpStreamHandle(ClientSocketHandle* connection,
- HttpStream* stream)
- : connection_(connection), stream_(stream) {
- DCHECK(stream_.get());
-}
-
-HttpStreamHandle::~HttpStreamHandle() {
-}
-
-int HttpStreamHandle::InitializeStream(const HttpRequestInfo* request_info,
- const BoundNetLog& net_log,
- CompletionCallback* callback) {
- return stream_->InitializeStream(request_info, net_log, callback);
-}
-
-int HttpStreamHandle::SendRequest(const std::string& request_headers,
- UploadDataStream* request_body,
- HttpResponseInfo* response,
- CompletionCallback* callback) {
- return stream_->SendRequest(request_headers, request_body, response,
- callback);
-}
-
-uint64 HttpStreamHandle::GetUploadProgress() const {
- return stream_->GetUploadProgress();
-}
-
-int HttpStreamHandle::ReadResponseHeaders(CompletionCallback* callback) {
- return stream_->ReadResponseHeaders(callback);
-}
-
-const HttpResponseInfo* HttpStreamHandle::GetResponseInfo() const {
- return stream_->GetResponseInfo();
-}
-
-int HttpStreamHandle::ReadResponseBody(IOBuffer* buf, int buf_len,
- CompletionCallback* callback) {
- return stream_->ReadResponseBody(buf, buf_len, callback);
-}
-
-void HttpStreamHandle::Close(bool not_reusable) {
- stream_->Close(not_reusable);
-}
-
-bool HttpStreamHandle::IsResponseBodyComplete() const {
- return stream_->IsResponseBodyComplete();
-}
-
-bool HttpStreamHandle::CanFindEndOfResponse() const {
- return stream_->CanFindEndOfResponse();
-}
-
-bool HttpStreamHandle::IsMoreDataBuffered() const {
- return stream_->IsMoreDataBuffered();
-}
-
-bool HttpStreamHandle::IsConnectionReused() const {
- return stream_->IsConnectionReused();
-}
-
-void HttpStreamHandle::SetConnectionReused() {
- stream_->SetConnectionReused();
-}
-
-void HttpStreamHandle::GetSSLInfo(SSLInfo* ssl_info) {
- stream_->GetSSLInfo(ssl_info);
-}
-
-void HttpStreamHandle::GetSSLCertRequestInfo(
- SSLCertRequestInfo* cert_request_info) {
- stream_->GetSSLCertRequestInfo(cert_request_info);
-}
-
-} // namespace net