Refactor TlsHandshaker interactions with the session's config

Before this CL, both TlsClientHandshaker and TlsServerHandshaker used to access session->config() directly to read and write transport parameters. This CL refactors this to go through the handshaker delegate, which is implemented by the session. This goes towards our goal of removing the session from the handshakers, but also is needed to allow the session to make some modifications to the transport parameters - that will happen in a subsequent CL aimed at supporting the draft-28 transport parameters.

Refactor, no behavior change, not flag protected

PiperOrigin-RevId: 313495203
Change-Id: I2d8acf8887c40de6be284395a57948dbc1cadc66
diff --git a/quic/core/handshaker_delegate_interface.h b/quic/core/handshaker_delegate_interface.h
index c157e08..bfc8761 100644
--- a/quic/core/handshaker_delegate_interface.h
+++ b/quic/core/handshaker_delegate_interface.h
@@ -5,6 +5,7 @@
 #ifndef QUICHE_QUIC_CORE_HANDSHAKER_DELEGATE_INTERFACE_H_
 #define QUICHE_QUIC_CORE_HANDSHAKER_DELEGATE_INTERFACE_H_
 
+#include "net/third_party/quiche/src/quic/core/crypto/transport_parameters.h"
 #include "net/third_party/quiche/src/quic/core/quic_types.h"
 
 namespace quic {
@@ -58,6 +59,18 @@
   // Called when 0-RTT data is rejected by the server. This is only called in
   // TLS handshakes and only called on clients.
   virtual void OnZeroRttRejected() = 0;
+
+  // Fills in |params| with values from the delegate's QuicConfig.
+  // Returns whether the operation succeeded.
+  virtual bool FillTransportParameters(TransportParameters* params) = 0;
+
+  // Read |params| and apply the values to the delegate's QuicConfig.
+  // On failure, returns a QuicErrorCode and saves a detailed error in
+  // |error_details|.
+  virtual QuicErrorCode ProcessTransportParameters(
+      const TransportParameters& params,
+      bool is_resumption,
+      std::string* error_details) = 0;
 };
 
 }  // namespace quic