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

Unified Diff: net/tools/quic/test_tools/quic_test_server.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/test_tools/quic_test_client.cc ('k') | net/tools/quic/test_tools/server_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/test_tools/quic_test_server.cc
diff --git a/net/tools/quic/test_tools/quic_test_server.cc b/net/tools/quic/test_tools/quic_test_server.cc
index dc5fc45141d60470c9a63c2549bdff2dfff59e52..32e41178b1f65e277547a5312d8ab6f04afee232 100644
--- a/net/tools/quic/test_tools/quic_test_server.cc
+++ b/net/tools/quic/test_tools/quic_test_server.cc
@@ -19,6 +19,7 @@
#include "net/quic/quic_packet_writer.h"
#include "net/quic/quic_protocol.h"
#include "net/tools/quic/quic_dispatcher.h"
+#include "net/tools/quic/quic_epoll_alarm_factory.h"
#include "net/tools/quic/quic_epoll_connection_helper.h"
#include "net/tools/quic/quic_simple_server_session.h"
#include "net/tools/quic/quic_simple_server_stream.h"
@@ -76,8 +77,13 @@ class QuicTestDispatcher : public QuicDispatcher {
QuicTestDispatcher(const QuicConfig& config,
const QuicCryptoServerConfig* crypto_config,
const QuicVersionVector& versions,
- QuicConnectionHelperInterface* helper)
- : QuicDispatcher(config, crypto_config, versions, helper),
+ std::unique_ptr<QuicConnectionHelperInterface> helper,
+ std::unique_ptr<QuicAlarmFactory> alarm_factory)
+ : QuicDispatcher(config,
+ crypto_config,
+ versions,
+ std::move(helper),
+ std::move(alarm_factory)),
session_factory_(nullptr),
stream_factory_(nullptr),
crypto_stream_factory_(nullptr) {}
@@ -90,7 +96,7 @@ class QuicTestDispatcher : public QuicDispatcher {
return QuicDispatcher::CreateQuicSession(id, client);
}
QuicConnection* connection = new QuicConnection(
- id, client, helper(), CreatePerConnectionWriter(),
+ id, client, helper(), alarm_factory(), CreatePerConnectionWriter(),
/* owns_writer= */ true, Perspective::IS_SERVER, supported_versions());
QuicServerSessionBase* session = nullptr;
@@ -150,8 +156,10 @@ QuicTestServer::QuicTestServer(ProofSource* proof_source,
QuicDispatcher* QuicTestServer::CreateQuicDispatcher() {
return new QuicTestDispatcher(
config(), &crypto_config(), supported_versions(),
- new QuicEpollConnectionHelper(epoll_server(),
- QuicAllocator::BUFFER_POOL));
+ std::unique_ptr<QuicEpollConnectionHelper>(new QuicEpollConnectionHelper(
+ epoll_server(), QuicAllocator::BUFFER_POOL)),
+ std::unique_ptr<QuicEpollAlarmFactory>(
+ new QuicEpollAlarmFactory(epoll_server())));
}
void QuicTestServer::SetSessionFactory(SessionFactory* factory) {
« no previous file with comments | « net/tools/quic/test_tools/quic_test_client.cc ('k') | net/tools/quic/test_tools/server_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698