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

Unified Diff: net/quic/quic_received_packet_manager.cc

Issue 648933003: Land Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with TOT Created 6 years, 2 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_protocol.h ('k') | net/quic/quic_received_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_received_packet_manager.cc
diff --git a/net/quic/quic_received_packet_manager.cc b/net/quic/quic_received_packet_manager.cc
index 255ce4dc10a7a4287ab497615d61471a4a74e29a..944376cd94481a33a6c256bcdd08e5b24a0e8668 100644
--- a/net/quic/quic_received_packet_manager.cc
+++ b/net/quic/quic_received_packet_manager.cc
@@ -229,14 +229,11 @@ void QuicReceivedPacketManager::UpdateReceivedPacketInfo(
return;
}
- if (approximate_now < time_largest_observed_) {
- // Approximate now may well be "in the past".
- ack_frame->delta_time_largest_observed = QuicTime::Delta::Zero();
- return;
- }
-
+ // Ensure the delta is zero if approximate now is "in the past".
ack_frame->delta_time_largest_observed =
- approximate_now.Subtract(time_largest_observed_);
+ approximate_now < time_largest_observed_ ?
+ QuicTime::Delta::Zero() :
+ approximate_now.Subtract(time_largest_observed_);
// Remove all packets that are too far from largest_observed to express.
received_packet_times_.remove_if(isTooLarge(ack_frame_.largest_observed));
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/quic_received_packet_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698