| 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 } | 163 } |
| 164 if (FLAGS_quic_adaptive_loss_recovery && | 164 if (FLAGS_quic_adaptive_loss_recovery && |
| 165 config.HasReceivedConnectionOptions() && | 165 config.HasReceivedConnectionOptions() && |
| 166 ContainsQuicTag(config.ReceivedConnectionOptions(), kATIM)) { | 166 ContainsQuicTag(config.ReceivedConnectionOptions(), kATIM)) { |
| 167 loss_algorithm_.reset(new GeneralLossAlgorithm(kAdaptiveTime)); | 167 loss_algorithm_.reset(new GeneralLossAlgorithm(kAdaptiveTime)); |
| 168 } | 168 } |
| 169 if (FLAGS_quic_loss_recovery_use_largest_acked && | 169 if (FLAGS_quic_loss_recovery_use_largest_acked && |
| 170 config.HasClientSentConnectionOption(kUNDO, perspective_)) { | 170 config.HasClientSentConnectionOption(kUNDO, perspective_)) { |
| 171 undo_pending_retransmits_ = true; | 171 undo_pending_retransmits_ = true; |
| 172 } | 172 } |
| 173 if (config.HasReceivedSocketReceiveBuffer()) { | 173 if (!FLAGS_quic_ignore_srbf && config.HasReceivedSocketReceiveBuffer()) { |
| 174 receive_buffer_bytes_ = | 174 receive_buffer_bytes_ = |
| 175 max(kMinSocketReceiveBuffer, | 175 max(kMinSocketReceiveBuffer, |
| 176 static_cast<QuicByteCount>(config.ReceivedSocketReceiveBuffer())); | 176 static_cast<QuicByteCount>(config.ReceivedSocketReceiveBuffer())); |
| 177 QuicByteCount max_cwnd_bytes = static_cast<QuicByteCount>( | 177 QuicByteCount max_cwnd_bytes = static_cast<QuicByteCount>( |
| 178 receive_buffer_bytes_ * kConservativeReceiveBufferFraction); | 178 receive_buffer_bytes_ * kConservativeReceiveBufferFraction); |
| 179 send_algorithm_->SetMaxCongestionWindow(max_cwnd_bytes); | 179 send_algorithm_->SetMaxCongestionWindow(max_cwnd_bytes); |
| 180 } | 180 } |
| 181 send_algorithm_->SetFromConfig(config, perspective_); | 181 send_algorithm_->SetFromConfig(config, perspective_); |
| 182 | 182 |
| 183 if (network_change_visitor_ != nullptr) { | 183 if (network_change_visitor_ != nullptr) { |
| (...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1023 TransmissionInfo* QuicSentPacketManager::GetMutableTransmissionInfo( | 1023 TransmissionInfo* QuicSentPacketManager::GetMutableTransmissionInfo( |
| 1024 QuicPacketNumber packet_number) { | 1024 QuicPacketNumber packet_number) { |
| 1025 return unacked_packets_.GetMutableTransmissionInfo(packet_number); | 1025 return unacked_packets_.GetMutableTransmissionInfo(packet_number); |
| 1026 } | 1026 } |
| 1027 | 1027 |
| 1028 void QuicSentPacketManager::RemoveObsoletePackets() { | 1028 void QuicSentPacketManager::RemoveObsoletePackets() { |
| 1029 unacked_packets_.RemoveObsoletePackets(); | 1029 unacked_packets_.RemoveObsoletePackets(); |
| 1030 } | 1030 } |
| 1031 | 1031 |
| 1032 } // namespace net | 1032 } // namespace net |
| OLD | NEW |