Limit the amount of incoming crypto data that will be buffered.

gfe-relnote: protected by disabled flag-protected QUIC_VERSION_48
PiperOrigin-RevId: 266019141
Change-Id: Ife996bdf80a28b3bcce4b02cda49bff0fd23a071
diff --git a/quic/core/tls_handshaker.h b/quic/core/tls_handshaker.h
index b4f16e8..7d5b9bc 100644
--- a/quic/core/tls_handshaker.h
+++ b/quic/core/tls_handshaker.h
@@ -50,6 +50,7 @@
   virtual const QuicCryptoNegotiatedParameters& crypto_negotiated_params()
       const = 0;
   virtual CryptoMessageParser* crypto_message_parser() { return this; }
+  size_t BufferSizeLimitForLevel(EncryptionLevel level) const;
 
  protected:
   virtual void AdvanceHandshake() = 0;
@@ -65,9 +66,9 @@
   std::unique_ptr<QuicDecrypter> CreateDecrypter(
       const std::vector<uint8_t>& pp_secret);
 
-  virtual TlsConnection* tls_connection() = 0;
+  virtual const TlsConnection* tls_connection() const = 0;
 
-  SSL* ssl() { return tls_connection()->ssl(); }
+  SSL* ssl() const { return tls_connection()->ssl(); }
 
   QuicCryptoStream* stream() { return stream_; }
   QuicSession* session() { return session_; }