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

Unified Diff: net/tools/quic/test_tools/quic_test_server.cc

Issue 971863002: QUIC - deleted unused QuicTestServer code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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_server.h ('k') | no next file » | 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
deleted file mode 100644
index 3d6c2476c6c0f6b3ca7ef82cdc5199bcf3774794..0000000000000000000000000000000000000000
--- a/net/tools/quic/test_tools/quic_test_server.cc
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "net/tools/quic/test_tools/quic_test_server.h"
-
-namespace net {
-
-namespace tools {
-
-namespace test {
-
-class QuicTestDispatcher : public QuicDispatcher {
- public:
- QuicTestDispatcher(const QuicConfig& config,
- const QuicCryptoServerConfig& crypto_config,
- const QuicVersionVector& versions,
- PacketWriterFactory* factory,
- EpollServer* eps)
- : QuicDispatcher(config, crypto_config, versions, factory, eps) {}
- QuicSession* CreateQuicSession(QuicConnectionId id,
- const IPEndPoint& server,
- const IPEndPoint& client) override {
- if (session_creator_ == nullptr) {
- return QuicDispatcher::CreateQuicSession(id, server, client);
- } else {
- QuicConnection* connection = CreateQuicConnection(id, server, client);
- QuicServerSession* session =
- (session_creator_)(config(), connection, this);
- session->InitializeSession(crypto_config());
- return session;
- }
- }
-
- void set_session_creator(
- const QuicTestServer::SessionCreationFunction& function) {
- session_creator_ = function;
- }
-
- private:
- QuicTestServer::SessionCreationFunction session_creator_;
-};
-
-QuicDispatcher* QuicTestServer::CreateQuicDispatcher() {
- return new QuicTestDispatcher(
- config(), crypto_config(), supported_versions(),
- new QuicDispatcher::DefaultPacketWriterFactory(), epoll_server());
-}
-
-void QuicTestServer::SetSessionCreator(
- const SessionCreationFunction& function) {
- static_cast<QuicTestDispatcher*>(dispatcher())->set_session_creator(function);
-}
-
-/////////////////////////// TEST SESSIONS ///////////////////////////////
-
-ImmediateGoAwaySession::ImmediateGoAwaySession(
- const QuicConfig& config,
- QuicConnection* connection,
- QuicServerSessionVisitor* visitor)
- : QuicServerSession(config, connection, visitor) {
- SendGoAway(QUIC_PEER_GOING_AWAY, "");
-}
-
-} // namespace test
-
-} // namespace tools
-
-} // namespace net
« no previous file with comments | « net/tools/quic/test_tools/quic_test_server.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698