Rename HandshakerDelegate to HandshakerInterface in QuicCryptoServerStream
and QuicCryptoClientStream to make it clear that this is an interface which
defines the handshaker as opposed to a delegate of the handshaker (Which is
defined by the similarly named HandshakerDelegateInterface).

gfe-relnote: n/a - Rename only
PiperOrigin-RevId: 286924355
Change-Id: Ifb31cf8f7afd6aa0560c599fc28cbf9c9f3655b4
diff --git a/quic/core/quic_crypto_client_handshaker.h b/quic/core/quic_crypto_client_handshaker.h
index 467e5c8..e9e2f66 100644
--- a/quic/core/quic_crypto_client_handshaker.h
+++ b/quic/core/quic_crypto_client_handshaker.h
@@ -15,10 +15,10 @@
 
 namespace quic {
 
-// An implementation of QuicCryptoClientStream::HandshakerDelegate which uses
+// An implementation of QuicCryptoClientStream::HandshakerInterface which uses
 // QUIC crypto as the crypto handshake protocol.
 class QUIC_EXPORT_PRIVATE QuicCryptoClientHandshaker
-    : public QuicCryptoClientStream::HandshakerDelegate,
+    : public QuicCryptoClientStream::HandshakerInterface,
       public QuicCryptoHandshaker {
  public:
   QuicCryptoClientHandshaker(
@@ -34,7 +34,7 @@
 
   ~QuicCryptoClientHandshaker() override;
 
-  // From QuicCryptoClientStream::HandshakerDelegate
+  // From QuicCryptoClientStream::HandshakerInterface
   bool CryptoConnect() override;
   int num_sent_client_hellos() const override;
   bool IsResumption() const override;
diff --git a/quic/core/quic_crypto_client_stream.h b/quic/core/quic_crypto_client_stream.h
index 3f9b0af..cf1d3e9 100644
--- a/quic/core/quic_crypto_client_stream.h
+++ b/quic/core/quic_crypto_client_stream.h
@@ -62,20 +62,20 @@
   //     the client a fallback ServerConfig.
   static const int kMaxClientHellos = 4;
 
-  // QuicCryptoClientStream creates a HandshakerDelegate at construction time
+  // QuicCryptoClientStream creates a HandshakerInterface at construction time
   // based on the QuicTransportVersion of the connection. Different
-  // HandshakerDelegates provide implementations of different crypto handshake
+  // HandshakerInterfaces provide implementations of different crypto handshake
   // protocols. Currently QUIC crypto is the only protocol implemented; a future
-  // HandshakerDelegate will use TLS as the handshake protocol.
+  // HandshakerInterface will use TLS as the handshake protocol.
   // QuicCryptoClientStream delegates all of its public methods to its
-  // HandshakerDelegate.
+  // HandshakerInterface.
   //
   // This setup of the crypto stream delegating its implementation to the
   // handshaker results in the handshaker reading and writing bytes on the
   // crypto stream, instead of the handshaker passing the stream bytes to send.
-  class QUIC_EXPORT_PRIVATE HandshakerDelegate {
+  class QUIC_EXPORT_PRIVATE HandshakerInterface {
    public:
-    virtual ~HandshakerDelegate() {}
+    virtual ~HandshakerInterface() {}
 
     // Performs a crypto handshake with the server. Returns true if the
     // connection is still connected.
@@ -167,12 +167,12 @@
   std::string chlo_hash() const;
 
  protected:
-  void set_handshaker(std::unique_ptr<HandshakerDelegate> handshaker) {
+  void set_handshaker(std::unique_ptr<HandshakerInterface> handshaker) {
     handshaker_ = std::move(handshaker);
   }
 
  private:
-  std::unique_ptr<HandshakerDelegate> handshaker_;
+  std::unique_ptr<HandshakerInterface> handshaker_;
 };
 
 }  // namespace quic
diff --git a/quic/core/quic_crypto_server_handshaker.h b/quic/core/quic_crypto_server_handshaker.h
index 4e1a1b8..a2ed38a 100644
--- a/quic/core/quic_crypto_server_handshaker.h
+++ b/quic/core/quic_crypto_server_handshaker.h
@@ -21,7 +21,7 @@
 }  // namespace test
 
 class QUIC_EXPORT_PRIVATE QuicCryptoServerHandshaker
-    : public QuicCryptoServerStream::HandshakerDelegate,
+    : public QuicCryptoServerStream::HandshakerInterface,
       public QuicCryptoHandshaker {
  public:
   // |crypto_config| must outlive the stream.
@@ -38,7 +38,7 @@
 
   ~QuicCryptoServerHandshaker() override;
 
-  // From HandshakerDelegate
+  // From HandshakerInterface
   void CancelOutstandingCallbacks() override;
   bool GetBase64SHA256ClientChannelID(std::string* output) const override;
   void SendServerConfigUpdate(
diff --git a/quic/core/quic_crypto_server_stream.cc b/quic/core/quic_crypto_server_stream.cc
index 784b20a..09aa0c5 100644
--- a/quic/core/quic_crypto_server_stream.cc
+++ b/quic/core/quic_crypto_server_stream.cc
@@ -43,7 +43,7 @@
     QuicCompressedCertsCache* compressed_certs_cache,
     QuicSession* session,
     Helper* helper,
-    std::unique_ptr<HandshakerDelegate> handshaker)
+    std::unique_ptr<HandshakerInterface> handshaker)
     : QuicCryptoServerStreamBase(session),
       handshaker_(std::move(handshaker)),
       create_handshaker_in_constructor_(
@@ -174,13 +174,13 @@
 }
 
 void QuicCryptoServerStream::set_handshaker(
-    std::unique_ptr<QuicCryptoServerStream::HandshakerDelegate> handshaker) {
+    std::unique_ptr<QuicCryptoServerStream::HandshakerInterface> handshaker) {
   CHECK(!handshaker_);
   handshaker_ = std::move(handshaker);
 }
 
-QuicCryptoServerStream::HandshakerDelegate* QuicCryptoServerStream::handshaker()
-    const {
+QuicCryptoServerStream::HandshakerInterface*
+QuicCryptoServerStream::handshaker() const {
   return handshaker_.get();
 }
 
diff --git a/quic/core/quic_crypto_server_stream.h b/quic/core/quic_crypto_server_stream.h
index 427cced..1b74474 100644
--- a/quic/core/quic_crypto_server_stream.h
+++ b/quic/core/quic_crypto_server_stream.h
@@ -61,20 +61,20 @@
 class QUIC_EXPORT_PRIVATE QuicCryptoServerStream
     : public QuicCryptoServerStreamBase {
  public:
-  // QuicCryptoServerStream creates a HandshakerDelegate at construction time
+  // QuicCryptoServerStream creates a HandshakerInterface at construction time
   // based on the QuicTransportVersion of the connection. Different
-  // HandshakerDelegates provide implementations of different crypto handshake
+  // HandshakerInterfaces provide implementations of different crypto handshake
   // protocols. Currently QUIC crypto is the only protocol implemented; a future
-  // HandshakerDelegate will use TLS as the handshake protocol.
+  // HandshakerInterface will use TLS as the handshake protocol.
   // QuicCryptoServerStream delegates all of its public methods to its
-  // HandshakerDelegate.
+  // HandshakerInterface.
   //
   // This setup of the crypto stream delegating its implementation to the
   // handshaker results in the handshaker reading and writing bytes on the
   // crypto stream, instead of the handshake rpassing the stream bytes to send.
-  class QUIC_EXPORT_PRIVATE HandshakerDelegate {
+  class QUIC_EXPORT_PRIVATE HandshakerInterface {
    public:
-    virtual ~HandshakerDelegate() {}
+    virtual ~HandshakerInterface() {}
 
     // Cancel any outstanding callbacks, such as asynchronous validation of
     // client hello.
@@ -192,21 +192,21 @@
                          QuicCompressedCertsCache* compressed_certs_cache,
                          QuicSession* session,
                          Helper* helper,
-                         std::unique_ptr<HandshakerDelegate> handshaker);
-  void set_handshaker(std::unique_ptr<HandshakerDelegate> handshaker);
-  HandshakerDelegate* handshaker() const;
+                         std::unique_ptr<HandshakerInterface> handshaker);
+  void set_handshaker(std::unique_ptr<HandshakerInterface> handshaker);
+  HandshakerInterface* handshaker() const;
 
   const QuicCryptoServerConfig* crypto_config() const;
   QuicCompressedCertsCache* compressed_certs_cache() const;
   Helper* helper() const;
 
  private:
-  std::unique_ptr<HandshakerDelegate> handshaker_;
+  std::unique_ptr<HandshakerInterface> handshaker_;
   // Latched value of quic_create_server_handshaker_in_constructor flag.
   bool create_handshaker_in_constructor_;
 
   // Arguments from QuicCryptoServerStream constructor that might need to be
-  // passed to the HandshakerDelegate constructor in its late construction.
+  // passed to the HandshakerInterface constructor in its late construction.
   const QuicCryptoServerConfig* crypto_config_;
   QuicCompressedCertsCache* compressed_certs_cache_;
   Helper* helper_;
diff --git a/quic/core/tls_client_handshaker.h b/quic/core/tls_client_handshaker.h
index 0dd2320..83a1975 100644
--- a/quic/core/tls_client_handshaker.h
+++ b/quic/core/tls_client_handshaker.h
@@ -18,11 +18,11 @@
 
 namespace quic {
 
-// An implementation of QuicCryptoClientStream::HandshakerDelegate which uses
+// An implementation of QuicCryptoClientStream::HandshakerInterface which uses
 // TLS 1.3 for the crypto handshake protocol.
 class QUIC_EXPORT_PRIVATE TlsClientHandshaker
     : public TlsHandshaker,
-      public QuicCryptoClientStream::HandshakerDelegate,
+      public QuicCryptoClientStream::HandshakerInterface,
       public TlsClientConnection::Delegate {
  public:
   TlsClientHandshaker(const QuicServerId& server_id,
@@ -36,14 +36,14 @@
 
   ~TlsClientHandshaker() override;
 
-  // From QuicCryptoClientStream::HandshakerDelegate
+  // From QuicCryptoClientStream::HandshakerInterface
   bool CryptoConnect() override;
   int num_sent_client_hellos() const override;
   bool IsResumption() const override;
   int num_scup_messages_received() const override;
   std::string chlo_hash() const override;
 
-  // From QuicCryptoClientStream::HandshakerDelegate and TlsHandshaker
+  // From QuicCryptoClientStream::HandshakerInterface and TlsHandshaker
   bool encryption_established() const override;
   bool handshake_confirmed() const override;
   const QuicCryptoNegotiatedParameters& crypto_negotiated_params()
diff --git a/quic/core/tls_server_handshaker.h b/quic/core/tls_server_handshaker.h
index 7e65120..6def370 100644
--- a/quic/core/tls_server_handshaker.h
+++ b/quic/core/tls_server_handshaker.h
@@ -19,12 +19,12 @@
 
 namespace quic {
 
-// An implementation of QuicCryptoServerStream::HandshakerDelegate which uses
+// An implementation of QuicCryptoServerStream::HandshakerInterface which uses
 // TLS 1.3 for the crypto handshake protocol.
 class QUIC_EXPORT_PRIVATE TlsServerHandshaker
     : public TlsHandshaker,
       public TlsServerConnection::Delegate,
-      public QuicCryptoServerStream::HandshakerDelegate {
+      public QuicCryptoServerStream::HandshakerInterface {
  public:
   TlsServerHandshaker(QuicCryptoStream* stream,
                       QuicSession* session,
@@ -35,7 +35,7 @@
 
   ~TlsServerHandshaker() override;
 
-  // From QuicCryptoServerStream::HandshakerDelegate
+  // From QuicCryptoServerStream::HandshakerInterface
   void CancelOutstandingCallbacks() override;
   bool GetBase64SHA256ClientChannelID(std::string* output) const override;
   void SendServerConfigUpdate(
@@ -50,7 +50,7 @@
   void OnPacketDecrypted(EncryptionLevel level) override;
   bool ShouldSendExpectCTHeader() const override;
 
-  // From QuicCryptoServerStream::HandshakerDelegate and TlsHandshaker
+  // From QuicCryptoServerStream::HandshakerInterface and TlsHandshaker
   bool encryption_established() const override;
   bool handshake_confirmed() const override;
   const QuicCryptoNegotiatedParameters& crypto_negotiated_params()