Move QuicCryptoServerStream::Helper to QuicCryptoServerStreamBase

gfe-relnote: rename class - no behavior change
PiperOrigin-RevId: 296246242
Change-Id: I68425fe4ba7a2040eed4bf93835639e6f353a406
diff --git a/quic/core/http/quic_server_session_base.cc b/quic/core/http/quic_server_session_base.cc
index f52c19d..3a7dd98 100644
--- a/quic/core/http/quic_server_session_base.cc
+++ b/quic/core/http/quic_server_session_base.cc
@@ -22,7 +22,7 @@
     const ParsedQuicVersionVector& supported_versions,
     QuicConnection* connection,
     Visitor* visitor,
-    QuicCryptoServerStream::Helper* helper,
+    QuicCryptoServerStreamBase::Helper* helper,
     const QuicCryptoServerConfig* crypto_config,
     QuicCompressedCertsCache* compressed_certs_cache)
     : QuicSpdySession(connection, visitor, config, supported_versions),
diff --git a/quic/core/http/quic_server_session_base.h b/quic/core/http/quic_server_session_base.h
index f2c7ab3..3561e28 100644
--- a/quic/core/http/quic_server_session_base.h
+++ b/quic/core/http/quic_server_session_base.h
@@ -38,7 +38,7 @@
                         const ParsedQuicVersionVector& supported_versions,
                         QuicConnection* connection,
                         QuicSession::Visitor* visitor,
-                        QuicCryptoServerStream::Helper* helper,
+                        QuicCryptoServerStreamBase::Helper* helper,
                         const QuicCryptoServerConfig* crypto_config,
                         QuicCompressedCertsCache* compressed_certs_cache);
   QuicServerSessionBase(const QuicServerSessionBase&) = delete;
@@ -93,7 +93,7 @@
 
   const QuicCryptoServerConfig* crypto_config() { return crypto_config_; }
 
-  QuicCryptoServerStream::Helper* stream_helper() { return helper_; }
+  QuicCryptoServerStreamBase::Helper* stream_helper() { return helper_; }
 
  private:
   friend class test::QuicServerSessionBasePeer;
@@ -109,7 +109,7 @@
 
   // Pointer to the helper used to create crypto server streams. Must outlive
   // streams created via CreateQuicCryptoServerStream.
-  QuicCryptoServerStream::Helper* helper_;
+  QuicCryptoServerStreamBase::Helper* helper_;
 
   // Whether bandwidth resumption is enabled for this connection.
   bool bandwidth_resumption_enabled_;
diff --git a/quic/core/http/quic_server_session_base_test.cc b/quic/core/http/quic_server_session_base_test.cc
index 33a1ab8..3e9437f 100644
--- a/quic/core/http/quic_server_session_base_test.cc
+++ b/quic/core/http/quic_server_session_base_test.cc
@@ -54,7 +54,7 @@
   TestServerSession(const QuicConfig& config,
                     QuicConnection* connection,
                     QuicSession::Visitor* visitor,
-                    QuicCryptoServerStream::Helper* helper,
+                    QuicCryptoServerStreamBase::Helper* helper,
                     const QuicCryptoServerConfig* crypto_config,
                     QuicCompressedCertsCache* compressed_certs_cache,
                     QuicSimpleServerBackend* quic_simple_server_backend)
@@ -462,7 +462,7 @@
       const QuicCryptoServerConfig* crypto_config,
       QuicCompressedCertsCache* compressed_certs_cache,
       QuicServerSessionBase* session,
-      QuicCryptoServerStream::Helper* helper)
+      QuicCryptoServerStreamBase::Helper* helper)
       : QuicCryptoServerStream(crypto_config,
                                compressed_certs_cache,
                                session,
diff --git a/quic/core/quic_crypto_server_handshaker.cc b/quic/core/quic_crypto_server_handshaker.cc
index 6150642..a4994a0 100644
--- a/quic/core/quic_crypto_server_handshaker.cc
+++ b/quic/core/quic_crypto_server_handshaker.cc
@@ -51,7 +51,7 @@
     QuicCryptoServerStream* stream,
     QuicCompressedCertsCache* compressed_certs_cache,
     QuicSession* session,
-    QuicCryptoServerStream::Helper* helper)
+    QuicCryptoServerStreamBase::Helper* helper)
     : QuicCryptoHandshaker(stream, session),
       stream_(stream),
       session_(session),
diff --git a/quic/core/quic_crypto_server_handshaker.h b/quic/core/quic_crypto_server_handshaker.h
index e6d5cae..257ee16 100644
--- a/quic/core/quic_crypto_server_handshaker.h
+++ b/quic/core/quic_crypto_server_handshaker.h
@@ -31,7 +31,7 @@
                              QuicCryptoServerStream* stream,
                              QuicCompressedCertsCache* compressed_certs_cache,
                              QuicSession* session,
-                             QuicCryptoServerStream::Helper* helper);
+                             QuicCryptoServerStreamBase::Helper* helper);
   QuicCryptoServerHandshaker(const QuicCryptoServerHandshaker&) = delete;
   QuicCryptoServerHandshaker& operator=(const QuicCryptoServerHandshaker&) =
       delete;
