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

Unified Diff: net/quic/quic_connection.cc

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_connection.h ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection.cc
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
index be606c2e138cd61505951d03720e6c1b6467934f..3c08ef265fc18abe2943160d43d216eafc57f819 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -23,7 +23,6 @@
#include "net/quic/quic_bandwidth.h"
#include "net/quic/quic_config.h"
#include "net/quic/quic_flags.h"
-#include "net/quic/quic_flow_controller.h"
#include "net/quic/quic_utils.h"
using base::hash_map;
@@ -193,8 +192,7 @@ QuicConnection::QuicConnection(QuicConnectionId connection_id,
QuicConnectionHelperInterface* helper,
QuicPacketWriter* writer,
bool is_server,
- const QuicVersionVector& supported_versions,
- uint32 max_flow_control_receive_window_bytes)
+ const QuicVersionVector& supported_versions)
: framer_(supported_versions, helper->GetClock()->ApproximateNow(),
is_server),
helper_(helper),
@@ -238,22 +236,7 @@ QuicConnection::QuicConnection(QuicConnectionId connection_id,
peer_ip_changed_(false),
peer_port_changed_(false),
self_ip_changed_(false),
- self_port_changed_(false),
- max_flow_control_receive_window_bytes_(
- max_flow_control_receive_window_bytes) {
- if (max_flow_control_receive_window_bytes_ < kDefaultFlowControlSendWindow) {
- DLOG(ERROR) << "Initial receive window ("
- << max_flow_control_receive_window_bytes_
- << ") cannot be set lower than default ("
- << kDefaultFlowControlSendWindow << ").";
- max_flow_control_receive_window_bytes_ = kDefaultFlowControlSendWindow;
- }
-
- flow_controller_.reset(new QuicFlowController(
- supported_versions.front(), 0, is_server_,
- kDefaultFlowControlSendWindow, max_flow_control_receive_window_bytes_,
- max_flow_control_receive_window_bytes_));
-
+ self_port_changed_(false) {
if (!is_server_) {
// Pacing will be enabled if the client negotiates it.
sent_packet_manager_.MaybeEnablePacing();
@@ -375,10 +358,6 @@ bool QuicConnection::OnProtocolVersionMismatch(QuicVersion received_version) {
// Store the new version.
framer_.set_version(received_version);
- if (received_version < QUIC_VERSION_19) {
- flow_controller_->Disable();
- }
-
// TODO(satyamshekhar): Store the sequence number of this packet and close the
// connection if we ever received a packet with incorrect version and whose
// sequence number is greater.
@@ -494,9 +473,6 @@ bool QuicConnection::OnPacketHeader(const QuicPacketHeader& header) {
DCHECK_EQ(header.public_header.versions[0], version());
version_negotiation_state_ = NEGOTIATED_VERSION;
visitor_->OnSuccessfulVersionNegotiation(version());
- if (version() < QUIC_VERSION_19) {
- flow_controller_->Disable();
- }
}
} else {
DCHECK(!header.public_header.version_flag);
@@ -505,9 +481,6 @@ bool QuicConnection::OnPacketHeader(const QuicPacketHeader& header) {
packet_creator_.StopSendingVersion();
version_negotiation_state_ = NEGOTIATED_VERSION;
visitor_->OnSuccessfulVersionNegotiation(version());
- if (version() < QUIC_VERSION_19) {
- flow_controller_->Disable();
- }
}
}
« no previous file with comments | « net/quic/quic_connection.h ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698