Deprecate gfe2_reloadable_flag_quic_one_dcid.

PiperOrigin-RevId: 942569459
diff --git a/quiche/common/quiche_feature_flags_list.h b/quiche/common/quiche_feature_flags_list.h
index 063e3c4..491c09f 100755
--- a/quiche/common/quiche_feature_flags_list.h
+++ b/quiche/common/quiche_feature_flags_list.h
@@ -53,7 +53,6 @@
 QUICHE_FLAG(bool, quiche_reloadable_flag_quic_notify_ack_listener_earlier, true, true, "If true, call QuicAckListenerInterface::OnPacketAcked() before moving the stream to closed stream list.")
 QUICHE_FLAG(bool, quiche_reloadable_flag_quic_notify_stream_soon_to_destroy, true, true, "If true, notify each QUIC stream before it gets destroyed and update ACK listener before that.")
 QUICHE_FLAG(bool, quiche_reloadable_flag_quic_on_packet_header_return_connected, false, true, "If true, QuicConnection::OnPacketHeader will return connected_ at the end of the function.")
-QUICHE_FLAG(bool, quiche_reloadable_flag_quic_one_dcid, true, true, "If true, stores only one copy of the destination connection ID in QuicConnection::ReceivedPacketInfo.")
 QUICHE_FLAG(bool, quiche_reloadable_flag_quic_optimize_qpack_blocking_manager, false, false, "If true, optimize qpack_blocking_manager for CPU efficiency.")
 QUICHE_FLAG(bool, quiche_reloadable_flag_quic_pacing_remove_non_initial_burst, false, false, "If true, remove the non-initial burst in QUIC PacingSender.")
 QUICHE_FLAG(bool, quiche_reloadable_flag_quic_parse_cert_compression_algos_from_chlo, true, true, "If true, parse offered cert compression algorithms from received CHLOs.")
diff --git a/quiche/quic/core/quic_connection.cc b/quiche/quic/core/quic_connection.cc
index a1f2592..c7df04f 100644
--- a/quiche/quic/core/quic_connection.cc
+++ b/quiche/quic/core/quic_connection.cc
@@ -236,7 +236,6 @@
       perspective_(perspective),
       owns_writer_(owns_writer),
       can_truncate_connection_ids_(perspective == Perspective::IS_SERVER),
