Rename QuicConnection::RetransmitZeroRttPackets() to MarkZeroRttPacketsForRetransmission() because the method doesn't actually retransmit the data. Name change only. not protected. PiperOrigin-RevId: 320082765 Change-Id: I407bfbbd66d4b52fd807a1c914b279d23fc37823
diff --git a/quic/core/quic_connection.cc b/quic/core/quic_connection.cc index 2fff73a..79e83f9 100644 --- a/quic/core/quic_connection.cc +++ b/quic/core/quic_connection.cc
@@ -2357,8 +2357,8 @@ } } -void QuicConnection::RetransmitZeroRttPackets() { - sent_packet_manager_.RetransmitZeroRttPackets(); +void QuicConnection::MarkZeroRttPacketsForRetransmission() { + sent_packet_manager_.MarkZeroRttPacketsForRetransmission(); } void QuicConnection::NeuterUnencryptedPackets() {
diff --git a/quic/core/quic_connection.h b/quic/core/quic_connection.h index b4f6445..ceef35f 100644 --- a/quic/core/quic_connection.h +++ b/quic/core/quic_connection.h
@@ -703,9 +703,10 @@ // remaining unacked packets. void OnRetransmissionTimeout(); - // Retransmits all sent 0-RTT encrypted packets. Called when new 0-RTT or - // 1-RTT key is available. - void RetransmitZeroRttPackets(); + // Mark all sent 0-RTT encrypted packets for retransmission. Called when new + // 0-RTT or 1-RTT key is available in gQUIC, or when 0-RTT is rejected in IETF + // QUIC. + void MarkZeroRttPacketsForRetransmission(); // Calls |sent_packet_manager_|'s NeuterUnencryptedPackets. Used when the // connection becomes forward secure and hasn't received acks for all packets.
diff --git a/quic/core/quic_connection_test.cc b/quic/core/quic_connection_test.cc index 4e5bc8c..f3fa7b9 100644 --- a/quic/core/quic_connection_test.cc +++ b/quic/core/quic_connection_test.cc
@@ -4553,7 +4553,7 @@ SendStreamDataToPeer(2, "bar", 0, NO_FIN, nullptr); EXPECT_FALSE(notifier_.HasLostStreamData()); - connection_.RetransmitZeroRttPackets(); + connection_.MarkZeroRttPacketsForRetransmission(); EXPECT_TRUE(notifier_.HasLostStreamData()); }
diff --git a/quic/core/quic_sent_packet_manager.cc b/quic/core/quic_sent_packet_manager.cc index 11f65cf..5033836 100644 --- a/quic/core/quic_sent_packet_manager.cc +++ b/quic/core/quic_sent_packet_manager.cc
@@ -454,7 +454,7 @@ } } -void QuicSentPacketManager::RetransmitZeroRttPackets() { +void QuicSentPacketManager::MarkZeroRttPacketsForRetransmission() { QuicPacketNumber packet_number = unacked_packets_.GetLeastUnacked(); for (QuicUnackedPacketMap::iterator it = unacked_packets_.begin(); it != unacked_packets_.end(); ++it, ++packet_number) {
diff --git a/quic/core/quic_sent_packet_manager.h b/quic/core/quic_sent_packet_manager.h index 508286a..2176246 100644 --- a/quic/core/quic_sent_packet_manager.h +++ b/quic/core/quic_sent_packet_manager.h
@@ -141,10 +141,10 @@ void SetHandshakeConfirmed(); // Requests retransmission of all unacked 0-RTT packets. - // Only initially encrypted packets will be retransmitted. This can happen, + // Only 0-RTT encrypted packets will be retransmitted. This can happen, // for example, when a CHLO has been rejected and the previously encrypted // data needs to be encrypted with a new key. - void RetransmitZeroRttPackets(); + void MarkZeroRttPacketsForRetransmission(); // Notify the sent packet manager of an external network measurement or // prediction for either |bandwidth| or |rtt|; either can be empty.
diff --git a/quic/core/quic_session.cc b/quic/core/quic_session.cc index a1ba52b..d83823b 100644 --- a/quic/core/quic_session.cc +++ b/quic/core/quic_session.cc
@@ -1539,7 +1539,7 @@ if (perspective() == Perspective::IS_CLIENT) { // Retransmit old 0-RTT data (if any) with the new 0-RTT keys, since // they can't be decrypted by the server. - connection_->RetransmitZeroRttPackets(); + connection_->MarkZeroRttPacketsForRetransmission(); // Given any streams blocked by encryption a chance to write. OnCanWrite(); } @@ -1610,7 +1610,7 @@ void QuicSession::OnZeroRttRejected() { was_zero_rtt_rejected_ = true; - connection_->RetransmitZeroRttPackets(); + connection_->MarkZeroRttPacketsForRetransmission(); if (connection_->encryption_level() == ENCRYPTION_FORWARD_SECURE) { QUIC_BUG << "1-RTT keys already available when 0-RTT is rejected."; connection_->CloseConnection(