@@ -182,7 +182,7 @@
   std::string chlo_hash_;
 
   // Pointer to the helper for this crypto stream. Must outlive this stream.
-  QuicCryptoServerStream::Helper* helper_;
+  QuicCryptoServerStreamBase::Helper* helper_;
 
   // Number of handshake messages received by this stream.
   uint8_t num_handshake_messages_;
diff --git a/quic/core/quic_crypto_server_stream.cc b/quic/core/quic_crypto_server_stream.cc
index 234ecca..dbbb541 100644
--- a/quic/core/quic_crypto_server_stream.cc
+++ b/quic/core/quic_crypto_server_stream.cc
@@ -31,7 +31,7 @@
     const QuicCryptoServerConfig* crypto_config,
     QuicCompressedCertsCache* compressed_certs_cache,
     QuicSession* session,
-    QuicCryptoServerStream::Helper* helper) {
+    QuicCryptoServerStreamBase::Helper* helper) {
   switch (session->connection()->version().handshake_protocol) {
     case PROTOCOL_QUIC_CRYPTO:
       return std::unique_ptr<QuicCryptoServerStream>(new QuicCryptoServerStream(
@@ -52,7 +52,7 @@
     const QuicCryptoServerConfig* crypto_config,
     QuicCompressedCertsCache* compressed_certs_cache,
     QuicSession* session,
-    Helper* helper)
+    QuicCryptoServerStreamBase::Helper* helper)
     : QuicCryptoServerStream(crypto_config,
                              compressed_certs_cache,
                              session,
@@ -63,7 +63,7 @@
     const QuicCryptoServerConfig* crypto_config,
     QuicCompressedCertsCache* compressed_certs_cache,
     QuicSession* session,
-    Helper* helper,
+    QuicCryptoServerStreamBase::Helper* helper,
     std::unique_ptr<HandshakerInterface> handshaker)
     : QuicCryptoServerStreamBase(session),
       handshaker_(std::move(handshaker)),
@@ -196,7 +196,7 @@
   return compressed_certs_cache_;
 }
 
-QuicCryptoServerStream::Helper* QuicCryptoServerStream::helper() const {
+QuicCryptoServerStreamBase::Helper* QuicCryptoServerStream::helper() const {
   return helper_;
 }
 
diff --git a/quic/core/quic_crypto_server_stream.h b/quic/core/quic_crypto_server_stream.h
index d6e621b..f96c45a 100644
--- a/quic/core/quic_crypto_server_stream.h
+++ b/quic/core/quic_crypto_server_stream.h
@@ -31,6 +31,20 @@
  public:
   explicit QuicCryptoServerStreamBase(QuicSession* session);
 
+  class QUIC_EXPORT_PRIVATE Helper {
+   public:
+    virtual ~Helper() {}
+
+    // Returns true if |message|, which was received on |self_address| is
+    // acceptable according to the visitor's policy. Otherwise, returns false
+    // and populates |error_details|.
+    virtual bool CanAcceptClientHello(const CryptoHandshakeMessage& message,
+                                      const QuicSocketAddress& client_address,
+                                      const QuicSocketAddress& peer_address,
+                                      const QuicSocketAddress& self_address,
+                                      std::string* error_details) const = 0;
+  };
+
   ~QuicCryptoServerStreamBase() override {}
 
   // Cancel any outstanding callbacks, such as asynchronous validation of client
@@ -136,20 +150,6 @@
     virtual size_t BufferSizeLimitForLevel(EncryptionLevel level) const = 0;
   };
 
-  class QUIC_EXPORT_PRIVATE Helper {
-   public:
-    virtual ~Helper() {}
-
-    // Returns true if |message|, which was received on |self_address| is
-    // acceptable according to the visitor's policy. Otherwise, returns false
-    // and populates |error_details|.
-    virtual bool CanAcceptClientHello(const CryptoHandshakeMessage& message,
-                                      const QuicSocketAddress& client_address,
-                                      const QuicSocketAddress& peer_address,
-                                      const QuicSocketAddress& self_address,
-                                      std::string* error_details) const = 0;
-  };
-
   QuicCryptoServerStream(const QuicCryptoServerStream&) = delete;
   QuicCryptoServerStream& operator=(const QuicCryptoServerStream&) = delete;
 
@@ -185,12 +185,12 @@
   CreateCryptoServerStream(const QuicCryptoServerConfig* crypto_config,
                            QuicCompressedCertsCache* compressed_certs_cache,
                            QuicSession* session,
-                           Helper* helper);
+                           QuicCryptoServerStreamBase::Helper* helper);
 
   QuicCryptoServerStream(const QuicCryptoServerConfig* crypto_config,
                          QuicCompressedCertsCache* compressed_certs_cache,
                          QuicSession* session,
-                         Helper* helper);
+                         QuicCryptoServerStreamBase::Helper* helper);
   // Provided so that subclasses can provide their own handshaker.
   // set_handshaker can only be called if this QuicCryptoServerStream's
   // handshaker hasn't been set yet. If set_handshaker is called outside of
