| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "net/http/http_request_info.h" | 9 #include "net/http/http_request_info.h" |
| 10 #include "net/http/http_response_body_drainer.h" | 10 #include "net/http/http_response_body_drainer.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 } | 31 } |
| 32 | 32 |
| 33 int HttpBasicStream::SendRequest(const HttpRequestHeaders& headers, | 33 int HttpBasicStream::SendRequest(const HttpRequestHeaders& headers, |
| 34 HttpResponseInfo* response, | 34 HttpResponseInfo* response, |
| 35 const CompletionCallback& callback) { | 35 const CompletionCallback& callback) { |
| 36 DCHECK(parser()); | 36 DCHECK(parser()); |
| 37 return parser()->SendRequest( | 37 return parser()->SendRequest( |
| 38 state_.GenerateRequestLine(), headers, response, callback); | 38 state_.GenerateRequestLine(), headers, response, callback); |
| 39 } | 39 } |
| 40 | 40 |
| 41 UploadProgress HttpBasicStream::GetUploadProgress() const { | |
| 42 return parser()->GetUploadProgress(); | |
| 43 } | |
| 44 | |
| 45 int HttpBasicStream::ReadResponseHeaders(const CompletionCallback& callback) { | 41 int HttpBasicStream::ReadResponseHeaders(const CompletionCallback& callback) { |
| 46 return parser()->ReadResponseHeaders(callback); | 42 return parser()->ReadResponseHeaders(callback); |
| 47 } | 43 } |
| 48 | 44 |
| 49 int HttpBasicStream::ReadResponseBody(IOBuffer* buf, | 45 int HttpBasicStream::ReadResponseBody(IOBuffer* buf, |
| 50 int buf_len, | 46 int buf_len, |
| 51 const CompletionCallback& callback) { | 47 const CompletionCallback& callback) { |
| 52 return parser()->ReadResponseBody(buf, buf_len, callback); | 48 return parser()->ReadResponseBody(buf, buf_len, callback); |
| 53 } | 49 } |
| 54 | 50 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // like the right version should be reported, if headers were received. | 127 // like the right version should be reported, if headers were received. |
| 132 details->connection_info = HttpResponseInfo::CONNECTION_INFO_HTTP1_1; | 128 details->connection_info = HttpResponseInfo::CONNECTION_INFO_HTTP1_1; |
| 133 return; | 129 return; |
| 134 } | 130 } |
| 135 | 131 |
| 136 void HttpBasicStream::SetPriority(RequestPriority priority) { | 132 void HttpBasicStream::SetPriority(RequestPriority priority) { |
| 137 // TODO(akalin): Plumb this through to |connection_|. | 133 // TODO(akalin): Plumb this through to |connection_|. |
| 138 } | 134 } |
| 139 | 135 |
| 140 } // namespace net | 136 } // namespace net |
| OLD | NEW |