| Index: net/quic/quic_session.cc
|
| diff --git a/net/quic/quic_session.cc b/net/quic/quic_session.cc
|
| index 20fd9835b0c5daa64dcaa7fd679f32f1181edf11..865af07cd0dbddbb2ecdd1c70d083c6459c381ff 100644
|
| --- a/net/quic/quic_session.cc
|
| +++ b/net/quic/quic_session.cc
|
| @@ -104,20 +104,16 @@ QuicSession::QuicSession(QuicConnection* connection, const QuicConfig& config)
|
| next_stream_id_(is_server() ? 2 : 5),
|
| largest_peer_created_stream_id_(0),
|
| error_(QUIC_NO_ERROR),
|
| + flow_controller_(new QuicFlowController(
|
| + connection_.get(),
|
| + 0,
|
| + is_server(),
|
| + kMinimumFlowControlSendWindow,
|
| + config_.GetInitialSessionFlowControlWindowToSend(),
|
| + config_.GetInitialSessionFlowControlWindowToSend())),
|
| goaway_received_(false),
|
| goaway_sent_(false),
|
| has_pending_handshake_(false) {
|
| - if (connection_->version() == QUIC_VERSION_19) {
|
| - flow_controller_.reset(new QuicFlowController(
|
| - connection_.get(), 0, is_server(), kMinimumFlowControlSendWindow,
|
| - config_.GetInitialFlowControlWindowToSend(),
|
| - config_.GetInitialFlowControlWindowToSend()));
|
| - } else {
|
| - flow_controller_.reset(new QuicFlowController(
|
| - connection_.get(), 0, is_server(), kMinimumFlowControlSendWindow,
|
| - config_.GetInitialSessionFlowControlWindowToSend(),
|
| - config_.GetInitialSessionFlowControlWindowToSend()));
|
| - }
|
| }
|
|
|
| void QuicSession::InitializeSession() {
|
| @@ -464,7 +460,6 @@ bool QuicSession::IsCryptoHandshakeConfirmed() {
|
|
|
| void QuicSession::OnConfigNegotiated() {
|
| connection_->SetFromConfig(config_);
|
| - QuicVersion version = connection()->version();
|
|
|
| uint32 max_streams = config_.MaxStreamsPerConnection();
|
| if (is_server()) {
|
| @@ -479,23 +474,6 @@ void QuicSession::OnConfigNegotiated() {
|
| }
|
| set_max_open_streams(max_streams);
|
|
|
| - if (version == QUIC_VERSION_19) {
|
| - // QUIC_VERSION_19 doesn't support independent stream/session flow
|
| - // control windows.
|
| - if (config_.HasReceivedInitialFlowControlWindowBytes()) {
|
| - // Streams which were created before the SHLO was received (0-RTT
|
| - // requests) are now informed of the peer's initial flow control window.
|
| - QuicStreamOffset new_window =
|
| - config_.ReceivedInitialFlowControlWindowBytes();
|
| - OnNewStreamFlowControlWindow(new_window);
|
| - OnNewSessionFlowControlWindow(new_window);
|
| - }
|
| -
|
| - return;
|
| - }
|
| -
|
| - // QUIC_VERSION_21 and higher can have independent stream and session flow
|
| - // control windows.
|
| if (config_.HasReceivedInitialStreamFlowControlWindowBytes()) {
|
| // Streams which were created before the SHLO was received (0-RTT
|
| // requests) are now informed of the peer's initial flow control window.
|
| @@ -748,7 +726,6 @@ bool QuicSession::GetSSLInfo(SSLInfo* ssl_info) const {
|
|
|
| void QuicSession::PostProcessAfterData() {
|
| STLDeleteElements(&closed_streams_);
|
| - closed_streams_.clear();
|
|
|
| if (connection()->connected() &&
|
| locally_closed_streams_highest_offset_.size() > max_open_streams_) {
|
| @@ -757,15 +734,6 @@ void QuicSession::PostProcessAfterData() {
|
| }
|
| }
|
|
|
| -void QuicSession::OnSuccessfulVersionNegotiation(const QuicVersion& version) {
|
| - // Disable stream level flow control based on negotiated version. Streams may
|
| - // have been created with a different version.
|
| - if (version < QUIC_VERSION_21) {
|
| - GetCryptoStream()->flow_controller()->Disable();
|
| - headers_stream_->flow_controller()->Disable();
|
| - }
|
| -}
|
| -
|
| bool QuicSession::IsConnectionFlowControlBlocked() const {
|
| return flow_controller_->IsBlocked();
|
| }
|
|
|