| 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 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 if (transmission_type != TLP_RETRANSMISSION && | 374 if (transmission_type != TLP_RETRANSMISSION && |
| 375 transmission_type != RTO_RETRANSMISSION) { | 375 transmission_type != RTO_RETRANSMISSION) { |
| 376 unacked_packets_.RemoveFromInFlight(packet_number); | 376 unacked_packets_.RemoveFromInFlight(packet_number); |
| 377 } | 377 } |
| 378 if (delegate_ != nullptr) { | 378 if (delegate_ != nullptr) { |
| 379 delegate_->OnRetransmissionMarked(path_id_, packet_number, | 379 delegate_->OnRetransmissionMarked(path_id_, packet_number, |
| 380 transmission_type); | 380 transmission_type); |
| 381 } else { | 381 } else { |
| 382 // TODO(ianswett): Currently the RTO can fire while there are pending NACK | 382 // TODO(ianswett): Currently the RTO can fire while there are pending NACK |
| 383 // retransmissions for the same data, which is not ideal. | 383 // retransmissions for the same data, which is not ideal. |
| 384 if (ContainsKey(pending_retransmissions_, packet_number)) { | 384 if (base::ContainsKey(pending_retransmissions_, packet_number)) { |
| 385 return; | 385 return; |
| 386 } | 386 } |
| 387 | 387 |
| 388 pending_retransmissions_[packet_number] = transmission_type; | 388 pending_retransmissions_[packet_number] = transmission_type; |
| 389 } | 389 } |
| 390 } | 390 } |
| 391 | 391 |
| 392 void QuicSentPacketManager::RecordOneSpuriousRetransmission( | 392 void QuicSentPacketManager::RecordOneSpuriousRetransmission( |
| 393 const TransmissionInfo& info) { | 393 const TransmissionInfo& info) { |
| 394 stats_->bytes_spuriously_retransmitted += info.bytes_sent; | 394 stats_->bytes_spuriously_retransmitted += info.bytes_sent; |
| (...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 TransmissionInfo* QuicSentPacketManager::GetMutableTransmissionInfo( | 1014 TransmissionInfo* QuicSentPacketManager::GetMutableTransmissionInfo( |
| 1015 QuicPacketNumber packet_number) { | 1015 QuicPacketNumber packet_number) { |
| 1016 return unacked_packets_.GetMutableTransmissionInfo(packet_number); | 1016 return unacked_packets_.GetMutableTransmissionInfo(packet_number); |
| 1017 } | 1017 } |
| 1018 | 1018 |
| 1019 void QuicSentPacketManager::RemoveObsoletePackets() { | 1019 void QuicSentPacketManager::RemoveObsoletePackets() { |
| 1020 unacked_packets_.RemoveObsoletePackets(); | 1020 unacked_packets_.RemoveObsoletePackets(); |
| 1021 } | 1021 } |
| 1022 | 1022 |
| 1023 } // namespace net | 1023 } // namespace net |
| OLD | NEW |