| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_TEST_TOOLS_MOCK_CRYPTO_CLIENT_STREAM_H_ | 5 #ifndef NET_QUIC_TEST_TOOLS_MOCK_CRYPTO_CLIENT_STREAM_H_ |
| 6 #define NET_QUIC_TEST_TOOLS_MOCK_CRYPTO_CLIENT_STREAM_H_ | 6 #define NET_QUIC_TEST_TOOLS_MOCK_CRYPTO_CLIENT_STREAM_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "net/quic/crypto/crypto_handshake.h" | 11 #include "net/quic/crypto/crypto_handshake.h" |
| 12 #include "net/quic/crypto/crypto_protocol.h" | 12 #include "net/quic/crypto/crypto_protocol.h" |
| 13 #include "net/quic/quic_client_session_base.h" |
| 13 #include "net/quic/quic_crypto_client_stream.h" | 14 #include "net/quic/quic_crypto_client_stream.h" |
| 14 #include "net/quic/quic_session.h" | 15 #include "net/quic/quic_session.h" |
| 15 | 16 |
| 16 namespace net { | 17 namespace net { |
| 17 | 18 |
| 18 class QuicServerId; | 19 class QuicServerId; |
| 19 | 20 |
| 20 class MockCryptoClientStream : public QuicCryptoClientStream { | 21 class MockCryptoClientStream : public QuicCryptoClientStream { |
| 21 public: | 22 public: |
| 22 // HandshakeMode enumerates the handshake mode MockCryptoClientStream should | 23 // HandshakeMode enumerates the handshake mode MockCryptoClientStream should |
| (...skipping 28 matching lines...) Expand all Loading... |
| 51 void CryptoConnect() override; | 52 void CryptoConnect() override; |
| 52 | 53 |
| 53 // Invokes the sessions's CryptoHandshakeEvent method with the specified | 54 // Invokes the sessions's CryptoHandshakeEvent method with the specified |
| 54 // event. | 55 // event. |
| 55 void SendOnCryptoHandshakeEvent(QuicSession::CryptoHandshakeEvent event); | 56 void SendOnCryptoHandshakeEvent(QuicSession::CryptoHandshakeEvent event); |
| 56 | 57 |
| 57 HandshakeMode handshake_mode_; | 58 HandshakeMode handshake_mode_; |
| 58 | 59 |
| 59 private: | 60 private: |
| 60 void SetConfigNegotiated(); | 61 void SetConfigNegotiated(); |
| 61 QuicClientSessionBase* client_session(); | |
| 62 | 62 |
| 63 const ProofVerifyDetails* proof_verify_details_; | 63 const ProofVerifyDetails* proof_verify_details_; |
| 64 | 64 |
| 65 DISALLOW_COPY_AND_ASSIGN(MockCryptoClientStream); | 65 DISALLOW_COPY_AND_ASSIGN(MockCryptoClientStream); |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 } // namespace net | 68 } // namespace net |
| 69 | 69 |
| 70 #endif // NET_QUIC_TEST_TOOLS_MOCK_CRYPTO_CLIENT_STREAM_H_ | 70 #endif // NET_QUIC_TEST_TOOLS_MOCK_CRYPTO_CLIENT_STREAM_H_ |
| OLD | NEW |