gfe-relnote: Add QuicParsedVersion::HasHeaderProtection method. Currently unused; not flag protected. This change will enable landing code in chromium that is gated behind this version feature before cl/234202553 lands. PiperOrigin-RevId: 246190639 Change-Id: If5eb208dff74f37095649301c52bb6058caa194b
diff --git a/quic/core/quic_versions.cc b/quic/core/quic_versions.cc index a6d237e..8168a6a 100644 --- a/quic/core/quic_versions.cc +++ b/quic/core/quic_versions.cc
@@ -49,6 +49,10 @@ handshake_protocol == PROTOCOL_TLS1_3; } +bool ParsedQuicVersion::HasHeaderProtection() const { + return transport_version == QUIC_VERSION_99; +} + std::ostream& operator<<(std::ostream& os, const ParsedQuicVersion& version) { os << ParsedQuicVersionToString(version); return os;
diff --git a/quic/core/quic_versions.h b/quic/core/quic_versions.h index 8da7361..00bbb32 100644 --- a/quic/core/quic_versions.h +++ b/quic/core/quic_versions.h
@@ -151,6 +151,9 @@ // Indicates that this QUIC version does not have an enforced minimum value // for flow control values negotiated during the handshake. bool AllowsLowFlowControlLimits() const; + + // Returns whether header protection is used in this version of QUIC. + bool HasHeaderProtection() const; }; QUIC_EXPORT_PRIVATE ParsedQuicVersion UnsupportedQuicVersion();