Deprecate gfe2_reloadable_flag_quic_no_path_degrading_before_handshake_confirmed.

PiperOrigin-RevId: 907924372
diff --git a/quiche/common/quiche_feature_flags_list.h b/quiche/common/quiche_feature_flags_list.h
index 43a9685..fffed3b 100755
--- a/quiche/common/quiche_feature_flags_list.h
+++ b/quiche/common/quiche_feature_flags_list.h
@@ -47,7 +47,6 @@
 QUICHE_FLAG(bool, quiche_reloadable_flag_quic_include_datagrams_in_willing_to_write, false, false, "If true, checks for queued datagrams when determining if a connection is willing to write.")
 QUICHE_FLAG(bool, quiche_reloadable_flag_quic_move_clock_now, false, false, "If true, move the call to clock.Now() in QuicPacketReader::ReadAndDispatchPackets to after socket_api_.ReadMultiplePackets().")
 QUICHE_FLAG(bool, quiche_reloadable_flag_quic_neuter_packets_on_migration, false, true, "If ture, QuicSentPacketManager::OnConnectionMigration will call old_send_algorithm->OnPacketNeutered on all inflight packets.")
-QUICHE_FLAG(bool, quiche_reloadable_flag_quic_no_path_degrading_before_handshake_confirmed, true, true, "If true, an endpoint does not detect path degrading or blackholing until handshake gets confirmed.")
 QUICHE_FLAG(bool, quiche_reloadable_flag_quic_no_write_control_frame_upon_connection_close, false, true, "If trrue, early return before write control frame in OnCanWrite() if the connection is already closed.")
 QUICHE_FLAG(bool, quiche_reloadable_flag_quic_no_write_control_frame_upon_connection_close2, false, true, "If true, QuicSession will block outgoing control frames when the connection is closed.")
 QUICHE_FLAG(bool, quiche_reloadable_flag_quic_not_instantiate_unused_qpack_send_stream, true, true, "When qpack_maximum_dynamic_table_capacity is zero, don't bother to instantiate the unused QpackSendStream.")
diff --git a/quiche/quic/core/quic_connection.cc b/quiche/quic/core/quic_connection.cc
index 5ad4514..55b74d2 100644
--- a/quiche/quic/core/quic_connection.cc
+++ b/quiche/quic/core/quic_connection.cc
@@ -6765,11 +6765,7 @@
   if (!connected_) {
     return false;
   }
