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

Unified Diff: net/quic/quic_connection_logger.cc

Issue 549433006: Fix the logic for computing the number of truncated QUIC ACK frames sent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection_logger.cc
diff --git a/net/quic/quic_connection_logger.cc b/net/quic/quic_connection_logger.cc
index 8157848fff62ff06eba358da203057cf82aa70b8..be7d8389d53e4f907db163e9a723f4be4dd3f0e5 100644
--- a/net/quic/quic_connection_logger.cc
+++ b/net/quic/quic_connection_logger.cc
@@ -371,7 +371,15 @@ void QuicConnectionLogger::OnFrameAddedToPacket(const QuicFrame& frame) {
net_log_.AddEvent(
NetLog::TYPE_QUIC_SESSION_ACK_FRAME_SENT,
base::Bind(&NetLogQuicAckFrameCallback, frame.ack_frame));
- if (frame.ack_frame->is_truncated)
+ size_t num_ranges = 0;
+ QuicPacketSequenceNumber last_missing = 0;
+ for (size_t i = 0; i < frame.ack_frame->missing_packets.size(); ++i) {
+ if (frame.ack_frame->missing_packets[i] != last_missing + 1) {
Ian Swett 2014/09/08 17:27:58 It's annoying to have to perform this logic in mul
+ ++num_ranges;
+ }
+ last_missing = frame.ack_frame->missing_packets[i];
+ }
+ if (num_ranges >= numeric_limits<uint8>::max())
++num_truncated_acks_sent_;
break;
case CONGESTION_FEEDBACK_FRAME:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698