| 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 } | 166 } |
| 167 if (config.HasReceivedSocketReceiveBuffer()) { | 167 if (config.HasReceivedSocketReceiveBuffer()) { |
| 168 receive_buffer_bytes_ = | 168 receive_buffer_bytes_ = |
| 169 max(kMinSocketReceiveBuffer, | 169 max(kMinSocketReceiveBuffer, |
| 170 static_cast<QuicByteCount>(config.ReceivedSocketReceiveBuffer())); | 170 static_cast<QuicByteCount>(config.ReceivedSocketReceiveBuffer())); |
| 171 if (FLAGS_quic_limit_max_cwnd_to_receive_buffer) { | 171 if (FLAGS_quic_limit_max_cwnd_to_receive_buffer) { |
| 172 send_algorithm_->SetMaxCongestionWindow(receive_buffer_bytes_ * | 172 send_algorithm_->SetMaxCongestionWindow(receive_buffer_bytes_ * |
| 173 kUsableRecieveBufferFraction); | 173 kUsableRecieveBufferFraction); |
| 174 } | 174 } |
| 175 } | 175 } |
| 176 send_algorithm_->SetFromConfig(config, perspective_, using_pacing_); | 176 send_algorithm_->SetFromConfig(config, perspective_); |
| 177 | 177 |
| 178 if (network_change_visitor_ != nullptr) { | 178 if (network_change_visitor_ != nullptr) { |
| 179 network_change_visitor_->OnCongestionWindowChange(); | 179 network_change_visitor_->OnCongestionWindowChange(); |
| 180 } | 180 } |
| 181 } | 181 } |
| 182 | 182 |
| 183 bool QuicSentPacketManager::ResumeConnectionState( | 183 bool QuicSentPacketManager::ResumeConnectionState( |
| 184 const CachedNetworkParameters& cached_network_params, | 184 const CachedNetworkParameters& cached_network_params, |
| 185 bool max_bandwidth_resumption) { | 185 bool max_bandwidth_resumption) { |
| 186 if (cached_network_params.has_min_rtt_ms()) { | 186 if (cached_network_params.has_min_rtt_ms()) { |
| (...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 967 // Set up a pacing sender with a 1 millisecond alarm granularity, the same as | 967 // Set up a pacing sender with a 1 millisecond alarm granularity, the same as |
| 968 // the default granularity of the Linux kernel's FQ qdisc. | 968 // the default granularity of the Linux kernel's FQ qdisc. |
| 969 using_pacing_ = true; | 969 using_pacing_ = true; |
| 970 send_algorithm_.reset( | 970 send_algorithm_.reset( |
| 971 new PacingSender(send_algorithm_.release(), | 971 new PacingSender(send_algorithm_.release(), |
| 972 QuicTime::Delta::FromMilliseconds(1), | 972 QuicTime::Delta::FromMilliseconds(1), |
| 973 kInitialUnpacedBurst)); | 973 kInitialUnpacedBurst)); |
| 974 } | 974 } |
| 975 | 975 |
| 976 } // namespace net | 976 } // namespace net |
| OLD | NEW |