Deprecate gfe2_reloadable_flag_quic_stop_sending_uses_ietf_error_code. PiperOrigin-RevId: 344050163 Change-Id: I128f0525eff7deed8278ccbdceb77126b5284e5e
diff --git a/quic/core/frames/quic_stop_sending_frame.cc b/quic/core/frames/quic_stop_sending_frame.cc index 20281e5..256210f 100644 --- a/quic/core/frames/quic_stop_sending_frame.cc +++ b/quic/core/frames/quic_stop_sending_frame.cc
@@ -13,13 +13,7 @@ stream_id(stream_id), error_code(error_code), ietf_error_code( - GetQuicReloadableFlag(quic_stop_sending_uses_ietf_error_code) - ? RstStreamErrorCodeToIetfResetStreamErrorCode(error_code) - : static_cast<uint64_t>(error_code)) { - if (GetQuicReloadableFlag(quic_stop_sending_uses_ietf_error_code)) { - QUIC_RELOADABLE_FLAG_COUNT_N(quic_stop_sending_uses_ietf_error_code, 1, 2); - } -} + RstStreamErrorCodeToIetfResetStreamErrorCode(error_code)) {} std::ostream& operator<<(std::ostream& os, const QuicStopSendingFrame& frame) { os << "{ control_frame_id: " << frame.control_frame_id
diff --git a/quic/core/http/quic_spdy_session.cc b/quic/core/http/quic_spdy_session.cc index 438352a..af11a1f 100644 --- a/quic/core/http/quic_spdy_session.cc +++ b/quic/core/http/quic_spdy_session.cc
@@ -1320,13 +1320,7 @@ return true; } default: - if (GetQuicReloadableFlag(quic_stop_sending_uses_ietf_error_code)) { - SendStopSending(QUIC_STREAM_STREAM_CREATION_ERROR, pending->id()); - } else { - SendStopSending(static_cast<QuicRstStreamErrorCode>( - QuicHttp3ErrorCode::STREAM_CREATION_ERROR), - pending->id()); - } + SendStopSending(QUIC_STREAM_STREAM_CREATION_ERROR, pending->id()); pending->StopReading(); } return false;
diff --git a/quic/core/http/quic_spdy_session_test.cc b/quic/core/http/quic_spdy_session_test.cc index d1e271c..3b8db73 100644 --- a/quic/core/http/quic_spdy_session_test.cc +++ b/quic/core/http/quic_spdy_session_test.cc
@@ -2335,12 +2335,8 @@ QuicStopSendingFrame* stop_sending = frame.stop_sending_frame; EXPECT_EQ(stream_id, stop_sending->stream_id); - EXPECT_EQ( - GetQuicReloadableFlag(quic_stop_sending_uses_ietf_error_code) - ? QUIC_STREAM_STREAM_CREATION_ERROR - : static_cast<QuicRstStreamErrorCode>( - QuicHttp3ErrorCode::STREAM_CREATION_ERROR), - stop_sending->error_code); + EXPECT_EQ(QUIC_STREAM_STREAM_CREATION_ERROR, + stop_sending->error_code); EXPECT_EQ( static_cast<uint64_t>(QuicHttp3ErrorCode::STREAM_CREATION_ERROR), stop_sending->ietf_error_code);
diff --git a/quic/core/quic_flags_list.h b/quic/core/quic_flags_list.h index ae001f7..4ddf2d8 100644 --- a/quic/core/quic_flags_list.h +++ b/quic/core/quic_flags_list.h
@@ -69,7 +69,6 @@ QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_single_ack_in_packet, false) QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_split_up_send_rst_2, true) QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_start_peer_migration_earlier, false) -QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_stop_sending_uses_ietf_error_code, true) QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_testonly_default_false, false) QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_testonly_default_true, true) QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_tls_use_early_select_cert, false)
diff --git a/quic/core/quic_framer.cc b/quic/core/quic_framer.cc index 90f4370..98c0dd7 100644 --- a/quic/core/quic_framer.cc +++ b/quic/core/quic_framer.cc
@@ -6075,24 +6075,8 @@ return false; } - if (GetQuicReloadableFlag(quic_stop_sending_uses_ietf_error_code)) { - QUIC_RELOADABLE_FLAG_COUNT_N(quic_stop_sending_uses_ietf_error_code, 2, 2); - stop_sending_frame->error_code = - IetfResetStreamErrorCodeToRstStreamErrorCode( - stop_sending_frame->ietf_error_code); - return true; - } - - // TODO(fkastenholz): when error codes go to uint64_t, remove this. - if (stop_sending_frame->ietf_error_code > 0xffff) { - stop_sending_frame->error_code = - static_cast<QuicRstStreamErrorCode>(0xffff); - QUIC_DLOG(ERROR) << "Stop sending error code (" - << stop_sending_frame->ietf_error_code << ") > 0xffff"; - } else { - stop_sending_frame->error_code = static_cast<QuicRstStreamErrorCode>( - stop_sending_frame->ietf_error_code); - } + stop_sending_frame->error_code = IetfResetStreamErrorCodeToRstStreamErrorCode( + stop_sending_frame->ietf_error_code); return true; }
diff --git a/quic/core/quic_framer_test.cc b/quic/core/quic_framer_test.cc index ba9a70e..da6cd5a 100644 --- a/quic/core/quic_framer_test.cc +++ b/quic/core/quic_framer_test.cc
@@ -11235,12 +11235,8 @@ PACKET_8BYTE_CONNECTION_ID, PACKET_0BYTE_CONNECTION_ID)); EXPECT_EQ(kStreamId, visitor_.stop_sending_frame_.stream_id); - if (GetQuicReloadableFlag(quic_stop_sending_uses_ietf_error_code)) { - EXPECT_EQ(QUIC_STREAM_UNKNOWN_APPLICATION_ERROR_CODE, - visitor_.stop_sending_frame_.error_code); - } else { - EXPECT_EQ(0x7654, visitor_.stop_sending_frame_.error_code); - } + EXPECT_EQ(QUIC_STREAM_UNKNOWN_APPLICATION_ERROR_CODE, + visitor_.stop_sending_frame_.error_code); EXPECT_EQ(static_cast<uint64_t>(0x7654), visitor_.stop_sending_frame_.ietf_error_code);