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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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_protocol.h ('k') | net/quic/quic_stream_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bdf86904e281e0fe6f98ce1a35bbcf14a681be70..9e2d04fb5af5c23208529c078e1e51395cb1b9b1 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -97,12 +97,16 @@ QuicSentPacketManager::~QuicSentPacketManager() {
void QuicSentPacketManager::SetFromConfig(const QuicConfig& config) {
if (config.HasReceivedInitialRoundTripTimeUs() &&
config.ReceivedInitialRoundTripTimeUs() > 0) {
- rtt_stats_.set_initial_rtt_us(min(kMaxInitialRoundTripTimeUs,
- config.ReceivedInitialRoundTripTimeUs()));
- } else if (config.HasInitialRoundTripTimeUsToSend()) {
rtt_stats_.set_initial_rtt_us(
- min(kMaxInitialRoundTripTimeUs,
- config.GetInitialRoundTripTimeUsToSend()));
+ max(kMinInitialRoundTripTimeUs,
+ min(kMaxInitialRoundTripTimeUs,
+ config.ReceivedInitialRoundTripTimeUs())));
+ } else if (config.HasInitialRoundTripTimeUsToSend() &&
+ config.GetInitialRoundTripTimeUsToSend() > 0) {
+ rtt_stats_.set_initial_rtt_us(
+ max(kMinInitialRoundTripTimeUs,
+ min(kMaxInitialRoundTripTimeUs,
+ config.GetInitialRoundTripTimeUsToSend())));
}
// TODO(ianswett): BBR is currently a server only feature.
if (FLAGS_quic_allow_bbr &&
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/quic_stream_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698