| OLD | NEW |
| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 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 QuicServerSessionVisitor* visitor, | 37 QuicServerSessionVisitor* visitor, |
| 38 const QuicCryptoServerConfig* crypto_config) = 0; | 38 const QuicCryptoServerConfig* crypto_config, |
| 39 QuicCompressedCertsCache* compressed_certs_cache) = 0; |
| 39 }; | 40 }; |
| 40 | 41 |
| 41 // Factory for creating QuicSimpleServerStreams. | 42 // Factory for creating QuicSimpleServerStreams. |
| 42 class StreamFactory { | 43 class StreamFactory { |
| 43 public: | 44 public: |
| 44 virtual ~StreamFactory() {} | 45 virtual ~StreamFactory() {} |
| 45 | 46 |
| 46 // Returns a new stream owned by the caller. | 47 // Returns a new stream owned by the caller. |
| 47 virtual QuicSimpleServerStream* CreateStream(QuicStreamId id, | 48 virtual QuicSimpleServerStream* CreateStream(QuicStreamId id, |
| 48 QuicSpdySession* session) = 0; | 49 QuicSpdySession* session) = 0; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 | 83 |
| 83 // Useful test sessions for the QuicTestServer. | 84 // Useful test sessions for the QuicTestServer. |
| 84 | 85 |
| 85 // Test session which sends a GOAWAY immedaitely on creation, before crypto | 86 // Test session which sends a GOAWAY immedaitely on creation, before crypto |
| 86 // credentials have even been established. | 87 // credentials have even been established. |
| 87 class ImmediateGoAwaySession : public QuicSimpleServerSession { | 88 class ImmediateGoAwaySession : public QuicSimpleServerSession { |
| 88 public: | 89 public: |
| 89 ImmediateGoAwaySession(const QuicConfig& config, | 90 ImmediateGoAwaySession(const QuicConfig& config, |
| 90 QuicConnection* connection, | 91 QuicConnection* connection, |
| 91 QuicServerSessionVisitor* visitor, | 92 QuicServerSessionVisitor* visitor, |
| 92 const QuicCryptoServerConfig* crypto_config); | 93 const QuicCryptoServerConfig* crypto_config, |
| 94 QuicCompressedCertsCache* compressed_certs_cache); |
| 93 }; | 95 }; |
| 94 | 96 |
| 95 } // namespace test | 97 } // namespace test |
| 96 | 98 |
| 97 | 99 |
| 98 } // namespace net | 100 } // namespace net |
| 99 | 101 |
| 100 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_SERVER_H_ | 102 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_SERVER_H_ |
| OLD | NEW |