Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Side by Side Diff: net/quic/quic_sent_packet_manager.cc

Issue 1809123002: Pass QuicTime, QuicTime::Delta, and QuicBandwidth exclusively by value. Not flag protected. No func… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@116970314
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/quic_sent_packet_manager.h ('k') | net/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 // Since we will not retransmit this, we need to remove it from 720 // Since we will not retransmit this, we need to remove it from
721 // unacked_packets_. This is either the current transmission of 721 // unacked_packets_. This is either the current transmission of
722 // a packet whose previous transmission has been acked or a packet that 722 // a packet whose previous transmission has been acked or a packet that
723 // has been TLP retransmitted. 723 // has been TLP retransmitted.
724 unacked_packets_.RemoveFromInFlight(pair.first); 724 unacked_packets_.RemoveFromInFlight(pair.first);
725 } 725 }
726 } 726 }
727 } 727 }
728 728
729 bool QuicSentPacketManager::MaybeUpdateRTT(const QuicAckFrame& ack_frame, 729 bool QuicSentPacketManager::MaybeUpdateRTT(const QuicAckFrame& ack_frame,
730 const QuicTime& ack_receive_time) { 730 QuicTime ack_receive_time) {
731 // We rely on ack_delay_time to compute an RTT estimate, so we 731 // We rely on ack_delay_time to compute an RTT estimate, so we
732 // only update rtt when the largest observed gets acked. 732 // only update rtt when the largest observed gets acked.
733 // NOTE: If ack is a truncated ack, then the largest observed is in fact 733 // NOTE: If ack is a truncated ack, then the largest observed is in fact
734 // unacked, and may cause an RTT sample to be taken. 734 // unacked, and may cause an RTT sample to be taken.
735 if (!unacked_packets_.IsUnacked(ack_frame.largest_observed)) { 735 if (!unacked_packets_.IsUnacked(ack_frame.largest_observed)) {
736 return false; 736 return false;
737 } 737 }
738 // We calculate the RTT based on the highest ACKed packet number, the lower 738 // We calculate the RTT based on the highest ACKed packet number, the lower
739 // packet numbers will include the ACK aggregation delay. 739 // packet numbers will include the ACK aggregation delay.
740 const TransmissionInfo& transmission_info = 740 const TransmissionInfo& transmission_info =
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 TransmissionInfo* QuicSentPacketManager::GetMutableTransmissionInfo( 961 TransmissionInfo* QuicSentPacketManager::GetMutableTransmissionInfo(
962 QuicPacketNumber packet_number) { 962 QuicPacketNumber packet_number) {
963 return unacked_packets_.GetMutableTransmissionInfo(packet_number); 963 return unacked_packets_.GetMutableTransmissionInfo(packet_number);
964 } 964 }
965 965
966 void QuicSentPacketManager::RemoveObsoletePackets() { 966 void QuicSentPacketManager::RemoveObsoletePackets() {
967 unacked_packets_.RemoveObsoletePackets(); 967 unacked_packets_.RemoveObsoletePackets();
968 } 968 }
969 969
970 } // namespace net 970 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_sent_packet_manager.h ('k') | net/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698