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 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 unacked_packets_.GetTransmissionInfo(ack_frame.largest_observed); | 755 unacked_packets_.GetTransmissionInfo(ack_frame.largest_observed); |
756 // Ensure the packet has a valid sent time. | 756 // Ensure the packet has a valid sent time. |
757 if (transmission_info.sent_time == QuicTime::Zero()) { | 757 if (transmission_info.sent_time == QuicTime::Zero()) { |
758 QUIC_BUG << "Acked packet has zero sent time, largest_observed:" | 758 QUIC_BUG << "Acked packet has zero sent time, largest_observed:" |
759 << ack_frame.largest_observed; | 759 << ack_frame.largest_observed; |
760 return false; | 760 return false; |
761 } | 761 } |
762 | 762 |
763 QuicTime::Delta send_delta = ack_receive_time - transmission_info.sent_time; | 763 QuicTime::Delta send_delta = ack_receive_time - transmission_info.sent_time; |
764 const int kMaxSendDeltaSeconds = 30; | 764 const int kMaxSendDeltaSeconds = 30; |
765 if (FLAGS_quic_socket_walltimestamps && | 765 if (send_delta.ToSeconds() > kMaxSendDeltaSeconds) { |
766 send_delta.ToSeconds() > kMaxSendDeltaSeconds) { | |
767 // send_delta can be very high if local clock is changed mid-connection. | 766 // send_delta can be very high if local clock is changed mid-connection. |
768 LOG(WARNING) << "Excessive send delta: " << send_delta.ToSeconds() | 767 LOG(WARNING) << "Excessive send delta: " << send_delta.ToSeconds() |
769 << ", setting to: " << kMaxSendDeltaSeconds | 768 << ", setting to: " << kMaxSendDeltaSeconds |
770 << " largest_observed:" << ack_frame.largest_observed | 769 << " largest_observed:" << ack_frame.largest_observed |
771 << " ack_receive_time:" << ack_receive_time.ToDebuggingValue() | 770 << " ack_receive_time:" << ack_receive_time.ToDebuggingValue() |
772 << " sent_time:" | 771 << " sent_time:" |
773 << transmission_info.sent_time.ToDebuggingValue(); | 772 << transmission_info.sent_time.ToDebuggingValue(); |
774 return false; | 773 return false; |
775 } | 774 } |
776 rtt_stats_.UpdateRtt(send_delta, ack_frame.ack_delay_time, ack_receive_time); | 775 rtt_stats_.UpdateRtt(send_delta, ack_frame.ack_delay_time, ack_receive_time); |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1015 TransmissionInfo* QuicSentPacketManager::GetMutableTransmissionInfo( | 1014 TransmissionInfo* QuicSentPacketManager::GetMutableTransmissionInfo( |
1016 QuicPacketNumber packet_number) { | 1015 QuicPacketNumber packet_number) { |
1017 return unacked_packets_.GetMutableTransmissionInfo(packet_number); | 1016 return unacked_packets_.GetMutableTransmissionInfo(packet_number); |
1018 } | 1017 } |
1019 | 1018 |
1020 void QuicSentPacketManager::RemoveObsoletePackets() { | 1019 void QuicSentPacketManager::RemoveObsoletePackets() { |
1021 unacked_packets_.RemoveObsoletePackets(); | 1020 unacked_packets_.RemoveObsoletePackets(); |
1022 } | 1021 } |
1023 | 1022 |
1024 } // namespace net | 1023 } // namespace net |
OLD | NEW |