| OLD | NEW |
| 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/core/crypto/quic_crypto_client_config.h" | 5 #include "net/quic/core/crypto/quic_crypto_client_config.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 | 410 |
| 411 void QuicCryptoClientConfig::FillInchoateClientHello( | 411 void QuicCryptoClientConfig::FillInchoateClientHello( |
| 412 const QuicServerId& server_id, | 412 const QuicServerId& server_id, |
| 413 const QuicVersion preferred_version, | 413 const QuicVersion preferred_version, |
| 414 const CachedState* cached, | 414 const CachedState* cached, |
| 415 QuicRandom* rand, | 415 QuicRandom* rand, |
| 416 bool demand_x509_proof, | 416 bool demand_x509_proof, |
| 417 QuicCryptoNegotiatedParameters* out_params, | 417 QuicCryptoNegotiatedParameters* out_params, |
| 418 CryptoHandshakeMessage* out) const { | 418 CryptoHandshakeMessage* out) const { |
| 419 out->set_tag(kCHLO); | 419 out->set_tag(kCHLO); |
| 420 // TODO(rch): Remove this when we remove: |
| 421 // FLAGS_quic_use_chlo_packet_size |
| 420 out->set_minimum_size(kClientHelloMinimumSize); | 422 out->set_minimum_size(kClientHelloMinimumSize); |
| 421 | 423 |
| 422 // Server name indication. We only send SNI if it's a valid domain name, as | 424 // Server name indication. We only send SNI if it's a valid domain name, as |
| 423 // per the spec. | 425 // per the spec. |
| 424 if (CryptoUtils::IsValidSNI(server_id.host())) { | 426 if (CryptoUtils::IsValidSNI(server_id.host())) { |
| 425 out->SetStringPiece(kSNI, server_id.host()); | 427 out->SetStringPiece(kSNI, server_id.host()); |
| 426 } | 428 } |
| 427 out->SetValue(kVER, QuicVersionToQuicTag(preferred_version)); | 429 out->SetValue(kVER, QuicVersionToQuicTag(preferred_version)); |
| 428 | 430 |
| 429 if (!user_agent_id_.empty()) { | 431 if (!user_agent_id_.empty()) { |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 973 } | 975 } |
| 974 | 976 |
| 975 // Update canonical version to point at the "most recent" entry. | 977 // Update canonical version to point at the "most recent" entry. |
| 976 canonical_server_map_[suffix_server_id] = server_id; | 978 canonical_server_map_[suffix_server_id] = server_id; |
| 977 | 979 |
| 978 server_state->InitializeFrom(*canonical_state); | 980 server_state->InitializeFrom(*canonical_state); |
| 979 return true; | 981 return true; |
| 980 } | 982 } |
| 981 | 983 |
| 982 } // namespace net | 984 } // namespace net |
| OLD | NEW |