Refine QuicSpdyStream::UsesPendingStreams() behavior.
This is so that VersionHasStreamType(), which is an HTTP/3 concept, can be
removed from QuicStream, which lives in the transport layer.
gfe-relnote: n/a, no functional change.
PiperOrigin-RevId: 254379801
Change-Id: I6634dc77e85673166628b5912788cc8a41db2b57
diff --git a/quic/core/http/quic_spdy_session.cc b/quic/core/http/quic_spdy_session.cc
index b4849ab..55ceb2a 100644
--- a/quic/core/http/quic_spdy_session.cc
+++ b/quic/core/http/quic_spdy_session.cc
@@ -577,8 +577,10 @@
}
bool QuicSpdySession::UsesPendingStreams() const {
- DCHECK(VersionHasStreamType(connection()->transport_version()));
- return true;
+ // QuicSpdySession supports PendingStreams, therefore this method should
+ // eventually just return true. However, pending streams can only be used if
+ // unidirectional stream type is supported.
+ return VersionHasStreamType(connection()->transport_version());
}
size_t QuicSpdySession::WriteHeadersOnHeadersStreamImpl(