OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/quic/quic_headers_stream.h" | 5 #include "net/quic/quic_headers_stream.h" |
6 | 6 |
7 #include "net/quic/quic_session.h" | 7 #include "net/quic/quic_session.h" |
8 | 8 |
9 using base::StringPiece; | 9 using base::StringPiece; |
10 | 10 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 167 |
168 QuicHeadersStream::QuicHeadersStream(QuicSession* session) | 168 QuicHeadersStream::QuicHeadersStream(QuicSession* session) |
169 : ReliableQuicStream(kHeadersStreamId, session), | 169 : ReliableQuicStream(kHeadersStreamId, session), |
170 stream_id_(kInvalidStreamId), | 170 stream_id_(kInvalidStreamId), |
171 fin_(false), | 171 fin_(false), |
172 frame_len_(0), | 172 frame_len_(0), |
173 spdy_framer_(SPDY3), | 173 spdy_framer_(SPDY3), |
174 spdy_framer_visitor_(new SpdyFramerVisitor(this)) { | 174 spdy_framer_visitor_(new SpdyFramerVisitor(this)) { |
175 spdy_framer_.set_visitor(spdy_framer_visitor_.get()); | 175 spdy_framer_.set_visitor(spdy_framer_visitor_.get()); |
176 spdy_framer_.set_debug_visitor(spdy_framer_visitor_.get()); | 176 spdy_framer_.set_debug_visitor(spdy_framer_visitor_.get()); |
177 DisableFlowControl(); | 177 if (version() <= QUIC_VERSION_20) { |
| 178 // Prior to QUIC_VERSION_21 the headers stream is not subject to any flow |
| 179 // control. |
| 180 DisableFlowControl(); |
| 181 } |
| 182 // The headers stream is exempt from connection level flow control. |
| 183 DisableConnectionFlowControlForThisStream(); |
178 } | 184 } |
179 | 185 |
180 QuicHeadersStream::~QuicHeadersStream() {} | 186 QuicHeadersStream::~QuicHeadersStream() {} |
181 | 187 |
182 size_t QuicHeadersStream::WriteHeaders( | 188 size_t QuicHeadersStream::WriteHeaders( |
183 QuicStreamId stream_id, | 189 QuicStreamId stream_id, |
184 const SpdyHeaderBlock& headers, | 190 const SpdyHeaderBlock& headers, |
185 bool fin, | 191 bool fin, |
186 QuicAckNotifier::DelegateInterface* ack_notifier_delegate) { | 192 QuicAckNotifier::DelegateInterface* ack_notifier_delegate) { |
187 scoped_ptr<SpdySerializedFrame> frame; | 193 scoped_ptr<SpdySerializedFrame> frame; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 DCHECK_EQ(kInvalidStreamId, stream_id_); | 262 DCHECK_EQ(kInvalidStreamId, stream_id_); |
257 DCHECK_EQ(0u, frame_len_); | 263 DCHECK_EQ(0u, frame_len_); |
258 frame_len_ = frame_len; | 264 frame_len_ = frame_len; |
259 } | 265 } |
260 | 266 |
261 bool QuicHeadersStream::IsConnected() { | 267 bool QuicHeadersStream::IsConnected() { |
262 return session()->connection()->connected(); | 268 return session()->connection()->connected(); |
263 } | 269 } |
264 | 270 |
265 } // namespace net | 271 } // namespace net |
OLD | NEW |