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

Unified Diff: net/tools/quic/quic_dispatcher.h

Issue 1899753003: Split out QuicAlarm creation from QuicConnectionHelper to new QuicAlarmFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@119871679
Patch Set: Created 4 years, 8 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
Index: net/tools/quic/quic_dispatcher.h
diff --git a/net/tools/quic/quic_dispatcher.h b/net/tools/quic/quic_dispatcher.h
index f4eda9f53a2b0635ca23554850e9fd4e5592351e..6d63f95d4cdcc3eaf0c3fea6611e4d6843f0d574 100644
--- a/net/tools/quic/quic_dispatcher.h
+++ b/net/tools/quic/quic_dispatcher.h
@@ -51,7 +51,8 @@ class QuicDispatcher : public QuicServerSessionVisitor,
QuicDispatcher(const QuicConfig& config,
const QuicCryptoServerConfig* crypto_config,
const QuicVersionVector& supported_versions,
- QuicConnectionHelperInterface* helper);
+ QuicConnectionHelperInterface* helper,
+ QuicAlarmFactory* alarm_factory);
~QuicDispatcher() override;
@@ -196,6 +197,8 @@ class QuicDispatcher : public QuicServerSessionVisitor,
QuicConnectionHelperInterface* helper() { return helper_.get(); }
+ QuicAlarmFactory* alarm_factory() { return alarm_factory_.get(); }
+
QuicPacketWriter* writer() { return writer_.get(); }
// Creates per-connection packet writers out of the QuicDispatcher's shared
@@ -242,6 +245,9 @@ class QuicDispatcher : public QuicServerSessionVisitor,
// The helper used for all connections.
std::unique_ptr<QuicConnectionHelperInterface> helper_;
+ // Creates alarms.
+ std::unique_ptr<QuicAlarmFactory> alarm_factory_;
+
// An alarm which deletes closed sessions.
std::unique_ptr<QuicAlarm> delete_sessions_alarm_;

Powered by Google App Engine
This is Rietveld 408576698