Index: net/quic/quic_connection.cc |
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc |
index 60f5395be74c50800270ee67b78c826fed2572bd..c8a132f6e52ae99490232982c2eaa9721050d8db 100644 |
--- a/net/quic/quic_connection.cc |
+++ b/net/quic/quic_connection.cc |
@@ -204,6 +204,7 @@ class MtuDiscoveryAckListener : public QuicAckListenerInterface { |
QuicConnection::QuicConnection(QuicConnectionId connection_id, |
IPEndPoint address, |
QuicConnectionHelperInterface* helper, |
+ QuicAlarmFactory* alarm_factory, |
QuicPacketWriter* writer, |
bool owns_writer, |
Perspective perspective, |
@@ -212,6 +213,7 @@ QuicConnection::QuicConnection(QuicConnectionId connection_id, |
helper->GetClock()->ApproximateNow(), |
perspective), |
helper_(helper), |
+ alarm_factory_(alarm_factory), |
per_packet_options_(nullptr), |
writer_(writer), |
owns_writer_(owns_writer), |
@@ -248,17 +250,22 @@ QuicConnection::QuicConnection(QuicConnectionId connection_id, |
pending_retransmission_alarm_(false), |
defer_send_in_response_to_packets_(false), |
arena_(), |
- ack_alarm_(helper->CreateAlarm(arena_.New<AckAlarm>(this), &arena_)), |
+ ack_alarm_( |
+ alarm_factory_->CreateAlarm(arena_.New<AckAlarm>(this), &arena_)), |
retransmission_alarm_( |
- helper->CreateAlarm(arena_.New<RetransmissionAlarm>(this), &arena_)), |
- send_alarm_(helper->CreateAlarm(arena_.New<SendAlarm>(this), &arena_)), |
+ alarm_factory_->CreateAlarm(arena_.New<RetransmissionAlarm>(this), |
+ &arena_)), |
+ send_alarm_( |
+ alarm_factory_->CreateAlarm(arena_.New<SendAlarm>(this), &arena_)), |
resume_writes_alarm_( |
- helper->CreateAlarm(arena_.New<SendAlarm>(this), &arena_)), |
+ alarm_factory_->CreateAlarm(arena_.New<SendAlarm>(this), &arena_)), |
timeout_alarm_( |
- helper->CreateAlarm(arena_.New<TimeoutAlarm>(this), &arena_)), |
- ping_alarm_(helper->CreateAlarm(arena_.New<PingAlarm>(this), &arena_)), |
+ alarm_factory_->CreateAlarm(arena_.New<TimeoutAlarm>(this), &arena_)), |
+ ping_alarm_( |
+ alarm_factory_->CreateAlarm(arena_.New<PingAlarm>(this), &arena_)), |
mtu_discovery_alarm_( |
- helper->CreateAlarm(arena_.New<MtuDiscoveryAlarm>(this), &arena_)), |
+ alarm_factory_->CreateAlarm(arena_.New<MtuDiscoveryAlarm>(this), |
+ &arena_)), |
visitor_(nullptr), |
debug_visitor_(nullptr), |
packet_generator_(connection_id_, |