OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "net/http/http_basic_stream.h" |
| 6 |
| 7 namespace net { |
| 8 |
| 9 HttpBasicStream::HttpBasicStream(ClientSocketHandle* handle) |
| 10 : read_buf_(new GrowableIOBuffer()), |
| 11 parser_(new HttpStreamParser(handle, read_buf_)) { |
| 12 } |
| 13 |
| 14 int HttpBasicStream::SendRequest(const HttpRequestInfo* request, |
| 15 const std::string& headers, |
| 16 UploadDataStream* request_body, |
| 17 CompletionCallback* callback) { |
| 18 return parser_->SendRequest(request, headers, request_body, callback); |
| 19 } |
| 20 |
| 21 uint64 HttpBasicStream::GetUploadProgress() const { |
| 22 return parser_->GetUploadProgress(); |
| 23 } |
| 24 |
| 25 int HttpBasicStream::ReadResponseHeaders(CompletionCallback* callback) { |
| 26 return parser_->ReadResponseHeaders(callback); |
| 27 } |
| 28 |
| 29 HttpResponseInfo* HttpBasicStream::GetResponseInfo() const { |
| 30 return parser_->GetResponseInfo(); |
| 31 } |
| 32 |
| 33 int HttpBasicStream::ReadResponseBody(IOBuffer* buf, int buf_len, |
| 34 CompletionCallback* callback) { |
| 35 return parser_->ReadResponseBody(buf, buf_len, callback); |
| 36 } |
| 37 |
| 38 bool HttpBasicStream::IsResponseBodyComplete() const { |
| 39 return parser_->IsResponseBodyComplete(); |
| 40 } |
| 41 |
| 42 bool HttpBasicStream::CanFindEndOfResponse() const { |
| 43 return parser_->CanFindEndOfResponse(); |
| 44 } |
| 45 |
| 46 bool HttpBasicStream::IsMoreDataBuffered() const { |
| 47 return parser_->IsMoreDataBuffered(); |
| 48 } |
| 49 |
| 50 } // namespace net |
OLD | NEW |