OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 #ifndef NET_QUIC_QUIC_SPDY_SESSION_H_ | 5 #ifndef NET_QUIC_QUIC_SPDY_SESSION_H_ |
6 #define NET_QUIC_QUIC_SPDY_SESSION_H_ | 6 #define NET_QUIC_QUIC_SPDY_SESSION_H_ |
7 | 7 |
8 #include "net/quic/quic_headers_stream.h" | 8 #include "net/quic/quic_headers_stream.h" |
9 #include "net/quic/quic_session.h" | 9 #include "net/quic/quic_session.h" |
10 #include "net/quic/quic_spdy_stream.h" | 10 #include "net/quic/quic_spdy_stream.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // If provided, |ack_notifier_delegate| will be registered to be notified when | 44 // If provided, |ack_notifier_delegate| will be registered to be notified when |
45 // we have seen ACKs for all packets resulting from this call. | 45 // we have seen ACKs for all packets resulting from this call. |
46 size_t WriteHeaders(QuicStreamId id, | 46 size_t WriteHeaders(QuicStreamId id, |
47 const SpdyHeaderBlock& headers, | 47 const SpdyHeaderBlock& headers, |
48 bool fin, | 48 bool fin, |
49 QuicPriority priority, | 49 QuicPriority priority, |
50 QuicAckListenerInterface* ack_notifier_delegate); | 50 QuicAckListenerInterface* ack_notifier_delegate); |
51 | 51 |
52 QuicHeadersStream* headers_stream() { return headers_stream_.get(); } | 52 QuicHeadersStream* headers_stream() { return headers_stream_.get(); } |
53 | 53 |
| 54 // Called when Head of Line Blocking happens in the headers stream. |
| 55 // |delta| indicates how long that piece of data has been blocked. |
| 56 virtual void OnHeadersHeadOfLineBlocking(QuicTime::Delta delta); |
| 57 |
54 protected: | 58 protected: |
55 // Override CreateIncomingDynamicStream() and CreateOutgoingDynamicStream() | 59 // Override CreateIncomingDynamicStream() and CreateOutgoingDynamicStream() |
56 // with QuicSpdyStream return type to make sure that all data streams are | 60 // with QuicSpdyStream return type to make sure that all data streams are |
57 // QuicSpdyStreams. | 61 // QuicSpdyStreams. |
58 QuicSpdyStream* CreateIncomingDynamicStream(QuicStreamId id) override = 0; | 62 QuicSpdyStream* CreateIncomingDynamicStream(QuicStreamId id) override = 0; |
59 QuicSpdyStream* CreateOutgoingDynamicStream() override = 0; | 63 QuicSpdyStream* CreateOutgoingDynamicStream() override = 0; |
60 | 64 |
61 QuicSpdyStream* GetSpdyDataStream(const QuicStreamId stream_id); | 65 QuicSpdyStream* GetSpdyDataStream(const QuicStreamId stream_id); |
62 | 66 |
63 private: | 67 private: |
64 friend class test::QuicSpdySessionPeer; | 68 friend class test::QuicSpdySessionPeer; |
65 | 69 |
66 scoped_ptr<QuicHeadersStream> headers_stream_; | 70 scoped_ptr<QuicHeadersStream> headers_stream_; |
67 | 71 |
68 DISALLOW_COPY_AND_ASSIGN(QuicSpdySession); | 72 DISALLOW_COPY_AND_ASSIGN(QuicSpdySession); |
69 }; | 73 }; |
70 | 74 |
71 } // namespace net | 75 } // namespace net |
72 | 76 |
73 #endif // NET_QUIC_QUIC_SPDY_SESSION_H_ | 77 #endif // NET_QUIC_QUIC_SPDY_SESSION_H_ |
OLD | NEW |