OLD | NEW |
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 "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 class QuicSession; | 22 class QuicSession; |
23 class SSLInfo; | 23 class SSLInfo; |
24 | 24 |
25 namespace test { | 25 namespace test { |
26 class CryptoTestUtils; | 26 class CryptoTestUtils; |
27 } // namespace test | 27 } // namespace test |
28 | 28 |
29 class NET_EXPORT_PRIVATE QuicCryptoClientStream : public QuicCryptoStream { | 29 class NET_EXPORT_PRIVATE QuicCryptoClientStream : public QuicCryptoStream { |
30 public: | 30 public: |
31 QuicCryptoClientStream(const string& server_hostname, | 31 QuicCryptoClientStream(const string& server_hostname, |
| 32 uint16 server_port, |
32 QuicSession* session, | 33 QuicSession* session, |
33 QuicCryptoClientConfig* crypto_config); | 34 QuicCryptoClientConfig* crypto_config); |
34 virtual ~QuicCryptoClientStream(); | 35 virtual ~QuicCryptoClientStream(); |
35 | 36 |
36 // CryptoFramerVisitorInterface implementation | 37 // CryptoFramerVisitorInterface implementation |
37 virtual void OnHandshakeMessage( | 38 virtual void OnHandshakeMessage( |
38 const CryptoHandshakeMessage& message) OVERRIDE; | 39 const CryptoHandshakeMessage& message) OVERRIDE; |
39 | 40 |
40 // Performs a crypto handshake with the server. Returns true if the crypto | 41 // Performs a crypto handshake with the server. Returns true if the crypto |
41 // handshake is started successfully. | 42 // handshake is started successfully. |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 // num_client_hellos_ contains the number of client hello messages that this | 108 // num_client_hellos_ contains the number of client hello messages that this |
108 // connection has sent. | 109 // connection has sent. |
109 int num_client_hellos_; | 110 int num_client_hellos_; |
110 | 111 |
111 QuicCryptoClientConfig* const crypto_config_; | 112 QuicCryptoClientConfig* const crypto_config_; |
112 | 113 |
113 // Client's connection nonce (4-byte timestamp + 28 random bytes) | 114 // Client's connection nonce (4-byte timestamp + 28 random bytes) |
114 std::string nonce_; | 115 std::string nonce_; |
115 // Server's hostname | 116 // Server's hostname |
116 std::string server_hostname_; | 117 std::string server_hostname_; |
| 118 // Server's port. |
| 119 uint16 server_port_; |
117 | 120 |
118 // Generation counter from QuicCryptoClientConfig's CachedState. | 121 // Generation counter from QuicCryptoClientConfig's CachedState. |
119 uint64 generation_counter_; | 122 uint64 generation_counter_; |
120 | 123 |
121 // proof_verify_callback_ contains the callback object that we passed to an | 124 // proof_verify_callback_ contains the callback object that we passed to an |
122 // asynchronous proof verification. The ProofVerifier owns this object. | 125 // asynchronous proof verification. The ProofVerifier owns this object. |
123 ProofVerifierCallbackImpl* proof_verify_callback_; | 126 ProofVerifierCallbackImpl* proof_verify_callback_; |
124 | 127 |
125 // These members are used to store the result of an asynchronous proof | 128 // These members are used to store the result of an asynchronous proof |
126 // verification. These members must not be used after | 129 // verification. These members must not be used after |
(...skipping 14 matching lines...) Expand all Loading... |
141 base::TimeTicks read_start_time_; | 144 base::TimeTicks read_start_time_; |
142 | 145 |
143 base::WeakPtrFactory<QuicCryptoClientStream> weak_factory_; | 146 base::WeakPtrFactory<QuicCryptoClientStream> weak_factory_; |
144 | 147 |
145 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientStream); | 148 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientStream); |
146 }; | 149 }; |
147 | 150 |
148 } // namespace net | 151 } // namespace net |
149 | 152 |
150 #endif // NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ | 153 #endif // NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ |
OLD | NEW |