Deprecate quic_do_not_override_connection_id
gfe-relnote: deprecate gfe2_restart_flag_quic_do_not_override_connection_id
PiperOrigin-RevId: 260976000
Change-Id: Icc887c99c5d167fca3d2295f1285a2e4db8e2df7
diff --git a/quic/core/http/end_to_end_test.cc b/quic/core/http/end_to_end_test.cc
index 364ab4d..ca71f3f 100644
--- a/quic/core/http/end_to_end_test.cc
+++ b/quic/core/http/end_to_end_test.cc
@@ -1895,11 +1895,7 @@
client_->client()->client_session()->connection();
QuicPacketHeader* header =
QuicConnectionPeer::GetLastHeader(client_connection);
- if (!GetQuicRestartFlag(quic_do_not_override_connection_id)) {
- EXPECT_EQ(CONNECTION_ID_ABSENT, header->destination_connection_id_included);
- } else {
- EXPECT_EQ(CONNECTION_ID_ABSENT, header->source_connection_id_included);
- }
+ EXPECT_EQ(CONNECTION_ID_ABSENT, header->source_connection_id_included);
}
TEST_P(EndToEndTestWithTls, 8ByteConnectionId) {
diff --git a/quic/core/http/quic_spdy_client_session_test.cc b/quic/core/http/quic_spdy_client_session_test.cc
index 0f29b06..be06984 100644
--- a/quic/core/http/quic_spdy_client_session_test.cc
+++ b/quic/core/http/quic_spdy_client_session_test.cc
@@ -515,10 +515,6 @@
ParsedQuicVersionVector versions = SupportedVersions(GetParam());
QuicConnectionId destination_connection_id = EmptyQuicConnectionId();
QuicConnectionId source_connection_id = connection_id;
- if (!GetQuicRestartFlag(quic_do_not_override_connection_id)) {
- destination_connection_id = connection_id;
- source_connection_id = EmptyQuicConnectionId();
- }
std::unique_ptr<QuicEncryptedPacket> packet(ConstructEncryptedPacket(
destination_connection_id, source_connection_id, false, false, 100,
"data", CONNECTION_ID_ABSENT, CONNECTION_ID_ABSENT,
diff --git a/quic/core/quic_connection_test.cc b/quic/core/quic_connection_test.cc
index f0152cd..176e386 100644
--- a/quic/core/quic_connection_test.cc
+++ b/quic/core/quic_connection_test.cc
@@ -1133,9 +1133,7 @@
header.destination_connection_id = connection_id_;
header.packet_number_length = packet_number_length_;
header.destination_connection_id_included = connection_id_included_;
- if ((VersionHasIetfInvariantHeader(peer_framer_.transport_version()) ||
- GetQuicRestartFlag(quic_do_not_override_connection_id)) &&
- peer_framer_.perspective() == Perspective::IS_SERVER) {
+ if (peer_framer_.perspective() == Perspective::IS_SERVER) {
header.destination_connection_id_included = CONNECTION_ID_ABSENT;
}
if (level == ENCRYPTION_INITIAL &&
@@ -1146,10 +1144,7 @@
header.length_length = VARIABLE_LENGTH_INTEGER_LENGTH_2;
}
}
- if ((GetQuicRestartFlag(quic_do_not_override_connection_id) ||
- (level == ENCRYPTION_INITIAL &&
- peer_framer_.version().KnowsWhichDecrypterToUse())) &&
- header.version_flag &&
+ if (header.version_flag &&
peer_framer_.perspective() == Perspective::IS_SERVER) {
header.source_connection_id = connection_id_;
header.source_connection_id_included = CONNECTION_ID_PRESENT;
@@ -1371,8 +1366,7 @@
}
// Set connection_id to peer's in memory representation as this data packet
// is created by peer_framer.
- if (GetQuicRestartFlag(quic_do_not_override_connection_id) &&
- peer_framer_.perspective() == Perspective::IS_SERVER) {
+ if (peer_framer_.perspective() == Perspective::IS_SERVER) {
header.source_connection_id = connection_id_;
header.source_connection_id_included = connection_id_included_;
header.destination_connection_id_included = CONNECTION_ID_ABSENT;
@@ -1425,8 +1419,7 @@
QuicPacketHeader header;
// Set connection_id to peer's in memory representation as this connection
// close packet is created by peer_framer.
- if (GetQuicRestartFlag(quic_do_not_override_connection_id) &&
- peer_framer_.perspective() == Perspective::IS_SERVER) {
+ if (peer_framer_.perspective() == Perspective::IS_SERVER) {
header.source_connection_id = connection_id_;
header.destination_connection_id_included = CONNECTION_ID_ABSENT;
if (!VersionHasIetfInvariantHeader(peer_framer_.transport_version())) {
@@ -6879,8 +6872,7 @@
TEST_P(QuicConnectionTest, ProcessFramesIfPacketClosedConnection) {
// Construct a packet with stream frame and connection close frame.
QuicPacketHeader header;
- if (GetQuicRestartFlag(quic_do_not_override_connection_id) &&
- peer_framer_.perspective() == Perspective::IS_SERVER) {
+ if (peer_framer_.perspective() == Perspective::IS_SERVER) {
header.source_connection_id = connection_id_;
header.destination_connection_id_included = CONNECTION_ID_ABSENT;
if (!VersionHasIetfInvariantHeader(peer_framer_.transport_version())) {
@@ -8448,7 +8440,6 @@
// Make sure a packet received with the right client connection ID is processed.
TEST_P(QuicConnectionTest, ValidClientConnectionId) {
- SetQuicRestartFlag(quic_do_not_override_connection_id, true);
if (!framer_.version().SupportsClientConnectionIds()) {
return;
}
@@ -8478,7 +8469,6 @@
// Make sure a packet received with a different client connection ID is dropped.
TEST_P(QuicConnectionTest, InvalidClientConnectionId) {
- SetQuicRestartFlag(quic_do_not_override_connection_id, true);
if (!framer_.version().SupportsClientConnectionIds()) {
return;
}
@@ -8508,7 +8498,6 @@
// Make sure the first packet received with a different client connection ID on
// the server is processed and it changes the client connection ID.
TEST_P(QuicConnectionTest, UpdateClientConnectionIdFromFirstPacket) {
- SetQuicRestartFlag(quic_do_not_override_connection_id, true);
if (!framer_.version().SupportsClientConnectionIds()) {
return;
}
diff --git a/quic/core/quic_dispatcher_test.cc b/quic/core/quic_dispatcher_test.cc
index 0ac5d56..3d60a7a 100644
--- a/quic/core/quic_dispatcher_test.cc
+++ b/quic/core/quic_dispatcher_test.cc
@@ -543,7 +543,6 @@
}
TEST_F(QuicDispatcherTest, StatelessVersionNegotiationWithClientConnectionId) {
- SetQuicRestartFlag(quic_do_not_override_connection_id, true);
SetQuicReloadableFlag(quic_use_parse_public_header, true);
CreateTimeWaitListManager();
QuicSocketAddress client_address(QuicIpAddress::Loopback4(), 1);
diff --git a/quic/core/quic_framer.cc b/quic/core/quic_framer.cc
index 944130d..ecad6a1 100644
--- a/quic/core/quic_framer.cc
+++ b/quic/core/quic_framer.cc
@@ -1484,8 +1484,6 @@
<< server_connection_id << " client_connection_id "
<< client_connection_id << " versions "
<< ParsedQuicVersionVectorToString(versions);
- DCHECK(client_connection_id.IsEmpty() ||
- GetQuicRestartFlag(quic_do_not_override_connection_id));
DCHECK(!versions.empty());
size_t len = kPacketHeaderTypeSize + kConnectionIdLengthSize +
client_connection_id.length() + server_connection_id.length() +
@@ -2347,8 +2345,7 @@
QuicConnectionId* header_connection_id = &header->destination_connection_id;
QuicConnectionIdIncluded* header_connection_id_included =
&header->destination_connection_id_included;
- if (perspective_ == Perspective::IS_CLIENT &&
- GetQuicRestartFlag(quic_do_not_override_connection_id)) {
+ if (perspective_ == Perspective::IS_CLIENT) {
header_connection_id = &header->source_connection_id;
header_connection_id_included = &header->source_connection_id_included;
}
@@ -2803,34 +2800,16 @@
return false;
}
- if (!GetQuicRestartFlag(quic_do_not_override_connection_id)) {
- if (header->source_connection_id_included == CONNECTION_ID_PRESENT) {
- DCHECK_EQ(Perspective::IS_CLIENT, perspective_);
- DCHECK_EQ(IETF_QUIC_LONG_HEADER_PACKET, header->form);
- if (!header->destination_connection_id.IsEmpty()) {
- set_detailed_error("Client connection ID not supported yet.");
- return false;
- }
- // Set destination connection ID to source connection ID.
- header->destination_connection_id = header->source_connection_id;
- } else if (header->destination_connection_id_included ==
- CONNECTION_ID_ABSENT) {
- header->destination_connection_id = last_serialized_server_connection_id_;
+ if (header->source_connection_id_included == CONNECTION_ID_ABSENT) {
+ if (!header->source_connection_id.IsEmpty()) {
+ DCHECK(!version_.SupportsClientConnectionIds());
+ set_detailed_error("Client connection ID not supported in this version.");
+ return false;
}
- } else {
- QUIC_RESTART_FLAG_COUNT_N(quic_do_not_override_connection_id, 5, 7);
- if (header->source_connection_id_included == CONNECTION_ID_ABSENT) {
- if (!header->source_connection_id.IsEmpty()) {
- DCHECK(!version_.SupportsClientConnectionIds());
- set_detailed_error(
- "Client connection ID not supported in this version.");
- return false;
- }
- if (perspective_ == Perspective::IS_CLIENT) {
- header->source_connection_id = last_serialized_server_connection_id_;
- } else {
- header->source_connection_id = last_serialized_client_connection_id_;
- }
+ if (perspective_ == Perspective::IS_CLIENT) {
+ header->source_connection_id = last_serialized_server_connection_id_;
+ } else {
+ header->source_connection_id = last_serialized_client_connection_id_;
}
}
@@ -6324,8 +6303,7 @@
return QUIC_INVALID_PACKET_HEADER;
}
// Read source connection ID.
- if (GetQuicRestartFlag(quic_do_not_override_connection_id) &&
- !reader.ReadConnectionId(source_connection_id,
+ if (!reader.ReadConnectionId(source_connection_id,
source_connection_id_length)) {
*detailed_error = "Unable to read source connection ID.";
return QUIC_INVALID_PACKET_HEADER;
diff --git a/quic/core/quic_framer_test.cc b/quic/core/quic_framer_test.cc
index e2c106a..bdb9019 100644
--- a/quic/core/quic_framer_test.cc
+++ b/quic/core/quic_framer_test.cc
@@ -1040,7 +1040,6 @@
return;
}
SetQuicReloadableFlag(quic_use_parse_public_header, false);
- SetQuicRestartFlag(quic_do_not_override_connection_id, true);
SetDecrypterLevel(ENCRYPTION_ZERO_RTT);
const unsigned char type_byte =
framer_.transport_version() == QUIC_VERSION_44 ? 0xFC : 0xD3;
@@ -1098,7 +1097,6 @@
}
TEST_P(QuicFramerTest, ClientConnectionIdFromShortHeaderToClient) {
- SetQuicRestartFlag(quic_do_not_override_connection_id, true);
if (!framer_.version().SupportsClientConnectionIds()) {
return;
}
@@ -1134,7 +1132,6 @@
// last serialized client connection ID. This test ensures that this
// mechanism behaves as expected.
TEST_P(QuicFramerTest, ClientConnectionIdFromShortHeaderToServer) {
- SetQuicRestartFlag(quic_do_not_override_connection_id, true);
if (!framer_.version().SupportsClientConnectionIds()) {
return;
}
@@ -1224,12 +1221,7 @@
EXPECT_FALSE(framer_.ProcessPacket(*encrypted));
EXPECT_EQ(QUIC_MISSING_PAYLOAD, framer_.error());
ASSERT_TRUE(visitor_.header_.get());
- if (!GetQuicRestartFlag(quic_do_not_override_connection_id)) {
- EXPECT_EQ(FramerTestConnectionId(),
- visitor_.header_->destination_connection_id);
- } else {
- EXPECT_EQ(FramerTestConnectionId(), visitor_.header_->source_connection_id);
- }
+ EXPECT_EQ(FramerTestConnectionId(), visitor_.header_->source_connection_id);
EXPECT_FALSE(visitor_.header_->reset_flag);
EXPECT_FALSE(visitor_.header_->version_flag);
EXPECT_EQ(kPacketNumber, visitor_.header_->packet_number);
@@ -6969,8 +6961,6 @@
return;
}
- // Client connection IDs cannot be used unless this flag is true.
- SetQuicRestartFlag(quic_do_not_override_connection_id, true);
SetQuicReloadableFlag(quic_version_negotiation_grease, true);
SetQuicFlag(FLAGS_quic_disable_version_negotiation_grease_randomness, true);
@@ -14269,14 +14259,6 @@
EXPECT_EQ("Invalid ConnectionId length.", framer_.detailed_error());
return;
}
- if (!GetQuicRestartFlag(quic_do_not_override_connection_id)) {
- // When the flag is disabled we expect processing to fail.
- EXPECT_FALSE(parse_success);
- EXPECT_EQ(QUIC_INVALID_PACKET_HEADER, framer_.error());
- EXPECT_EQ("Client connection ID not supported yet.",
- framer_.detailed_error());
- return;
- }
EXPECT_TRUE(parse_success);
EXPECT_EQ(QUIC_NO_ERROR, framer_.error());
EXPECT_EQ("", framer_.detailed_error());
@@ -14345,8 +14327,7 @@
EXPECT_EQ("Invalid ConnectionId length.", framer_.detailed_error());
return;
}
- if (!framer_.version().SupportsClientConnectionIds() &&
- GetQuicRestartFlag(quic_do_not_override_connection_id)) {
+ if (!framer_.version().SupportsClientConnectionIds()) {
EXPECT_FALSE(parse_success);
EXPECT_EQ(QUIC_INVALID_PACKET_HEADER, framer_.error());
EXPECT_EQ("Client connection ID not supported in this version.",
diff --git a/quic/core/quic_packet_creator.cc b/quic/core/quic_packet_creator.cc
index 27c913e..70d5ccb 100644
--- a/quic/core/quic_packet_creator.cc
+++ b/quic/core/quic_packet_creator.cc
@@ -762,10 +762,6 @@
}
QuicConnectionId QuicPacketCreator::GetDestinationConnectionId() const {
- if (!GetQuicRestartFlag(quic_do_not_override_connection_id)) {
- return server_connection_id_;
- }
- QUIC_RESTART_FLAG_COUNT_N(quic_do_not_override_connection_id, 1, 7);
if (framer_->perspective() == Perspective::IS_SERVER) {
return client_connection_id_;
}
@@ -773,10 +769,6 @@
}
QuicConnectionId QuicPacketCreator::GetSourceConnectionId() const {
- if (!GetQuicRestartFlag(quic_do_not_override_connection_id)) {
- return server_connection_id_;
- }
- QUIC_RESTART_FLAG_COUNT_N(quic_do_not_override_connection_id, 6, 7);
if (framer_->perspective() == Perspective::IS_CLIENT) {
return client_connection_id_;
}
@@ -785,16 +777,12 @@
QuicConnectionIdIncluded QuicPacketCreator::GetDestinationConnectionIdIncluded()
const {
- if (VersionHasIetfInvariantHeader(framer_->transport_version()) ||
- GetQuicRestartFlag(quic_do_not_override_connection_id)) {
- // In versions that do not support client connection IDs, the destination
- // connection ID is only sent from client to server.
- return (framer_->perspective() == Perspective::IS_CLIENT ||
- framer_->version().SupportsClientConnectionIds())
- ? CONNECTION_ID_PRESENT
- : CONNECTION_ID_ABSENT;
- }
- return server_connection_id_included_;
+ // In versions that do not support client connection IDs, the destination
+ // connection ID is only sent from client to server.
+ return (framer_->perspective() == Perspective::IS_CLIENT ||
+ framer_->version().SupportsClientConnectionIds())
+ ? CONNECTION_ID_PRESENT
+ : CONNECTION_ID_ABSENT;
}
QuicConnectionIdIncluded QuicPacketCreator::GetSourceConnectionIdIncluded()
@@ -807,9 +795,7 @@
framer_->version().SupportsClientConnectionIds())) {
return CONNECTION_ID_PRESENT;
}
- if (GetQuicRestartFlag(quic_do_not_override_connection_id) &&
- framer_->perspective() == Perspective::IS_SERVER) {
- QUIC_RESTART_FLAG_COUNT_N(quic_do_not_override_connection_id, 2, 7);
+ if (framer_->perspective() == Perspective::IS_SERVER) {
return server_connection_id_included_;
}
return CONNECTION_ID_ABSENT;
@@ -1069,8 +1055,6 @@
QuicConnectionId client_connection_id) {
DCHECK(client_connection_id.IsEmpty() ||
framer_->version().SupportsClientConnectionIds());
- DCHECK(client_connection_id.IsEmpty() ||
- GetQuicRestartFlag(quic_do_not_override_connection_id));
client_connection_id_ = client_connection_id;
}
diff --git a/quic/core/quic_packet_creator_test.cc b/quic/core/quic_packet_creator_test.cc
index bd49182..ff9960f 100644
--- a/quic/core/quic_packet_creator_test.cc
+++ b/quic/core/quic_packet_creator_test.cc
@@ -1926,17 +1926,11 @@
}
TEST_P(QuicPacketCreatorTest, GetConnectionId) {
- if (!GetQuicRestartFlag(quic_do_not_override_connection_id)) {
- EXPECT_EQ(TestConnectionId(2), creator_.GetDestinationConnectionId());
- EXPECT_EQ(TestConnectionId(2), creator_.GetSourceConnectionId());
- return;
- }
EXPECT_EQ(TestConnectionId(2), creator_.GetDestinationConnectionId());
EXPECT_EQ(EmptyQuicConnectionId(), creator_.GetSourceConnectionId());
}
TEST_P(QuicPacketCreatorTest, ClientConnectionId) {
- SetQuicRestartFlag(quic_do_not_override_connection_id, true);
if (!client_framer_.version().SupportsClientConnectionIds()) {
return;
}
diff --git a/quic/core/quic_packet_generator_test.cc b/quic/core/quic_packet_generator_test.cc
index cdb19b3..0e71e44 100644
--- a/quic/core/quic_packet_generator_test.cc
+++ b/quic/core/quic_packet_generator_test.cc
@@ -1475,7 +1475,6 @@
}
TEST_F(QuicPacketGeneratorTest, ConnectionId) {
- SetQuicRestartFlag(quic_do_not_override_connection_id, true);
generator_.SetServerConnectionId(TestConnectionId(0x1337));
EXPECT_EQ(TestConnectionId(0x1337), creator_->GetDestinationConnectionId());
EXPECT_EQ(EmptyQuicConnectionId(), creator_->GetSourceConnectionId());
diff --git a/quic/core/quic_packets.cc b/quic/core/quic_packets.cc
index 7d4769f..03b8420 100644
--- a/quic/core/quic_packets.cc
+++ b/quic/core/quic_packets.cc
@@ -21,8 +21,7 @@
QuicConnectionId GetServerConnectionIdAsRecipient(
const QuicPacketHeader& header,
Perspective perspective) {
- if (perspective == Perspective::IS_SERVER ||
- !GetQuicRestartFlag(quic_do_not_override_connection_id)) {
+ if (perspective == Perspective::IS_SERVER) {
return header.destination_connection_id;
}
return header.source_connection_id;
@@ -31,7 +30,6 @@
QuicConnectionId GetClientConnectionIdAsRecipient(
const QuicPacketHeader& header,
Perspective perspective) {
- DCHECK(GetQuicRestartFlag(quic_do_not_override_connection_id));
if (perspective == Perspective::IS_CLIENT) {
return header.destination_connection_id;
}
@@ -40,40 +38,33 @@
QuicConnectionId GetServerConnectionIdAsSender(const QuicPacketHeader& header,
Perspective perspective) {
- if (perspective == Perspective::IS_CLIENT ||
- !GetQuicRestartFlag(quic_do_not_override_connection_id)) {
+ if (perspective == Perspective::IS_CLIENT) {
return header.destination_connection_id;
}
- QUIC_RESTART_FLAG_COUNT_N(quic_do_not_override_connection_id, 3, 7);
return header.source_connection_id;
}
QuicConnectionIdIncluded GetServerConnectionIdIncludedAsSender(
const QuicPacketHeader& header,
Perspective perspective) {
- if (perspective == Perspective::IS_CLIENT ||
- !GetQuicRestartFlag(quic_do_not_override_connection_id)) {
+ if (perspective == Perspective::IS_CLIENT) {
return header.destination_connection_id_included;
}
- QUIC_RESTART_FLAG_COUNT_N(quic_do_not_override_connection_id, 4, 7);
return header.source_connection_id_included;
}
QuicConnectionId GetClientConnectionIdAsSender(const QuicPacketHeader& header,
Perspective perspective) {
- if (perspective == Perspective::IS_CLIENT ||
- !GetQuicRestartFlag(quic_do_not_override_connection_id)) {
+ if (perspective == Perspective::IS_CLIENT) {
return header.source_connection_id;
}
- QUIC_RESTART_FLAG_COUNT_N(quic_do_not_override_connection_id, 7, 7);
return header.destination_connection_id;
}
QuicConnectionIdIncluded GetClientConnectionIdIncludedAsSender(
const QuicPacketHeader& header,
Perspective perspective) {
- if (perspective == Perspective::IS_CLIENT ||
- !GetQuicRestartFlag(quic_do_not_override_connection_id)) {
+ if (perspective == Perspective::IS_CLIENT) {
return header.source_connection_id_included;
}
return header.destination_connection_id_included;
@@ -155,8 +146,6 @@
// Google QUIC versions <= 43 can only carry one connection ID.
DCHECK(destination_connection_id_length == 0 ||
source_connection_id_length == 0);
- DCHECK(source_connection_id_length == 0 ||
- GetQuicRestartFlag(quic_do_not_override_connection_id));
return kPublicFlagsSize + destination_connection_id_length +
source_connection_id_length +
(include_version ? kQuicVersionSize : 0) + packet_number_length +
diff --git a/quic/core/quic_packets_test.cc b/quic/core/quic_packets_test.cc
index be35d20..7ee7797 100644
--- a/quic/core/quic_packets_test.cc
+++ b/quic/core/quic_packets_test.cc
@@ -24,14 +24,6 @@
TEST_F(QuicPacketsTest, GetServerConnectionIdAsRecipient) {
QuicPacketHeader header = CreateFakePacketHeader();
- if (!GetQuicRestartFlag(quic_do_not_override_connection_id)) {
- EXPECT_EQ(TestConnectionId(1),
- GetServerConnectionIdAsRecipient(header, Perspective::IS_SERVER));
- EXPECT_EQ(TestConnectionId(1),
- GetServerConnectionIdAsRecipient(header, Perspective::IS_CLIENT));
- return;
- }
-
EXPECT_EQ(TestConnectionId(1),
GetServerConnectionIdAsRecipient(header, Perspective::IS_SERVER));
EXPECT_EQ(TestConnectionId(2),
@@ -40,14 +32,6 @@
TEST_F(QuicPacketsTest, GetServerConnectionIdAsSender) {
QuicPacketHeader header = CreateFakePacketHeader();
- if (!GetQuicRestartFlag(quic_do_not_override_connection_id)) {
- EXPECT_EQ(TestConnectionId(1),
- GetServerConnectionIdAsSender(header, Perspective::IS_SERVER));
- EXPECT_EQ(TestConnectionId(1),
- GetServerConnectionIdAsSender(header, Perspective::IS_CLIENT));
- return;
- }
-
EXPECT_EQ(TestConnectionId(2),
GetServerConnectionIdAsSender(header, Perspective::IS_SERVER));
EXPECT_EQ(TestConnectionId(1),
@@ -56,14 +40,6 @@
TEST_F(QuicPacketsTest, GetServerConnectionIdIncludedAsSender) {
QuicPacketHeader header = CreateFakePacketHeader();
- if (!GetQuicRestartFlag(quic_do_not_override_connection_id)) {
- EXPECT_EQ(CONNECTION_ID_PRESENT, GetServerConnectionIdIncludedAsSender(
- header, Perspective::IS_SERVER));
- EXPECT_EQ(CONNECTION_ID_PRESENT, GetServerConnectionIdIncludedAsSender(
- header, Perspective::IS_CLIENT));
- return;
- }
-
EXPECT_EQ(CONNECTION_ID_ABSENT, GetServerConnectionIdIncludedAsSender(
header, Perspective::IS_SERVER));
EXPECT_EQ(CONNECTION_ID_PRESENT, GetServerConnectionIdIncludedAsSender(
@@ -72,14 +48,6 @@
TEST_F(QuicPacketsTest, GetClientConnectionIdIncludedAsSender) {
QuicPacketHeader header = CreateFakePacketHeader();
- if (!GetQuicRestartFlag(quic_do_not_override_connection_id)) {
- EXPECT_EQ(CONNECTION_ID_ABSENT, GetClientConnectionIdIncludedAsSender(
- header, Perspective::IS_SERVER));
- EXPECT_EQ(CONNECTION_ID_ABSENT, GetClientConnectionIdIncludedAsSender(
- header, Perspective::IS_CLIENT));
- return;
- }
-
EXPECT_EQ(CONNECTION_ID_PRESENT, GetClientConnectionIdIncludedAsSender(
header, Perspective::IS_SERVER));
EXPECT_EQ(CONNECTION_ID_ABSENT, GetClientConnectionIdIncludedAsSender(
@@ -87,7 +55,6 @@
}
TEST_F(QuicPacketsTest, GetClientConnectionIdAsRecipient) {
- SetQuicRestartFlag(quic_do_not_override_connection_id, true);
QuicPacketHeader header = CreateFakePacketHeader();
EXPECT_EQ(TestConnectionId(2),
GetClientConnectionIdAsRecipient(header, Perspective::IS_SERVER));
@@ -97,14 +64,6 @@
TEST_F(QuicPacketsTest, GetClientConnectionIdAsSender) {
QuicPacketHeader header = CreateFakePacketHeader();
- if (!GetQuicRestartFlag(quic_do_not_override_connection_id)) {
- EXPECT_EQ(TestConnectionId(2),
- GetClientConnectionIdAsSender(header, Perspective::IS_SERVER));
- EXPECT_EQ(TestConnectionId(2),
- GetClientConnectionIdAsSender(header, Perspective::IS_CLIENT));
- return;
- }
-
EXPECT_EQ(TestConnectionId(1),
GetClientConnectionIdAsSender(header, Perspective::IS_SERVER));
EXPECT_EQ(TestConnectionId(2),
diff --git a/quic/core/quic_time_wait_list_manager_test.cc b/quic/core/quic_time_wait_list_manager_test.cc
index daa6431..4caae88 100644
--- a/quic/core/quic_time_wait_list_manager_test.cc
+++ b/quic/core/quic_time_wait_list_manager_test.cc
@@ -300,9 +300,6 @@
TEST_F(QuicTimeWaitListManagerTest,
SendIetfVersionNegotiationPacketWithClientConnectionId) {
- // Client connection IDs cannot be used unless this flag is true.
- SetQuicRestartFlag(quic_do_not_override_connection_id, true);
-
std::unique_ptr<QuicEncryptedPacket> packet(
QuicFramer::BuildVersionNegotiationPacket(
connection_id_, TestConnectionId(0x33), /*ietf_quic=*/true,
diff --git a/quic/core/quic_versions.cc b/quic/core/quic_versions.cc
index d08ab4d..29fc3fa 100644
--- a/quic/core/quic_versions.cc
+++ b/quic/core/quic_versions.cc
@@ -72,11 +72,6 @@
}
bool ParsedQuicVersion::SupportsClientConnectionIds() const {
- if (!GetQuicRestartFlag(quic_do_not_override_connection_id)) {
- // Do not enable this feature in a production version until this flag has
- // been deprecated.
- return false;
- }
return transport_version >= QUIC_VERSION_99;
}
@@ -479,7 +474,6 @@
SetQuicFlag(FLAGS_quic_supports_tls_handshake, true);
SetQuicReloadableFlag(quic_simplify_stop_waiting, true);
SetQuicReloadableFlag(quic_use_parse_public_header, true);
- SetQuicRestartFlag(quic_do_not_override_connection_id, true);
SetQuicRestartFlag(quic_use_allocated_connection_ids, true);
SetQuicRestartFlag(quic_dispatcher_hands_chlo_extractor_one_version, true);
}