Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(815)

Unified Diff: net/quic/core/quic_server_session_base.h

Issue 2460163002: Refactor QuicServerSessionBase::Visitor (Closed)
Patch Set: Updated patchset dependency Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/quic_client_session_base.cc ('k') | net/quic/core/quic_server_session_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2e6d7e4fbe6c80e7c1a43a12fe2797afbe512ca6..347cf1644673bd8174f51e8c3e7687dc22649fc2 100644
--- a/net/quic/core/quic_server_session_base.h
+++ b/net/quic/core/quic_server_session_base.h
@@ -37,43 +37,19 @@ class QuicSimpleServerSessionPeer;
class NET_EXPORT_PRIVATE QuicServerSessionBase : public QuicSpdySession {
public:
- // An interface from the session to the entity owning the session.
- // This lets the session notify its owner (the Dispatcher) when the connection
- // is closed, blocked, or added/removed from the time-wait std::list.
- class Visitor {
- public:
- virtual ~Visitor() {}
-
- // Called when the connection is closed.
- virtual void OnConnectionClosed(QuicConnectionId connection_id,
- QuicErrorCode error,
- const std::string& error_details) = 0;
-
- // Called when the session has become write blocked.
- virtual void OnWriteBlocked(QuicBlockedWriterInterface* blocked_writer) = 0;
-
- // Called after the given connection is added to the time-wait std::list.
- virtual void OnConnectionAddedToTimeWaitList(
- QuicConnectionId connection_id) = 0;
-
- // Called before a packet is going to be processed by |session|.
- virtual void OnPacketBeingDispatchedToSession(QuicSession* session) = 0;
- };
-
// Does not take ownership of |connection|. |crypto_config| must outlive the
// session. |helper| must outlive any created crypto streams.
QuicServerSessionBase(const QuicConfig& config,
QuicConnection* connection,
- Visitor* visitor,
+ QuicSession::Visitor* visitor,
QuicCryptoServerStream::Helper* helper,
const QuicCryptoServerConfig* crypto_config,
QuicCompressedCertsCache* compressed_certs_cache);
- // Override the base class to notify the owner of the connection close.
+ // Override the base class to cancel any ongoing asychronous crypto.
void OnConnectionClosed(QuicErrorCode error,
const std::string& error_details,
ConnectionCloseSource source) override;
- void OnWriteBlocked() override;
// Sends a server config update to the client, containing new bandwidth
// estimate.
@@ -116,8 +92,6 @@ class NET_EXPORT_PRIVATE QuicServerSessionBase : public QuicSpdySession {
const QuicCryptoServerConfig* crypto_config() { return crypto_config_; }
- Visitor* visitor() { return visitor_; }
-
QuicCryptoServerStream::Helper* stream_helper() { return helper_; }
private:
@@ -131,7 +105,6 @@ class NET_EXPORT_PRIVATE QuicServerSessionBase : public QuicSpdySession {
QuicCompressedCertsCache* compressed_certs_cache_;
std::unique_ptr<QuicCryptoServerStreamBase> crypto_stream_;
- Visitor* visitor_;
// Pointer to the helper used to create crypto server streams. Must outlive
// streams created via CreateQuicCryptoServerStream.
« no previous file with comments | « net/quic/core/quic_client_session_base.cc ('k') | net/quic/core/quic_server_session_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698