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