| 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 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 } else { | 569 } else { |
| 570 PendingRetransmissionMap::iterator it = | 570 PendingRetransmissionMap::iterator it = |
| 571 pending_retransmissions_.find(original_sequence_number); | 571 pending_retransmissions_.find(original_sequence_number); |
| 572 if (it != pending_retransmissions_.end()) { | 572 if (it != pending_retransmissions_.end()) { |
| 573 pending_retransmissions_.erase(it); | 573 pending_retransmissions_.erase(it); |
| 574 } else { | 574 } else { |
| 575 DLOG(DFATAL) << "Expected sequence number to be in " | 575 DLOG(DFATAL) << "Expected sequence number to be in " |
| 576 << "pending_retransmissions_. sequence_number: " | 576 << "pending_retransmissions_. sequence_number: " |
| 577 << original_sequence_number; | 577 << original_sequence_number; |
| 578 } | 578 } |
| 579 // A notifier may be waiting to hear about ACKs for the original sequence | 579 // Inform the ack notifier of retransmissions so it can calculate the |
| 580 // number. Inform them that the sequence number has changed. | 580 // retransmit rate. |
| 581 ack_notifier_manager_.UpdateSequenceNumber(original_sequence_number, | 581 ack_notifier_manager_.OnPacketRetransmitted(original_sequence_number, |
| 582 sequence_number); | 582 sequence_number, bytes); |
| 583 } | 583 } |
| 584 | 584 |
| 585 if (pending_timer_transmission_count_ > 0) { | 585 if (pending_timer_transmission_count_ > 0) { |
| 586 --pending_timer_transmission_count_; | 586 --pending_timer_transmission_count_; |
| 587 } | 587 } |
| 588 | 588 |
| 589 if (unacked_packets_.bytes_in_flight() == 0) { | 589 if (unacked_packets_.bytes_in_flight() == 0) { |
| 590 // TODO(ianswett): Consider being less aggressive to force a new | 590 // TODO(ianswett): Consider being less aggressive to force a new |
| 591 // recent_min_rtt, likely by not discarding a relatively new sample. | 591 // recent_min_rtt, likely by not discarding a relatively new sample. |
| 592 DVLOG(1) << "Sampling a new recent min rtt within 2 samples. currently:" | 592 DVLOG(1) << "Sampling a new recent min rtt within 2 samples. currently:" |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1010 // Set up a pacing sender with a 1 millisecond alarm granularity, the same as | 1010 // Set up a pacing sender with a 1 millisecond alarm granularity, the same as |
| 1011 // the default granularity of the Linux kernel's FQ qdisc. | 1011 // the default granularity of the Linux kernel's FQ qdisc. |
| 1012 using_pacing_ = true; | 1012 using_pacing_ = true; |
| 1013 send_algorithm_.reset( | 1013 send_algorithm_.reset( |
| 1014 new PacingSender(send_algorithm_.release(), | 1014 new PacingSender(send_algorithm_.release(), |
| 1015 QuicTime::Delta::FromMilliseconds(1), | 1015 QuicTime::Delta::FromMilliseconds(1), |
| 1016 kInitialUnpacedBurst)); | 1016 kInitialUnpacedBurst)); |
| 1017 } | 1017 } |
| 1018 | 1018 |
| 1019 } // namespace net | 1019 } // namespace net |
| OLD | NEW |