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/metrics/histogram_macros.h" | 7 #include "base/metrics/histogram_macros.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "net/quic/quic_flags.h" | 9 #include "net/quic/quic_flags.h" |
10 #include "net/quic/quic_headers_stream.h" | 10 #include "net/quic/quic_headers_stream.h" |
11 #include "net/quic/quic_spdy_session.h" | 11 #include "net/quic/quic_spdy_session.h" |
12 #include "net/quic/quic_time.h" | 12 #include "net/quic/quic_time.h" |
13 | 13 |
14 using base::StringPiece; | 14 using base::StringPiece; |
15 using net::HTTP2; | 15 using net::HTTP2; |
16 using net::SpdyFrameType; | 16 using net::SpdyFrameType; |
17 using std::string; | 17 using std::string; |
18 | 18 |
19 namespace net { | 19 namespace net { |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 const QuicStreamId kInvalidStreamId = 0; | 23 const QuicStreamId kInvalidStreamId = 0; |
24 | 24 |
25 } // namespace | 25 } // namespace |
26 | 26 |
27 // A SpdyFramer visitor which passed SYN_STREAM and SYN_REPLY frames to | 27 // A SpdyFramer visitor which passed SYN_STREAM and SYN_REPLY frames to |
28 // the QuicDataStream, and closes the connection if any unexpected frames | 28 // the QuicSpdyStream, and closes the connection if any unexpected frames |
29 // are received. | 29 // are received. |
30 class QuicHeadersStream::SpdyFramerVisitor | 30 class QuicHeadersStream::SpdyFramerVisitor |
31 : public SpdyFramerVisitorInterface, | 31 : public SpdyFramerVisitorInterface, |
32 public SpdyFramerDebugVisitorInterface { | 32 public SpdyFramerDebugVisitorInterface { |
33 public: | 33 public: |
34 explicit SpdyFramerVisitor(QuicHeadersStream* stream) : stream_(stream) {} | 34 explicit SpdyFramerVisitor(QuicHeadersStream* stream) : stream_(stream) {} |
35 | 35 |
36 // SpdyFramerVisitorInterface implementation | 36 // SpdyFramerVisitorInterface implementation |
37 void OnSynStream(SpdyStreamId stream_id, | 37 void OnSynStream(SpdyStreamId stream_id, |
38 SpdyStreamId associated_stream_id, | 38 SpdyStreamId associated_stream_id, |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 | 308 |
309 void QuicHeadersStream::OnCompressedFrameSize(size_t frame_len) { | 309 void QuicHeadersStream::OnCompressedFrameSize(size_t frame_len) { |
310 frame_len_ += frame_len; | 310 frame_len_ += frame_len; |
311 } | 311 } |
312 | 312 |
313 bool QuicHeadersStream::IsConnected() { | 313 bool QuicHeadersStream::IsConnected() { |
314 return session()->connection()->connected(); | 314 return session()->connection()->connected(); |
315 } | 315 } |
316 | 316 |
317 } // namespace net | 317 } // namespace net |
OLD | NEW |