OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/format_macros.h" | 7 #include "base/format_macros.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 #include "net/base/io_buffer.h" | 10 #include "net/base/io_buffer.h" |
11 #include "net/base/net_errors.h" | 11 #include "net/base/net_errors.h" |
12 #include "net/http/http_request_headers.h" | 12 #include "net/http/http_request_headers.h" |
13 #include "net/http/http_request_info.h" | 13 #include "net/http/http_request_info.h" |
| 14 #include "net/http/http_response_body_drainer.h" |
14 #include "net/http/http_stream_parser.h" | 15 #include "net/http/http_stream_parser.h" |
15 #include "net/http/http_util.h" | 16 #include "net/http/http_util.h" |
16 #include "net/socket/client_socket_handle.h" | 17 #include "net/socket/client_socket_handle.h" |
17 #include "net/socket/client_socket_pool_base.h" | 18 #include "net/socket/client_socket_pool_base.h" |
18 | 19 |
19 namespace net { | 20 namespace net { |
20 | 21 |
21 HttpBasicStream::HttpBasicStream(ClientSocketHandle* connection, | 22 HttpBasicStream::HttpBasicStream(ClientSocketHandle* connection, |
22 HttpStreamParser* parser, | 23 HttpStreamParser* parser, |
23 bool using_proxy) | 24 bool using_proxy) |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 } | 124 } |
124 | 125 |
125 bool HttpBasicStream::IsSpdyHttpStream() const { | 126 bool HttpBasicStream::IsSpdyHttpStream() const { |
126 return false; | 127 return false; |
127 } | 128 } |
128 | 129 |
129 void HttpBasicStream::LogNumRttVsBytesMetrics() const { | 130 void HttpBasicStream::LogNumRttVsBytesMetrics() const { |
130 // Log rtt metrics here. | 131 // Log rtt metrics here. |
131 } | 132 } |
132 | 133 |
| 134 void HttpBasicStream::Drain(HttpNetworkSession* session) { |
| 135 HttpResponseBodyDrainer* drainer = new HttpResponseBodyDrainer(this); |
| 136 drainer->Start(session); |
| 137 // |drainer| will delete itself. |
| 138 } |
| 139 |
133 } // namespace net | 140 } // namespace net |
OLD | NEW |