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

Side by Side Diff: net/quic/crypto/quic_crypto_client_config.h

Issue 312193005: Pass chrome version and channel in CHLO message to server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile fix Created 6 years, 6 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/crypto/crypto_protocol.h ('k') | net/quic/crypto/quic_crypto_client_config.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_CRYPTO_QUIC_CRYPTO_CLIENT_CONFIG_H_ 5 #ifndef NET_QUIC_CRYPTO_QUIC_CRYPTO_CLIENT_CONFIG_H_
6 #define NET_QUIC_CRYPTO_QUIC_CRYPTO_CLIENT_CONFIG_H_ 6 #define NET_QUIC_CRYPTO_QUIC_CRYPTO_CLIENT_CONFIG_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 // Prefers AES-GCM (kAESG) over other AEAD algorithms. Call this method if 238 // Prefers AES-GCM (kAESG) over other AEAD algorithms. Call this method if
239 // the CPU has hardware acceleration for AES-GCM. This method can only be 239 // the CPU has hardware acceleration for AES-GCM. This method can only be
240 // called after SetDefaults(). 240 // called after SetDefaults().
241 void PreferAesGcm(); 241 void PreferAesGcm();
242 242
243 // Disables the use of ECDSA for proof verification. 243 // Disables the use of ECDSA for proof verification.
244 // Call this method on platforms that do not support ECDSA. 244 // Call this method on platforms that do not support ECDSA.
245 // TODO(rch): remove this method when we drop support for Windows XP. 245 // TODO(rch): remove this method when we drop support for Windows XP.
246 void DisableEcdsa(); 246 void DisableEcdsa();
247 247
248 // Saves the |user_agent_id| that will be passed in QUIC's CHLO message.
249 void set_user_agent_id(const std::string& user_agent_id) {
250 user_agent_id_ = user_agent_id;
251 }
252
248 private: 253 private:
249 typedef std::map<QuicServerId, CachedState*> CachedStateMap; 254 typedef std::map<QuicServerId, CachedState*> CachedStateMap;
250 255
251 // If the suffix of the hostname in |server_id| is in |canoncial_suffixes_|, 256 // If the suffix of the hostname in |server_id| is in |canoncial_suffixes_|,
252 // then populate |cached| with the canonical cached state from 257 // then populate |cached| with the canonical cached state from
253 // |canonical_server_map_| for that suffix. 258 // |canonical_server_map_| for that suffix.
254 void PopulateFromCanonicalConfig(const QuicServerId& server_id, 259 void PopulateFromCanonicalConfig(const QuicServerId& server_id,
255 CachedState* cached); 260 CachedState* cached);
256 261
257 // cached_states_ maps from the server_id to the cached information about 262 // cached_states_ maps from the server_id to the cached information about
258 // that server. 263 // that server.
259 CachedStateMap cached_states_; 264 CachedStateMap cached_states_;
260 265
261 // Contains a map of servers which could share the same server config. Map 266 // Contains a map of servers which could share the same server config. Map
262 // from a canonical host suffix/port/scheme to a representative server with 267 // from a canonical host suffix/port/scheme to a representative server with
263 // the canonical suffix, which has a plausible set of initial certificates 268 // the canonical suffix, which has a plausible set of initial certificates
264 // (or at least server public key). 269 // (or at least server public key).
265 std::map<QuicServerId, QuicServerId> canonical_server_map_; 270 std::map<QuicServerId, QuicServerId> canonical_server_map_;
266 271
267 // Contains list of suffixes (for exmaple ".c.youtube.com", 272 // Contains list of suffixes (for exmaple ".c.youtube.com",
268 // ".googlevideo.com") of canoncial hostnames. 273 // ".googlevideo.com") of canoncial hostnames.
269 std::vector<std::string> canoncial_suffixes_; 274 std::vector<std::string> canoncial_suffixes_;
270 275
271 scoped_ptr<ProofVerifier> proof_verifier_; 276 scoped_ptr<ProofVerifier> proof_verifier_;
272 scoped_ptr<ChannelIDSource> channel_id_source_; 277 scoped_ptr<ChannelIDSource> channel_id_source_;
273 278
274 // True if ECDSA should be disabled. 279 // True if ECDSA should be disabled.
275 bool disable_ecdsa_; 280 bool disable_ecdsa_;
276 281
282 // The |user_agent_id_| passed in QUIC's CHLO message.
283 std::string user_agent_id_;
284
277 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientConfig); 285 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientConfig);
278 }; 286 };
279 287
280 } // namespace net 288 } // namespace net
281 289
282 #endif // NET_QUIC_CRYPTO_QUIC_CRYPTO_CLIENT_CONFIG_H_ 290 #endif // NET_QUIC_CRYPTO_QUIC_CRYPTO_CLIENT_CONFIG_H_
OLDNEW
« no previous file with comments | « net/quic/crypto/crypto_protocol.h ('k') | net/quic/crypto/quic_crypto_client_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698