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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 491663003: Remove largest_observed_ from QuicSentPacketManager, since it's also in (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Optimize_EntropyTracker_73709652
Patch Set: Created 6 years, 4 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_unacked_packet_map.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 8fb27170ef3f0af8af05520eb7eb8718cee88b7a..21a4fbcd84b6f16856a8ba4e21e8f2a851baee31 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -78,7 +78,6 @@ QuicSentPacketManager::QuicSentPacketManager(
congestion_control_type,
stats)),
loss_algorithm_(LossDetectionInterface::Create(loss_type)),
- largest_observed_(0),
least_packet_awaited_by_peer_(1),
first_rto_transmission_(0),
consecutive_rto_count_(0),
@@ -189,10 +188,9 @@ void QuicSentPacketManager::OnIncomingAck(const QuicAckFrame& ack_frame,
// We rely on delta_time_largest_observed to compute an RTT estimate, so
// we only update rtt when the largest observed gets acked.
bool largest_observed_acked = MaybeUpdateRTT(ack_frame, ack_receive_time);
- if (largest_observed_ < ack_frame.largest_observed) {
- largest_observed_ = ack_frame.largest_observed;
- unacked_packets_.IncreaseLargestObserved(largest_observed_);
- }
+ DCHECK_GE(ack_frame.largest_observed, unacked_packets_.largest_observed());
+ unacked_packets_.IncreaseLargestObserved(ack_frame.largest_observed);
+
HandleAckForSentPackets(ack_frame);
InvokeLossDetection(ack_receive_time);
MaybeInvokeCongestionEvent(largest_observed_acked, bytes_in_flight);
@@ -224,7 +222,7 @@ void QuicSentPacketManager::OnIncomingAck(const QuicAckFrame& ack_frame,
if (debug_delegate_ != NULL) {
debug_delegate_->OnIncomingAck(ack_frame,
ack_receive_time,
- largest_observed_,
+ unacked_packets_.largest_observed(),
largest_observed_acked,
GetLeastUnackedSentPacket());
}
@@ -700,7 +698,7 @@ void QuicSentPacketManager::InvokeLossDetection(QuicTime time) {
SequenceNumberSet lost_packets =
loss_algorithm_->DetectLostPackets(unacked_packets_,
time,
- largest_observed_,
+ unacked_packets_.largest_observed(),
rtt_stats_);
for (SequenceNumberSet::const_iterator it = lost_packets.begin();
it != lost_packets.end(); ++it) {
« no previous file with comments | « net/quic/quic_sent_packet_manager.h ('k') | net/quic/quic_unacked_packet_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698