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

Unified Diff: net/tools/quic/quic_dispatcher.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/tools/quic/quic_dispatcher.h ('k') | net/tools/quic/quic_dispatcher_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « net/tools/quic/quic_dispatcher.h ('k') | net/tools/quic/quic_dispatcher_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698