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

Side by Side Diff: net/quic/test_tools/mock_crypto_client_stream.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_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
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
wtc 2013/08/21 01:09:32 Typo: CryptoHandshakeEvent => OnCryptoHandshakeEve
51 // event.
52 void SendOnCryptoHandshakeEvent(QuicSession::CryptoHandshakeEvent event);
wtc 2013/08/21 01:09:32 What does the "Send" in the method's name mean?
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698