Make ALPN an array in QuicBufferedPacketStore
This is required to support QUIC+TLS where
ALPN is encoded as a list instead of a
single value.
gfe-relnote: refactor, no behavior change, not flag protected
PiperOrigin-RevId: 307922725
Change-Id: I08bbb0dc6db9264d17a64f569cf459ca590787c9
diff --git a/quic/core/quic_version_manager.h b/quic/core/quic_version_manager.h
index 381cef4..c5111ed 100644
--- a/quic/core/quic_version_manager.h
+++ b/quic/core/quic_version_manager.h
@@ -29,6 +29,10 @@
// Returns currently supported versions using QUIC crypto.
const ParsedQuicVersionVector& GetSupportedVersionsWithQuicCrypto();
+ // Returns the list of supported ALPNs, based on the current supported
+ // versions and any custom additions by subclasses.
+ const std::vector<std::string>& GetSupportedAlpns();
+
protected:
// If the value of any reloadable flag is different from the cached value,
// re-filter |filtered_supported_versions_| and update the cached flag values.
@@ -42,6 +46,10 @@
return filtered_transport_versions_;
}
+ // Mechanism for subclasses to add custom ALPNs to the supported list.
+ // Should be called in constructor and RefilterSupportedVersions.
+ void AddCustomAlpn(const std::string& alpn);
+
private:
// Cached value of reloadable flags.
// quic_enable_version_draft_27 flag
@@ -72,6 +80,9 @@
// |filtered_supported_versions_|. No guarantees are made that the same
// transport version isn't repeated.
QuicTransportVersionVector filtered_transport_versions_;
+ // Contains the list of ALPNs corresponding to filtered_supported_versions_
+ // with custom ALPNs added.
+ std::vector<std::string> filtered_supported_alpns_;
};
} // namespace quic