| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef NET_QUIC_CONGESTION_CONTROL_GENERAL_LOSS_ALGORITHM_H_ | 5 #ifndef NET_QUIC_CONGESTION_CONTROL_GENERAL_LOSS_ALGORITHM_H_ |
| 6 #define NET_QUIC_CONGESTION_CONTROL_GENERAL_LOSS_ALGORITHM_H_ | 6 #define NET_QUIC_CONGESTION_CONTROL_GENERAL_LOSS_ALGORITHM_H_ |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 ~GeneralLossAlgorithm() override {} | 29 ~GeneralLossAlgorithm() override {} |
| 30 | 30 |
| 31 LossDetectionType GetLossDetectionType() const override; | 31 LossDetectionType GetLossDetectionType() const override; |
| 32 void SetLossDetectionType(LossDetectionType loss_type) { | 32 void SetLossDetectionType(LossDetectionType loss_type) { |
| 33 loss_type_ = loss_type; | 33 loss_type_ = loss_type; |
| 34 } | 34 } |
| 35 | 35 |
| 36 // Uses |largest_observed| and time to decide when packets are lost. | 36 // Uses |largest_observed| and time to decide when packets are lost. |
| 37 void DetectLosses( | 37 void DetectLosses( |
| 38 const QuicUnackedPacketMap& unacked_packets, | 38 const QuicUnackedPacketMap& unacked_packets, |
| 39 const QuicTime& time, | 39 QuicTime time, |
| 40 const RttStats& rtt_stats, | 40 const RttStats& rtt_stats, |
| 41 SendAlgorithmInterface::CongestionVector* packets_lost) override; | 41 SendAlgorithmInterface::CongestionVector* packets_lost) override; |
| 42 | 42 |
| 43 // Returns a non-zero value when the early retransmit timer is active. | 43 // Returns a non-zero value when the early retransmit timer is active. |
| 44 QuicTime GetLossTimeout() const override; | 44 QuicTime GetLossTimeout() const override; |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 LossDetectionType loss_type_; | 47 LossDetectionType loss_type_; |
| 48 QuicTime loss_detection_timeout_; | 48 QuicTime loss_detection_timeout_; |
| 49 | 49 |
| 50 DISALLOW_COPY_AND_ASSIGN(GeneralLossAlgorithm); | 50 DISALLOW_COPY_AND_ASSIGN(GeneralLossAlgorithm); |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 } // namespace net | 53 } // namespace net |
| 54 | 54 |
| 55 #endif // NET_QUIC_CONGESTION_CONTROL_GENERAL_LOSS_ALGORITHM_H_ | 55 #endif // NET_QUIC_CONGESTION_CONTROL_GENERAL_LOSS_ALGORITHM_H_ |
| OLD | NEW |