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

Unified Diff: net/quic/quic_session.cc

Issue 851503003: Update from https://crrev.com/311076 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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_session.h ('k') | net/quic/quic_session_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « net/quic/quic_session.h ('k') | net/quic/quic_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698