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

Side by Side Diff: net/tools/quic/test_tools/quic_test_server.h

Issue 2460163002: Refactor QuicServerSessionBase::Visitor (Closed)
Patch Set: Updated patchset dependency Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_SERVER_H_ 5 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_SERVER_H_
6 #define NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_SERVER_H_ 6 #define NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_SERVER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 16 matching lines...) Expand all
27 public: 27 public:
28 // Factory for creating QuicServerSessions. 28 // Factory for creating QuicServerSessions.
29 class SessionFactory { 29 class SessionFactory {
30 public: 30 public:
31 virtual ~SessionFactory() {} 31 virtual ~SessionFactory() {}
32 32
33 // Returns a new session owned by the caller. 33 // Returns a new session owned by the caller.
34 virtual QuicServerSessionBase* CreateSession( 34 virtual QuicServerSessionBase* CreateSession(
35 const QuicConfig& config, 35 const QuicConfig& config,
36 QuicConnection* connection, 36 QuicConnection* connection,
37 QuicServerSessionBase::Visitor* visitor, 37 QuicSession::Visitor* visitor,
38 QuicCryptoServerStream::Helper* helper, 38 QuicCryptoServerStream::Helper* helper,
39 const QuicCryptoServerConfig* crypto_config, 39 const QuicCryptoServerConfig* crypto_config,
40 QuicCompressedCertsCache* compressed_certs_cache) = 0; 40 QuicCompressedCertsCache* compressed_certs_cache) = 0;
41 }; 41 };
42 42
43 // Factory for creating QuicSimpleServerStreams. 43 // Factory for creating QuicSimpleServerStreams.
44 class StreamFactory { 44 class StreamFactory {
45 public: 45 public:
46 virtual ~StreamFactory() {} 46 virtual ~StreamFactory() {}
47 47
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 }; 83 };
84 84
85 // Useful test sessions for the QuicTestServer. 85 // Useful test sessions for the QuicTestServer.
86 86
87 // Test session which sends a GOAWAY immedaitely on creation, before crypto 87 // Test session which sends a GOAWAY immedaitely on creation, before crypto
88 // credentials have even been established. 88 // credentials have even been established.
89 class ImmediateGoAwaySession : public QuicSimpleServerSession { 89 class ImmediateGoAwaySession : public QuicSimpleServerSession {
90 public: 90 public:
91 ImmediateGoAwaySession(const QuicConfig& config, 91 ImmediateGoAwaySession(const QuicConfig& config,
92 QuicConnection* connection, 92 QuicConnection* connection,
93 QuicServerSessionBase::Visitor* visitor, 93 QuicSession::Visitor* visitor,
94 QuicCryptoServerStream::Helper* helper, 94 QuicCryptoServerStream::Helper* helper,
95 const QuicCryptoServerConfig* crypto_config, 95 const QuicCryptoServerConfig* crypto_config,
96 QuicCompressedCertsCache* compressed_certs_cache); 96 QuicCompressedCertsCache* compressed_certs_cache);
97 // Override to send GoAway. 97 // Override to send GoAway.
98 void OnStreamFrame(const QuicStreamFrame& frame) override; 98 void OnStreamFrame(const QuicStreamFrame& frame) override;
99 }; 99 };
100 100
101 } // namespace test 101 } // namespace test
102 102
103 103
104 } // namespace net 104 } // namespace net
105 105
106 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_SERVER_H_ 106 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_SERVER_H_
OLDNEW
« no previous file with comments | « net/tools/quic/test_tools/mock_quic_time_wait_list_manager.cc ('k') | net/tools/quic/test_tools/quic_test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698