| 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 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 << ack_frame.largest_observed; | 747 << ack_frame.largest_observed; |
| 748 return false; | 748 return false; |
| 749 } | 749 } |
| 750 | 750 |
| 751 QuicTime::Delta send_delta = ack_receive_time - transmission_info.sent_time; | 751 QuicTime::Delta send_delta = ack_receive_time - transmission_info.sent_time; |
| 752 const int kMaxSendDeltaSeconds = 30; | 752 const int kMaxSendDeltaSeconds = 30; |
| 753 if (FLAGS_quic_socket_walltimestamps && | 753 if (FLAGS_quic_socket_walltimestamps && |
| 754 send_delta.ToSeconds() > kMaxSendDeltaSeconds) { | 754 send_delta.ToSeconds() > kMaxSendDeltaSeconds) { |
| 755 // send_delta can be very high if local clock is changed mid-connection. | 755 // send_delta can be very high if local clock is changed mid-connection. |
| 756 LOG(WARNING) << "Excessive send delta: " << send_delta.ToSeconds() | 756 LOG(WARNING) << "Excessive send delta: " << send_delta.ToSeconds() |
| 757 << ", setting to: " << kMaxSendDeltaSeconds; | 757 << ", setting to: " << kMaxSendDeltaSeconds |
| 758 send_delta = QuicTime::Delta::FromSeconds(kMaxSendDeltaSeconds); | 758 << " largest_observed:" << ack_frame.largest_observed |
| 759 << " ack_receive_time:" << ack_receive_time.ToDebuggingValue() |
| 760 << " sent_time:" |
| 761 << transmission_info.sent_time.ToDebuggingValue(); |
| 762 return false; |
| 759 } | 763 } |
| 760 rtt_stats_.UpdateRtt(send_delta, ack_frame.ack_delay_time, ack_receive_time); | 764 rtt_stats_.UpdateRtt(send_delta, ack_frame.ack_delay_time, ack_receive_time); |
| 761 | 765 |
| 762 return true; | 766 return true; |
| 763 } | 767 } |
| 764 | 768 |
| 765 QuicTime::Delta QuicSentPacketManager::TimeUntilSend( | 769 QuicTime::Delta QuicSentPacketManager::TimeUntilSend( |
| 766 QuicTime now, | 770 QuicTime now, |
| 767 HasRetransmittableData retransmittable, | 771 HasRetransmittableData retransmittable, |
| 768 QuicPathId* path_id) { | 772 QuicPathId* path_id) { |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 990 TransmissionInfo* QuicSentPacketManager::GetMutableTransmissionInfo( | 994 TransmissionInfo* QuicSentPacketManager::GetMutableTransmissionInfo( |
| 991 QuicPacketNumber packet_number) { | 995 QuicPacketNumber packet_number) { |
| 992 return unacked_packets_.GetMutableTransmissionInfo(packet_number); | 996 return unacked_packets_.GetMutableTransmissionInfo(packet_number); |
| 993 } | 997 } |
| 994 | 998 |
| 995 void QuicSentPacketManager::RemoveObsoletePackets() { | 999 void QuicSentPacketManager::RemoveObsoletePackets() { |
| 996 unacked_packets_.RemoveObsoletePackets(); | 1000 unacked_packets_.RemoveObsoletePackets(); |
| 997 } | 1001 } |
| 998 | 1002 |
| 999 } // namespace net | 1003 } // namespace net |
| OLD | NEW |