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 #include "net/quic/quic_spdy_session.h" | 5 #include "net/quic/quic_spdy_session.h" |
6 | 6 |
7 #include "net/quic/quic_bug_tracker.h" | 7 #include "net/quic/quic_bug_tracker.h" |
8 #include "net/quic/quic_headers_stream.h" | 8 #include "net/quic/quic_headers_stream.h" |
9 | 9 |
10 using std::string; | 10 using std::string; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 bool fin, | 56 bool fin, |
57 size_t frame_len) { | 57 size_t frame_len) { |
58 QuicSpdyStream* stream = GetSpdyDataStream(stream_id); | 58 QuicSpdyStream* stream = GetSpdyDataStream(stream_id); |
59 if (!stream) { | 59 if (!stream) { |
60 // It's quite possible to receive headers after a stream has been reset. | 60 // It's quite possible to receive headers after a stream has been reset. |
61 return; | 61 return; |
62 } | 62 } |
63 stream->OnStreamHeadersComplete(fin, frame_len); | 63 stream->OnStreamHeadersComplete(fin, frame_len); |
64 } | 64 } |
65 | 65 |
| 66 void QuicSpdySession::OnStreamHeaderList(QuicStreamId stream_id, |
| 67 bool fin, |
| 68 size_t frame_len, |
| 69 const QuicHeaderList& header_list) { |
| 70 QuicSpdyStream* stream = GetSpdyDataStream(stream_id); |
| 71 if (!stream) { |
| 72 // It's quite possible to receive headers after a stream has been reset. |
| 73 return; |
| 74 } |
| 75 stream->OnStreamHeaderList(fin, frame_len, header_list); |
| 76 } |
| 77 |
66 size_t QuicSpdySession::WriteHeaders( | 78 size_t QuicSpdySession::WriteHeaders( |
67 QuicStreamId id, | 79 QuicStreamId id, |
68 const SpdyHeaderBlock& headers, | 80 const SpdyHeaderBlock& headers, |
69 bool fin, | 81 bool fin, |
70 SpdyPriority priority, | 82 SpdyPriority priority, |
71 QuicAckListenerInterface* ack_notifier_delegate) { | 83 QuicAckListenerInterface* ack_notifier_delegate) { |
72 return headers_stream_->WriteHeaders(id, headers, fin, priority, | 84 return headers_stream_->WriteHeaders(id, headers, fin, priority, |
73 ack_notifier_delegate); | 85 ack_notifier_delegate); |
74 } | 86 } |
75 | 87 |
(...skipping 30 matching lines...) Expand all Loading... |
106 | 118 |
107 void QuicSpdySession::OnPromiseHeadersComplete(QuicStreamId stream_id, | 119 void QuicSpdySession::OnPromiseHeadersComplete(QuicStreamId stream_id, |
108 QuicStreamId promised_stream_id, | 120 QuicStreamId promised_stream_id, |
109 size_t frame_len) { | 121 size_t frame_len) { |
110 string error = "OnPromiseHeadersComplete should be overriden in client code."; | 122 string error = "OnPromiseHeadersComplete should be overriden in client code."; |
111 QUIC_BUG << error; | 123 QUIC_BUG << error; |
112 connection()->CloseConnection(QUIC_INTERNAL_ERROR, error, | 124 connection()->CloseConnection(QUIC_INTERNAL_ERROR, error, |
113 ConnectionCloseBehavior::SILENT_CLOSE); | 125 ConnectionCloseBehavior::SILENT_CLOSE); |
114 } | 126 } |
115 | 127 |
| 128 void QuicSpdySession::OnPromiseHeaderList(QuicStreamId stream_id, |
| 129 QuicStreamId promised_stream_id, |
| 130 size_t frame_len, |
| 131 const QuicHeaderList& header_list) { |
| 132 string error = "OnPromiseHeaderList should be overriden in client code."; |
| 133 QUIC_BUG << error; |
| 134 connection()->CloseConnection(QUIC_INTERNAL_ERROR, error, |
| 135 ConnectionCloseBehavior::SILENT_CLOSE); |
| 136 } |
| 137 |
116 void QuicSpdySession::OnConfigNegotiated() { | 138 void QuicSpdySession::OnConfigNegotiated() { |
117 QuicSession::OnConfigNegotiated(); | 139 QuicSession::OnConfigNegotiated(); |
118 if (FLAGS_quic_disable_hpack_dynamic_table && | 140 if (FLAGS_quic_disable_hpack_dynamic_table && |
119 config()->HasClientSentConnectionOption(kDHDT, perspective())) { | 141 config()->HasClientSentConnectionOption(kDHDT, perspective())) { |
120 headers_stream_->DisableHpackDynamicTable(); | 142 headers_stream_->DisableHpackDynamicTable(); |
121 } | 143 } |
122 } | 144 } |
123 | 145 |
124 } // namespace net | 146 } // namespace net |
OLD | NEW |