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

Unified Diff: net/tools/quic/quic_dispatcher.cc

Issue 1908103002: Landing Recent QUIC changes until 4/15/2016 17:20 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix 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 6d08fbe2dd8e9d22fe10df7d02c0729e4a372090..bda974192a84500ce63813e1d4a4ccb191c5a0ed 100644
--- a/net/tools/quic/quic_dispatcher.cc
+++ b/net/tools/quic/quic_dispatcher.cc
@@ -41,17 +41,20 @@ class DeleteSessionsAlarm : public QuicAlarm::Delegate {
} // namespace
-QuicDispatcher::QuicDispatcher(const QuicConfig& config,
- const QuicCryptoServerConfig* crypto_config,
- const QuicVersionVector& supported_versions,
- QuicConnectionHelperInterface* helper)
+QuicDispatcher::QuicDispatcher(
+ const QuicConfig& config,
+ const QuicCryptoServerConfig* crypto_config,
+ const QuicVersionVector& supported_versions,
+ std::unique_ptr<QuicConnectionHelperInterface> helper,
+ std::unique_ptr<QuicAlarmFactory> alarm_factory)
: config_(config),
crypto_config_(crypto_config),
compressed_certs_cache_(
QuicCompressedCertsCache::kQuicCompressedCertsCacheSize),
- helper_(helper),
+ 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,
@@ -449,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(
@@ -459,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