| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 bool fin) override { | 85 bool fin) override { |
| 86 if (fin && len == 0) { | 86 if (fin && len == 0) { |
| 87 // The framer invokes OnStreamFrameData with zero-length data and | 87 // The framer invokes OnStreamFrameData with zero-length data and |
| 88 // fin = true after processing a SYN_STREAM or SYN_REPLY frame | 88 // fin = true after processing a SYN_STREAM or SYN_REPLY frame |
| 89 // that had the fin bit set. | 89 // that had the fin bit set. |
| 90 return; | 90 return; |
| 91 } | 91 } |
| 92 CloseConnection("SPDY DATA frame received."); | 92 CloseConnection("SPDY DATA frame received."); |
| 93 } | 93 } |
| 94 | 94 |
| 95 void OnStreamPadding(SpdyStreamId stream_id, size_t len) override { |
| 96 CloseConnection("SPDY frame padding received."); |
| 97 } |
| 98 |
| 95 void OnError(SpdyFramer* framer) override { | 99 void OnError(SpdyFramer* framer) override { |
| 96 CloseConnection(base::StringPrintf( | 100 CloseConnection(base::StringPrintf( |
| 97 "SPDY framing error: %s", | 101 "SPDY framing error: %s", |
| 98 SpdyFramer::ErrorCodeToString(framer->error_code()))); | 102 SpdyFramer::ErrorCodeToString(framer->error_code()))); |
| 99 } | 103 } |
| 100 | 104 |
| 101 void OnDataFrameHeader(SpdyStreamId stream_id, | 105 void OnDataFrameHeader(SpdyStreamId stream_id, |
| 102 size_t length, | 106 size_t length, |
| 103 bool fin) override { | 107 bool fin) override { |
| 104 CloseConnection("SPDY DATA frame received."); | 108 CloseConnection("SPDY DATA frame received."); |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 DCHECK_EQ(0u, frame_len_); | 328 DCHECK_EQ(0u, frame_len_); |
| 325 } | 329 } |
| 326 frame_len_ += frame_len; | 330 frame_len_ += frame_len; |
| 327 } | 331 } |
| 328 | 332 |
| 329 bool QuicHeadersStream::IsConnected() { | 333 bool QuicHeadersStream::IsConnected() { |
| 330 return session()->connection()->connected(); | 334 return session()->connection()->connected(); |
| 331 } | 335 } |
| 332 | 336 |
| 333 } // namespace net | 337 } // namespace net |
| OLD | NEW |