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_pipelined_stream.h" | 5 #include "net/http/http_pipelined_stream.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
9 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
10 #include "net/http/http_pipelined_connection_impl.h" | 10 #include "net/http/http_pipelined_connection_impl.h" |
11 #include "net/http/http_request_headers.h" | 11 #include "net/http/http_request_headers.h" |
12 #include "net/http/http_request_info.h" | 12 #include "net/http/http_request_info.h" |
13 #include "net/http/http_response_info.h" | |
mmenke
2011/11/28 18:39:10
nit: Is this needed? We don't seem to do more th
James Simonsen
2011/11/29 23:57:28
Done.
| |
13 #include "net/http/http_util.h" | 14 #include "net/http/http_util.h" |
14 | 15 |
15 namespace net { | 16 namespace net { |
16 | 17 |
17 HttpPipelinedStream::HttpPipelinedStream(HttpPipelinedConnectionImpl* pipeline, | 18 HttpPipelinedStream::HttpPipelinedStream(HttpPipelinedConnectionImpl* pipeline, |
18 int pipeline_id) | 19 int pipeline_id) |
19 : pipeline_(pipeline), | 20 : pipeline_(pipeline), |
20 pipeline_id_(pipeline_id), | 21 pipeline_id_(pipeline_id), |
21 request_info_(NULL) { | 22 request_info_(NULL) { |
22 } | 23 } |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
111 } | 112 } |
112 | 113 |
113 bool HttpPipelinedStream::IsSpdyHttpStream() const { | 114 bool HttpPipelinedStream::IsSpdyHttpStream() const { |
114 return false; | 115 return false; |
115 } | 116 } |
116 | 117 |
117 void HttpPipelinedStream::LogNumRttVsBytesMetrics() const { | 118 void HttpPipelinedStream::LogNumRttVsBytesMetrics() const { |
118 // TODO(simonjam): I don't want to copy & paste this from http_basic_stream. | 119 // TODO(simonjam): I don't want to copy & paste this from http_basic_stream. |
119 } | 120 } |
120 | 121 |
121 void HttpPipelinedStream::Drain(HttpNetworkSession*) { | 122 void HttpPipelinedStream::Drain(HttpNetworkSession* session) { |
122 // On errors, we already evict everything from the pipeline and close it. | 123 pipeline_->Drain(this, session); |
123 // TODO(simonjam): Consider trying to drain the pipeline in the same way that | |
124 // HttpBasicStream does. | |
125 delete this; | |
126 } | 124 } |
127 | 125 |
128 const SSLConfig& HttpPipelinedStream::used_ssl_config() const { | 126 const SSLConfig& HttpPipelinedStream::used_ssl_config() const { |
129 return pipeline_->used_ssl_config(); | 127 return pipeline_->used_ssl_config(); |
130 } | 128 } |
131 | 129 |
132 const ProxyInfo& HttpPipelinedStream::used_proxy_info() const { | 130 const ProxyInfo& HttpPipelinedStream::used_proxy_info() const { |
133 return pipeline_->used_proxy_info(); | 131 return pipeline_->used_proxy_info(); |
134 } | 132 } |
135 | 133 |
136 const NetLog::Source& HttpPipelinedStream::source() const { | 134 const NetLog::Source& HttpPipelinedStream::source() const { |
137 return pipeline_->source(); | 135 return pipeline_->source(); |
138 } | 136 } |
139 | 137 |
140 bool HttpPipelinedStream::was_npn_negotiated() const { | 138 bool HttpPipelinedStream::was_npn_negotiated() const { |
141 return pipeline_->was_npn_negotiated(); | 139 return pipeline_->was_npn_negotiated(); |
142 } | 140 } |
143 | 141 |
144 } // namespace net | 142 } // namespace net |
OLD | NEW |