| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 loss_algorithm_.reset(new GeneralLossAlgorithm(kTime)); | 156 loss_algorithm_.reset(new GeneralLossAlgorithm(kTime)); |
| 157 } | 157 } |
| 158 if (config.HasReceivedConnectionOptions() && | 158 if (config.HasReceivedConnectionOptions() && |
| 159 ContainsQuicTag(config.ReceivedConnectionOptions(), kATIM)) { | 159 ContainsQuicTag(config.ReceivedConnectionOptions(), kATIM)) { |
| 160 loss_algorithm_.reset(new GeneralLossAlgorithm(kAdaptiveTime)); | 160 loss_algorithm_.reset(new GeneralLossAlgorithm(kAdaptiveTime)); |
| 161 } | 161 } |
| 162 if (FLAGS_quic_loss_recovery_use_largest_acked && | 162 if (FLAGS_quic_loss_recovery_use_largest_acked && |
| 163 config.HasClientSentConnectionOption(kUNDO, perspective_)) { | 163 config.HasClientSentConnectionOption(kUNDO, perspective_)) { |
| 164 undo_pending_retransmits_ = true; | 164 undo_pending_retransmits_ = true; |
| 165 } | 165 } |
| 166 if (!FLAGS_quic_ignore_srbf && config.HasReceivedSocketReceiveBuffer()) { | |
| 167 receive_buffer_bytes_ = | |
| 168 max(kMinSocketReceiveBuffer, | |
| 169 static_cast<QuicByteCount>(config.ReceivedSocketReceiveBuffer())); | |
| 170 QuicByteCount max_cwnd_bytes = static_cast<QuicByteCount>( | |
| 171 receive_buffer_bytes_ * kConservativeReceiveBufferFraction); | |
| 172 send_algorithm_->SetMaxCongestionWindow(max_cwnd_bytes); | |
| 173 } | |
| 174 send_algorithm_->SetFromConfig(config, perspective_); | 166 send_algorithm_->SetFromConfig(config, perspective_); |
| 175 | 167 |
| 176 if (network_change_visitor_ != nullptr) { | 168 if (network_change_visitor_ != nullptr) { |
| 177 network_change_visitor_->OnCongestionChange(); | 169 network_change_visitor_->OnCongestionChange(); |
| 178 } | 170 } |
| 179 } | 171 } |
| 180 | 172 |
| 181 void QuicSentPacketManager::ResumeConnectionState( | 173 void QuicSentPacketManager::ResumeConnectionState( |
| 182 const CachedNetworkParameters& cached_network_params, | 174 const CachedNetworkParameters& cached_network_params, |
| 183 bool max_bandwidth_resumption) { | 175 bool max_bandwidth_resumption) { |
| (...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1016 TransmissionInfo* QuicSentPacketManager::GetMutableTransmissionInfo( | 1008 TransmissionInfo* QuicSentPacketManager::GetMutableTransmissionInfo( |
| 1017 QuicPacketNumber packet_number) { | 1009 QuicPacketNumber packet_number) { |
| 1018 return unacked_packets_.GetMutableTransmissionInfo(packet_number); | 1010 return unacked_packets_.GetMutableTransmissionInfo(packet_number); |
| 1019 } | 1011 } |
| 1020 | 1012 |
| 1021 void QuicSentPacketManager::RemoveObsoletePackets() { | 1013 void QuicSentPacketManager::RemoveObsoletePackets() { |
| 1022 unacked_packets_.RemoveObsoletePackets(); | 1014 unacked_packets_.RemoveObsoletePackets(); |
| 1023 } | 1015 } |
| 1024 | 1016 |
| 1025 } // namespace net | 1017 } // namespace net |
| OLD | NEW |