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

Unified Diff: net/quic/quic_unacked_packet_map.cc

Issue 968493002: Cleanup of QUIC's TransmissionInfo constructor to make more fields const (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Fixing_bug_QUIC_prober_86703503
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_protocol.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_unacked_packet_map.cc
diff --git a/net/quic/quic_unacked_packet_map.cc b/net/quic/quic_unacked_packet_map.cc
index f45e44234a7eb7bc2f23c4d61fc7e60a4a865d6b..be665d2228ef683a47326fe90a8249d33ffb5466 100644
--- a/net/quic/quic_unacked_packet_map.cc
+++ b/net/quic/quic_unacked_packet_map.cc
@@ -50,11 +50,8 @@ void QuicUnackedPacketMap::AddSentPacket(
}
TransmissionInfo info(packet.retransmittable_frames,
- packet.sequence_number_length,
- transmission_type,
- sent_time);
- info.is_fec_packet = packet.is_fec_packet;
-
+ packet.sequence_number_length, transmission_type,
+ sent_time, bytes_sent, packet.is_fec_packet);
if (old_sequence_number == 0) {
if (packet.retransmittable_frames != nullptr &&
packet.retransmittable_frames->HasCryptoHandshake() == IS_HANDSHAKE) {
@@ -68,7 +65,6 @@ void QuicUnackedPacketMap::AddSentPacket(
largest_sent_packet_ = sequence_number;
if (set_in_flight) {
bytes_in_flight_ += bytes_sent;
- info.bytes_sent = bytes_sent;
info.in_flight = true;
}
unacked_packets_.push_back(info);
@@ -94,7 +90,6 @@ void QuicUnackedPacketMap::TransferRetransmissionInfo(
DCHECK_GE(new_sequence_number, least_unacked_ + unacked_packets_.size());
DCHECK_NE(NOT_RETRANSMISSION, transmission_type);
- // TODO(ianswett): Discard and lose the packet lazily instead of immediately.
TransmissionInfo* transmission_info =
&unacked_packets_.at(old_sequence_number - least_unacked_);
RetransmittableFrames* frames = transmission_info->retransmittable_frames;
« no previous file with comments | « net/quic/quic_protocol.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698