| 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 "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 } | 117 } |
| 118 if (config.HasReceivedConnectionOptions() && | 118 if (config.HasReceivedConnectionOptions() && |
| 119 ContainsQuicTag(config.ReceivedConnectionOptions(), kRENO)) { | 119 ContainsQuicTag(config.ReceivedConnectionOptions(), kRENO)) { |
| 120 if (ContainsQuicTag(config.ReceivedConnectionOptions(), kBYTE)) { | 120 if (ContainsQuicTag(config.ReceivedConnectionOptions(), kBYTE)) { |
| 121 SetSendAlgorithm(kRenoBytes); | 121 SetSendAlgorithm(kRenoBytes); |
| 122 } else { | 122 } else { |
| 123 SetSendAlgorithm(kReno); | 123 SetSendAlgorithm(kReno); |
| 124 } | 124 } |
| 125 } else if (config.HasReceivedConnectionOptions() && | 125 } else if (config.HasReceivedConnectionOptions() && |
| 126 ContainsQuicTag(config.ReceivedConnectionOptions(), kBYTE)) { | 126 ContainsQuicTag(config.ReceivedConnectionOptions(), kBYTE)) { |
| 127 SetSendAlgorithm(kCubicBytes); | 127 if (FLAGS_quic_default_enable_cubic_bytes) { |
| 128 SetSendAlgorithm(kCubic); |
| 129 } else { |
| 130 SetSendAlgorithm(kCubicBytes); |
| 131 } |
| 128 } | 132 } |
| 129 using_pacing_ = !FLAGS_quic_disable_pacing_for_perf_tests; | 133 using_pacing_ = !FLAGS_quic_disable_pacing_for_perf_tests; |
| 130 | 134 |
| 131 if (config.HasClientSentConnectionOption(k1CON, perspective_)) { | 135 if (config.HasClientSentConnectionOption(k1CON, perspective_)) { |
| 132 send_algorithm_->SetNumEmulatedConnections(1); | 136 send_algorithm_->SetNumEmulatedConnections(1); |
| 133 } | 137 } |
| 134 if (config.HasClientSentConnectionOption(kNCON, perspective_)) { | 138 if (config.HasClientSentConnectionOption(kNCON, perspective_)) { |
| 135 n_connection_simulation_ = true; | 139 n_connection_simulation_ = true; |
| 136 } | 140 } |
| 137 if (config.HasClientSentConnectionOption(kNTLP, perspective_)) { | 141 if (config.HasClientSentConnectionOption(kNTLP, perspective_)) { |
| (...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1011 | 1015 |
| 1012 void QuicSentPacketManager::RemoveObsoletePackets() { | 1016 void QuicSentPacketManager::RemoveObsoletePackets() { |
| 1013 unacked_packets_.RemoveObsoletePackets(); | 1017 unacked_packets_.RemoveObsoletePackets(); |
| 1014 } | 1018 } |
| 1015 | 1019 |
| 1016 void QuicSentPacketManager::OnApplicationLimited() { | 1020 void QuicSentPacketManager::OnApplicationLimited() { |
| 1017 send_algorithm_->OnApplicationLimited(unacked_packets_.bytes_in_flight()); | 1021 send_algorithm_->OnApplicationLimited(unacked_packets_.bytes_in_flight()); |
| 1018 } | 1022 } |
| 1019 | 1023 |
| 1020 } // namespace net | 1024 } // namespace net |
| OLD | NEW |