| 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 #include "net/quic/test_tools/mock_crypto_client_stream_factory.h" | 5 #include "net/quic/test_tools/mock_crypto_client_stream_factory.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "net/quic/quic_crypto_client_stream.h" | 8 #include "net/quic/quic_crypto_client_stream.h" |
| 9 #include "net/quic/quic_session_key.h" |
| 9 | 10 |
| 10 using std::string; | 11 using std::string; |
| 11 | 12 |
| 12 namespace net { | 13 namespace net { |
| 13 | 14 |
| 14 MockCryptoClientStreamFactory::MockCryptoClientStreamFactory() | 15 MockCryptoClientStreamFactory::MockCryptoClientStreamFactory() |
| 15 : handshake_mode_(MockCryptoClientStream::CONFIRM_HANDSHAKE), | 16 : handshake_mode_(MockCryptoClientStream::CONFIRM_HANDSHAKE), |
| 16 last_stream_(NULL), | 17 last_stream_(NULL), |
| 17 ssl_info_(NULL) { | 18 ssl_info_(NULL) { |
| 18 } | 19 } |
| 19 | 20 |
| 20 QuicCryptoClientStream* | 21 QuicCryptoClientStream* |
| 21 MockCryptoClientStreamFactory::CreateQuicCryptoClientStream( | 22 MockCryptoClientStreamFactory::CreateQuicCryptoClientStream( |
| 22 const string& server_hostname, | 23 const QuicSessionKey& server_key, |
| 23 QuicSession* session, | 24 QuicSession* session, |
| 24 QuicCryptoClientConfig* crypto_config) { | 25 QuicCryptoClientConfig* crypto_config) { |
| 25 last_stream_ = new MockCryptoClientStream( | 26 last_stream_ = new MockCryptoClientStream( |
| 26 server_hostname, session, crypto_config, handshake_mode_, ssl_info_); | 27 server_key, session, crypto_config, handshake_mode_, ssl_info_); |
| 27 return last_stream_; | 28 return last_stream_; |
| 28 } | 29 } |
| 29 | 30 |
| 30 } // namespace net | 31 } // namespace net |
| OLD | NEW |