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_CORE_QUIC_SPDY_SESSION_H_ | 5 #ifndef NET_QUIC_CORE_QUIC_SPDY_SESSION_H_ |
6 #define NET_QUIC_CORE_QUIC_SPDY_SESSION_H_ | 6 #define NET_QUIC_CORE_QUIC_SPDY_SESSION_H_ |
7 | 7 |
8 #include <cstddef> | 8 #include <cstddef> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 // Sets how much encoded data the hpack decoder of spdy_framer_ is willing to | 156 // Sets how much encoded data the hpack decoder of spdy_framer_ is willing to |
157 // buffer. | 157 // buffer. |
158 void set_max_decode_buffer_size_bytes(size_t max_decode_buffer_size_bytes) { | 158 void set_max_decode_buffer_size_bytes(size_t max_decode_buffer_size_bytes) { |
159 spdy_framer_.set_max_decode_buffer_size_bytes(max_decode_buffer_size_bytes); | 159 spdy_framer_.set_max_decode_buffer_size_bytes(max_decode_buffer_size_bytes); |
160 } | 160 } |
161 | 161 |
162 void set_max_uncompressed_header_bytes( | 162 void set_max_uncompressed_header_bytes( |
163 size_t set_max_uncompressed_header_bytes); | 163 size_t set_max_uncompressed_header_bytes); |
164 | 164 |
165 protected: | 165 protected: |
| 166 // TODO(ckrasic) - remove these two when |
| 167 // FLAGS_quic_reloadable_flag_quic_refactor_stream_creation is |
| 168 // deprecated. |
166 // Override CreateIncomingDynamicStream() and CreateOutgoingDynamicStream() | 169 // Override CreateIncomingDynamicStream() and CreateOutgoingDynamicStream() |
167 // with QuicSpdyStream return type to make sure that all data streams are | 170 // with QuicSpdyStream return type to make sure that all data streams are |
168 // QuicSpdyStreams. | 171 // QuicSpdyStreams. |
169 QuicSpdyStream* CreateIncomingDynamicStream(QuicStreamId id) override = 0; | 172 QuicSpdyStream* CreateIncomingDynamicStream(QuicStreamId id) override = 0; |
170 QuicSpdyStream* CreateOutgoingDynamicStream(SpdyPriority priority) override = | 173 QuicSpdyStream* CreateOutgoingDynamicStream(SpdyPriority priority) override = |
171 0; | 174 0; |
172 | 175 |
| 176 QuicSpdyStream* MaybeCreateIncomingDynamicStream(QuicStreamId id) override; |
| 177 QuicSpdyStream* MaybeCreateOutgoingDynamicStream( |
| 178 SpdyPriority priority) override; |
| 179 |
173 QuicSpdyStream* GetSpdyDataStream(const QuicStreamId stream_id); | 180 QuicSpdyStream* GetSpdyDataStream(const QuicStreamId stream_id); |
174 | 181 |
| 182 // TODO(ckrasic) - remove these two when |
| 183 // FLAGS_quic_reloadable_flag_quic_refactor_stream_creation is |
| 184 // depreacted. |
| 185 |
175 // If an incoming stream can be created, return true. | 186 // If an incoming stream can be created, return true. |
176 virtual bool ShouldCreateIncomingDynamicStream(QuicStreamId id) = 0; | 187 virtual bool ShouldCreateIncomingDynamicStream(QuicStreamId id) = 0; |
177 | 188 |
178 // If an outgoing stream can be created, return true. | 189 // If an outgoing stream can be created, return true. |
179 virtual bool ShouldCreateOutgoingDynamicStream() = 0; | 190 virtual bool ShouldCreateOutgoingDynamicStream() = 0; |
180 | 191 |
181 void OnCryptoHandshakeEvent(CryptoHandshakeEvent event) override; | 192 void OnCryptoHandshakeEvent(CryptoHandshakeEvent event) override; |
182 | 193 |
183 bool supports_push_promise() { return supports_push_promise_; } | 194 bool supports_push_promise() { return supports_push_promise_; } |
184 | 195 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 | 292 |
282 SpdyFramer spdy_framer_; | 293 SpdyFramer spdy_framer_; |
283 std::unique_ptr<SpdyFramerVisitor> spdy_framer_visitor_; | 294 std::unique_ptr<SpdyFramerVisitor> spdy_framer_visitor_; |
284 | 295 |
285 DISALLOW_COPY_AND_ASSIGN(QuicSpdySession); | 296 DISALLOW_COPY_AND_ASSIGN(QuicSpdySession); |
286 }; | 297 }; |
287 | 298 |
288 } // namespace net | 299 } // namespace net |
289 | 300 |
290 #endif // NET_QUIC_CORE_QUIC_SPDY_SESSION_H_ | 301 #endif // NET_QUIC_CORE_QUIC_SPDY_SESSION_H_ |
OLD | NEW |