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