| 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 #include <string> |
| 8 | 9 |
| 9 #include "base/logging.h" | 10 #include "base/logging.h" |
| 10 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
| 11 #include "net/quic/chromium/quic_utils_chromium.h" | 12 #include "net/quic/chromium/quic_utils_chromium.h" |
| 12 #include "net/quic/core/congestion_control/general_loss_algorithm.h" | 13 #include "net/quic/core/congestion_control/general_loss_algorithm.h" |
| 13 #include "net/quic/core/congestion_control/pacing_sender.h" | 14 #include "net/quic/core/congestion_control/pacing_sender.h" |
| 14 #include "net/quic/core/crypto/crypto_protocol.h" | 15 #include "net/quic/core/crypto/crypto_protocol.h" |
| 15 #include "net/quic/core/proto/cached_network_parameters.pb.h" | 16 #include "net/quic/core/proto/cached_network_parameters.pb.h" |
| 16 #include "net/quic/core/quic_bug_tracker.h" | 17 #include "net/quic/core/quic_bug_tracker.h" |
| 17 #include "net/quic/core/quic_connection_stats.h" | 18 #include "net/quic/core/quic_connection_stats.h" |
| (...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 914 } | 915 } |
| 915 | 916 |
| 916 QuicByteCount QuicSentPacketManager::GetCongestionWindowInBytes() const { | 917 QuicByteCount QuicSentPacketManager::GetCongestionWindowInBytes() const { |
| 917 return send_algorithm_->GetCongestionWindow(); | 918 return send_algorithm_->GetCongestionWindow(); |
| 918 } | 919 } |
| 919 | 920 |
| 920 QuicPacketCount QuicSentPacketManager::GetSlowStartThresholdInTcpMss() const { | 921 QuicPacketCount QuicSentPacketManager::GetSlowStartThresholdInTcpMss() const { |
| 921 return send_algorithm_->GetSlowStartThreshold() / kDefaultTCPMSS; | 922 return send_algorithm_->GetSlowStartThreshold() / kDefaultTCPMSS; |
| 922 } | 923 } |
| 923 | 924 |
| 925 std::string QuicSentPacketManager::GetDebugState() const { |
| 926 return send_algorithm_->GetDebugState(); |
| 927 } |
| 928 |
| 924 void QuicSentPacketManager::CancelRetransmissionsForStream( | 929 void QuicSentPacketManager::CancelRetransmissionsForStream( |
| 925 QuicStreamId stream_id) { | 930 QuicStreamId stream_id) { |
| 926 unacked_packets_.CancelRetransmissionsForStream(stream_id); | 931 unacked_packets_.CancelRetransmissionsForStream(stream_id); |
| 927 if (delegate_ != nullptr) { | 932 if (delegate_ != nullptr) { |
| 928 return; | 933 return; |
| 929 } | 934 } |
| 930 PendingRetransmissionMap::iterator it = pending_retransmissions_.begin(); | 935 PendingRetransmissionMap::iterator it = pending_retransmissions_.begin(); |
| 931 while (it != pending_retransmissions_.end()) { | 936 while (it != pending_retransmissions_.end()) { |
| 932 if (unacked_packets_.HasRetransmittableFrames(it->first)) { | 937 if (unacked_packets_.HasRetransmittableFrames(it->first)) { |
| 933 ++it; | 938 ++it; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 TransmissionInfo* QuicSentPacketManager::GetMutableTransmissionInfo( | 1019 TransmissionInfo* QuicSentPacketManager::GetMutableTransmissionInfo( |
| 1015 QuicPacketNumber packet_number) { | 1020 QuicPacketNumber packet_number) { |
| 1016 return unacked_packets_.GetMutableTransmissionInfo(packet_number); | 1021 return unacked_packets_.GetMutableTransmissionInfo(packet_number); |
| 1017 } | 1022 } |
| 1018 | 1023 |
| 1019 void QuicSentPacketManager::RemoveObsoletePackets() { | 1024 void QuicSentPacketManager::RemoveObsoletePackets() { |
| 1020 unacked_packets_.RemoveObsoletePackets(); | 1025 unacked_packets_.RemoveObsoletePackets(); |
| 1021 } | 1026 } |
| 1022 | 1027 |
| 1023 } // namespace net | 1028 } // namespace net |
| OLD | NEW |