@@ -199,14 +199,14 @@
   QuicCryptoServerStream(const QuicCryptoServerConfig* crypto_config,
                          QuicCompressedCertsCache* compressed_certs_cache,
                          QuicSession* session,
-                         Helper* helper,
+                         QuicCryptoServerStreamBase::Helper* helper,
                          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;
+  QuicCryptoServerStreamBase::Helper* helper() const;
 
  private:
   std::unique_ptr<HandshakerInterface> handshaker_;
@@ -215,7 +215,7 @@
   // passed to the HandshakerInterface constructor in its late construction.
   const QuicCryptoServerConfig* crypto_config_;
   QuicCompressedCertsCache* compressed_certs_cache_;
-  Helper* helper_;
+  QuicCryptoServerStreamBase::Helper* helper_;
 };
 
 // Creates an appropriate QuicCryptoServerStream for the provided parameters,
@@ -226,7 +226,7 @@
 CreateCryptoServerStream(const QuicCryptoServerConfig* crypto_config,
                          QuicCompressedCertsCache* compressed_certs_cache,
                          QuicSession* session,
-                         QuicCryptoServerStream::Helper* helper);
+                         QuicCryptoServerStreamBase::Helper* helper);
 
 }  // namespace quic
 
diff --git a/quic/core/quic_dispatcher.cc b/quic/core/quic_dispatcher.cc
index bcb7cd1..a92dfb7 100644
--- a/quic/core/quic_dispatcher.cc
+++ b/quic/core/quic_dispatcher.cc
@@ -221,7 +221,7 @@
     const QuicCryptoServerConfig* crypto_config,
     QuicVersionManager* version_manager,
     std::unique_ptr<QuicConnectionHelperInterface> helper,
-    std::unique_ptr<QuicCryptoServerStream::Helper> session_helper,
+    std::unique_ptr<QuicCryptoServerStreamBase::Helper> session_helper,
     std::unique_ptr<QuicAlarmFactory> alarm_factory,
     uint8_t expected_server_connection_id_length)
     : config_(config),
diff --git a/quic/core/quic_dispatcher.h b/quic/core/quic_dispatcher.h
index 3c57ec5..aae7e6c 100644
--- a/quic/core/quic_dispatcher.h
+++ b/quic/core/quic_dispatcher.h
@@ -43,13 +43,14 @@
   // Ideally we'd have a linked_hash_set: the  boolean is unused.
   typedef QuicLinkedHashMap<QuicBlockedWriterInterface*, bool> WriteBlockedList;
 
-  QuicDispatcher(const QuicConfig* config,
-                 const QuicCryptoServerConfig* crypto_config,
-                 QuicVersionManager* version_manager,
-                 std::unique_ptr<QuicConnectionHelperInterface> helper,
-                 std::unique_ptr<QuicCryptoServerStream::Helper> session_helper,
-                 std::unique_ptr<QuicAlarmFactory> alarm_factory,
-                 uint8_t expected_server_connection_id_length);
+  QuicDispatcher(
+      const QuicConfig* config,
+      const QuicCryptoServerConfig* crypto_config,
+      QuicVersionManager* version_manager,
+      std::unique_ptr<QuicConnectionHelperInterface> helper,
+      std::unique_ptr<QuicCryptoServerStreamBase::Helper> session_helper,
+      std::unique_ptr<QuicAlarmFactory> alarm_factory,
+      uint8_t expected_server_connection_id_length);
   QuicDispatcher(const QuicDispatcher&) = delete;
   QuicDispatcher& operator=(const QuicDispatcher&) = delete;
 
@@ -210,7 +211,7 @@
 
   QuicConnectionHelperInterface* helper() { return helper_.get(); }
 
-  QuicCryptoServerStream::Helper* session_helper() {
+  QuicCryptoServerStreamBase::Helper* session_helper() {
     return session_helper_.get();
   }
 
@@ -338,7 +339,7 @@
   std::unique_ptr<QuicConnectionHelperInterface> helper_;
 
   // The helper used for all sessions.
-  std::unique_ptr<QuicCryptoServerStream::Helper> session_helper_;
+  std::unique_ptr<QuicCryptoServerStreamBase::Helper> session_helper_;
 
   // Creates alarms.
   std::unique_ptr<QuicAlarmFactory> alarm_factory_;
diff --git a/quic/core/quic_dispatcher_test.cc b/quic/core/quic_dispatcher_test.cc
index 4ce9fa2..66b9e2e 100644
--- a/quic/core/quic_dispatcher_test.cc
+++ b/quic/core/quic_dispatcher_test.cc
@@ -93,7 +93,7 @@
                                     stream_helper());
   }
 
-  QuicCryptoServerStream::Helper* stream_helper() {
+  QuicCryptoServerStreamBase::Helper* stream_helper() {
     return QuicServerSessionBase::stream_helper();
   }
 };
@@ -108,7 +108,7 @@
                        crypto_config,
                        version_manager,
                        std::make_unique<MockQuicConnectionHelper>(),
-                       std::unique_ptr<QuicCryptoServerStream::Helper>(
+                       std::unique_ptr<QuicCryptoServerStreamBase::Helper>(
                            new QuicSimpleCryptoServerStreamHelper()),
                        std::make_unique<MockAlarmFactory>(),
                        kQuicDefaultConnectionIdLength),
