Prevent QuicSession from directly accessing streams' flow controller.
This change provides the following advantages:
1. QuicSession is no longer able to go cross QuicStream to modify its flow controller, and is limited on what it can do with stream's flow controller.
2. QuicStream::IsFlowControlBlocked() can be potentially transitioned to a stream state.
This CL also removes some tests in quic_spdy_session_test that are redundant with quic_session_test.
No behavior change. not protected.
PiperOrigin-RevId: 325899044
Change-Id: I1b676da2736507aec0a4438afdbc596ca274ed13
diff --git a/quic/core/quic_stream.h b/quic/core/quic_stream.h
index a01d163..3590190 100644
--- a/quic/core/quic_stream.h
+++ b/quic/core/quic_stream.h
@@ -228,9 +228,10 @@
int num_frames_received() const;
int num_duplicate_frames_received() const;
- QuicFlowController* flow_controller();
-
- const QuicFlowController* flow_controller() const;
+ // Flow controller related methods.
+ bool IsFlowControlBlocked() const;
+ QuicStreamOffset highest_received_byte_offset() const;
+ void UpdateReceiveWindowSize(QuicStreamOffset size);
// Called when endpoint receives a frame which could increase the highest
// offset.