| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/http/http_basic_stream.h" | 5 #include "net/http/http_basic_stream.h" |
| 6 | 6 |
| 7 namespace net { | 7 namespace net { |
| 8 | 8 |
| 9 HttpBasicStream::HttpBasicStream(ClientSocketHandle* handle, LoadLog* load_log) | 9 HttpBasicStream::HttpBasicStream(ClientSocketHandle* handle, |
| 10 const BoundNetLog& net_log) |
| 10 : read_buf_(new GrowableIOBuffer()), | 11 : read_buf_(new GrowableIOBuffer()), |
| 11 parser_(new HttpStreamParser(handle, read_buf_, load_log)) { | 12 parser_(new HttpStreamParser(handle, read_buf_, net_log)) { |
| 12 } | 13 } |
| 13 | 14 |
| 14 int HttpBasicStream::SendRequest(const HttpRequestInfo* request, | 15 int HttpBasicStream::SendRequest(const HttpRequestInfo* request, |
| 15 const std::string& headers, | 16 const std::string& headers, |
| 16 UploadDataStream* request_body, | 17 UploadDataStream* request_body, |
| 17 HttpResponseInfo* response, | 18 HttpResponseInfo* response, |
| 18 CompletionCallback* callback) { | 19 CompletionCallback* callback) { |
| 19 return parser_->SendRequest( | 20 return parser_->SendRequest( |
| 20 request, headers, request_body, response, callback); | 21 request, headers, request_body, response, callback); |
| 21 } | 22 } |
| (...skipping 21 matching lines...) Expand all Loading... |
| 43 | 44 |
| 44 bool HttpBasicStream::CanFindEndOfResponse() const { | 45 bool HttpBasicStream::CanFindEndOfResponse() const { |
| 45 return parser_->CanFindEndOfResponse(); | 46 return parser_->CanFindEndOfResponse(); |
| 46 } | 47 } |
| 47 | 48 |
| 48 bool HttpBasicStream::IsMoreDataBuffered() const { | 49 bool HttpBasicStream::IsMoreDataBuffered() const { |
| 49 return parser_->IsMoreDataBuffered(); | 50 return parser_->IsMoreDataBuffered(); |
| 50 } | 51 } |
| 51 | 52 |
| 52 } // namespace net | 53 } // namespace net |
| OLD | NEW |