Deprecate gfe2_reloadable_flag_quic_update_packet_content_returns_connected

PiperOrigin-RevId: 362089393
Change-Id: Ib966c66ac43434ec9103e74c6be9f37865159e5d
diff --git a/quic/core/quic_connection.cc b/quic/core/quic_connection.cc
index fe7ac45..5296a1c 100644
--- a/quic/core/quic_connection.cc
+++ b/quic/core/quic_connection.cc
@@ -375,7 +375,6 @@
       validate_client_addresses_(
           framer_.version().HasIetfQuicFrames() && use_path_validator_ &&
           count_bytes_on_alternative_path_separately_ &&
-          update_packet_content_returns_connected_ &&
           GetQuicReloadableFlag(quic_server_reverse_validate_new_path)) {
   QUIC_BUG_IF_V2(quic_bug_12714_1,
                  !start_peer_migration_earlier_ && send_path_response_);
@@ -5266,21 +5265,18 @@
 }
 
 bool QuicConnection::UpdatePacketContent(QuicFrameType type) {
-  if (update_packet_content_returns_connected_) {
-    QUIC_RELOADABLE_FLAG_COUNT(quic_update_packet_content_returns_connected);
-  }
   most_recent_frame_type_ = type;
   if (version().HasIetfQuicFrames()) {
     if (!QuicUtils::IsProbingFrame(type)) {
       MaybeStartIetfPeerMigration();
-      return !update_packet_content_returns_connected_ || connected_;
+      return connected_;
     }
     QuicSocketAddress current_effective_peer_address =
         GetEffectivePeerAddressFromCurrentPacket();
     if (!count_bytes_on_alternative_path_separately_ ||
         IsDefaultPath(last_packet_destination_address_,
                       last_packet_source_address_)) {
-      return !update_packet_content_returns_connected_ || connected_;
+      return connected_;
     }
     QUIC_CODE_COUNT_N(quic_count_bytes_on_alternative_path_seperately, 3, 5);
     if (type == PATH_CHALLENGE_FRAME &&
@@ -5328,7 +5324,7 @@
       }
     }
     MaybeUpdateBytesReceivedFromAlternativeAddress(last_size_);
-    return !update_packet_content_returns_connected_ || connected_;
+    return connected_;
   }
   // Packet content is tracked to identify connectivity probe in non-IETF
   // version, where a connectivity probe is defined as
@@ -5339,13 +5335,13 @@
     // We have already learned the current packet is not a connectivity
     // probing packet. Peer migration should have already been started earlier
     // if needed.
-    return !update_packet_content_returns_connected_ || connected_;
+    return connected_;
   }
 
   if (type == PING_FRAME) {
     if (current_packet_content_ == NO_FRAMES_RECEIVED) {
       current_packet_content_ = FIRST_FRAME_IS_PING;
-      return !update_packet_content_returns_connected_ || connected_;
+      return connected_;
     }
   }
 
@@ -5375,7 +5371,7 @@
           << last_packet_destination_address_
           << ", default path self_address :" << default_path_.self_address;
     }
-    return !update_packet_content_returns_connected_ || connected_;
+    return connected_;
   }
 
   current_packet_content_ = NOT_PADDED_PING;
@@ -5389,7 +5385,7 @@
     }
   }
   current_effective_peer_migration_type_ = NO_CHANGE;
-  return !update_packet_content_returns_connected_ || connected_;
+  return connected_;
 }
 
 void QuicConnection::MaybeStartIetfPeerMigration() {
diff --git a/quic/core/quic_connection.h b/quic/core/quic_connection.h
index 5c192f8..ec866a6 100644
--- a/quic/core/quic_connection.h
+++ b/quic/core/quic_connection.h
@@ -2148,9 +2148,6 @@
   bool count_bytes_on_alternative_path_separately_ =
       GetQuicReloadableFlag(quic_count_bytes_on_alternative_path_seperately);
 
-  bool update_packet_content_returns_connected_ =
-      GetQuicReloadableFlag(quic_update_packet_content_returns_connected);
-
   // If true, upon seeing a new client address, validate the client address.
   const bool validate_client_addresses_;
 
diff --git a/quic/core/quic_connection_test.cc b/quic/core/quic_connection_test.cc
index fc72a8a..d2f7499 100644
--- a/quic/core/quic_connection_test.cc
+++ b/quic/core/quic_connection_test.cc
@@ -13653,17 +13653,10 @@
   EXPECT_CALL(visitor_,
               OnConnectionClosed(_, ConnectionCloseSource::FROM_SELF));
   EXPECT_CALL(visitor_, OnConnectionMigration(PORT_CHANGE)).Times(0u);
-  if (!GetQuicReloadableFlag(quic_update_packet_content_returns_connected)) {
-    EXPECT_CALL(*send_algorithm_, OnCongestionEvent(_, _, _, _, _));
-    EXPECT_QUIC_BUG(
-        ProcessFramePacketWithAddresses(QuicFrame(&frame), kSelfAddress,
-                                        kNewPeerAddress, ENCRYPTION_INITIAL),
-        "");
-  } else {
-    EXPECT_CALL(*send_algorithm_, OnCongestionEvent(_, _, _, _, _)).Times(0);
-    ProcessFramePacketWithAddresses(QuicFrame(&frame), kSelfAddress,
-                                    kNewPeerAddress, ENCRYPTION_INITIAL);
-  }
+
+  EXPECT_CALL(*send_algorithm_, OnCongestionEvent(_, _, _, _, _)).Times(0);
+  ProcessFramePacketWithAddresses(QuicFrame(&frame), kSelfAddress,
+                                  kNewPeerAddress, ENCRYPTION_INITIAL);
   EXPECT_FALSE(connection_.connected());
 }
 
diff --git a/quic/core/quic_flags_list.h b/quic/core/quic_flags_list.h
index 3e49d0e..6360714 100644
--- a/quic/core/quic_flags_list.h
+++ b/quic/core/quic_flags_list.h
@@ -66,7 +66,6 @@
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_tls_use_per_handshaker_proof_source, true)
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_unified_iw_options, false)
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_unify_stop_sending, true)
-QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_update_packet_content_returns_connected, true)
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_use_encryption_level_context, true)
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_use_write_or_buffer_data_at_level, false)
 QUIC_FLAG(FLAGS_quic_reloadable_flag_send_quic_fallback_server_config_on_leto_error, true)