| 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 0d5913b1a0dceb24717096c21d116473a325797b..b1e04a9723db787219d95ad91d84f5fbd4fac99e 100644
|
| --- a/net/quic/quic_sent_packet_manager.cc
|
| +++ b/net/quic/quic_sent_packet_manager.cc
|
| @@ -139,21 +139,6 @@ void QuicSentPacketManager::SetFromConfig(const QuicConfig& config) {
|
| }
|
| }
|
|
|
| -// TODO(ianswett): Combine this method with OnPacketSent once packets are always
|
| -// sent in order and the connection tracks RetransmittableFrames for longer.
|
| -void QuicSentPacketManager::OnSerializedPacket(
|
| - const SerializedPacket& serialized_packet) {
|
| - if (serialized_packet.retransmittable_frames) {
|
| - ack_notifier_manager_.OnSerializedPacket(serialized_packet);
|
| - }
|
| - unacked_packets_.AddPacket(serialized_packet);
|
| -
|
| - if (debug_delegate_ != NULL) {
|
| - // TODO(ianswett): Merge calls in the debug delegate.
|
| - debug_delegate_->OnSerializedPacket(serialized_packet);
|
| - }
|
| -}
|
| -
|
| void QuicSentPacketManager::OnRetransmittedPacket(
|
| QuicPacketSequenceNumber old_sequence_number,
|
| QuicPacketSequenceNumber new_sequence_number) {
|
| @@ -177,13 +162,6 @@ void QuicSentPacketManager::OnRetransmittedPacket(
|
| unacked_packets_.OnRetransmittedPacket(old_sequence_number,
|
| new_sequence_number,
|
| transmission_type);
|
| -
|
| - if (debug_delegate_ != NULL) {
|
| - debug_delegate_->OnRetransmittedPacket(old_sequence_number,
|
| - new_sequence_number,
|
| - transmission_type,
|
| - clock_->ApproximateNow());
|
| - }
|
| }
|
|
|
| void QuicSentPacketManager::OnIncomingAck(const QuicAckFrame& ack_frame,
|
| @@ -514,8 +492,19 @@ bool QuicSentPacketManager::OnPacketSent(
|
| DCHECK_LT(0u, sequence_number);
|
| DCHECK(!unacked_packets_.IsUnacked(sequence_number));
|
| LOG_IF(DFATAL, bytes == 0) << "Cannot send empty packets.";
|
| + if (debug_delegate_ != NULL) {
|
| + debug_delegate_->OnSentPacket(*serialized_packet,
|
| + original_sequence_number,
|
| + sent_time,
|
| + bytes,
|
| + transmission_type);
|
| + }
|
| +
|
| if (original_sequence_number == 0) {
|
| - OnSerializedPacket(*serialized_packet);
|
| + if (serialized_packet->retransmittable_frames) {
|
| + ack_notifier_manager_.OnSerializedPacket(*serialized_packet);
|
| + }
|
| + unacked_packets_.AddPacket(*serialized_packet);
|
| serialized_packet->retransmittable_frames = NULL;
|
| } else {
|
| OnRetransmittedPacket(original_sequence_number, sequence_number);
|
| @@ -542,11 +531,6 @@ bool QuicSentPacketManager::OnPacketSent(
|
| has_retransmittable_data);
|
| unacked_packets_.SetSent(sequence_number, sent_time, bytes, in_flight);
|
|
|
| - if (debug_delegate_ != NULL) {
|
| - debug_delegate_->OnSentPacket(
|
| - sequence_number, sent_time, bytes, transmission_type);
|
| - }
|
| -
|
| // Reset the retransmission timer anytime a pending packet is sent.
|
| return in_flight;
|
| }
|
|
|