| 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 "net/quic/crypto/crypto_handshake.h" | 10 #include "net/quic/crypto/crypto_handshake.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 // ZERO_RTT indicates that CryptoConnect will establish encryption but will | 29 // ZERO_RTT indicates that CryptoConnect will establish encryption but will |
| 30 // not confirm the handshake. | 30 // not confirm the handshake. |
| 31 ZERO_RTT, | 31 ZERO_RTT, |
| 32 | 32 |
| 33 // COLD_START indicates that CryptoConnect will neither establish encryption | 33 // COLD_START indicates that CryptoConnect will neither establish encryption |
| 34 // nor confirm the handshake | 34 // nor confirm the handshake |
| 35 COLD_START, | 35 COLD_START, |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 MockCryptoClientStream( | 38 MockCryptoClientStream(const QuicServerId& server_id, |
| 39 const QuicServerId& server_id, | 39 QuicClientSessionBase* session, |
| 40 QuicClientSessionBase* session, | 40 ProofVerifyContext* verify_context, |
| 41 ProofVerifyContext* verify_context, | 41 QuicCryptoClientConfig* crypto_config, |
| 42 QuicCryptoClientConfig* crypto_config, | 42 HandshakeMode handshake_mode, |
| 43 HandshakeMode handshake_mode, | 43 const ProofVerifyDetails* proof_verify_details_); |
| 44 const ProofVerifyDetails* proof_verify_details_); | |
| 45 virtual ~MockCryptoClientStream(); | 44 virtual ~MockCryptoClientStream(); |
| 46 | 45 |
| 47 // CryptoFramerVisitorInterface implementation. | 46 // CryptoFramerVisitorInterface implementation. |
| 48 virtual void OnHandshakeMessage( | 47 virtual void OnHandshakeMessage( |
| 49 const CryptoHandshakeMessage& message) OVERRIDE; | 48 const CryptoHandshakeMessage& message) OVERRIDE; |
| 50 | 49 |
| 51 // QuicCryptoClientStream implementation. | 50 // QuicCryptoClientStream implementation. |
| 52 virtual bool CryptoConnect() OVERRIDE; | 51 virtual bool CryptoConnect() OVERRIDE; |
| 53 | 52 |
| 54 // Invokes the sessions's CryptoHandshakeEvent method with the specified | 53 // Invokes the sessions's CryptoHandshakeEvent method with the specified |
| 55 // event. | 54 // event. |
| 56 void SendOnCryptoHandshakeEvent(QuicSession::CryptoHandshakeEvent event); | 55 void SendOnCryptoHandshakeEvent(QuicSession::CryptoHandshakeEvent event); |
| 57 | 56 |
| 58 HandshakeMode handshake_mode_; | 57 HandshakeMode handshake_mode_; |
| 59 | 58 |
| 60 private: | 59 private: |
| 61 void SetConfigNegotiated(); | 60 void SetConfigNegotiated(); |
| 62 QuicClientSessionBase* client_session(); | 61 QuicClientSessionBase* client_session(); |
| 63 | 62 |
| 64 const ProofVerifyDetails* proof_verify_details_; | 63 const ProofVerifyDetails* proof_verify_details_; |
| 65 | 64 |
| 66 DISALLOW_COPY_AND_ASSIGN(MockCryptoClientStream); | 65 DISALLOW_COPY_AND_ASSIGN(MockCryptoClientStream); |
| 67 }; | 66 }; |
| 68 | 67 |
| 69 } // namespace net | 68 } // namespace net |
| 70 | 69 |
| 71 #endif // NET_QUIC_TEST_TOOLS_MOCK_CRYPTO_CLIENT_STREAM_H_ | 70 #endif // NET_QUIC_TEST_TOOLS_MOCK_CRYPTO_CLIENT_STREAM_H_ |
| OLD | NEW |