summaryrefslogtreecommitdiffstats
path: root/net/http/http_basic_stream.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/http/http_basic_stream.cc')
-rw-r--r--net/http/http_basic_stream.cc50
1 files changed, 50 insertions, 0 deletions
diff --git a/net/http/http_basic_stream.cc b/net/http/http_basic_stream.cc
new file mode 100644
index 0000000..f1e6100
--- /dev/null
+++ b/net/http/http_basic_stream.cc
@@ -0,0 +1,50 @@
+// Copyright (c) 2006-2009 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_basic_stream.h"
+
+namespace net {
+
+HttpBasicStream::HttpBasicStream(ClientSocketHandle* handle)
+ : read_buf_(new GrowableIOBuffer()),
+ parser_(new HttpStreamParser(handle, read_buf_)) {
+}
+
+int HttpBasicStream::SendRequest(const HttpRequestInfo* request,
+ const std::string& headers,
+ UploadDataStream* request_body,
+ CompletionCallback* callback) {
+ return parser_->SendRequest(request, headers, request_body, callback);
+}
+
+uint64 HttpBasicStream::GetUploadProgress() const {
+ return parser_->GetUploadProgress();
+}
+
+int HttpBasicStream::ReadResponseHeaders(CompletionCallback* callback) {
+ return parser_->ReadResponseHeaders(callback);
+}
+
+HttpResponseInfo* HttpBasicStream::GetResponseInfo() const {
+ return parser_->GetResponseInfo();
+}
+
+int HttpBasicStream::ReadResponseBody(IOBuffer* buf, int buf_len,
+ CompletionCallback* callback) {
+ return parser_->ReadResponseBody(buf, buf_len, callback);
+}
+
+bool HttpBasicStream::IsResponseBodyComplete() const {
+ return parser_->IsResponseBodyComplete();
+}
+
+bool HttpBasicStream::CanFindEndOfResponse() const {
+ return parser_->CanFindEndOfResponse();
+}
+
+bool HttpBasicStream::IsMoreDataBuffered() const {
+ return parser_->IsMoreDataBuffered();
+}
+
+} // namespace net