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 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 } | 791 } |
792 | 792 |
793 bool QuicSentPacketManager::HasReliableBandwidthEstimate() const { | 793 bool QuicSentPacketManager::HasReliableBandwidthEstimate() const { |
794 return send_algorithm_->HasReliableBandwidthEstimate(); | 794 return send_algorithm_->HasReliableBandwidthEstimate(); |
795 } | 795 } |
796 | 796 |
797 QuicByteCount QuicSentPacketManager::GetCongestionWindow() const { | 797 QuicByteCount QuicSentPacketManager::GetCongestionWindow() const { |
798 return send_algorithm_->GetCongestionWindow(); | 798 return send_algorithm_->GetCongestionWindow(); |
799 } | 799 } |
800 | 800 |
| 801 QuicByteCount QuicSentPacketManager::GetSlowStartThreshold() const { |
| 802 return send_algorithm_->GetSlowStartThreshold(); |
| 803 } |
| 804 |
801 void QuicSentPacketManager::MaybeEnablePacing() { | 805 void QuicSentPacketManager::MaybeEnablePacing() { |
802 if (!FLAGS_enable_quic_pacing) { | 806 if (!FLAGS_enable_quic_pacing) { |
803 return; | 807 return; |
804 } | 808 } |
805 | 809 |
806 if (using_pacing_) { | 810 if (using_pacing_) { |
807 return; | 811 return; |
808 } | 812 } |
809 | 813 |
810 // Set up a pacing sender with a 5 millisecond alarm granularity. | 814 // Set up a pacing sender with a 5 millisecond alarm granularity. |
811 using_pacing_ = true; | 815 using_pacing_ = true; |
812 send_algorithm_.reset( | 816 send_algorithm_.reset( |
813 new PacingSender(send_algorithm_.release(), | 817 new PacingSender(send_algorithm_.release(), |
814 QuicTime::Delta::FromMilliseconds(5), | 818 QuicTime::Delta::FromMilliseconds(5), |
815 kInitialUnpacedBurst)); | 819 kInitialUnpacedBurst)); |
816 } | 820 } |
817 | 821 |
818 } // namespace net | 822 } // namespace net |
OLD | NEW |