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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 839143002: Roll Chrome into Mojo. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rebase 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_sent_packet_manager.h ('k') | net/quic/quic_sent_packet_manager_test.cc » ('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 5feb46774bbf2540c24d42873ba75edc7c6ccfbd..f1804f97ea093a36fe875795b2a7945cf9b62d66 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -117,6 +117,10 @@ void QuicSentPacketManager::SetFromConfig(const QuicConfig& config) {
min(kMaxInitialRoundTripTimeUs,
config.GetInitialRoundTripTimeUsToSend())));
}
+ // Initial RTT may have changed.
+ if (network_change_visitor_ != nullptr) {
+ network_change_visitor_->OnRttChange();
+ }
// TODO(ianswett): BBR is currently a server only feature.
if (FLAGS_quic_allow_bbr &&
config.HasReceivedConnectionOptions() &&
@@ -414,7 +418,9 @@ bool QuicSentPacketManager::HasPendingRetransmissions() const {
QuicSentPacketManager::PendingRetransmission
QuicSentPacketManager::NextPendingRetransmission() {
- DCHECK(!pending_retransmissions_.empty());
+ LOG_IF(DFATAL, pending_retransmissions_.empty())
+ << "Unexpected call to PendingRetransmissions() with empty pending "
+ << "retransmission list. Corrupted memory usage imminent.";
QuicPacketSequenceNumber sequence_number =
pending_retransmissions_.begin()->first;
TransmissionType transmission_type = pending_retransmissions_.begin()->second;
@@ -775,6 +781,11 @@ bool QuicSentPacketManager::MaybeUpdateRTT(
ack_receive_time.Subtract(transmission_info.sent_time);
rtt_stats_.UpdateRtt(
send_delta, ack_frame.delta_time_largest_observed, ack_receive_time);
+
+ if (network_change_visitor_ != nullptr) {
+ network_change_visitor_->OnRttChange();
+ }
+
return true;
}
« no previous file with comments | « net/quic/quic_sent_packet_manager.h ('k') | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698