| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 ContainsQuicTag(config.ReceivedConnectionOptions(), kRENO)) { | 117 ContainsQuicTag(config.ReceivedConnectionOptions(), kRENO)) { |
| 118 send_algorithm_.reset( | 118 send_algorithm_.reset( |
| 119 SendAlgorithmInterface::Create(clock_, &rtt_stats_, kReno, stats_)); | 119 SendAlgorithmInterface::Create(clock_, &rtt_stats_, kReno, stats_)); |
| 120 } | 120 } |
| 121 if (HasClientSentConnectionOption(config, kPACE)) { | 121 if (HasClientSentConnectionOption(config, kPACE)) { |
| 122 EnablePacing(); | 122 EnablePacing(); |
| 123 } | 123 } |
| 124 if (HasClientSentConnectionOption(config, k1CON)) { | 124 if (HasClientSentConnectionOption(config, k1CON)) { |
| 125 send_algorithm_->SetNumEmulatedConnections(1); | 125 send_algorithm_->SetNumEmulatedConnections(1); |
| 126 } | 126 } |
| 127 if (HasClientSentConnectionOption(config, kNTLP)) { |
| 128 max_tail_loss_probes_ = 0; |
| 129 } |
| 127 if (config.HasReceivedConnectionOptions() && | 130 if (config.HasReceivedConnectionOptions() && |
| 128 ContainsQuicTag(config.ReceivedConnectionOptions(), kTIME)) { | 131 ContainsQuicTag(config.ReceivedConnectionOptions(), kTIME)) { |
| 129 loss_algorithm_.reset(LossDetectionInterface::Create(kTime)); | 132 loss_algorithm_.reset(LossDetectionInterface::Create(kTime)); |
| 130 } | 133 } |
| 131 send_algorithm_->SetFromConfig(config, is_server_); | 134 send_algorithm_->SetFromConfig(config, is_server_); |
| 132 | 135 |
| 133 if (network_change_visitor_ != nullptr) { | 136 if (network_change_visitor_ != nullptr) { |
| 134 network_change_visitor_->OnCongestionWindowChange(GetCongestionWindow()); | 137 network_change_visitor_->OnCongestionWindowChange(GetCongestionWindow()); |
| 135 } | 138 } |
| 136 } | 139 } |
| (...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 // Set up a pacing sender with a 1 millisecond alarm granularity, the same as | 872 // Set up a pacing sender with a 1 millisecond alarm granularity, the same as |
| 870 // the default granularity of the Linux kernel's FQ qdisc. | 873 // the default granularity of the Linux kernel's FQ qdisc. |
| 871 using_pacing_ = true; | 874 using_pacing_ = true; |
| 872 send_algorithm_.reset( | 875 send_algorithm_.reset( |
| 873 new PacingSender(send_algorithm_.release(), | 876 new PacingSender(send_algorithm_.release(), |
| 874 QuicTime::Delta::FromMilliseconds(1), | 877 QuicTime::Delta::FromMilliseconds(1), |
| 875 kInitialUnpacedBurst)); | 878 kInitialUnpacedBurst)); |
| 876 } | 879 } |
| 877 | 880 |
| 878 } // namespace net | 881 } // namespace net |
| OLD | NEW |