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 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
890 const RttStats* QuicSentPacketManager::GetRttStats() const { | 890 const RttStats* QuicSentPacketManager::GetRttStats() const { |
891 return &rtt_stats_; | 891 return &rtt_stats_; |
892 } | 892 } |
893 | 893 |
894 QuicBandwidth QuicSentPacketManager::BandwidthEstimate() const { | 894 QuicBandwidth QuicSentPacketManager::BandwidthEstimate() const { |
895 // TODO(ianswett): Remove BandwidthEstimate from SendAlgorithmInterface | 895 // TODO(ianswett): Remove BandwidthEstimate from SendAlgorithmInterface |
896 // and implement the logic here. | 896 // and implement the logic here. |
897 return send_algorithm_->BandwidthEstimate(); | 897 return send_algorithm_->BandwidthEstimate(); |
898 } | 898 } |
899 | 899 |
900 const QuicSustainedBandwidthRecorder& | 900 const QuicSustainedBandwidthRecorder* |
901 QuicSentPacketManager::SustainedBandwidthRecorder() const { | 901 QuicSentPacketManager::SustainedBandwidthRecorder() const { |
902 return sustained_bandwidth_recorder_; | 902 return &sustained_bandwidth_recorder_; |
903 } | 903 } |
904 | 904 |
905 QuicPacketCount QuicSentPacketManager::EstimateMaxPacketsInFlight( | 905 QuicPacketCount QuicSentPacketManager::EstimateMaxPacketsInFlight( |
906 QuicByteCount max_packet_length) const { | 906 QuicByteCount max_packet_length) const { |
907 return send_algorithm_->GetCongestionWindow() / max_packet_length; | 907 return send_algorithm_->GetCongestionWindow() / max_packet_length; |
908 } | 908 } |
909 | 909 |
910 QuicPacketCount QuicSentPacketManager::GetCongestionWindowInTcpMss() const { | 910 QuicPacketCount QuicSentPacketManager::GetCongestionWindowInTcpMss() const { |
911 return send_algorithm_->GetCongestionWindow() / kDefaultTCPMSS; | 911 return send_algorithm_->GetCongestionWindow() / kDefaultTCPMSS; |
912 } | 912 } |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1006 TransmissionInfo* QuicSentPacketManager::GetMutableTransmissionInfo( | 1006 TransmissionInfo* QuicSentPacketManager::GetMutableTransmissionInfo( |
1007 QuicPacketNumber packet_number) { | 1007 QuicPacketNumber packet_number) { |
1008 return unacked_packets_.GetMutableTransmissionInfo(packet_number); | 1008 return unacked_packets_.GetMutableTransmissionInfo(packet_number); |
1009 } | 1009 } |
1010 | 1010 |
1011 void QuicSentPacketManager::RemoveObsoletePackets() { | 1011 void QuicSentPacketManager::RemoveObsoletePackets() { |
1012 unacked_packets_.RemoveObsoletePackets(); | 1012 unacked_packets_.RemoveObsoletePackets(); |
1013 } | 1013 } |
1014 | 1014 |
1015 } // namespace net | 1015 } // namespace net |
OLD | NEW |