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

Unified Diff: net/quic/quic_session.h

Issue 286213002: Refactor: move flow controller from QuicConnection to QuicSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src
Patch Set: Created 6 years, 7 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_http_stream_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 2bbd8ba33e576ec730c72960227d4f654cdc8dcd..e7473dca6fbb35704f43e5a6044055e246c215b4 100644
--- a/net/quic/quic_session.h
+++ b/net/quic/quic_session.h
@@ -25,6 +25,7 @@
namespace net {
class QuicCryptoStream;
+class QuicFlowController;
class ReliableQuicStream;
class SSLInfo;
class VisitorShim;
@@ -53,6 +54,7 @@ class NET_EXPORT_PRIVATE QuicSession : public QuicConnectionVisitorInterface {
};
QuicSession(QuicConnection* connection,
+ uint32 max_flow_control_receive_window_bytes,
const QuicConfig& config);
virtual ~QuicSession();
@@ -69,7 +71,7 @@ class NET_EXPORT_PRIVATE QuicSession : public QuicConnectionVisitorInterface {
virtual void OnConnectionClosed(QuicErrorCode error, bool from_peer) OVERRIDE;
virtual void OnWriteBlocked() OVERRIDE {}
virtual void OnSuccessfulVersionNegotiation(
- const QuicVersion& version) OVERRIDE {}
+ const QuicVersion& version) OVERRIDE;
virtual void OnCanWrite() OVERRIDE;
virtual bool HasPendingWrites() const OVERRIDE;
virtual bool HasPendingHandshake() const OVERRIDE;
@@ -201,6 +203,12 @@ class NET_EXPORT_PRIVATE QuicSession : public QuicConnectionVisitorInterface {
bool is_server() const { return connection_->is_server(); }
+ uint32 max_flow_control_receive_window_bytes() {
+ return max_flow_control_receive_window_bytes_;
+ }
+
+ QuicFlowController* flow_controller() { return flow_controller_.get(); }
+
protected:
typedef base::hash_map<QuicStreamId, QuicDataStream*> DataStreamMap;
@@ -295,6 +303,12 @@ class NET_EXPORT_PRIVATE QuicSession : public QuicConnectionVisitorInterface {
// Indicate if there is pending data for the crypto stream.
bool has_pending_handshake_;
+ // Used for session level flow control.
+ scoped_ptr<QuicFlowController> flow_controller_;
+
+ // Initial flow control receive window size for new streams.
+ uint32 max_flow_control_receive_window_bytes_;
+
DISALLOW_COPY_AND_ASSIGN(QuicSession);
};
« no previous file with comments | « net/quic/quic_http_stream_test.cc ('k') | net/quic/quic_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698