-  if (GetQuicReloadableFlag(
-          quic_no_path_degrading_before_handshake_confirmed) &&
-      SupportsMultiplePacketNumberSpaces()) {
-    QUIC_RELOADABLE_FLAG_COUNT_N(
-        quic_no_path_degrading_before_handshake_confirmed, 1, 2);
+  if (SupportsMultiplePacketNumberSpaces()) {
     // No path degrading detection before handshake confirmed.
     return perspective_ == Perspective::IS_CLIENT && IsHandshakeConfirmed() &&
            !is_path_degrading_;
@@ -6831,11 +6827,7 @@
   if (!connected_ || blackhole_detection_disabled_) {
     return false;
   }
-  if (GetQuicReloadableFlag(
-          quic_no_path_degrading_before_handshake_confirmed) &&
-      SupportsMultiplePacketNumberSpaces() && !IsHandshakeConfirmed()) {
-    QUIC_RELOADABLE_FLAG_COUNT_N(
-        quic_no_path_degrading_before_handshake_confirmed, 2, 2);
+  if (SupportsMultiplePacketNumberSpaces() && !IsHandshakeConfirmed()) {
     return false;
   }
   // No blackhole detection before handshake completes.
diff --git a/quiche/quic/core/quic_connection_test.cc b/quiche/quic/core/quic_connection_test.cc
index e0d8372..0aa8e19 100644
--- a/quiche/quic/core/quic_connection_test.cc
+++ b/quiche/quic/core/quic_connection_test.cc
@@ -16,7 +16,6 @@
 #include "absl/strings/str_cat.h"
 #include "absl/strings/str_join.h"
 #include "absl/strings/string_view.h"
-#include "quiche/quic/core/congestion_control/loss_detection_interface.h"
 #include "quiche/quic/core/congestion_control/send_algorithm_interface.h"
 #include "quiche/quic/core/crypto/null_decrypter.h"
 #include "quiche/quic/core/crypto/null_encrypter.h"
@@ -7646,9 +7645,7 @@
       .WillRepeatedly(Return(HANDSHAKE_COMPLETE));
 
   connection_.SendStreamDataWithString(1, "data", 0, NO_FIN);
-  if (GetQuicReloadableFlag(
-          quic_no_path_degrading_before_handshake_confirmed) &&
-      connection_.SupportsMultiplePacketNumberSpaces()) {
+  if (connection_.SupportsMultiplePacketNumberSpaces()) {
     EXPECT_FALSE(connection_.PathDegradingDetectionInProgress());
   } else {
     EXPECT_TRUE(connection_.PathDegradingDetectionInProgress());
@@ -9638,12 +9635,8 @@
   EXPECT_CALL(*send_algorithm_, EnableECT1()).WillOnce(Return(false));
   EXPECT_CALL(*send_algorithm_, EnableECT0()).WillOnce(Return(false));
   connection_.SetFromConfig(config);
-  if (GetQuicReloadableFlag(quic_default_enable_5rto_blackhole_detection2) ||
-      GetQuicReloadableFlag(
-          quic_no_path_degrading_before_handshake_confirmed)) {
-    EXPECT_CALL(visitor_, GetHandshakeState())
-        .WillRepeatedly(Return(HANDSHAKE_CONFIRMED));
-  }
+  EXPECT_CALL(visitor_, GetHandshakeState())
+      .WillRepeatedly(Return(HANDSHAKE_CONFIRMED));
   connection_.OnHandshakeComplete();
   EXPECT_FALSE(connection_.GetRetransmissionAlarm()->IsSet());
 
@@ -9692,12 +9685,8 @@
   EXPECT_CALL(*send_algorithm_, EnableECT1()).WillOnce(Return(false));
   EXPECT_CALL(*send_algorithm_, EnableECT0()).WillOnce(Return(false));
   connection_.SetFromConfig(config);
-  if (GetQuicReloadableFlag(quic_default_enable_5rto_blackhole_detection2) ||
-      GetQuicReloadableFlag(
-          quic_no_path_degrading_before_handshake_confirmed)) {
-    EXPECT_CALL(visitor_, GetHandshakeState())
-        .WillRepeatedly(Return(HANDSHAKE_CONFIRMED));
-  }
+  EXPECT_CALL(visitor_, GetHandshakeState())
+      .WillRepeatedly(Return(HANDSHAKE_CONFIRMED));
   connection_.OnHandshakeComplete();
   EXPECT_FALSE(connection_.GetRetransmissionAlarm()->IsSet());
 
@@ -9745,12 +9734,8 @@
   EXPECT_CALL(*send_algorithm_, EnableECT1()).WillOnce(Return(false));
   EXPECT_CALL(*send_algorithm_, EnableECT0()).WillOnce(Return(false));
   connection_.SetFromConfig(config);
-  if (GetQuicReloadableFlag(quic_default_enable_5rto_blackhole_detection2) ||
-      GetQuicReloadableFlag(
-          quic_no_path_degrading_before_handshake_confirmed)) {
-    EXPECT_CALL(visitor_, GetHandshakeState())
-        .WillRepeatedly(Return(HANDSHAKE_CONFIRMED));
-  }
+  EXPECT_CALL(visitor_, GetHandshakeState())
+      .WillRepeatedly(Return(HANDSHAKE_CONFIRMED));
   connection_.OnHandshakeComplete();
   EXPECT_FALSE(connection_.GetRetransmissionAlarm()->IsSet());
 
@@ -11189,12 +11174,8 @@
   connection_options.push_back(k5RTO);
   config.SetConnectionOptionsToSend(connection_options);
   QuicConfigPeer::SetNegotiated(&config, true);
-  if (GetQuicReloadableFlag(quic_default_enable_5rto_blackhole_detection2) ||
-      GetQuicReloadableFlag(
-          quic_no_path_degrading_before_handshake_confirmed)) {
-    EXPECT_CALL(visitor_, GetHandshakeState())
-        .WillRepeatedly(Return(HANDSHAKE_COMPLETE));
-  }
+  EXPECT_CALL(visitor_, GetHandshakeState())
+      .WillRepeatedly(Return(HANDSHAKE_COMPLETE));
   if (connection_.version().IsIetfQuic()) {
     QuicConfigPeer::SetReceivedOriginalConnectionId(
         &config, connection_.connection_id());
@@ -11207,27 +11188,14 @@
   connection_.SetFromConfig(config);
 
   connection_.SendCryptoDataWithString("foo", 0, ENCRYPTION_HANDSHAKE);
-  if (GetQuicReloadableFlag(
-          quic_no_path_degrading_before_handshake_confirmed)) {
-    // No blackhole detection before handshake confirmed.
-    EXPECT_FALSE(connection_.BlackholeDetectionInProgress());
-  } else {
-    EXPECT_TRUE(connection_.BlackholeDetectionInProgress());
-  }
+  // No blackhole detection before handshake confirmed.
+  EXPECT_FALSE(connection_.BlackholeDetectionInProgress());
   // Discard handshake keys.
   EXPECT_CALL(visitor_, GetHandshakeState())
       .WillRepeatedly(Return(HANDSHAKE_CONFIRMED));
   connection_.OnHandshakeComplete();
-  if (GetQuicReloadableFlag(quic_default_enable_5rto_blackhole_detection2) ||
-      GetQuicReloadableFlag(
-          quic_no_path_degrading_before_handshake_confirmed)) {
-    // Verify blackhole detection stops.
-    EXPECT_FALSE(connection_.BlackholeDetectionInProgress());
-  } else {
-    // Problematic: although there is nothing in flight, blackhole detection is
-    // still in progress.
-    EXPECT_TRUE(connection_.BlackholeDetectionInProgress());
-  }
+  // Verify blackhole detection stops.
+  EXPECT_FALSE(connection_.BlackholeDetectionInProgress());
 }
 
 TEST_P(QuicConnectionTest, ProcessUndecryptablePacketsBasedOnEncryptionLevel) {