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

Unified Diff: net/quic/congestion_control/tcp_cubic_sender.cc

Issue 1037633002: Add a QUIC connection option(BWMX) to resume to the max bandwidth (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Populate_RTT_info_89043159
Patch Set: Created 5 years, 9 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
Index: net/quic/congestion_control/tcp_cubic_sender.cc
diff --git a/net/quic/congestion_control/tcp_cubic_sender.cc b/net/quic/congestion_control/tcp_cubic_sender.cc
index 5a1a8f20ada944fee6e662877126c558f7b09c8d..0c2283e0012a8e0373822bf0d6dba86153406fee 100644
--- a/net/quic/congestion_control/tcp_cubic_sender.cc
+++ b/net/quic/congestion_control/tcp_cubic_sender.cc
@@ -78,7 +78,8 @@ void TcpCubicSender::SetFromConfig(const QuicConfig& config,
}
bool TcpCubicSender::ResumeConnectionState(
- const CachedNetworkParameters& cached_network_params) {
+ const CachedNetworkParameters& cached_network_params,
+ bool max_bandwidth_resumption) {
// If the previous bandwidth estimate is less than an hour old, store in
// preparation for doing bandwidth resumption.
int64 seconds_since_estimate =
@@ -88,7 +89,9 @@ bool TcpCubicSender::ResumeConnectionState(
}
QuicBandwidth bandwidth = QuicBandwidth::FromBytesPerSecond(
- cached_network_params.bandwidth_estimate_bytes_per_second());
+ max_bandwidth_resumption
+ ? cached_network_params.max_bandwidth_estimate_bytes_per_second()
+ : cached_network_params.bandwidth_estimate_bytes_per_second());
QuicTime::Delta rtt_ms =
QuicTime::Delta::FromMilliseconds(cached_network_params.min_rtt_ms());
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender.h ('k') | net/quic/congestion_control/tcp_cubic_sender_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698