Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(782)

Side by Side Diff: net/quic/core/quic_session.h

Issue 2808273006: Landing Recent QUIC changes until Sun Apr 9 16:12:55 (Closed)
Patch Set: increment enabled_options in e2e test Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/core/quic_packet_generator_test.cc ('k') | net/quic/core/quic_session.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // A QuicSession, which demuxes a single connection to individual streams. 5 // A QuicSession, which demuxes a single connection to individual streams.
6 6
7 #ifndef NET_QUIC_CORE_QUIC_SESSION_H_ 7 #ifndef NET_QUIC_CORE_QUIC_SESSION_H_
8 #define NET_QUIC_CORE_QUIC_SESSION_H_ 8 #define NET_QUIC_CORE_QUIC_SESSION_H_
9 9
10 #include <cstddef> 10 #include <cstddef>
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 // then a new stream is created and returned. In all other cases, nullptr is 238 // then a new stream is created and returned. In all other cases, nullptr is
239 // returned. 239 // returned.
240 QuicStream* GetOrCreateStream(const QuicStreamId stream_id); 240 QuicStream* GetOrCreateStream(const QuicStreamId stream_id);
241 241
242 // Mark a stream as draining. 242 // Mark a stream as draining.
243 virtual void StreamDraining(QuicStreamId id); 243 virtual void StreamDraining(QuicStreamId id);
244 244
245 // Returns true if this stream should yield writes to another blocked stream. 245 // Returns true if this stream should yield writes to another blocked stream.
246 bool ShouldYield(QuicStreamId stream_id); 246 bool ShouldYield(QuicStreamId stream_id);
247 247
248 bool flow_control_invariant() { return flow_control_invariant_; }
249
250 protected: 248 protected:
251 using StaticStreamMap = QuicSmallMap<QuicStreamId, QuicStream*, 2>; 249 using StaticStreamMap = QuicSmallMap<QuicStreamId, QuicStream*, 2>;
252 250
253 using DynamicStreamMap = 251 using DynamicStreamMap =
254 QuicSmallMap<QuicStreamId, std::unique_ptr<QuicStream>, 10>; 252 QuicSmallMap<QuicStreamId, std::unique_ptr<QuicStream>, 10>;
255 253
256 using ClosedStreams = std::vector<std::unique_ptr<QuicStream>>; 254 using ClosedStreams = std::vector<std::unique_ptr<QuicStream>>;
257 255
258 // Creates a new stream to handle a peer-initiated stream. 256 // Creates a new stream to handle a peer-initiated stream.
259 // Caller does not own the returned stream. 257 // Caller does not own the returned stream.
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 // The latched error with which the connection was closed. 429 // The latched error with which the connection was closed.
432 QuicErrorCode error_; 430 QuicErrorCode error_;
433 431
434 // Used for connection-level flow control. 432 // Used for connection-level flow control.
435 QuicFlowController flow_controller_; 433 QuicFlowController flow_controller_;
436 434
437 // The stream id which was last popped in OnCanWrite, or 0, if not under the 435 // The stream id which was last popped in OnCanWrite, or 0, if not under the
438 // call stack of OnCanWrite. 436 // call stack of OnCanWrite.
439 QuicStreamId currently_writing_stream_id_; 437 QuicStreamId currently_writing_stream_id_;
440 438
441 // Latched value of quic_reloadable_flag_quic_flow_control_invariant.
442 const bool flow_control_invariant_;
443
444 DISALLOW_COPY_AND_ASSIGN(QuicSession); 439 DISALLOW_COPY_AND_ASSIGN(QuicSession);
445 }; 440 };
446 441
447 } // namespace net 442 } // namespace net
448 443
449 #endif // NET_QUIC_CORE_QUIC_SESSION_H_ 444 #endif // NET_QUIC_CORE_QUIC_SESSION_H_
OLDNEW
« no previous file with comments | « net/quic/core/quic_packet_generator_test.cc ('k') | net/quic/core/quic_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698