| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_QUIC_TOOLS_QUIC_SIMPLE_CRYPTO_SERVER_STREAM_HELPER_H_ | 5 #ifndef NET_TOOLS_QUIC_QUIC_SIMPLE_CRYPTO_SERVER_STREAM_HELPER_H_ |
| 6 #define NET_QUIC_TOOLS_QUIC_SIMPLE_CRYPTO_SERVER_STREAM_HELPER_H_ | 6 #define NET_TOOLS_QUIC_QUIC_SIMPLE_CRYPTO_SERVER_STREAM_HELPER_H_ |
| 7 | 7 |
| 8 #include "net/quic/core/crypto/quic_random.h" | 8 #include "net/quic/core/crypto/quic_random.h" |
| 9 #include "net/quic/core/quic_crypto_server_stream.h" | 9 #include "net/quic/core/quic_crypto_server_stream.h" |
| 10 | 10 |
| 11 namespace net { | 11 namespace net { |
| 12 | 12 |
| 13 // Simple helper for server crypto streams which generates a new random | 13 // Simple helper for server crypto streams which generates a new random |
| 14 // connection ID for stateless rejects. | 14 // connection ID for stateless rejects. |
| 15 class QuicSimpleCryptoServerStreamHelper | 15 class QuicSimpleCryptoServerStreamHelper |
| 16 : public QuicCryptoServerStream::Helper { | 16 : public QuicCryptoServerStream::Helper { |
| 17 public: | 17 public: |
| 18 explicit QuicSimpleCryptoServerStreamHelper(QuicRandom* random); | 18 explicit QuicSimpleCryptoServerStreamHelper(QuicRandom* random); |
| 19 | 19 |
| 20 ~QuicSimpleCryptoServerStreamHelper() override; | 20 ~QuicSimpleCryptoServerStreamHelper() override; |
| 21 | 21 |
| 22 QuicConnectionId GenerateConnectionIdForReject( | 22 QuicConnectionId GenerateConnectionIdForReject( |
| 23 QuicConnectionId /*connection_id*/) const override; | 23 QuicConnectionId /*connection_id*/) const override; |
| 24 | 24 |
| 25 bool CanAcceptClientHello(const CryptoHandshakeMessage& message, | 25 bool CanAcceptClientHello(const CryptoHandshakeMessage& message, |
| 26 const QuicSocketAddress& self_address, | 26 const QuicSocketAddress& self_address, |
| 27 std::string* error_details) const override; | 27 std::string* error_details) const override; |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 QuicRandom* random_; // Unowned. | 30 QuicRandom* random_; // Unowned. |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 } // namespace net | 33 } // namespace net |
| 34 | 34 |
| 35 #endif // NET_QUIC_TOOLS_QUIC_SIMPLE_CRYPTO_SERVER_STREAM_HELPER_H_ | 35 #endif // NET_TOOLS_QUIC_QUIC_SIMPLE_CRYPTO_SERVER_STREAM_HELPER_H_ |
| OLD | NEW |