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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 1566633002: relnote: A small refactoring to make RecordSpuriousRetransmission() of QuicSentPacketManager simpl… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_sent_packet_manager.h ('k') | no next file » | 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 3a39adaa2a795ea4e8699f05d911a5830db65c4f..095e206910ca77f82cde50291e047e80782fb1da 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -392,6 +392,16 @@ void QuicSentPacketManager::MarkForRetransmission(
pending_retransmissions_[packet_number] = transmission_type;
}
+void QuicSentPacketManager::RecordOneSpuriousRetransmission(
+ const TransmissionInfo& info) {
+ stats_->bytes_spuriously_retransmitted += info.bytes_sent;
+ ++stats_->packets_spuriously_retransmitted;
+ if (debug_delegate_ != nullptr) {
+ debug_delegate_->OnSpuriousPacketRetransmission(info.transmission_type,
+ info.bytes_sent);
+ }
+}
+
void QuicSentPacketManager::RecordSpuriousRetransmissions(
const TransmissionInfo& info,
QuicPacketNumber acked_packet_number) {
@@ -401,12 +411,7 @@ void QuicSentPacketManager::RecordSpuriousRetransmissions(
const TransmissionInfo& retransmit_info =
unacked_packets_.GetTransmissionInfo(retransmission);
retransmission = retransmit_info.retransmission;
- stats_->bytes_spuriously_retransmitted += retransmit_info.bytes_sent;
- ++stats_->packets_spuriously_retransmitted;
- if (debug_delegate_ != nullptr) {
- debug_delegate_->OnSpuriousPacketRetransmission(
- retransmit_info.transmission_type, retransmit_info.bytes_sent);
- }
+ RecordOneSpuriousRetransmission(retransmit_info);
}
return;
}
@@ -425,12 +430,7 @@ void QuicSentPacketManager::RecordSpuriousRetransmissions(
const TransmissionInfo& retransmit_info =
unacked_packets_.GetTransmissionInfo(*it);
- stats_->bytes_spuriously_retransmitted += retransmit_info.bytes_sent;
- ++stats_->packets_spuriously_retransmitted;
- if (debug_delegate_ != nullptr) {
- debug_delegate_->OnSpuriousPacketRetransmission(
- retransmit_info.transmission_type, retransmit_info.bytes_sent);
- }
+ RecordOneSpuriousRetransmission(retransmit_info);
}
}
« no previous file with comments | « net/quic/quic_sent_packet_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698