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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 593193004: Call QuicSentPacketManager's OnPacketSent method and make (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Change_the_return_type_75724127
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 | « net/quic/quic_sent_packet_manager.h ('k') | net/quic/quic_sent_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_sent_packet_manager.cc
diff --git a/net/quic/quic_sent_packet_manager.cc b/net/quic/quic_sent_packet_manager.cc
index 12ddf29f7441943375c31b2e587cef2a59da0fa9..c56b3d5fac1af62e64583c29cc3b031a19c47702 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -151,6 +151,7 @@ void QuicSentPacketManager::OnSerializedPacket(
unacked_packets_.AddPacket(serialized_packet);
if (debug_delegate_ != NULL) {
+ // TODO(ianswett): Merge calls in the debug delegate.
debug_delegate_->OnSerializedPacket(serialized_packet);
}
}
@@ -505,14 +506,23 @@ QuicSentPacketManager::GetLeastUnacked() const {
}
bool QuicSentPacketManager::OnPacketSent(
- QuicPacketSequenceNumber sequence_number,
+ SerializedPacket* serialized_packet,
+ QuicPacketSequenceNumber original_sequence_number,
QuicTime sent_time,
QuicByteCount bytes,
TransmissionType transmission_type,
HasRetransmittableData has_retransmittable_data) {
+ QuicPacketSequenceNumber sequence_number = serialized_packet->sequence_number;
DCHECK_LT(0u, sequence_number);
- DCHECK(unacked_packets_.IsUnacked(sequence_number));
+ DCHECK(!unacked_packets_.IsUnacked(sequence_number));
LOG_IF(DFATAL, bytes == 0) << "Cannot send empty packets.";
+ if (original_sequence_number == 0) {
+ OnSerializedPacket(*serialized_packet);
+ serialized_packet->retransmittable_frames = NULL;
+ } else {
+ OnRetransmittedPacket(original_sequence_number, sequence_number);
+ }
+
if (pending_timer_transmission_count_ > 0) {
--pending_timer_transmission_count_;
}
« no previous file with comments | « net/quic/quic_sent_packet_manager.h ('k') | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698