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

Side by Side Diff: net/quic/quic_unacked_packet_map.cc

Issue 1565883003: relnote: Moving many QUIC DFATALS over to QUIC_BUG (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove comments Created 4 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 unified diff | Download patch
« no previous file with comments | « net/quic/quic_stream_sequencer.cc ('k') | net/quic/reliable_quic_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/quic_unacked_packet_map.h" 5 #include "net/quic/quic_unacked_packet_map.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/stl_util.h" 8 #include "net/quic/quic_bug_tracker.h"
9 #include "net/quic/quic_connection_stats.h" 9 #include "net/quic/quic_connection_stats.h"
10 #include "net/quic/quic_flags.h" 10 #include "net/quic/quic_flags.h"
11 #include "net/quic/quic_utils_chromium.h" 11 #include "net/quic/quic_utils_chromium.h"
12 12
13 using std::max; 13 using std::max;
14 14
15 namespace net { 15 namespace net {
16 16
17 QuicUnackedPacketMap::QuicUnackedPacketMap() 17 QuicUnackedPacketMap::QuicUnackedPacketMap()
18 : largest_sent_packet_(0), 18 : largest_sent_packet_(0),
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 } 86 }
87 } 87 }
88 88
89 void QuicUnackedPacketMap::TransferRetransmissionInfo( 89 void QuicUnackedPacketMap::TransferRetransmissionInfo(
90 QuicPacketNumber old_packet_number, 90 QuicPacketNumber old_packet_number,
91 QuicPacketNumber new_packet_number, 91 QuicPacketNumber new_packet_number,
92 TransmissionType transmission_type, 92 TransmissionType transmission_type,
93 TransmissionInfo* info) { 93 TransmissionInfo* info) {
94 if (old_packet_number < least_unacked_ || 94 if (old_packet_number < least_unacked_ ||
95 old_packet_number > largest_sent_packet_) { 95 old_packet_number > largest_sent_packet_) {
96 LOG(DFATAL) << "Old TransmissionInfo no longer exists for:" 96 QUIC_BUG << "Old TransmissionInfo no longer exists for:"
97 << old_packet_number << " least_unacked:" << least_unacked_ 97 << old_packet_number << " least_unacked:" << least_unacked_
98 << " largest_sent:" << largest_sent_packet_; 98 << " largest_sent:" << largest_sent_packet_;
99 return; 99 return;
100 } 100 }
101 DCHECK_GE(new_packet_number, least_unacked_ + unacked_packets_.size()); 101 DCHECK_GE(new_packet_number, least_unacked_ + unacked_packets_.size());
102 DCHECK_NE(NOT_RETRANSMISSION, transmission_type); 102 DCHECK_NE(NOT_RETRANSMISSION, transmission_type);
103 103
104 TransmissionInfo* transmission_info = 104 TransmissionInfo* transmission_info =
105 &unacked_packets_.at(old_packet_number - least_unacked_); 105 &unacked_packets_.at(old_packet_number - least_unacked_);
106 RetransmittableFrames* frames = transmission_info->retransmittable_frames; 106 RetransmittableFrames* frames = transmission_info->retransmittable_frames;
107 transmission_info->retransmittable_frames = nullptr; 107 transmission_info->retransmittable_frames = nullptr;
108 for (AckListenerWrapper& wrapper : transmission_info->ack_listeners) { 108 for (AckListenerWrapper& wrapper : transmission_info->ack_listeners) {
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 QuicTime QuicUnackedPacketMap::GetLastPacketSentTime() const { 352 QuicTime QuicUnackedPacketMap::GetLastPacketSentTime() const {
353 UnackedPacketMap::const_reverse_iterator it = unacked_packets_.rbegin(); 353 UnackedPacketMap::const_reverse_iterator it = unacked_packets_.rbegin();
354 while (it != unacked_packets_.rend()) { 354 while (it != unacked_packets_.rend()) {
355 if (it->in_flight) { 355 if (it->in_flight) {
356 LOG_IF(DFATAL, it->sent_time == QuicTime::Zero()) 356 LOG_IF(DFATAL, it->sent_time == QuicTime::Zero())
357 << "Sent time can never be zero for a packet in flight."; 357 << "Sent time can never be zero for a packet in flight.";
358 return it->sent_time; 358 return it->sent_time;
359 } 359 }
360 ++it; 360 ++it;
361 } 361 }
362 LOG(DFATAL) << "GetLastPacketSentTime requires in flight packets."; 362 QUIC_BUG << "GetLastPacketSentTime requires in flight packets.";
363 return QuicTime::Zero(); 363 return QuicTime::Zero();
364 } 364 }
365 365
366 size_t QuicUnackedPacketMap::GetNumUnackedPacketsDebugOnly() const { 366 size_t QuicUnackedPacketMap::GetNumUnackedPacketsDebugOnly() const {
367 size_t unacked_packet_count = 0; 367 size_t unacked_packet_count = 0;
368 QuicPacketNumber packet_number = least_unacked_; 368 QuicPacketNumber packet_number = least_unacked_;
369 for (UnackedPacketMap::const_iterator it = unacked_packets_.begin(); 369 for (UnackedPacketMap::const_iterator it = unacked_packets_.begin();
370 it != unacked_packets_.end(); ++it, ++packet_number) { 370 it != unacked_packets_.end(); ++it, ++packet_number) {
371 if (!IsPacketUseless(packet_number, *it)) { 371 if (!IsPacketUseless(packet_number, *it)) {
372 ++unacked_packet_count; 372 ++unacked_packet_count;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 } 404 }
405 } 405 }
406 return false; 406 return false;
407 } 407 }
408 408
409 QuicPacketNumber QuicUnackedPacketMap::GetLeastUnacked() const { 409 QuicPacketNumber QuicUnackedPacketMap::GetLeastUnacked() const {
410 return least_unacked_; 410 return least_unacked_;
411 } 411 }
412 412
413 } // namespace net 413 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_stream_sequencer.cc ('k') | net/quic/reliable_quic_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698