| 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/core/quic_sent_packet_manager.h" | 5 #include "net/quic/core/quic_sent_packet_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "net/quic/chromium/quic_utils_chromium.h" | 10 #include "net/quic/chromium/quic_utils_chromium.h" |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 } else { | 115 } else { |
| 116 SetSendAlgorithm(kReno); | 116 SetSendAlgorithm(kReno); |
| 117 } | 117 } |
| 118 } else if (config.HasClientRequestedIndependentOption(kBYTE, perspective_)) { | 118 } else if (config.HasClientRequestedIndependentOption(kBYTE, perspective_)) { |
| 119 SetSendAlgorithm(kCubic); | 119 SetSendAlgorithm(kCubic); |
| 120 } else if (FLAGS_quic_reloadable_flag_quic_enable_pcc && | 120 } else if (FLAGS_quic_reloadable_flag_quic_enable_pcc && |
| 121 config.HasClientRequestedIndependentOption(kTPCC, perspective_)) { | 121 config.HasClientRequestedIndependentOption(kTPCC, perspective_)) { |
| 122 SetSendAlgorithm(kPCC); | 122 SetSendAlgorithm(kPCC); |
| 123 } | 123 } |
| 124 | 124 |
| 125 using_pacing_ = !FLAGS_quic_disable_pacing_for_perf_tests; | 125 // The PCCSender implements its own version of pacing through the |
| 126 // SendAlgorithm::TimeUntilSend() function. Do not wrap a |
| 127 // PacingSender around it, since wrapping a PacingSender around an |
| 128 // already paced SendAlgorithm produces a DCHECK. TODO(fayang): |
| 129 // Change this if/when the PCCSender uses the PacingSender. |
| 130 using_pacing_ = !FLAGS_quic_disable_pacing_for_perf_tests && |
| 131 send_algorithm_->GetCongestionControlType() != kPCC; |
| 126 | 132 |
| 127 if (config.HasClientSentConnectionOption(k1CON, perspective_)) { | 133 if (config.HasClientSentConnectionOption(k1CON, perspective_)) { |
| 128 send_algorithm_->SetNumEmulatedConnections(1); | 134 send_algorithm_->SetNumEmulatedConnections(1); |
| 129 } | 135 } |
| 130 if (config.HasClientSentConnectionOption(kNCON, perspective_)) { | 136 if (config.HasClientSentConnectionOption(kNCON, perspective_)) { |
| 131 n_connection_simulation_ = true; | 137 n_connection_simulation_ = true; |
| 132 } | 138 } |
| 133 if (config.HasClientSentConnectionOption(kNTLP, perspective_)) { | 139 if (config.HasClientSentConnectionOption(kNTLP, perspective_)) { |
| 134 max_tail_loss_probes_ = 0; | 140 max_tail_loss_probes_ = 0; |
| 135 } | 141 } |
| (...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 950 | 956 |
| 951 void QuicSentPacketManager::OnApplicationLimited() { | 957 void QuicSentPacketManager::OnApplicationLimited() { |
| 952 send_algorithm_->OnApplicationLimited(unacked_packets_.bytes_in_flight()); | 958 send_algorithm_->OnApplicationLimited(unacked_packets_.bytes_in_flight()); |
| 953 } | 959 } |
| 954 | 960 |
| 955 const SendAlgorithmInterface* QuicSentPacketManager::GetSendAlgorithm() const { | 961 const SendAlgorithmInterface* QuicSentPacketManager::GetSendAlgorithm() const { |
| 956 return send_algorithm_.get(); | 962 return send_algorithm_.get(); |
| 957 } | 963 } |
| 958 | 964 |
| 959 } // namespace net | 965 } // namespace net |
| OLD | NEW |