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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 181433007: Minor optimizations to QuicUnackedPacketMap and QuicSentPacketManager to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: second try Created 6 years, 10 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 | net/quic/quic_unacked_packet_map.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 d7f0a6060b5b1620b8a410893b135b7e516f163b..ad83057217a17e8f2f3ab7caa674a890c66d30e6 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -513,12 +513,12 @@ QuicSentPacketManager::RetransmissionTimeoutMode
void QuicSentPacketManager::OnPacketAbandoned(
QuicPacketSequenceNumber sequence_number) {
- if (unacked_packets_.IsPending(sequence_number)) {
- LOG_IF(DFATAL, unacked_packets_.GetTransmissionInfo(
- sequence_number).bytes_sent == 0);
- send_algorithm_->OnPacketAbandoned(
- sequence_number,
- unacked_packets_.GetTransmissionInfo(sequence_number).bytes_sent);
+ const QuicUnackedPacketMap::TransmissionInfo& transmission_info =
+ unacked_packets_.GetTransmissionInfo(sequence_number);
+ if (transmission_info.pending) {
+ LOG_IF(DFATAL, transmission_info.bytes_sent == 0);
+ send_algorithm_->OnPacketAbandoned(sequence_number,
+ transmission_info.bytes_sent);
unacked_packets_.SetNotPending(sequence_number);
}
}
« no previous file with comments | « no previous file | net/quic/quic_unacked_packet_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698