OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_sent_packet_manager.h" | 5 #include "net/quic/quic_sent_packet_manager.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "net/quic/congestion_control/pacing_sender.h" | 9 #include "net/quic/congestion_control/pacing_sender.h" |
10 #include "net/quic/crypto/crypto_protocol.h" | 10 #include "net/quic/crypto/crypto_protocol.h" |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 if (consecutive_tlp_count_ < max_tail_loss_probes_) { | 506 if (consecutive_tlp_count_ < max_tail_loss_probes_) { |
507 if (unacked_packets_.HasUnackedRetransmittableFrames()) { | 507 if (unacked_packets_.HasUnackedRetransmittableFrames()) { |
508 return TLP_MODE; | 508 return TLP_MODE; |
509 } | 509 } |
510 } | 510 } |
511 return RTO_MODE; | 511 return RTO_MODE; |
512 } | 512 } |
513 | 513 |
514 void QuicSentPacketManager::OnPacketAbandoned( | 514 void QuicSentPacketManager::OnPacketAbandoned( |
515 QuicPacketSequenceNumber sequence_number) { | 515 QuicPacketSequenceNumber sequence_number) { |
516 if (unacked_packets_.IsPending(sequence_number)) { | 516 const QuicUnackedPacketMap::TransmissionInfo& transmission_info = |
517 LOG_IF(DFATAL, unacked_packets_.GetTransmissionInfo( | 517 unacked_packets_.GetTransmissionInfo(sequence_number); |
518 sequence_number).bytes_sent == 0); | 518 if (transmission_info.pending) { |
519 send_algorithm_->OnPacketAbandoned( | 519 LOG_IF(DFATAL, transmission_info.bytes_sent == 0); |
520 sequence_number, | 520 send_algorithm_->OnPacketAbandoned(sequence_number, |
521 unacked_packets_.GetTransmissionInfo(sequence_number).bytes_sent); | 521 transmission_info.bytes_sent); |
522 unacked_packets_.SetNotPending(sequence_number); | 522 unacked_packets_.SetNotPending(sequence_number); |
523 } | 523 } |
524 } | 524 } |
525 | 525 |
526 void QuicSentPacketManager::OnIncomingQuicCongestionFeedbackFrame( | 526 void QuicSentPacketManager::OnIncomingQuicCongestionFeedbackFrame( |
527 const QuicCongestionFeedbackFrame& frame, | 527 const QuicCongestionFeedbackFrame& frame, |
528 const QuicTime& feedback_receive_time) { | 528 const QuicTime& feedback_receive_time) { |
529 send_algorithm_->OnIncomingQuicCongestionFeedbackFrame( | 529 send_algorithm_->OnIncomingQuicCongestionFeedbackFrame( |
530 frame, feedback_receive_time); | 530 frame, feedback_receive_time); |
531 } | 531 } |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 return; | 739 return; |
740 } | 740 } |
741 | 741 |
742 using_pacing_ = true; | 742 using_pacing_ = true; |
743 send_algorithm_.reset( | 743 send_algorithm_.reset( |
744 new PacingSender(send_algorithm_.release(), | 744 new PacingSender(send_algorithm_.release(), |
745 QuicTime::Delta::FromMicroseconds(1))); | 745 QuicTime::Delta::FromMicroseconds(1))); |
746 } | 746 } |
747 | 747 |
748 } // namespace net | 748 } // namespace net |
OLD | NEW |