Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Side by Side Diff: net/quic/test_tools/mock_crypto_client_stream_factory.h

Issue 23279011: Require handshake confirmation until a QUIC connection is created succesfully when using a new netw… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
13 #include "net/quic/test_tools/mock_crypto_client_stream.h" 12 #include "net/quic/test_tools/mock_crypto_client_stream.h"
14 13
15 namespace net { 14 namespace net {
16 15
17 class MockCryptoClientStreamFactory : public QuicCryptoClientStreamFactory { 16 class MockCryptoClientStreamFactory : public QuicCryptoClientStreamFactory {
18 public: 17 public:
19 MockCryptoClientStreamFactory(); 18 MockCryptoClientStreamFactory();
20 19
21 virtual ~MockCryptoClientStreamFactory() {} 20 virtual ~MockCryptoClientStreamFactory() {}
22 21
23 virtual QuicCryptoClientStream* CreateQuicCryptoClientStream( 22 virtual QuicCryptoClientStream* CreateQuicCryptoClientStream(
24 const string& server_hostname, 23 const string& server_hostname,
25 QuicSession* session, 24 QuicSession* session,
26 QuicCryptoClientConfig* crypto_config) OVERRIDE; 25 QuicCryptoClientConfig* crypto_config) OVERRIDE;
27 26
28 void set_handshake_mode( 27 void set_handshake_mode(
29 MockCryptoClientStream::HandshakeMode handshake_mode) { 28 MockCryptoClientStream::HandshakeMode handshake_mode) {
30 handshake_mode_ = handshake_mode; 29 handshake_mode_ = handshake_mode;
31 } 30 }
32 31
32 MockCryptoClientStream* last_stream() const {
33 return last_stream_;
34 }
35
33 private: 36 private:
34 MockCryptoClientStream::HandshakeMode handshake_mode_; 37 MockCryptoClientStream::HandshakeMode handshake_mode_;
38 MockCryptoClientStream* last_stream_;
35 }; 39 };
36 40
37 } // namespace net 41 } // namespace net
38 42
39 #endif // NET_QUIC_TEST_TOOLS_MOCK_CRYPTO_CLIENT_STREAM_FACTORY_H_ 43 #endif // NET_QUIC_TEST_TOOLS_MOCK_CRYPTO_CLIENT_STREAM_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698