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/crypto/quic_crypto_client_config.h" | 5 #include "net/quic/crypto/quic_crypto_client_config.h" |
6 | 6 |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "base/metrics/sparse_histogram.h" | 8 #include "base/metrics/sparse_histogram.h" |
9 #include "base/profiler/scoped_tracker.h" | |
10 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
11 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
12 #include "net/quic/crypto/cert_compressor.h" | 11 #include "net/quic/crypto/cert_compressor.h" |
13 #include "net/quic/crypto/chacha20_poly1305_encrypter.h" | 12 #include "net/quic/crypto/chacha20_poly1305_encrypter.h" |
14 #include "net/quic/crypto/channel_id.h" | 13 #include "net/quic/crypto/channel_id.h" |
15 #include "net/quic/crypto/common_cert_set.h" | 14 #include "net/quic/crypto/common_cert_set.h" |
16 #include "net/quic/crypto/crypto_framer.h" | 15 #include "net/quic/crypto/crypto_framer.h" |
17 #include "net/quic/crypto/crypto_utils.h" | 16 #include "net/quic/crypto/crypto_utils.h" |
18 #include "net/quic/crypto/curve25519_key_exchange.h" | 17 #include "net/quic/crypto/curve25519_key_exchange.h" |
19 #include "net/quic/crypto/key_exchange.h" | 18 #include "net/quic/crypto/key_exchange.h" |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 const QuicServerId& server_id, | 393 const QuicServerId& server_id, |
395 QuicConnectionId connection_id, | 394 QuicConnectionId connection_id, |
396 const QuicVersion preferred_version, | 395 const QuicVersion preferred_version, |
397 const CachedState* cached, | 396 const CachedState* cached, |
398 QuicWallTime now, | 397 QuicWallTime now, |
399 QuicRandom* rand, | 398 QuicRandom* rand, |
400 const ChannelIDKey* channel_id_key, | 399 const ChannelIDKey* channel_id_key, |
401 QuicCryptoNegotiatedParameters* out_params, | 400 QuicCryptoNegotiatedParameters* out_params, |
402 CryptoHandshakeMessage* out, | 401 CryptoHandshakeMessage* out, |
403 string* error_details) const { | 402 string* error_details) const { |
404 // TODO(rtenneti): Remove ScopedTracker below once crbug.com/422516 is fixed. | |
405 tracked_objects::ScopedTracker tracking_profile( | |
406 FROM_HERE_WITH_EXPLICIT_FUNCTION( | |
407 "422516 QuicCryptoClientConfig::FillClientHello")); | |
408 | |
409 DCHECK(error_details != nullptr); | 403 DCHECK(error_details != nullptr); |
410 | 404 |
411 FillInchoateClientHello(server_id, preferred_version, cached, | 405 FillInchoateClientHello(server_id, preferred_version, cached, |
412 out_params, out); | 406 out_params, out); |
413 | 407 |
414 const CryptoHandshakeMessage* scfg = cached->GetServerConfig(); | 408 const CryptoHandshakeMessage* scfg = cached->GetServerConfig(); |
415 if (!scfg) { | 409 if (!scfg) { |
416 // This should never happen as our caller should have checked | 410 // This should never happen as our caller should have checked |
417 // cached->IsComplete() before calling this function. | 411 // cached->IsComplete() before calling this function. |
418 *error_details = "Handshake not ready"; | 412 *error_details = "Handshake not ready"; |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
875 } | 869 } |
876 | 870 |
877 // Update canonical version to point at the "most recent" entry. | 871 // Update canonical version to point at the "most recent" entry. |
878 canonical_server_map_[suffix_server_id] = server_id; | 872 canonical_server_map_[suffix_server_id] = server_id; |
879 | 873 |
880 server_state->InitializeFrom(*canonical_state); | 874 server_state->InitializeFrom(*canonical_state); |
881 return true; | 875 return true; |
882 } | 876 } |
883 | 877 |
884 } // namespace net | 878 } // namespace net |
OLD | NEW |