Support session-specific ALPNs for clients, and specifying multiple ALPNs.

gfe-relnote: n/a (no functional change)
PiperOrigin-RevId: 266192245
Change-Id: Id0921d36b2c32c7df92a4a528ec19d9a28b826b0
diff --git a/quic/core/tls_client_handshaker.h b/quic/core/tls_client_handshaker.h
index 47faf81..f3e90ce 100644
--- a/quic/core/tls_client_handshaker.h
+++ b/quic/core/tls_client_handshaker.h
@@ -54,6 +54,8 @@
   CryptoMessageParser* crypto_message_parser() override;
   size_t BufferSizeLimitForLevel(EncryptionLevel level) const override;
 
+  void AllowEmptyAlpnForTests() { allow_empty_alpn_for_tests_ = true; }
+
  protected:
   const TlsConnection* tls_connection() const override {
     return &tls_connection_;
@@ -95,6 +97,7 @@
     STATE_CONNECTION_CLOSED,
   } state_ = STATE_IDLE;
 
+  bool SetAlpn();
   bool SetTransportParameters();
   bool ProcessTransportParameters(std::string* error_details);
   void FinishHandshake();
@@ -121,13 +124,11 @@
   QuicReferenceCountedPointer<QuicCryptoNegotiatedParameters>
       crypto_negotiated_params_;
 
+  bool allow_empty_alpn_for_tests_ = false;
+
   TlsClientConnection tls_connection_;
 };
 
-// Allows tests to override the ALPN used by clients.
-// DO NOT use outside of tests.
-QUIC_EXPORT_PRIVATE extern std::string* quic_alpn_override_on_client_for_tests;
-
 }  // namespace quic
 
 #endif  // QUICHE_QUIC_CORE_TLS_CLIENT_HANDSHAKER_H_