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

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

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/quic_crypto_client_config.h ('k') | net/quic/quic_stream_factory.h » ('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 #include "net/quic/crypto/quic_crypto_client_config.h" 5 #include "net/quic/crypto/quic_crypto_client_config.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "net/quic/crypto/cert_compressor.h" 9 #include "net/quic/crypto/cert_compressor.h"
10 #include "net/quic/crypto/chacha20_poly1305_encrypter.h" 10 #include "net/quic/crypto/chacha20_poly1305_encrypter.h"
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 out->set_tag(kCHLO); 298 out->set_tag(kCHLO);
299 out->set_minimum_size(kClientHelloMinimumSize); 299 out->set_minimum_size(kClientHelloMinimumSize);
300 300
301 // Server name indication. We only send SNI if it's a valid domain name, as 301 // Server name indication. We only send SNI if it's a valid domain name, as
302 // per the spec. 302 // per the spec.
303 if (CryptoUtils::IsValidSNI(server_id.host())) { 303 if (CryptoUtils::IsValidSNI(server_id.host())) {
304 out->SetStringPiece(kSNI, server_id.host()); 304 out->SetStringPiece(kSNI, server_id.host());
305 } 305 }
306 out->SetValue(kVER, QuicVersionToQuicTag(preferred_version)); 306 out->SetValue(kVER, QuicVersionToQuicTag(preferred_version));
307 307
308 if (!user_agent_id_.empty()) {
309 out->SetStringPiece(kUAID, user_agent_id_);
310 }
311
308 if (!cached->source_address_token().empty()) { 312 if (!cached->source_address_token().empty()) {
309 out->SetStringPiece(kSourceAddressTokenTag, cached->source_address_token()); 313 out->SetStringPiece(kSourceAddressTokenTag, cached->source_address_token());
310 } 314 }
311 315
312 if (server_id.is_https()) { 316 if (server_id.is_https()) {
313 if (disable_ecdsa_) { 317 if (disable_ecdsa_) {
314 out->SetTaglist(kPDMD, kX59R, 0); 318 out->SetTaglist(kPDMD, kX59R, 0);
315 } else { 319 } else {
316 out->SetTaglist(kPDMD, kX509, 0); 320 out->SetTaglist(kPDMD, kX509, 0);
317 } 321 }
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 return; 764 return;
761 } 765 }
762 766
763 // Update canonical version to point at the "most recent" entry. 767 // Update canonical version to point at the "most recent" entry.
764 canonical_server_map_[suffix_server_id] = server_id; 768 canonical_server_map_[suffix_server_id] = server_id;
765 769
766 server_state->InitializeFrom(*canonical_state); 770 server_state->InitializeFrom(*canonical_state);
767 } 771 }
768 772
769 } // namespace net 773 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/crypto/quic_crypto_client_config.h ('k') | net/quic/quic_stream_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698