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

Unified Diff: net/tools/quic/quic_simple_server.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_simple_server.h ('k') | net/tools/quic/quic_simple_server_session_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_simple_server.cc
diff --git a/net/tools/quic/quic_simple_server.cc b/net/tools/quic/quic_simple_server.cc
index 765745bcdad6f71ba3ea8b448da3dcad6a50a485..41b7404d4530af2bf909ede8ad0a8f4d84934119 100644
--- a/net/tools/quic/quic_simple_server.cc
+++ b/net/tools/quic/quic_simple_server.cc
@@ -36,9 +36,11 @@ class SimpleQuicDispatcher : public QuicDispatcher {
SimpleQuicDispatcher(const QuicConfig& config,
const QuicCryptoServerConfig* crypto_config,
const QuicVersionVector& supported_versions,
- QuicConnectionHelperInterface* helper)
+ QuicConnectionHelperInterface* helper,
+ QuicAlarmFactory* alarm_factory)
: QuicDispatcher(config, crypto_config, supported_versions,
- std::unique_ptr<QuicConnectionHelperInterface>(helper)) {}
+ std::unique_ptr<QuicConnectionHelperInterface>(helper),
+ std::unique_ptr<QuicAlarmFactory>(alarm_factory)) {}
protected:
QuicServerSessionBase* CreateQuicSession(
@@ -64,10 +66,11 @@ QuicSimpleServer::QuicSimpleServer(ProofSource* proof_source,
const QuicConfig& config,
const QuicVersionVector& supported_versions)
: helper_(
- new QuicChromiumConnectionHelper(base::ThreadTaskRunnerHandle::Get()
- .get(),
- &clock_,
+ new QuicChromiumConnectionHelper(&clock_,
QuicRandom::GetInstance())),
+ alarm_factory_(
+ new QuicChromiumAlarmFactory(base::ThreadTaskRunnerHandle::Get().get(),
+ &clock_)),
config_(config),
crypto_config_(kSourceAddressTokenSecret,
QuicRandom::GetInstance(),
@@ -146,7 +149,7 @@ int QuicSimpleServer::Listen(const IPEndPoint& address) {
socket_.swap(socket);
dispatcher_.reset(new SimpleQuicDispatcher(config_, &crypto_config_,
- supported_versions_, helper_));
+ supported_versions_, helper_, alarm_factory_));
QuicSimpleServerPacketWriter* writer =
new QuicSimpleServerPacketWriter(socket_.get(), dispatcher_.get());
dispatcher_->InitializeWithWriter(writer);
« no previous file with comments | « net/tools/quic/quic_simple_server.h ('k') | net/tools/quic/quic_simple_server_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698