diff --git a/quic/masque/masque_dispatcher.cc b/quic/masque/masque_dispatcher.cc
index 749aeba..9856fb4 100644
--- a/quic/masque/masque_dispatcher.cc
+++ b/quic/masque/masque_dispatcher.cc
@@ -12,7 +12,7 @@
     const QuicCryptoServerConfig* crypto_config,
     QuicVersionManager* version_manager,
     std::unique_ptr<QuicConnectionHelperInterface> helper,
-    std::unique_ptr<QuicCryptoServerStream::Helper> session_helper,
+    std::unique_ptr<QuicCryptoServerStreamBase::Helper> session_helper,
     std::unique_ptr<QuicAlarmFactory> alarm_factory,
     MasqueServerBackend* masque_server_backend,
     uint8_t expected_server_connection_id_length)
diff --git a/quic/masque/masque_dispatcher.h b/quic/masque/masque_dispatcher.h
index a5fc4b0..4817b7b 100644
--- a/quic/masque/masque_dispatcher.h
+++ b/quic/masque/masque_dispatcher.h
@@ -22,7 +22,7 @@
       const QuicCryptoServerConfig* crypto_config,
       QuicVersionManager* version_manager,
       std::unique_ptr<QuicConnectionHelperInterface> helper,
-      std::unique_ptr<QuicCryptoServerStream::Helper> session_helper,
+      std::unique_ptr<QuicCryptoServerStreamBase::Helper> session_helper,
       std::unique_ptr<QuicAlarmFactory> alarm_factory,
       MasqueServerBackend* masque_server_backend,
       uint8_t expected_server_connection_id_length);
diff --git a/quic/masque/masque_server_session.cc b/quic/masque/masque_server_session.cc
index 720f52c..e884e41 100644
--- a/quic/masque/masque_server_session.cc
+++ b/quic/masque/masque_server_session.cc
@@ -12,7 +12,7 @@
     QuicConnection* connection,
     QuicSession::Visitor* visitor,
     Visitor* owner,
-    QuicCryptoServerStream::Helper* helper,
+    QuicCryptoServerStreamBase::Helper* helper,
     const QuicCryptoServerConfig* crypto_config,
     QuicCompressedCertsCache* compressed_certs_cache,
     MasqueServerBackend* masque_server_backend)
diff --git a/quic/masque/masque_server_session.h b/quic/masque/masque_server_session.h
index efc72b8..bc70f5e 100644
--- a/quic/masque/masque_server_session.h
+++ b/quic/masque/masque_server_session.h
@@ -38,7 +38,7 @@
       QuicConnection* connection,
       QuicSession::Visitor* visitor,
       Visitor* owner,
-      QuicCryptoServerStream::Helper* helper,
+      QuicCryptoServerStreamBase::Helper* helper,
       const QuicCryptoServerConfig* crypto_config,
       QuicCompressedCertsCache* compressed_certs_cache,
       MasqueServerBackend* masque_server_backend);
diff --git a/quic/qbone/qbone_client_test.cc b/quic/qbone/qbone_client_test.cc
index d1a2872..e6cbd02 100644
--- a/quic/qbone/qbone_client_test.cc
+++ b/quic/qbone/qbone_client_test.cc
@@ -94,7 +94,7 @@
       const QuicCryptoServerConfig* crypto_config,
       QuicVersionManager* version_manager,
       std::unique_ptr<QuicConnectionHelperInterface> helper,
