Ignore incoming HTTP/3 MAX_PUSH_ID frames.

Do not call Http3DebugVisitor::OnMaxPushIdFrameReceived().  This is not
implemented in the server, and is always an error in Chrome (because a server is
not allowed to send such a frame), and therefore will be visible in Chrome's
NetLog when the stream is reset.

Do not call QuicSpdySession::OnMaxPushIdFrame().  This removes the enforcement
on the values in successive MAX_PUSH_ID frames, but will allow us to remove some
complexity from QuicSpdySession when the flag is deprecated.

The enforcement on frame types (MAX_PUSH_ID is not allowed on any stream other
than the control stream, it cannot be sent by the server, it cannot be the first
frame on the control stream) is still in place.

PiperOrigin-RevId: 431034537
diff --git a/quic/core/http/quic_receive_control_stream.cc b/quic/core/http/quic_receive_control_stream.cc
index 3c6546f..456d847 100644
--- a/quic/core/http/quic_receive_control_stream.cc
+++ b/quic/core/http/quic_receive_control_stream.cc
@@ -65,6 +65,11 @@
 }
 
 bool QuicReceiveControlStream::OnMaxPushIdFrame(const MaxPushIdFrame& frame) {
+  if (GetQuicReloadableFlag(quic_ignore_max_push_id)) {
+    QUIC_RELOADABLE_FLAG_COUNT(quic_ignore_max_push_id);
+    return ValidateFrameType(HttpFrameType::MAX_PUSH_ID);
+  }
+
   if (spdy_session()->debug_visitor()) {
     spdy_session()->debug_visitor()->OnMaxPushIdFrameReceived(frame);
   }
diff --git a/quic/core/http/quic_spdy_session_test.cc b/quic/core/http/quic_spdy_session_test.cc
index b91292d..311cf1f 100644
--- a/quic/core/http/quic_spdy_session_test.cc
+++ b/quic/core/http/quic_spdy_session_test.cc
@@ -1823,6 +1823,10 @@
 
 // TODO(b/171463363): Remove.
 TEST_P(QuicSpdySessionTestServer, ReduceMaxPushId) {
+  if (GetQuicReloadableFlag(quic_ignore_max_push_id)) {
+    return;
+  }
+
   if (!VersionUsesHttp3(transport_version())) {
     return;
   }
diff --git a/quic/core/quic_flags_list.h b/quic/core/quic_flags_list.h
index 43a7b23..88f7957 100644
--- a/quic/core/quic_flags_list.h
+++ b/quic/core/quic_flags_list.h
@@ -75,6 +75,8 @@
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_flush_pending_frames_and_padding_bytes_on_migration, true)
 // If true, ietf connection migration is no longer conditioned on connection option RVCM.
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_remove_connection_migration_connection_option, false)
+// If true, ignore incoming MAX_PUSH_ID frames (expect for enforcing frame type rules).
+QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_ignore_max_push_id, false)
 // If true, include stream information in idle timeout connection close detail.
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_add_stream_info_to_idle_close_detail, true)
 // If true, pass the received PATH_RESPONSE payload to path validator to move forward the path validation.