Index: net/tools/quic/quic_dispatcher.cc |
diff --git a/net/tools/quic/quic_dispatcher.cc b/net/tools/quic/quic_dispatcher.cc |
index 7c7a7b284c63a910619068edf51700290ea30a6c..bda974192a84500ce63813e1d4a4ccb191c5a0ed 100644 |
--- a/net/tools/quic/quic_dispatcher.cc |
+++ b/net/tools/quic/quic_dispatcher.cc |
@@ -45,14 +45,16 @@ QuicDispatcher::QuicDispatcher( |
const QuicConfig& config, |
const QuicCryptoServerConfig* crypto_config, |
const QuicVersionVector& supported_versions, |
- std::unique_ptr<QuicConnectionHelperInterface> helper) |
+ std::unique_ptr<QuicConnectionHelperInterface> helper, |
+ std::unique_ptr<QuicAlarmFactory> alarm_factory) |
: config_(config), |
crypto_config_(crypto_config), |
compressed_certs_cache_( |
QuicCompressedCertsCache::kQuicCompressedCertsCacheSize), |
helper_(std::move(helper)), |
+ alarm_factory_(std::move(alarm_factory)), |
delete_sessions_alarm_( |
- helper_->CreateAlarm(new DeleteSessionsAlarm(this))), |
+ alarm_factory_->CreateAlarm(new DeleteSessionsAlarm(this))), |
supported_versions_(supported_versions), |
current_packet_(nullptr), |
framer_(supported_versions, |
@@ -450,7 +452,8 @@ QuicServerSessionBase* QuicDispatcher::CreateQuicSession( |
const IPEndPoint& client_address) { |
// The QuicServerSessionBase takes ownership of |connection| below. |
QuicConnection* connection = new QuicConnection( |
- connection_id, client_address, helper_.get(), CreatePerConnectionWriter(), |
+ connection_id, client_address, helper_.get(), alarm_factory_.get(), |
+ CreatePerConnectionWriter(), |
/* owns_writer= */ true, Perspective::IS_SERVER, supported_versions_); |
QuicServerSessionBase* session = new QuicSimpleServerSession( |
@@ -460,7 +463,8 @@ QuicServerSessionBase* QuicDispatcher::CreateQuicSession( |
} |
QuicTimeWaitListManager* QuicDispatcher::CreateQuicTimeWaitListManager() { |
- return new QuicTimeWaitListManager(writer_.get(), this, helper_.get()); |
+ return new QuicTimeWaitListManager(writer_.get(), this, helper_.get(), |
+ alarm_factory_.get()); |
} |
bool QuicDispatcher::HandlePacketForTimeWait( |