diff options
author | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-16 20:08:03 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-16 20:08:03 +0000 |
commit | 2f497d2c984fe9c7a646d6d78b04a7c922033f50 (patch) | |
tree | 9ed144aa1a4fb14e09b74ed39e680a61679e2ca4 /net/http/http_basic_stream.h | |
parent | cde4e80d78fee0902c0290b2c2a4052e1e7132cd (diff) | |
download | chromium_src-2f497d2c984fe9c7a646d6d78b04a7c922033f50.zip chromium_src-2f497d2c984fe9c7a646d6d78b04a7c922033f50.tar.gz chromium_src-2f497d2c984fe9c7a646d6d78b04a7c922033f50.tar.bz2 |
Reverting 29316.
Review URL: http://codereview.chromium.org/292002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29320 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_basic_stream.h')
-rw-r--r-- | net/http/http_basic_stream.h | 46 |
1 files changed, 14 insertions, 32 deletions
diff --git a/net/http/http_basic_stream.h b/net/http/http_basic_stream.h index 1b1f68a..2a82b7a 100644 --- a/net/http/http_basic_stream.h +++ b/net/http/http_basic_stream.h @@ -9,50 +9,32 @@ #ifndef NET_HTTP_HTTP_BASIC_STREAM_H_ #define NET_HTTP_HTTP_BASIC_STREAM_H_ -#include <string> - #include "base/basictypes.h" -#include "net/base/io_buffer.h" #include "net/http/http_stream.h" -#include "net/http/http_stream_parser.h" +#include "net/socket/client_socket_handle.h" namespace net { -class ClientSocketHandle; -class HttpRequestInfo; -class HttpResponseInfo; -class UploadDataStream; - class HttpBasicStream : public HttpStream { public: - explicit HttpBasicStream(ClientSocketHandle* handle); + explicit HttpBasicStream(ClientSocketHandle* handle) : handle_(handle) {} virtual ~HttpBasicStream() {} // HttpStream methods: - virtual int SendRequest(const HttpRequestInfo* request, - const std::string& headers, - UploadDataStream* request_body, - CompletionCallback* callback); - - virtual uint64 GetUploadProgress() const; - - virtual int ReadResponseHeaders(CompletionCallback* callback); - - virtual HttpResponseInfo* GetResponseInfo() const; - - virtual int ReadResponseBody(IOBuffer* buf, int buf_len, - CompletionCallback* callback); - - virtual bool IsResponseBodyComplete() const; - - virtual bool CanFindEndOfResponse() const; - - virtual bool IsMoreDataBuffered() const; + virtual int Read(IOBuffer* buf, + int buf_len, + CompletionCallback* callback) { + return handle_->socket()->Read(buf, buf_len, callback); + } + + virtual int Write(IOBuffer* buf, + int buf_len, + CompletionCallback* callback) { + return handle_->socket()->Write(buf, buf_len, callback); + } private: - scoped_refptr<GrowableIOBuffer> read_buf_; - - scoped_ptr<HttpStreamParser> parser_; + ClientSocketHandle* const handle_; DISALLOW_COPY_AND_ASSIGN(HttpBasicStream); }; |