Split QUIC session type to two: SECURE_SPDY4_OVER_QUIC only for QUIC crypto, and QUIC_WITH_TLS1_3 for QUIC with TLS.

gfe-relnote: n/a (test only change)
PiperOrigin-RevId: 303143429
Change-Id: If3e297091c110011a6f094fa0f949137c70605ea
diff --git a/quic/core/quic_versions.cc b/quic/core/quic_versions.cc
index b5fc585..6dc67d9 100644
--- a/quic/core/quic_versions.cc
+++ b/quic/core/quic_versions.cc
@@ -251,6 +251,17 @@
   return versions;
 }
 
+ParsedQuicVersionVector CurrentSupportedVersionsWithTls() {
+  ParsedQuicVersionVector versions;
+  for (const ParsedQuicVersion& version : CurrentSupportedVersions()) {
+    if (version.handshake_protocol == PROTOCOL_TLS1_3) {
+      versions.push_back(version);
+    }
+  }
+  QUIC_BUG_IF(versions.empty()) << "No version with TLS handshake found.";
+  return versions;
+}
+
 ParsedQuicVersion ParseQuicVersionLabel(QuicVersionLabel version_label) {
   for (const ParsedQuicVersion& version : AllSupportedVersions()) {
     if (version_label == CreateQuicVersionLabel(version)) {
diff --git a/quic/core/quic_versions.h b/quic/core/quic_versions.h
index 8739326..7850b41 100644
--- a/quic/core/quic_versions.h
+++ b/quic/core/quic_versions.h
@@ -392,11 +392,13 @@
 
 // Returns a subset of CurrentSupportedVersions() with
 // handshake_protocol == PROTOCOL_QUIC_CRYPTO, in the same order.
-// Deprecated; only to be used in components that do not yet support
-// PROTOCOL_TLS1_3.
 QUIC_EXPORT_PRIVATE ParsedQuicVersionVector
 CurrentSupportedVersionsWithQuicCrypto();
 
+// Returns a subset of CurrentSupportedVersions() with handshake_protocol ==
+// PROTOCOL_TLS1_3.
+QUIC_EXPORT_PRIVATE ParsedQuicVersionVector CurrentSupportedVersionsWithTls();
+
 // Returns QUIC version of |index| in result of |versions|. Returns
 // QUIC_VERSION_UNSUPPORTED if |index| is out of bounds.
 QUIC_EXPORT_PRIVATE QuicTransportVersionVector