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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 822713002: Update from https://crrev.com/309415 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years 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/quic_sent_packet_manager.cc
diff --git a/net/quic/quic_sent_packet_manager.cc b/net/quic/quic_sent_packet_manager.cc
index f054673d68b78aa2a3bef23990334746261ca3af..5feb46774bbf2540c24d42873ba75edc7c6ccfbd 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -165,6 +165,13 @@ void QuicSentPacketManager::SetFromConfig(const QuicConfig& config) {
bool QuicSentPacketManager::ResumeConnectionState(
const CachedNetworkParameters& cached_network_params) {
+ if (cached_network_params.has_min_rtt_ms()) {
+ uint32 initial_rtt_us =
+ kNumMicrosPerMilli * cached_network_params.min_rtt_ms();
+ rtt_stats_.set_initial_rtt_us(
+ max(kMinInitialRoundTripTimeUs,
+ min(kMaxInitialRoundTripTimeUs, initial_rtt_us)));
+ }
return send_algorithm_->ResumeConnectionState(cached_network_params);
}

Powered by Google App Engine
This is Rietveld 408576698