Deprecate gfe2_reloadable_flag_quic_new_priority_update_frame.
PiperOrigin-RevId: 353724108
Change-Id: Ib3bb31ee85df93689530c996b2ca62dd37fec095
diff --git a/quic/core/http/http_decoder.cc b/quic/core/http/http_decoder.cc
index a7df361..1aee09c 100644
--- a/quic/core/http/http_decoder.cc
+++ b/quic/core/http/http_decoder.cc
@@ -235,14 +235,7 @@
continue_processing = visitor_->OnPriorityUpdateFrameStart(header_length);
break;
case static_cast<uint64_t>(HttpFrameType::PRIORITY_UPDATE_REQUEST_STREAM):
- if (GetQuicReloadableFlag(quic_new_priority_update_frame)) {
- QUIC_CODE_COUNT_N(quic_new_priority_update_frame, 2, 2);
- continue_processing =
- visitor_->OnPriorityUpdateFrameStart(header_length);
- } else {
- continue_processing = visitor_->OnUnknownFrameStart(
- current_frame_type_, header_length, current_frame_length_);
- }
+ continue_processing = visitor_->OnPriorityUpdateFrameStart(header_length);
break;
case static_cast<uint64_t>(HttpFrameType::ACCEPT_CH):
if (GetQuicReloadableFlag(quic_parse_accept_ch_frame)) {
@@ -382,13 +375,9 @@
break;
}
case static_cast<uint64_t>(HttpFrameType::PRIORITY_UPDATE_REQUEST_STREAM): {
- if (GetQuicReloadableFlag(quic_new_priority_update_frame)) {
- // TODO(bnc): Avoid buffering if the entire frame is present, and
- // instead parse directly out of |reader|.
- BufferFramePayload(reader);
- } else {
- continue_processing = HandleUnknownFramePayload(reader);
- }
+ // TODO(bnc): Avoid buffering if the entire frame is present, and
+ // instead parse directly out of |reader|.
+ BufferFramePayload(reader);
break;
}
case static_cast<uint64_t>(HttpFrameType::ACCEPT_CH): {
@@ -499,18 +488,14 @@
break;
}
case static_cast<uint64_t>(HttpFrameType::PRIORITY_UPDATE_REQUEST_STREAM): {
- if (GetQuicReloadableFlag(quic_new_priority_update_frame)) {
- // TODO(bnc): Avoid buffering if the entire frame is present, and
- // instead parse directly out of |reader|.
- PriorityUpdateFrame frame;
- QuicDataReader reader(buffer_.data(), current_frame_length_);
- if (!ParseNewPriorityUpdateFrame(&reader, &frame)) {
- return false;
- }
- continue_processing = visitor_->OnPriorityUpdateFrame(frame);
- } else {
- continue_processing = visitor_->OnUnknownFrameEnd();
+ // TODO(bnc): Avoid buffering if the entire frame is present, and
+ // instead parse directly out of |reader|.
+ PriorityUpdateFrame frame;
+ QuicDataReader reader(buffer_.data(), current_frame_length_);
+ if (!ParseNewPriorityUpdateFrame(&reader, &frame)) {
+ return false;
}
+ continue_processing = visitor_->OnPriorityUpdateFrame(frame);
break;
}
case static_cast<uint64_t>(HttpFrameType::ACCEPT_CH): {
diff --git a/quic/core/http/http_decoder_test.cc b/quic/core/http/http_decoder_test.cc
index 68963a7..791d43c 100644
--- a/quic/core/http/http_decoder_test.cc
+++ b/quic/core/http/http_decoder_test.cc
@@ -1048,10 +1048,6 @@
}
TEST_F(HttpDecoderTest, NewPriorityUpdateFrame) {
- if (!GetQuicReloadableFlag(quic_new_priority_update_frame)) {
- return;
- }
-
InSequence s;
std::string input1 = absl::HexStringToBytes(
"800f0700" // type (PRIORITY_UPDATE)
@@ -1168,10 +1164,6 @@
}
TEST_F(HttpDecoderTest, CorruptNewPriorityUpdateFrame) {
- if (!GetQuicReloadableFlag(quic_new_priority_update_frame)) {
- return;
- }
-
std::string payload =
absl::HexStringToBytes("4005"); // prioritized element id
struct {
diff --git a/quic/core/http/http_encoder.cc b/quic/core/http/http_encoder.cc
index 50717fd..573bfad 100644
--- a/quic/core/http/http_encoder.cc
+++ b/quic/core/http/http_encoder.cc
@@ -204,50 +204,23 @@
QuicByteCount HttpEncoder::SerializePriorityUpdateFrame(
const PriorityUpdateFrame& priority_update,
std::unique_ptr<char[]>* output) {
- if (GetQuicReloadableFlag(quic_new_priority_update_frame)) {
- QUIC_CODE_COUNT_N(quic_new_priority_update_frame, 1, 2);
-
- if (priority_update.prioritized_element_type != REQUEST_STREAM) {
- QUIC_BUG << "PRIORITY_UPDATE for push streams not implemented";
- return 0;
- }
-
- QuicByteCount payload_length =
- QuicDataWriter::GetVarInt62Len(priority_update.prioritized_element_id) +
- priority_update.priority_field_value.size();
- QuicByteCount total_length = GetTotalLength(
- payload_length, HttpFrameType::PRIORITY_UPDATE_REQUEST_STREAM);
-
- output->reset(new char[total_length]);
- QuicDataWriter writer(total_length, output->get());
-
- if (WriteFrameHeader(payload_length,
- HttpFrameType::PRIORITY_UPDATE_REQUEST_STREAM,
- &writer) &&
- writer.WriteVarInt62(priority_update.prioritized_element_id) &&
- writer.WriteBytes(priority_update.priority_field_value.data(),
- priority_update.priority_field_value.size())) {
- return total_length;
- }
-
- QUIC_DLOG(ERROR) << "Http encoder failed when attempting to serialize "
- "PRIORITY_UPDATE frame.";
+ if (priority_update.prioritized_element_type != REQUEST_STREAM) {
+ QUIC_BUG << "PRIORITY_UPDATE for push streams not implemented";
return 0;
}
QuicByteCount payload_length =
- kPriorityFirstByteLength +
QuicDataWriter::GetVarInt62Len(priority_update.prioritized_element_id) +
priority_update.priority_field_value.size();
- QuicByteCount total_length =
- GetTotalLength(payload_length, HttpFrameType::PRIORITY_UPDATE);
+ QuicByteCount total_length = GetTotalLength(
+ payload_length, HttpFrameType::PRIORITY_UPDATE_REQUEST_STREAM);
output->reset(new char[total_length]);
QuicDataWriter writer(total_length, output->get());
- if (WriteFrameHeader(payload_length, HttpFrameType::PRIORITY_UPDATE,
+ if (WriteFrameHeader(payload_length,
+ HttpFrameType::PRIORITY_UPDATE_REQUEST_STREAM,
&writer) &&
- writer.WriteUInt8(priority_update.prioritized_element_type) &&
writer.WriteVarInt62(priority_update.prioritized_element_id) &&
writer.WriteBytes(priority_update.priority_field_value.data(),
priority_update.priority_field_value.size())) {
diff --git a/quic/core/http/http_encoder_test.cc b/quic/core/http/http_encoder_test.cc
index 46b2a9f..ad25cc4 100644
--- a/quic/core/http/http_encoder_test.cc
+++ b/quic/core/http/http_encoder_test.cc
@@ -134,31 +134,12 @@
}
TEST(HttpEncoderTest, SerializePriorityUpdateFrame) {
- if (GetQuicReloadableFlag(quic_new_priority_update_frame)) {
- PriorityUpdateFrame priority_update1;
- priority_update1.prioritized_element_type = REQUEST_STREAM;
- priority_update1.prioritized_element_id = 0x03;
- char output1[] = {0x80, 0x0f, 0x07, 0x00, // type (PRIORITY_UPDATE)
- 0x01, // length
- 0x03}; // prioritized element id
-
- std::unique_ptr<char[]> buffer;
- uint64_t length =
- HttpEncoder::SerializePriorityUpdateFrame(priority_update1, &buffer);
- EXPECT_EQ(ABSL_ARRAYSIZE(output1), length);
- quiche::test::CompareCharArraysWithHexError("PRIORITY_UPDATE", buffer.get(),
- length, output1,
- ABSL_ARRAYSIZE(output1));
- return;
- }
-
PriorityUpdateFrame priority_update1;
priority_update1.prioritized_element_type = REQUEST_STREAM;
priority_update1.prioritized_element_id = 0x03;
- char output1[] = {0x0f, // type (PRIORITY_UPDATE)
- 0x02, // length
- 0x00, // prioritized element type: REQUEST_STREAM
- 0x03}; // prioritized element id
+ char output1[] = {0x80, 0x0f, 0x07, 0x00, // type (PRIORITY_UPDATE)
+ 0x01, // length
+ 0x03}; // prioritized element id
std::unique_ptr<char[]> buffer;
uint64_t length =
@@ -167,21 +148,6 @@
quiche::test::CompareCharArraysWithHexError("PRIORITY_UPDATE", buffer.get(),
length, output1,
ABSL_ARRAYSIZE(output1));
-
- PriorityUpdateFrame priority_update2;
- priority_update2.prioritized_element_type = PUSH_STREAM;
- priority_update2.prioritized_element_id = 0x05;
- priority_update2.priority_field_value = "foo";
- char output2[] = {0x0f, // type (PRIORIRTY)
- 0x05, // length
- 0x80, // prioritized element type: PUSH_STREAM
- 0x05, // prioritized element id
- 'f', 'o', 'o'}; // priority field value
- length = HttpEncoder::SerializePriorityUpdateFrame(priority_update2, &buffer);
- EXPECT_EQ(ABSL_ARRAYSIZE(output2), length);
- quiche::test::CompareCharArraysWithHexError("PRIORITY_UPDATE", buffer.get(),
- length, output2,
- ABSL_ARRAYSIZE(output2));
}
TEST(HttpEncoderTest, SerializeAcceptChFrame) {
diff --git a/quic/core/quic_flags_list.h b/quic/core/quic_flags_list.h
index 095b7b6..81df1e4 100644
--- a/quic/core/quic_flags_list.h
+++ b/quic/core/quic_flags_list.h
@@ -48,7 +48,6 @@
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_fix_willing_and_able_to_write2, true)
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_goaway_with_max_stream_id, true)
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_granular_qpack_error_codes, true)
-QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_new_priority_update_frame, true)
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_parse_accept_ch_frame, true)
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_pass_path_response_to_validator, false)
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_require_handshake_confirmation, false)