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

Side by Side Diff: net/quic/quic_crypto_client_stream.h

Issue 15074007: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix for windows Created 7 years, 7 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
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_crypto_client_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_QUIC_CRYPTO_CLIENT_STREAM_H_ 5 #ifndef NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_
6 #define NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ 6 #define NET_QUIC_QUIC_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/quic_config.h" 11 #include "net/quic/quic_config.h"
12 #include "net/quic/quic_crypto_stream.h" 12 #include "net/quic/quic_crypto_stream.h"
13 13
14 namespace net { 14 namespace net {
15 15
16 class QuicConfig;
17 class QuicSession; 16 class QuicSession;
18 17
19 namespace test { 18 namespace test {
20 class CryptoTestUtils; 19 class CryptoTestUtils;
21 } // namespace test 20 } // namespace test
22 21
23 class NET_EXPORT_PRIVATE QuicCryptoClientStream : public QuicCryptoStream { 22 class NET_EXPORT_PRIVATE QuicCryptoClientStream : public QuicCryptoStream {
24 public: 23 public:
25 QuicCryptoClientStream(const string& server_hostname, 24 QuicCryptoClientStream(const string& server_hostname,
26 const QuicConfig& config,
27 QuicSession* session, 25 QuicSession* session,
28 QuicCryptoClientConfig* crypto_config); 26 QuicCryptoClientConfig* crypto_config);
29 virtual ~QuicCryptoClientStream(); 27 virtual ~QuicCryptoClientStream();
30 28
31 // CryptoFramerVisitorInterface implementation 29 // CryptoFramerVisitorInterface implementation
32 virtual void OnHandshakeMessage( 30 virtual void OnHandshakeMessage(
33 const CryptoHandshakeMessage& message) OVERRIDE; 31 const CryptoHandshakeMessage& message) OVERRIDE;
34 32
35 // Performs a crypto handshake with the server. Returns true if the crypto 33 // Performs a crypto handshake with the server. Returns true if the crypto
36 // handshake is started successfully. 34 // handshake is started successfully.
(...skipping 17 matching lines...) Expand all
54 52
55 // DoHandshakeLoop performs a step of the handshake state machine. Note that 53 // DoHandshakeLoop performs a step of the handshake state machine. Note that
56 // |in| is NULL for the first call. 54 // |in| is NULL for the first call.
57 void DoHandshakeLoop(const CryptoHandshakeMessage* in); 55 void DoHandshakeLoop(const CryptoHandshakeMessage* in);
58 56
59 State next_state_; 57 State next_state_;
60 // num_client_hellos_ contains the number of client hello messages that this 58 // num_client_hellos_ contains the number of client hello messages that this
61 // connection has sent. 59 // connection has sent.
62 int num_client_hellos_; 60 int num_client_hellos_;
63 61
64 const QuicConfig& config_;
65 QuicCryptoClientConfig* const crypto_config_; 62 QuicCryptoClientConfig* const crypto_config_;
66 63
67 // Client's connection nonce (4-byte timestamp + 28 random bytes) 64 // Client's connection nonce (4-byte timestamp + 28 random bytes)
68 std::string nonce_; 65 std::string nonce_;
69 // Server's hostname 66 // Server's hostname
70 std::string server_hostname_; 67 std::string server_hostname_;
71 68
72 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientStream); 69 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientStream);
73 }; 70 };
74 71
75 } // namespace net 72 } // namespace net
76 73
77 #endif // NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ 74 #endif // NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_
OLDNEW
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_crypto_client_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698