For IETF QUIC, Initialize bidirectional stream limit to 0, and unidirectional stream limit to the expected number of streams.

Having non-zero initial limit for unidirectional stream allows QuicSpdySession to locally create HTTP/3 stream objects early.

gfe-relnote: protected by disabled v99 flag.
PiperOrigin-RevId: 291276326
Change-Id: Ic74425c1a12bd399c15294db698c751d58c55a9f
diff --git a/quic/core/quic_session.cc b/quic/core/quic_session.cc
index 74931ad..e3dbf73 100644
--- a/quic/core/quic_session.cc
+++ b/quic/core/quic_session.cc
@@ -68,8 +68,8 @@
       v99_streamid_manager_(perspective(),
                             connection->version(),
                             this,
-                            kDefaultMaxStreamsPerConnection,
-                            kDefaultMaxStreamsPerConnection,
+                            0,
+                            num_expected_unidirectional_static_streams,
                             config_.GetMaxBidirectionalStreamsToSend(),
                             config_.GetMaxUnidirectionalStreamsToSend()),
       num_dynamic_incoming_streams_(0),
diff --git a/quic/core/quic_session_test.cc b/quic/core/quic_session_test.cc
index d4bddf2..23cd87b 100644
--- a/quic/core/quic_session_test.cc
+++ b/quic/core/quic_session_test.cc
@@ -2926,6 +2926,7 @@
   }
   // Create a stream before negotiating the config and verify it starts off
   // blocked.
+  QuicSessionPeer::SetMaxOpenOutgoingBidirectionalStreams(&session_, 10);
   TestStream* stream2 = session_.CreateOutgoingBidirectionalStream();
   EXPECT_TRUE(stream2->flow_controller()->IsBlocked());
   EXPECT_TRUE(session_.IsConnectionFlowControlBlocked());
diff --git a/quic/core/quic_versions.h b/quic/core/quic_versions.h
index 606afc3..37dc5cd 100644
--- a/quic/core/quic_versions.h
+++ b/quic/core/quic_versions.h
@@ -477,7 +477,7 @@
 // * GOAWAY is moved to HTTP layer.
 QUIC_EXPORT_PRIVATE constexpr bool VersionUsesHttp3(
     QuicTransportVersion transport_version) {
-  return transport_version == QUIC_VERSION_99;
+  return transport_version >= QUIC_VERSION_99;
 }
 
 // Returns whether the transport_version supports the variable length integer