| 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 "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "net/quic/quic_session.h" | 8 #include "net/quic/quic_session.h" |
| 9 | 9 |
| 10 using base::StringPiece; | 10 using base::StringPiece; |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 178 |
| 179 QuicHeadersStream::QuicHeadersStream(QuicSession* session) | 179 QuicHeadersStream::QuicHeadersStream(QuicSession* session) |
| 180 : ReliableQuicStream(kHeadersStreamId, session), | 180 : ReliableQuicStream(kHeadersStreamId, session), |
| 181 stream_id_(kInvalidStreamId), | 181 stream_id_(kInvalidStreamId), |
| 182 fin_(false), | 182 fin_(false), |
| 183 frame_len_(0), | 183 frame_len_(0), |
| 184 spdy_framer_(SPDY3), | 184 spdy_framer_(SPDY3), |
| 185 spdy_framer_visitor_(new SpdyFramerVisitor(this)) { | 185 spdy_framer_visitor_(new SpdyFramerVisitor(this)) { |
| 186 spdy_framer_.set_visitor(spdy_framer_visitor_.get()); | 186 spdy_framer_.set_visitor(spdy_framer_visitor_.get()); |
| 187 spdy_framer_.set_debug_visitor(spdy_framer_visitor_.get()); | 187 spdy_framer_.set_debug_visitor(spdy_framer_visitor_.get()); |
| 188 if (version() < QUIC_VERSION_21) { | |
| 189 // Prior to QUIC_VERSION_21 the headers stream is not subject to any flow | |
| 190 // control. | |
| 191 DisableFlowControl(); | |
| 192 } | |
| 193 // The headers stream is exempt from connection level flow control. | 188 // The headers stream is exempt from connection level flow control. |
| 194 DisableConnectionFlowControlForThisStream(); | 189 DisableConnectionFlowControlForThisStream(); |
| 195 } | 190 } |
| 196 | 191 |
| 197 QuicHeadersStream::~QuicHeadersStream() {} | 192 QuicHeadersStream::~QuicHeadersStream() {} |
| 198 | 193 |
| 199 size_t QuicHeadersStream::WriteHeaders( | 194 size_t QuicHeadersStream::WriteHeaders( |
| 200 QuicStreamId stream_id, | 195 QuicStreamId stream_id, |
| 201 const SpdyHeaderBlock& headers, | 196 const SpdyHeaderBlock& headers, |
| 202 bool fin, | 197 bool fin, |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 DCHECK_EQ(kInvalidStreamId, stream_id_); | 268 DCHECK_EQ(kInvalidStreamId, stream_id_); |
| 274 DCHECK_EQ(0u, frame_len_); | 269 DCHECK_EQ(0u, frame_len_); |
| 275 frame_len_ = frame_len; | 270 frame_len_ = frame_len; |
| 276 } | 271 } |
| 277 | 272 |
| 278 bool QuicHeadersStream::IsConnected() { | 273 bool QuicHeadersStream::IsConnected() { |
| 279 return session()->connection()->connected(); | 274 return session()->connection()->connected(); |
| 280 } | 275 } |
| 281 | 276 |
| 282 } // namespace net | 277 } // namespace net |
| OLD | NEW |