-      std::unique_ptr<QuicCryptoServerStream::Helper> session_helper,
+      std::unique_ptr<QuicCryptoServerStreamBase::Helper> session_helper,
       std::unique_ptr<QuicAlarmFactory> alarm_factory,
       QbonePacketWriter* writer)
       : QuicDispatcher(config,
@@ -146,7 +146,7 @@
         std::unique_ptr<QuicEpollConnectionHelper>(
             new QuicEpollConnectionHelper(epoll_server(),
                                           QuicAllocator::BUFFER_POOL)),
-        std::unique_ptr<QuicCryptoServerStream::Helper>(
+        std::unique_ptr<QuicCryptoServerStreamBase::Helper>(
             new QboneCryptoServerStreamHelper()),
         std::unique_ptr<QuicEpollAlarmFactory>(
             new QuicEpollAlarmFactory(epoll_server())),
diff --git a/quic/qbone/qbone_server_session.h b/quic/qbone/qbone_server_session.h
index db3381f..d6ef596 100644
--- a/quic/qbone/qbone_server_session.h
+++ b/quic/qbone/qbone_server_session.h
@@ -18,7 +18,8 @@
 namespace quic {
 
 // A helper class is used by the QuicCryptoServerStream.
-class QboneCryptoServerStreamHelper : public QuicCryptoServerStream::Helper {
+class QboneCryptoServerStreamHelper
+    : public QuicCryptoServerStreamBase::Helper {
  public:
   // This will look for the qbone alpn.
   bool CanAcceptClientHello(const CryptoHandshakeMessage& chlo,
diff --git a/quic/quartc/quartc_crypto_helpers.h b/quic/quartc/quartc_crypto_helpers.h
index 8f0fe96..92c68b6 100644
--- a/quic/quartc/quartc_crypto_helpers.h
+++ b/quic/quartc/quartc_crypto_helpers.h
@@ -99,7 +99,8 @@
 };
 
 // Implementation of the server-side crypto stream helper.
-class QuartcCryptoServerStreamHelper : public QuicCryptoServerStream::Helper {
+class QuartcCryptoServerStreamHelper
+    : public QuicCryptoServerStreamBase::Helper {
  public:
   bool CanAcceptClientHello(const CryptoHandshakeMessage& message,
                             const QuicSocketAddress& client_address,
diff --git a/quic/quartc/quartc_dispatcher.cc b/quic/quartc/quartc_dispatcher.cc
index 8f0f1c1..c5c4c4a 100644
--- a/quic/quartc/quartc_dispatcher.cc
+++ b/quic/quartc/quartc_dispatcher.cc
@@ -16,7 +16,7 @@
     std::unique_ptr<QuicCryptoServerConfig> crypto_config,
     QuicVersionManager* version_manager,
     std::unique_ptr<QuicConnectionHelperInterface> helper,
-    std::unique_ptr<QuicCryptoServerStream::Helper> session_helper,
+    std::unique_ptr<QuicCryptoServerStreamBase::Helper> session_helper,
     std::unique_ptr<QuicAlarmFactory> alarm_factory,
     std::unique_ptr<QuartcPacketWriter> packet_writer,
     Delegate* delegate)
diff --git a/quic/quartc/quartc_dispatcher.h b/quic/quartc/quartc_dispatcher.h
index 7ac3dae..47630f9 100644
--- a/quic/quartc/quartc_dispatcher.h
+++ b/quic/quartc/quartc_dispatcher.h
@@ -34,7 +34,7 @@
       std::unique_ptr<QuicCryptoServerConfig> crypto_config,
       QuicVersionManager* version_manager,
       std::unique_ptr<QuicConnectionHelperInterface> helper,
-      std::unique_ptr<QuicCryptoServerStream::Helper> session_helper,
+      std::unique_ptr<QuicCryptoServerStreamBase::Helper> session_helper,
       std::unique_ptr<QuicAlarmFactory> alarm_factory,
       std::unique_ptr<QuartcPacketWriter> packet_writer,
       Delegate* delegate);
diff --git a/quic/quartc/quartc_session.cc b/quic/quartc/quartc_session.cc
index 9efe659..6715ee2 100644
--- a/quic/quartc/quartc_session.cc
+++ b/quic/quartc/quartc_session.cc
@@ -429,7 +429,7 @@
     const QuicClock* clock,
     const QuicCryptoServerConfig* server_crypto_config,
     QuicCompressedCertsCache* const compressed_certs_cache,
-    QuicCryptoServerStream::Helper* const stream_helper)
+    QuicCryptoServerStreamBase::Helper* const stream_helper)
     : QuartcSession(std::move(connection),
                     visitor,
                     config,
diff --git a/quic/quartc/quartc_session.h b/quic/quartc/quartc_session.h
index 1d8554f..a9ebb47 100644
--- a/quic/quartc/quartc_session.h
+++ b/quic/quartc/quartc_session.h
@@ -308,7 +308,7 @@
                       const QuicClock* clock,
                       const QuicCryptoServerConfig* server_crypto_config,
                       QuicCompressedCertsCache* const compressed_certs_cache,
-                      QuicCryptoServerStream::Helper* const stream_helper);
+                      QuicCryptoServerStreamBase::Helper* const stream_helper);
   QuartcServerSession(const QuartcServerSession&) = delete;
   QuartcServerSession& operator=(const QuartcServerSession&) = delete;
 
@@ -327,7 +327,7 @@
   QuicCompressedCertsCache* const compressed_certs_cache_;
 
   // This helper is needed to create QuicCryptoServerStream.
-  QuicCryptoServerStream::Helper* const stream_helper_;
+  QuicCryptoServerStreamBase::Helper* const stream_helper_;
 
   // Server perspective crypto stream.
   std::unique_ptr<QuicCryptoServerStreamBase> crypto_stream_;
diff --git a/quic/quic_transport/quic_transport_server_session.cc b/quic/quic_transport/quic_transport_server_session.cc
index 45465cf..c2de659 100644
--- a/quic/quic_transport/quic_transport_server_session.cc
+++ b/quic/quic_transport/quic_transport_server_session.cc
@@ -21,7 +21,8 @@
 namespace quic {
 
 namespace {
-class QuicTransportServerCryptoHelper : public QuicCryptoServerStream::Helper {
+class QuicTransportServerCryptoHelper
+    : public QuicCryptoServerStreamBase::Helper {
  public:
   bool CanAcceptClientHello(const CryptoHandshakeMessage& /*message*/,
                             const QuicSocketAddress& /*client_address*/,
diff --git a/quic/test_tools/mock_quic_dispatcher.cc b/quic/test_tools/mock_quic_dispatcher.cc
index 3b3ca46..40869e0 100644
--- a/quic/test_tools/mock_quic_dispatcher.cc
+++ b/quic/test_tools/mock_quic_dispatcher.cc
@@ -14,7 +14,7 @@
     const QuicCryptoServerConfig* crypto_config,
     QuicVersionManager* version_manager,
     std::unique_ptr<QuicConnectionHelperInterface> helper,
-    std::unique_ptr<QuicCryptoServerStream::Helper> session_helper,
+    std::unique_ptr<QuicCryptoServerStreamBase::Helper> session_helper,
     std::unique_ptr<QuicAlarmFactory> alarm_factory,
     QuicSimpleServerBackend* quic_simple_server_backend)
     : QuicSimpleDispatcher(config,
diff --git a/quic/test_tools/mock_quic_dispatcher.h b/quic/test_tools/mock_quic_dispatcher.h
index 3134e1f..b2ab453 100644
--- a/quic/test_tools/mock_quic_dispatcher.h
+++ b/quic/test_tools/mock_quic_dispatcher.h
@@ -22,7 +22,7 @@
       const QuicCryptoServerConfig* crypto_config,
       QuicVersionManager* version_manager,
       std::unique_ptr<QuicConnectionHelperInterface> helper,
-      std::unique_ptr<QuicCryptoServerStream::Helper> session_helper,
+      std::unique_ptr<QuicCryptoServerStreamBase::Helper> session_helper,
       std::unique_ptr<QuicAlarmFactory> alarm_factory,
       QuicSimpleServerBackend* quic_simple_server_backend);
   MockQuicDispatcher(const MockQuicDispatcher&) = delete;
diff --git a/quic/test_tools/mock_quic_session_visitor.h b/quic/test_tools/mock_quic_session_visitor.h
index 0954bb7..92160cf 100644
--- a/quic/test_tools/mock_quic_session_visitor.h
+++ b/quic/test_tools/mock_quic_session_visitor.h
@@ -31,7 +31,8 @@
                void(QuicConnectionId connection_id));
 };
 
-class MockQuicCryptoServerStreamHelper : public QuicCryptoServerStream::Helper {
+class MockQuicCryptoServerStreamHelper
+    : public QuicCryptoServerStreamBase::Helper {
  public:
   MockQuicCryptoServerStreamHelper();
   MockQuicCryptoServerStreamHelper(const MockQuicCryptoServerStreamHelper&) =
diff --git a/quic/test_tools/quic_test_server.cc b/quic/test_tools/quic_test_server.cc
index 147d85e..d85fe1f 100644
--- a/quic/test_tools/quic_test_server.cc
+++ b/quic/test_tools/quic_test_server.cc
@@ -25,7 +25,7 @@
       const ParsedQuicVersionVector& supported_versions,
       QuicConnection* connection,
       QuicSession::Visitor* visitor,
-      QuicCryptoServerStream::Helper* helper,
+      QuicCryptoServerStreamBase::Helper* helper,
       const QuicCryptoServerConfig* crypto_config,
       QuicCompressedCertsCache* compressed_certs_cache,
       QuicTestServer::StreamFactory* stream_factory,
@@ -77,7 +77,7 @@
       const QuicCryptoServerConfig* crypto_config,
       QuicVersionManager* version_manager,
       std::unique_ptr<QuicConnectionHelperInterface> helper,
-      std::unique_ptr<QuicCryptoServerStream::Helper> session_helper,
+      std::unique_ptr<QuicCryptoServerStreamBase::Helper> session_helper,
       std::unique_ptr<QuicAlarmFactory> alarm_factory,
       QuicSimpleServerBackend* quic_simple_server_backend,
       uint8_t expected_server_connection_id_length)
@@ -191,7 +191,7 @@
       &config(), &crypto_config(), version_manager(),
       std::make_unique<QuicEpollConnectionHelper>(epoll_server(),
                                                   QuicAllocator::BUFFER_POOL),
-      std::unique_ptr<QuicCryptoServerStream::Helper>(
+      std::unique_ptr<QuicCryptoServerStreamBase::Helper>(
           new QuicSimpleCryptoServerStreamHelper()),
       std::make_unique<QuicEpollAlarmFactory>(epoll_server()), server_backend(),
       expected_server_connection_id_length());
@@ -217,7 +217,7 @@
     const QuicConfig& config,
     QuicConnection* connection,
     QuicSession::Visitor* visitor,
-    QuicCryptoServerStream::Helper* helper,
+    QuicCryptoServerStreamBase::Helper* helper,
     const QuicCryptoServerConfig* crypto_config,
     QuicCompressedCertsCache* compressed_certs_cache,
     QuicSimpleServerBackend* quic_simple_server_backend)
diff --git a/quic/test_tools/quic_test_server.h b/quic/test_tools/quic_test_server.h
index 34f2ba8..d88337a 100644
--- a/quic/test_tools/quic_test_server.h
+++ b/quic/test_tools/quic_test_server.h
@@ -31,7 +31,7 @@
         const QuicConfig& config,
         QuicConnection* connection,
         QuicSession::Visitor* visitor,
-        QuicCryptoServerStream::Helper* helper,
+        QuicCryptoServerStreamBase::Helper* helper,
         const QuicCryptoServerConfig* crypto_config,
         QuicCompressedCertsCache* compressed_certs_cache,
         QuicSimpleServerBackend* quic_simple_server_backend) = 0;
@@ -97,7 +97,7 @@
   ImmediateGoAwaySession(const QuicConfig& config,
                          QuicConnection* connection,
                          QuicSession::Visitor* visitor,
-                         QuicCryptoServerStream::Helper* helper,
+                         QuicCryptoServerStreamBase::Helper* helper,
                          const QuicCryptoServerConfig* crypto_config,
                          QuicCompressedCertsCache* compressed_certs_cache,
                          QuicSimpleServerBackend* quic_simple_server_backend);
diff --git a/quic/tools/quic_server.cc b/quic/tools/quic_server.cc
index 0ef34ac..53fb95f 100644
--- a/quic/tools/quic_server.cc
+++ b/quic/tools/quic_server.cc
@@ -159,7 +159,7 @@
       &config_, &crypto_config_, &version_manager_,
       std::unique_ptr<QuicEpollConnectionHelper>(new QuicEpollConnectionHelper(
           &epoll_server_, QuicAllocator::BUFFER_POOL)),
-      std::unique_ptr<QuicCryptoServerStream::Helper>(
+      std::unique_ptr<QuicCryptoServerStreamBase::Helper>(
           new QuicSimpleCryptoServerStreamHelper()),
       std::unique_ptr<QuicEpollAlarmFactory>(
           new QuicEpollAlarmFactory(&epoll_server_)),
diff --git a/quic/tools/quic_server_test.cc b/quic/tools/quic_server_test.cc
index 6852e98..fb7955f 100644
--- a/quic/tools/quic_server_test.cc
+++ b/quic/tools/quic_server_test.cc
@@ -35,7 +35,7 @@
       const QuicCryptoServerConfig* crypto_config,
       QuicVersionManager* version_manager,
       std::unique_ptr<QuicConnectionHelperInterface> helper,
-      std::unique_ptr<QuicCryptoServerStream::Helper> session_helper,
+      std::unique_ptr<QuicCryptoServerStreamBase::Helper> session_helper,
       std::unique_ptr<QuicAlarmFactory> alarm_factory,
       QuicSimpleServerBackend* quic_simple_server_backend)
       : QuicSimpleDispatcher(config,
@@ -71,7 +71,7 @@
         std::unique_ptr<QuicEpollConnectionHelper>(
             new QuicEpollConnectionHelper(epoll_server(),
                                           QuicAllocator::BUFFER_POOL)),
-        std::unique_ptr<QuicCryptoServerStream::Helper>(
+        std::unique_ptr<QuicCryptoServerStreamBase::Helper>(
             new QuicSimpleCryptoServerStreamHelper()),
         std::unique_ptr<QuicEpollAlarmFactory>(
             new QuicEpollAlarmFactory(epoll_server())),
@@ -164,7 +164,7 @@
             std::unique_ptr<QuicEpollConnectionHelper>(
                 new QuicEpollConnectionHelper(&eps_,
                                               QuicAllocator::BUFFER_POOL)),
-            std::unique_ptr<QuicCryptoServerStream::Helper>(
+            std::unique_ptr<QuicCryptoServerStreamBase::Helper>(
                 new QuicSimpleCryptoServerStreamHelper()),
             std::unique_ptr<QuicEpollAlarmFactory>(
                 new QuicEpollAlarmFactory(&eps_)),
diff --git a/quic/tools/quic_simple_crypto_server_stream_helper.h b/quic/tools/quic_simple_crypto_server_stream_helper.h
index c4dcb08..93678e4 100644
--- a/quic/tools/quic_simple_crypto_server_stream_helper.h
+++ b/quic/tools/quic_simple_crypto_server_stream_helper.h
@@ -13,7 +13,7 @@
 // Simple helper for server crypto streams which generates a new random
 // connection ID for rejects.
 class QuicSimpleCryptoServerStreamHelper
-    : public QuicCryptoServerStream::Helper {
+    : public QuicCryptoServerStreamBase::Helper {
  public:
   QuicSimpleCryptoServerStreamHelper();
 
diff --git a/quic/tools/quic_simple_dispatcher.cc b/quic/tools/quic_simple_dispatcher.cc
index 3e5d08d..e361511 100644
--- a/quic/tools/quic_simple_dispatcher.cc
+++ b/quic/tools/quic_simple_dispatcher.cc
@@ -14,7 +14,7 @@
     const QuicCryptoServerConfig* crypto_config,
     QuicVersionManager* version_manager,
     std::unique_ptr<QuicConnectionHelperInterface> helper,
-    std::unique_ptr<QuicCryptoServerStream::Helper> session_helper,
+    std::unique_ptr<QuicCryptoServerStreamBase::Helper> session_helper,
     std::unique_ptr<QuicAlarmFactory> alarm_factory,
     QuicSimpleServerBackend* quic_simple_server_backend,
     uint8_t expected_server_connection_id_length)
diff --git a/quic/tools/quic_simple_dispatcher.h b/quic/tools/quic_simple_dispatcher.h
index e64614a..dbb5fdf 100644
--- a/quic/tools/quic_simple_dispatcher.h
+++ b/quic/tools/quic_simple_dispatcher.h
@@ -19,7 +19,7 @@
       const QuicCryptoServerConfig* crypto_config,
       QuicVersionManager* version_manager,
       std::unique_ptr<QuicConnectionHelperInterface> helper,
-      std::unique_ptr<QuicCryptoServerStream::Helper> session_helper,
+      std::unique_ptr<QuicCryptoServerStreamBase::Helper> session_helper,
       std::unique_ptr<QuicAlarmFactory> alarm_factory,
       QuicSimpleServerBackend* quic_simple_server_backend,
       uint8_t expected_server_connection_id_length);
diff --git a/quic/tools/quic_simple_server_session.cc b/quic/tools/quic_simple_server_session.cc
index b17bc78..bb9a852 100644
--- a/quic/tools/quic_simple_server_session.cc
+++ b/quic/tools/quic_simple_server_session.cc
@@ -21,7 +21,7 @@
     const ParsedQuicVersionVector& supported_versions,
     QuicConnection* connection,
     QuicSession::Visitor* visitor,
-    QuicCryptoServerStream::Helper* helper,
+    QuicCryptoServerStreamBase::Helper* helper,
     const QuicCryptoServerConfig* crypto_config,
     QuicCompressedCertsCache* compressed_certs_cache,
     QuicSimpleServerBackend* quic_simple_server_backend)
diff --git a/quic/tools/quic_simple_server_session.h b/quic/tools/quic_simple_server_session.h
index d219b32..2bf645d 100644
--- a/quic/tools/quic_simple_server_session.h
+++ b/quic/tools/quic_simple_server_session.h
@@ -56,7 +56,7 @@
                           const ParsedQuicVersionVector& supported_versions,
                           QuicConnection* connection,
                           QuicSession::Visitor* visitor,
-                          QuicCryptoServerStream::Helper* helper,
+                          QuicCryptoServerStreamBase::Helper* helper,
                           const QuicCryptoServerConfig* crypto_config,
                           QuicCompressedCertsCache* compressed_certs_cache,
                           QuicSimpleServerBackend* quic_simple_server_backend);
diff --git a/quic/tools/quic_simple_server_session_test.cc b/quic/tools/quic_simple_server_session_test.cc
index 8e15bcd..8265dde 100644
--- a/quic/tools/quic_simple_server_session_test.cc
+++ b/quic/tools/quic_simple_server_session_test.cc
@@ -85,7 +85,7 @@
       const QuicCryptoServerConfig* crypto_config,
       QuicCompressedCertsCache* compressed_certs_cache,
       QuicSession* session,
-      QuicCryptoServerStream::Helper* helper)
+      QuicCryptoServerStreamBase::Helper* helper)
       : QuicCryptoServerStream(crypto_config,
                                compressed_certs_cache,
                                session,
@@ -121,7 +121,7 @@
     const QuicCryptoServerConfig* crypto_config,
     QuicCompressedCertsCache* compressed_certs_cache,
     QuicSession* session,
-    QuicCryptoServerStream::Helper* helper) {
+    QuicCryptoServerStreamBase::Helper* helper) {
   switch (session->connection()->version().handshake_protocol) {
     case PROTOCOL_QUIC_CRYPTO:
       return new MockQuicCryptoServerStream(
@@ -171,7 +171,7 @@
       const QuicConfig& config,
       QuicConnection* connection,
       QuicSession::Visitor* visitor,
-      QuicCryptoServerStream::Helper* helper,
+      QuicCryptoServerStreamBase::Helper* helper,
       const QuicCryptoServerConfig* crypto_config,
       QuicCompressedCertsCache* compressed_certs_cache,
       QuicSimpleServerBackend* quic_simple_server_backend)
diff --git a/quic/tools/quic_transport_simple_server_dispatcher.cc b/quic/tools/quic_transport_simple_server_dispatcher.cc
index b6daed3..55a0674 100644
--- a/quic/tools/quic_transport_simple_server_dispatcher.cc
+++ b/quic/tools/quic_transport_simple_server_dispatcher.cc
@@ -20,7 +20,7 @@
     const QuicCryptoServerConfig* crypto_config,
     QuicVersionManager* version_manager,
     std::unique_ptr<QuicConnectionHelperInterface> helper,
-    std::unique_ptr<QuicCryptoServerStream::Helper> session_helper,
+    std::unique_ptr<QuicCryptoServerStreamBase::Helper> session_helper,
     std::unique_ptr<QuicAlarmFactory> alarm_factory,
     uint8_t expected_server_connection_id_length,
     std::vector<url::Origin> accepted_origins)
diff --git a/quic/tools/quic_transport_simple_server_dispatcher.h b/quic/tools/quic_transport_simple_server_dispatcher.h
index c8d5ad7..cc3f76e 100644
--- a/quic/tools/quic_transport_simple_server_dispatcher.h
+++ b/quic/tools/quic_transport_simple_server_dispatcher.h
@@ -21,7 +21,7 @@
       const QuicCryptoServerConfig* crypto_config,
       QuicVersionManager* version_manager,
       std::unique_ptr<QuicConnectionHelperInterface> helper,
-      std::unique_ptr<QuicCryptoServerStream::Helper> session_helper,
+      std::unique_ptr<QuicCryptoServerStreamBase::Helper> session_helper,
       std::unique_ptr<QuicAlarmFactory> alarm_factory,
       uint8_t expected_server_connection_id_length,
       std::vector<url::Origin> accepted_origins);