| 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" | 
|  | 11 #include "net/quic/crypto/crypto_protocol.h" | 
| 11 #include "net/quic/quic_crypto_client_stream.h" | 12 #include "net/quic/quic_crypto_client_stream.h" | 
| 12 #include "net/quic/quic_session.h" | 13 #include "net/quic/quic_session.h" | 
| 13 | 14 | 
| 14 namespace net { | 15 namespace net { | 
| 15 | 16 | 
| 16 class MockCryptoClientStream : public QuicCryptoClientStream { | 17 class MockCryptoClientStream : public QuicCryptoClientStream { | 
| 17  public: | 18  public: | 
| 18   // HandshakeMode enumerates the handshake mode MockCryptoClientStream should | 19   // HandshakeMode enumerates the handshake mode MockCryptoClientStream should | 
| 19   // mock in CryptoConnect. | 20   // mock in CryptoConnect. | 
| 20   enum HandshakeMode { | 21   enum HandshakeMode { | 
| (...skipping 18 matching lines...) Expand all  Loading... | 
| 39       HandshakeMode handshake_mode); | 40       HandshakeMode handshake_mode); | 
| 40   virtual ~MockCryptoClientStream(); | 41   virtual ~MockCryptoClientStream(); | 
| 41 | 42 | 
| 42   // CryptoFramerVisitorInterface implementation. | 43   // CryptoFramerVisitorInterface implementation. | 
| 43   virtual void OnHandshakeMessage( | 44   virtual void OnHandshakeMessage( | 
| 44       const CryptoHandshakeMessage& message) OVERRIDE; | 45       const CryptoHandshakeMessage& message) OVERRIDE; | 
| 45 | 46 | 
| 46   // QuicCryptoClientStream implementation. | 47   // QuicCryptoClientStream implementation. | 
| 47   virtual bool CryptoConnect() OVERRIDE; | 48   virtual bool CryptoConnect() OVERRIDE; | 
| 48 | 49 | 
|  | 50   // Invokes the sessions's CryptoHandshakeEvent method with the specified | 
|  | 51   // event. | 
|  | 52   void SendOnCryptoHandshakeEvent(QuicSession::CryptoHandshakeEvent event); | 
|  | 53 | 
| 49   HandshakeMode handshake_mode_; | 54   HandshakeMode handshake_mode_; | 
| 50 | 55 | 
| 51  private: | 56  private: | 
| 52   void SetConfigNegotiated(); | 57   void SetConfigNegotiated(); | 
| 53 }; | 58 }; | 
| 54 | 59 | 
| 55 }  // namespace net | 60 }  // namespace net | 
| 56 | 61 | 
| 57 #endif  // NET_QUIC_TEST_TOOLS_MOCK_CRYPTO_CLIENT_STREAM_H_ | 62 #endif  // NET_QUIC_TEST_TOOLS_MOCK_CRYPTO_CLIENT_STREAM_H_ | 
| OLD | NEW | 
|---|