Deprecate gfe2_reloadable_flag_quic_do_not_clip_received_error_code.
PiperOrigin-RevId: 353712711
Change-Id: I6a52cc91c0fe0c0dffbccbbb5445048237aeaf62
diff --git a/quic/core/quic_flags_list.h b/quic/core/quic_flags_list.h
index 4e7f805..095b7b6 100644
--- a/quic/core/quic_flags_list.h
+++ b/quic/core/quic_flags_list.h
@@ -35,7 +35,6 @@
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_disable_version_q050, false)
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_disable_version_t051, false)
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_discard_initial_packet_with_key_dropped, true)
-QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_do_not_clip_received_error_code, true)
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_donot_reset_ideal_next_packet_send_time, false)
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_dont_defer_sending, false)
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_enable_alps_client, true)
diff --git a/quic/core/quic_framer.cc b/quic/core/quic_framer.cc
index 6015249..af85f12 100644
--- a/quic/core/quic_framer.cc
+++ b/quic/core/quic_framer.cc
@@ -4085,15 +4085,6 @@
return false;
}
- if (GetQuicReloadableFlag(quic_do_not_clip_received_error_code)) {
- QUIC_CODE_COUNT_N(quic_do_not_clip_received_error_code, 1, 2);
- } else {
- if (error_code >= QUIC_LAST_ERROR) {
- // Ignore invalid QUIC error code if any.
- error_code = QUIC_LAST_ERROR;
- }
- }
-
// For Google QUIC connection closes, |wire_error_code| and |quic_error_code|
// must have the same value.
frame->wire_error_code = error_code;
@@ -4117,14 +4108,6 @@
return false;
}
- if (GetQuicReloadableFlag(quic_do_not_clip_received_error_code)) {
- QUIC_CODE_COUNT_N(quic_do_not_clip_received_error_code, 2, 2);
- } else {
- if (error_code >= QUIC_LAST_ERROR) {
- // Ignore invalid QUIC error code if any.
- error_code = QUIC_LAST_ERROR;
- }
- }
frame->error_code = static_cast<QuicErrorCode>(error_code);
uint32_t stream_id;
diff --git a/quic/core/quic_framer_test.cc b/quic/core/quic_framer_test.cc
index 218d9a9..4859ad6 100644
--- a/quic/core/quic_framer_test.cc
+++ b/quic/core/quic_framer_test.cc
@@ -4605,15 +4605,8 @@
} else {
// For Google QUIC frame, |quic_error_code| and |wire_error_code| has the
// same value.
- if (GetQuicReloadableFlag(quic_do_not_clip_received_error_code)) {
- EXPECT_EQ(0xC0DEu, visitor_.connection_close_frame_.wire_error_code);
- EXPECT_EQ(0xC0DEu, visitor_.connection_close_frame_.quic_error_code);
- } else {
- EXPECT_EQ(QUIC_LAST_ERROR,
- visitor_.connection_close_frame_.wire_error_code);
- EXPECT_EQ(QUIC_LAST_ERROR,
- visitor_.connection_close_frame_.quic_error_code);
- }
+ EXPECT_EQ(0xC0DEu, visitor_.connection_close_frame_.wire_error_code);
+ EXPECT_EQ(0xC0DEu, visitor_.connection_close_frame_.quic_error_code);
}
ASSERT_EQ(0u, visitor_.ack_frames_.size());
@@ -5053,11 +5046,7 @@
PACKET_8BYTE_CONNECTION_ID, PACKET_0BYTE_CONNECTION_ID));
EXPECT_EQ(kStreamId, visitor_.goaway_frame_.last_good_stream_id);
- if (GetQuicReloadableFlag(quic_do_not_clip_received_error_code)) {
- EXPECT_EQ(0xC0DE, visitor_.goaway_frame_.error_code);
- } else {
- EXPECT_EQ(QUIC_LAST_ERROR, visitor_.goaway_frame_.error_code);
- }
+ EXPECT_EQ(0xC0DE, visitor_.goaway_frame_.error_code);
EXPECT_EQ("because I can", visitor_.goaway_frame_.reason_phrase);
CheckFramingBoundaries(fragments, QUIC_INVALID_GOAWAY_DATA);