gfe-relnote: Deprecate gfe2_reloadable_flag_quic_neuter_handshake_packets_once2.

PiperOrigin-RevId: 288342996
Change-Id: If5e705b4bf167ff7b39c85bd62521876c3b56089
diff --git a/quic/core/quic_sent_packet_manager.cc b/quic/core/quic_sent_packet_manager.cc
index 5ee7896..f2a2894 100644
--- a/quic/core/quic_sent_packet_manager.cc
+++ b/quic/core/quic_sent_packet_manager.cc
@@ -105,8 +105,6 @@
       always_include_max_ack_delay_for_pto_timeout_(true),
       pto_exponential_backoff_start_point_(0),
       pto_rttvar_multiplier_(4),
-      neuter_handshake_packets_once_(
-          GetQuicReloadableFlag(quic_neuter_handshake_packets_once2)),
       sanitize_ack_delay_(GetQuicReloadableFlag(quic_sanitize_ack_delay)) {
   SetSendAlgorithm(congestion_control_type);
 }
@@ -349,11 +347,7 @@
 }
 
 void QuicSentPacketManager::SetHandshakeConfirmed() {
-  if (!neuter_handshake_packets_once_ ||
-      handshake_state_ < HANDSHAKE_COMPLETE) {
-    if (neuter_handshake_packets_once_) {
-      QUIC_RELOADABLE_FLAG_COUNT_N(quic_neuter_handshake_packets_once2, 1, 3);
-    }
+  if (handshake_state_ < HANDSHAKE_COMPLETE) {
     handshake_state_ = HANDSHAKE_COMPLETE;
     NeuterHandshakePackets();
   }
@@ -472,11 +466,8 @@
       // will be sent. The data has been abandoned in the cryto stream. Remove
       // it from in flight.
       unacked_packets_.RemoveFromInFlight(packet_number);
-      if (neuter_handshake_packets_once_) {
-        QUIC_RELOADABLE_FLAG_COUNT_N(quic_neuter_handshake_packets_once2, 2, 3);
-        it->state = NEUTERED;
-        DCHECK(!unacked_packets_.HasRetransmittableFrames(*it));
-      }
+      it->state = NEUTERED;
+      DCHECK(!unacked_packets_.HasRetransmittableFrames(*it));
     }
   }
 }
@@ -489,14 +480,11 @@
         unacked_packets_.GetPacketNumberSpace(it->encryption_level) ==
             HANDSHAKE_DATA) {
       unacked_packets_.RemoveFromInFlight(packet_number);
-      if (neuter_handshake_packets_once_) {
-        // Notify session that the data has been delivered (but do not notify
-        // send algorithm).
-        QUIC_RELOADABLE_FLAG_COUNT_N(quic_neuter_handshake_packets_once2, 3, 3);
-        it->state = NEUTERED;
-        unacked_packets_.NotifyFramesAcked(*it, QuicTime::Delta::Zero(),
-                                           QuicTime::Zero());
-      }
+      // Notify session that the data has been delivered (but do not notify
+      // send algorithm).
+      it->state = NEUTERED;
+      unacked_packets_.NotifyFramesAcked(*it, QuicTime::Delta::Zero(),
+                                         QuicTime::Zero());
     }
   }
 }
@@ -788,7 +776,7 @@
     if (it->state == OUTSTANDING &&
         unacked_packets_.HasRetransmittableFrames(*it) &&
         pending_timer_transmission_count_ < max_rto_packets_) {
-      DCHECK(!neuter_handshake_packets_once_ || it->in_flight);
+      DCHECK(it->in_flight);
       retransmissions.push_back(packet_number);
       ++pending_timer_transmission_count_;
     }
@@ -821,7 +809,7 @@
        it != unacked_packets_.end(); ++it, ++packet_number) {
     if (it->state == OUTSTANDING &&
         unacked_packets_.HasRetransmittableFrames(*it)) {
-      DCHECK(!neuter_handshake_packets_once_ || it->in_flight);
+      DCHECK(it->in_flight);
       probing_packets.push_back(packet_number);
       if (probing_packets.size() == pending_timer_transmission_count_) {
         break;
diff --git a/quic/core/quic_sent_packet_manager.h b/quic/core/quic_sent_packet_manager.h
index ae62dfb..adacf37 100644
--- a/quic/core/quic_sent_packet_manager.h
+++ b/quic/core/quic_sent_packet_manager.h
@@ -652,9 +652,6 @@
   // The multiplier of rttvar when calculating PTO timeout.
   int pto_rttvar_multiplier_;
 
-  // Latched value of quic_neuter_handshake_packets_once2.
-  const bool neuter_handshake_packets_once_;
-
   // Latched value of quic_sanitize_ack_delay.
   const bool sanitize_ack_delay_;
 };
diff --git a/quic/core/quic_sent_packet_manager_test.cc b/quic/core/quic_sent_packet_manager_test.cc
index ccbd88e..8e2fc68 100644
--- a/quic/core/quic_sent_packet_manager_test.cc
+++ b/quic/core/quic_sent_packet_manager_test.cc
@@ -3173,11 +3173,7 @@
   SendDataPacket(2, ENCRYPTION_FORWARD_SECURE);
 
   // Successfully decrypt a forward secure packet.
-  if (GetQuicReloadableFlag(quic_neuter_handshake_packets_once2)) {
-    EXPECT_CALL(notifier_, OnFrameAcked(_, _, _)).Times(1);
-  } else {
-    EXPECT_CALL(notifier_, OnFrameAcked(_, _, _)).Times(0);
-  }
+  EXPECT_CALL(notifier_, OnFrameAcked(_, _, _)).Times(1);
   manager_.SetHandshakeConfirmed();
 
   // 1st TLP.
@@ -3197,19 +3193,10 @@
   manager_.MaybeRetransmitTailLossProbe();
 
   // RTO retransmits SHLO although it is not in flight.
-  size_t num_rto_packets = 2;
-  if (GetQuicReloadableFlag(quic_neuter_handshake_packets_once2)) {
-    num_rto_packets = 1;
-  }
   EXPECT_CALL(notifier_, RetransmitFrames(_, _))
-      .Times(num_rto_packets)
       .WillOnce(WithArgs<0>(Invoke([&crypto_frame](const QuicFrames& frames) {
         EXPECT_EQ(1u, frames.size());
-        if (GetQuicReloadableFlag(quic_neuter_handshake_packets_once2)) {
-          EXPECT_NE(crypto_frame, frames[0].stream_frame);
-        } else {
-          EXPECT_EQ(crypto_frame, frames[0].stream_frame);
-        }
+        EXPECT_NE(crypto_frame, frames[0].stream_frame);
       })));
   manager_.OnRetransmissionTimeout();
 }