| 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_FACTORY_H_ | 5 #ifndef NET_QUIC_TEST_TOOLS_MOCK_CRYPTO_CLIENT_STREAM_FACTORY_H_ |
| 6 #define NET_QUIC_TEST_TOOLS_MOCK_CRYPTO_CLIENT_STREAM_FACTORY_H_ | 6 #define NET_QUIC_TEST_TOOLS_MOCK_CRYPTO_CLIENT_STREAM_FACTORY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "net/quic/quic_crypto_client_stream.h" | 10 #include "net/quic/quic_crypto_client_stream.h" |
| 11 #include "net/quic/quic_crypto_client_stream_factory.h" | 11 #include "net/quic/quic_crypto_client_stream_factory.h" |
| 12 #include "net/quic/quic_session.h" | 12 #include "net/quic/quic_session.h" |
| 13 #include "net/quic/test_tools/mock_crypto_client_stream.h" |
| 13 | 14 |
| 14 namespace net { | 15 namespace net { |
| 15 | 16 |
| 16 class MockCryptoClientStreamFactory : public QuicCryptoClientStreamFactory { | 17 class MockCryptoClientStreamFactory : public QuicCryptoClientStreamFactory { |
| 17 public: | 18 public: |
| 19 MockCryptoClientStreamFactory(); |
| 20 |
| 18 virtual ~MockCryptoClientStreamFactory() {} | 21 virtual ~MockCryptoClientStreamFactory() {} |
| 19 | 22 |
| 20 virtual QuicCryptoClientStream* CreateQuicCryptoClientStream( | 23 virtual QuicCryptoClientStream* CreateQuicCryptoClientStream( |
| 21 const string& server_hostname, | 24 const string& server_hostname, |
| 22 const QuicConfig& config, | 25 const QuicConfig& config, |
| 23 QuicSession* session, | 26 QuicSession* session, |
| 24 QuicCryptoClientConfig* crypto_config) OVERRIDE; | 27 QuicCryptoClientConfig* crypto_config) OVERRIDE; |
| 28 |
| 29 void set_handshake_mode( |
| 30 MockCryptoClientStream::HandshakeMode handshake_mode) { |
| 31 handshake_mode_ = handshake_mode; |
| 32 } |
| 33 |
| 34 private: |
| 35 MockCryptoClientStream::HandshakeMode handshake_mode_; |
| 25 }; | 36 }; |
| 26 | 37 |
| 27 } // namespace net | 38 } // namespace net |
| 28 | 39 |
| 29 #endif // NET_QUIC_TEST_TOOLS_MOCK_CRYPTO_CLIENT_STREAM_FACTORY_H_ | 40 #endif // NET_QUIC_TEST_TOOLS_MOCK_CRYPTO_CLIENT_STREAM_FACTORY_H_ |
| OLD | NEW |