Index: net/quic/core/quic_server_session_base.h |
diff --git a/net/quic/core/quic_server_session_base.h b/net/quic/core/quic_server_session_base.h |
index 983d849b38b1114b29b1e9da6510b1a7b97cdd7c..8a09fdeb91c78672b1ee5278b9cfd950c3e19fa8 100644 |
--- a/net/quic/core/quic_server_session_base.h |
+++ b/net/quic/core/quic_server_session_base.h |
@@ -60,30 +60,12 @@ class NET_EXPORT_PRIVATE QuicServerSessionBase : public QuicSpdySession { |
QuicServerSessionBase* session) = 0; |
}; |
- // Provides helper functions for the session. |
- class Helper { |
- public: |
- virtual ~Helper() {} |
- |
- // Given the current connection_id, generates a new ConnectionId to |
- // be returned with a stateless reject. |
- virtual QuicConnectionId GenerateConnectionIdForReject( |
- QuicConnectionId connection_id) const = 0; |
- |
- // 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 IPEndPoint& self_address, |
- std::string* error_details) const = 0; |
- }; |
- |
// Does not take ownership of |connection|. |crypto_config| must outlive the |
- // session. |
+ // session. |helper| must outlive any created crypto streams. |
QuicServerSessionBase(const QuicConfig& config, |
QuicConnection* connection, |
Visitor* visitor, |
- Helper* helper, |
+ QuicCryptoServerStream::Helper* helper, |
const QuicCryptoServerConfig* crypto_config, |
QuicCompressedCertsCache* compressed_certs_cache); |
@@ -115,14 +97,6 @@ class NET_EXPORT_PRIVATE QuicServerSessionBase : public QuicSpdySession { |
bool server_push_enabled() const { return server_push_enabled_; } |
- // Delegates to the helper's GenerateConnectionIdForReject method. |
- QuicConnectionId GenerateConnectionIdForReject( |
- QuicConnectionId connection_id); |
- |
- // Delegates to the helper's CanAcceptClientHello method. |
- bool CanAcceptClientHello(const CryptoHandshakeMessage& message, |
- std::string* error_details); |
- |
protected: |
// QuicSession methods(override them with return type of QuicSpdyStream*): |
QuicCryptoServerStreamBase* GetCryptoStream() override; |
@@ -148,6 +122,8 @@ class NET_EXPORT_PRIVATE QuicServerSessionBase : public QuicSpdySession { |
Visitor* visitor() { return visitor_; } |
+ QuicCryptoServerStream::Helper* stream_helper() { return helper_; } |
+ |
private: |
friend class test::QuicServerSessionBasePeer; |
friend class test::QuicSimpleServerSessionPeer; |
@@ -160,7 +136,10 @@ class NET_EXPORT_PRIVATE QuicServerSessionBase : public QuicSpdySession { |
std::unique_ptr<QuicCryptoServerStreamBase> crypto_stream_; |
Visitor* visitor_; |
- Helper* helper_; |
+ |
+ // Pointer to the helper used to create crypto server streams. Must outlive |
+ // streams created via CreateQuicCryptoServerStream. |
+ QuicCryptoServerStream::Helper* helper_; |
// Whether bandwidth resumption is enabled for this connection. |
bool bandwidth_resumption_enabled_; |