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

Unified Diff: net/quic/quic_session.h

Issue 1660533002: Landing Recent QUIC changes until 01/26/2016 18:14 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_sent_packet_manager_test.cc ('k') | net/quic/quic_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_session.h
diff --git a/net/quic/quic_session.h b/net/quic/quic_session.h
index 712d0d60eae5f1c64cc586a3d9a28e368ab6b93e..0201d4396cd6cdc767ab8b4a5ef50ae2b41122d3 100644
--- a/net/quic/quic_session.h
+++ b/net/quic/quic_session.h
@@ -31,7 +31,6 @@ namespace net {
class QuicCryptoStream;
class QuicFlowController;
class ReliableQuicStream;
-class VisitorShim;
namespace test {
class QuicSessionPeer;
@@ -75,6 +74,9 @@ class NET_EXPORT_PRIVATE QuicSession : public QuicConnectionVisitorInterface {
void OnCanWrite() override;
void OnCongestionWindowChange(QuicTime /*now*/) override {}
void OnConnectionMigration() override {}
+ // Deletes streams that are safe to be deleted now that it's safe to do so (no
+ // other operations are being done on the streams at this time).
+ void PostProcessAfterData() override;
bool WillingAndAbleToWrite() const override;
bool HasPendingHandshake() const override;
bool HasOpenDynamicStreams() const override;
@@ -201,12 +203,16 @@ class NET_EXPORT_PRIVATE QuicSession : public QuicConnectionVisitorInterface {
// Returns true if any stream is flow controller blocked.
bool IsStreamFlowControlBlocked();
- size_t get_max_open_streams() const { return max_open_streams_; }
+ size_t max_open_incoming_streams() const {
+ return max_open_incoming_streams_;
+ }
- size_t get_max_available_streams() const {
- return max_open_streams_ * kMaxAvailableStreamsMultiplier;
+ size_t max_open_outgoing_streams() const {
+ return max_open_outgoing_streams_;
}
+ size_t MaxAvailableStreams() const;
+
ReliableQuicStream* GetStream(const QuicStreamId stream_id);
// Mark a stream as draining.
@@ -248,12 +254,6 @@ class NET_EXPORT_PRIVATE QuicSession : public QuicConnectionVisitorInterface {
// exists, the connection is closed.
ReliableQuicStream* GetOrCreateDynamicStream(QuicStreamId stream_id);
- // This is called after every call other than OnConnectionClose from the
- // QuicConnectionVisitor to allow post-processing once the work has been done.
- // In this case, it deletes streams given that it's safe to do so (no other
- // operations are being done on the streams at this time)
- virtual void PostProcessAfterData();
-
// Performs the work required to close |stream_id|. If |locally_reset|
// then the stream has been reset by this endpoint, not by the peer.
virtual void CloseStreamInner(QuicStreamId stream_id, bool locally_reset);
@@ -279,7 +279,8 @@ class NET_EXPORT_PRIVATE QuicSession : public QuicConnectionVisitorInterface {
return &closed_streams_;
}
- void set_max_open_streams(size_t max_open_streams);
+ void set_max_open_incoming_streams(size_t max_open_incoming_streams);
+ void set_max_open_outgoing_streams(size_t max_open_outgoing_streams);
void set_largest_peer_created_stream_id(
QuicStreamId largest_peer_created_stream_id) {
@@ -326,7 +327,6 @@ class NET_EXPORT_PRIVATE QuicSession : public QuicConnectionVisitorInterface {
private:
friend class test::QuicSessionPeer;
- friend class VisitorShim;
// Called in OnConfigNegotiated when we receive a new stream level flow
// control window in a negotiated config. Closes the connection if invalid.
@@ -351,16 +351,15 @@ class NET_EXPORT_PRIVATE QuicSession : public QuicConnectionVisitorInterface {
scoped_ptr<QuicConnection> connection_;
- // A shim to stand between the connection and the session, to handle stream
- // deletions.
- scoped_ptr<VisitorShim> visitor_shim_;
-
std::vector<ReliableQuicStream*> closed_streams_;
QuicConfig config_;
- // Returns the maximum number of streams this connection can open.
- size_t max_open_streams_;
+ // The maximum number of outgoing streams this connection can open.
+ size_t max_open_outgoing_streams_;
+
+ // The maximum number of incoming streams this connection will allow.
+ size_t max_open_incoming_streams_;
// Static streams, such as crypto and header streams. Owned by child classes
// that create these streams.
« no previous file with comments | « net/quic/quic_sent_packet_manager_test.cc ('k') | net/quic/quic_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698