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 <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 } | 398 } |
399 for (SequenceNumberList::const_reverse_iterator it = | 399 for (SequenceNumberList::const_reverse_iterator it = |
400 all_transmissions.rbegin(); | 400 all_transmissions.rbegin(); |
401 it != all_transmissions.rend() && *it > acked_sequence_number; ++it) { | 401 it != all_transmissions.rend() && *it > acked_sequence_number; ++it) { |
402 const TransmissionInfo& retransmit_info = | 402 const TransmissionInfo& retransmit_info = |
403 unacked_packets_.GetTransmissionInfo(*it); | 403 unacked_packets_.GetTransmissionInfo(*it); |
404 | 404 |
405 stats_->bytes_spuriously_retransmitted += retransmit_info.bytes_sent; | 405 stats_->bytes_spuriously_retransmitted += retransmit_info.bytes_sent; |
406 ++stats_->packets_spuriously_retransmitted; | 406 ++stats_->packets_spuriously_retransmitted; |
407 if (debug_delegate_ != nullptr) { | 407 if (debug_delegate_ != nullptr) { |
408 debug_delegate_->OnSpuriousPacketRetransmition( | 408 debug_delegate_->OnSpuriousPacketRetransmission( |
409 retransmit_info.transmission_type, | 409 retransmit_info.transmission_type, retransmit_info.bytes_sent); |
410 retransmit_info.bytes_sent); | |
411 } | 410 } |
412 } | 411 } |
413 } | 412 } |
414 | 413 |
415 bool QuicSentPacketManager::HasPendingRetransmissions() const { | 414 bool QuicSentPacketManager::HasPendingRetransmissions() const { |
416 return !pending_retransmissions_.empty(); | 415 return !pending_retransmissions_.empty(); |
417 } | 416 } |
418 | 417 |
419 QuicSentPacketManager::PendingRetransmission | 418 QuicSentPacketManager::PendingRetransmission |
420 QuicSentPacketManager::NextPendingRetransmission() { | 419 QuicSentPacketManager::NextPendingRetransmission() { |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
960 // Set up a pacing sender with a 1 millisecond alarm granularity, the same as | 959 // Set up a pacing sender with a 1 millisecond alarm granularity, the same as |
961 // the default granularity of the Linux kernel's FQ qdisc. | 960 // the default granularity of the Linux kernel's FQ qdisc. |
962 using_pacing_ = true; | 961 using_pacing_ = true; |
963 send_algorithm_.reset( | 962 send_algorithm_.reset( |
964 new PacingSender(send_algorithm_.release(), | 963 new PacingSender(send_algorithm_.release(), |
965 QuicTime::Delta::FromMilliseconds(1), | 964 QuicTime::Delta::FromMilliseconds(1), |
966 kInitialUnpacedBurst)); | 965 kInitialUnpacedBurst)); |
967 } | 966 } |
968 | 967 |
969 } // namespace net | 968 } // namespace net |
OLD | NEW |