| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 SetSendAlgorithm(kBBR); | 110 SetSendAlgorithm(kBBR); |
| 111 } | 111 } |
| 112 if (config.HasClientRequestedIndependentOption(kRENO, perspective_)) { | 112 if (config.HasClientRequestedIndependentOption(kRENO, perspective_)) { |
| 113 if (config.HasClientRequestedIndependentOption(kBYTE, perspective_)) { | 113 if (config.HasClientRequestedIndependentOption(kBYTE, perspective_)) { |
| 114 SetSendAlgorithm(kRenoBytes); | 114 SetSendAlgorithm(kRenoBytes); |
| 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_default_to_bbr && |
| 121 config.HasClientRequestedIndependentOption(kQBIC, perspective_)) { |
| 122 SetSendAlgorithm(kCubicBytes); |
| 120 } else if (FLAGS_quic_reloadable_flag_quic_enable_pcc && | 123 } else if (FLAGS_quic_reloadable_flag_quic_enable_pcc && |
| 121 config.HasClientRequestedIndependentOption(kTPCC, perspective_)) { | 124 config.HasClientRequestedIndependentOption(kTPCC, perspective_)) { |
| 122 SetSendAlgorithm(kPCC); | 125 SetSendAlgorithm(kPCC); |
| 123 } | 126 } |
| 124 | 127 |
| 125 // The PCCSender implements its own version of pacing through the | 128 // The PCCSender implements its own version of pacing through the |
| 126 // SendAlgorithm::TimeUntilSend() function. Do not wrap a | 129 // SendAlgorithm::TimeUntilSend() function. Do not wrap a |
| 127 // PacingSender around it, since wrapping a PacingSender around an | 130 // PacingSender around it, since wrapping a PacingSender around an |
| 128 // already paced SendAlgorithm produces a DCHECK. TODO(fayang): | 131 // already paced SendAlgorithm produces a DCHECK. TODO(fayang): |
| 129 // Change this if/when the PCCSender uses the PacingSender. | 132 // Change this if/when the PCCSender uses the PacingSender. |
| (...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 964 const SendAlgorithmInterface* QuicSentPacketManager::GetSendAlgorithm() const { | 967 const SendAlgorithmInterface* QuicSentPacketManager::GetSendAlgorithm() const { |
| 965 return send_algorithm_.get(); | 968 return send_algorithm_.get(); |
| 966 } | 969 } |
| 967 | 970 |
| 968 void QuicSentPacketManager::SetStreamNotifier( | 971 void QuicSentPacketManager::SetStreamNotifier( |
| 969 StreamNotifierInterface* stream_notifier) { | 972 StreamNotifierInterface* stream_notifier) { |
| 970 unacked_packets_.SetStreamNotifier(stream_notifier); | 973 unacked_packets_.SetStreamNotifier(stream_notifier); |
| 971 } | 974 } |
| 972 | 975 |
| 973 } // namespace net | 976 } // namespace net |
| OLD | NEW |