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

Unified Diff: net/quic/quic_connection.cc

Issue 1905843003: Split out QuicAlarm creation from QuicConnectionHelper to new QuicAlarmFactory. No behavior change,… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@119753783
Patch Set: Rebase 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
« no previous file with comments | « net/quic/quic_connection.h ('k') | net/quic/quic_connection_logger_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_,
« no previous file with comments | « net/quic/quic_connection.h ('k') | net/quic/quic_connection_logger_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698