-      store_one_dcid_(GetQuicReloadableFlag(quic_one_dcid)),
       spin_bit_enabled_(false) {
   QUICHE_DCHECK(perspective_ == Perspective::IS_CLIENT ||
                 default_path_.self_address.IsInitialized());
@@ -1025,33 +1024,17 @@
 
 bool QuicConnection::OnUnauthenticatedPublicHeader(
     const QuicPacketHeader& header) {
-  if (store_one_dcid_) {
-    QUIC_RELOADABLE_FLAG_COUNT_N(quic_one_dcid, 2, 3);
+  last_received_packet_info_.header.destination_connection_id =
+      header.destination_connection_id;
+  // If last packet destination connection ID is the original server
+  // connection ID chosen by client, replaces it with the connection ID chosen
+  // by server.
+  if (perspective_ == Perspective::IS_SERVER &&
+      original_destination_connection_id_.has_value() &&
+      last_received_packet_info_.header.destination_connection_id ==
+          *original_destination_connection_id_) {
     last_received_packet_info_.header.destination_connection_id =
-        header.destination_connection_id;
-    // If last packet destination connection ID is the original server
-    // connection ID chosen by client, replaces it with the connection ID chosen
-    // by server.
-    if (perspective_ == Perspective::IS_SERVER &&
-        original_destination_connection_id_.has_value() &&
-        last_received_packet_info_.header.destination_connection_id ==
-            *original_destination_connection_id_) {
-      last_received_packet_info_.header.destination_connection_id =
-          original_destination_connection_id_replacement_;
-    }
-  } else {
-    last_received_packet_info_.destination_connection_id =
-        header.destination_connection_id;
-    // If last packet destination connection ID is the original server
-    // connection ID chosen by client, replaces it with the connection ID chosen
-    // by server.
-    if (perspective_ == Perspective::IS_SERVER &&
-        original_destination_connection_id_.has_value() &&
-        last_received_packet_info_.destination_connection_id ==
-            *original_destination_connection_id_) {
-      last_received_packet_info_.destination_connection_id =
-          original_destination_connection_id_replacement_;
-    }
+        original_destination_connection_id_replacement_;
   }
 
   // As soon as we receive an initial we start ignoring subsequent retries.
@@ -1328,12 +1311,11 @@
     }
   }
 
-  if (store_one_dcid_) {
-    QUIC_RELOADABLE_FLAG_COUNT_N(quic_one_dcid, 3, 3);
-    // Save the stored destination connection ID, in case it was substituted.
-    QuicConnectionId destination_connection_id =
-        last_received_packet_info_.header.destination_connection_id;
-    last_received_packet_info_.header = header;
+  // Save the stored destination connection ID, in case it was substituted.
+  QuicConnectionId destination_connection_id =
+      last_received_packet_info_.header.destination_connection_id;
+  last_received_packet_info_.header = header;
+  if (!destination_connection_id.IsEmpty()) {
     last_received_packet_info_.header.destination_connection_id =
         destination_connection_id;
   }
@@ -1417,19 +1399,14 @@
 
   --stats_.packets_dropped;
   QUIC_DVLOG(1) << ENDPOINT << "Received packet header: " << header;
-  if (store_one_dcid_) {
-    // last_received_packet_info_.header.destination_connection_id will often
-    // be different from header.destination_connection_id, so we can't simply
-    // compare the two headers.
-    QUIC_BUG_IF(
-        quic_bug_header_mismatch,
-        last_received_packet_info_.header.packet_number !=
-                header.packet_number ||
-            last_received_packet_info_.header.type_byte != header.type_byte)
-        << "last_received_packet_info.header not assigned";
-  } else {
-    last_received_packet_info_.header = header;
-  }
+  // last_received_packet_info_.header.destination_connection_id will often
+  // be different from header.destination_connection_id, so we can't simply
+  // compare the two headers.
+  QUIC_BUG_IF(
+      quic_bug_header_mismatch,
+      last_received_packet_info_.header.packet_number != header.packet_number ||
+          last_received_packet_info_.header.type_byte != header.type_byte)
+      << "last_received_packet_info.header not assigned";
   if (!stats_.first_decrypted_packet.IsInitialized()) {
     stats_.first_decrypted_packet =
         last_received_packet_info_.header.packet_number;
diff --git a/quiche/quic/core/quic_connection.h b/quiche/quic/core/quic_connection.h
index 67aeea9..e8db6f5 100644
--- a/quiche/quic/core/quic_connection.h
+++ b/quiche/quic/core/quic_connection.h
@@ -1749,9 +1749,6 @@
     // be overridden to the current default self address.
     QuicSocketAddress actual_destination_address;
     // 8B remaining in the fourth cacheline.
-    // TODO(martinduke): Remove once gfe2_reloadable_flag_quic_one_dcid is
-    // deprecated.
-    QuicConnectionId destination_connection_id;
   };
   static_assert(offsetof(ReceivedPacketInfo, received_bytes_counted) <= 192);
 
@@ -2214,11 +2211,7 @@
   // Extract destination connection ID from ReceivedPacketInfo.
   inline QuicConnectionId GetDestinationConnectionId(
       const ReceivedPacketInfo& packet_info) const {
-    if (store_one_dcid_) {
-      QUIC_RELOADABLE_FLAG_COUNT_N(quic_one_dcid, 1, 3);
-      return packet_info.header.destination_connection_id;
-    }
-    return packet_info.destination_connection_id;
+    return packet_info.header.destination_connection_id;
   }
 
   // Send a scone packet immediately after successfully migrating to a new path
@@ -2593,9 +2586,6 @@
   // If true then flow labels will be changed when a PTO fires, or when
   // a PTO'd packet from a peer is detected.
   bool enable_black_hole_avoidance_via_flow_label_ : 1 = false;
-  // If true, stores only one copy of the destination connection ID in
-  // ReceivedPacketInfo.
-  const bool store_one_dcid_ : 1;
 
   // If true, the connection will accept SCONE packets from the peer.
   bool parse_scone_packets_ : 1 = false;
diff --git a/quiche/quic/test_tools/quic_connection_peer.cc b/quiche/quic/test_tools/quic_connection_peer.cc
index 2cec04f..26ba4a3 100644
--- a/quiche/quic/test_tools/quic_connection_peer.cc
+++ b/quiche/quic/test_tools/quic_connection_peer.cc
@@ -559,7 +559,7 @@
       << " receipt_time passed: " << (info.receipt_time == QuicTime::Zero())
       << " received_bytes_counted passed: " << !info.received_bytes_counted
       << " destination_connection_id passed: "
-      << (info.destination_connection_id == QuicConnectionId())
+      << (info.header.destination_connection_id == QuicConnectionId())
       << " length passed: " << (info.length == 0)
       << " decrypted passed: " << !info.decrypted << " decrypted_level passed: "
       << (info.decrypted_level == ENCRYPTION_INITIAL)
@@ -567,12 +567,12 @@
       << " ecn_codepoint passed: " << (info.ecn_codepoint == ECN_NOT_ECT)
       << " sizeof(ReceivedPacketInfo) passed: "
       << (sizeof(size_t) != 8 ||
-          sizeof(QuicConnection::ReceivedPacketInfo) == 272);
+          sizeof(QuicConnection::ReceivedPacketInfo) == 248);
   return info.destination_address == QuicSocketAddress() &&
          info.source_address == QuicSocketAddress() &&
          info.receipt_time == QuicTime::Zero() &&
          !info.received_bytes_counted && info.length == 0 &&
-         info.destination_connection_id == QuicConnectionId() &&
+         info.header.destination_connection_id == QuicConnectionId() &&
          !info.decrypted && info.decrypted_level == ENCRYPTION_INITIAL &&
          // There's no simple way to compare all the values of QuicPacketHeader.
          info.frames.empty() && info.ecn_codepoint == ECN_NOT_ECT &&
@@ -581,7 +581,7 @@
          // have changed. Please add the relevant conditions and update the
          // length below.
          (sizeof(size_t) != 8 ||
-          sizeof(QuicConnection::ReceivedPacketInfo) == 272);
+          sizeof(QuicConnection::ReceivedPacketInfo) == 248);
 }
 
 // static