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/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 }; | 49 }; |
50 | 50 |
51 void RecordServerConfigState(ServerConfigState server_config_state) { | 51 void RecordServerConfigState(ServerConfigState server_config_state) { |
52 UMA_HISTOGRAM_ENUMERATION("Net.QuicClientHelloServerConfigState", | 52 UMA_HISTOGRAM_ENUMERATION("Net.QuicClientHelloServerConfigState", |
53 server_config_state, SERVER_CONFIG_COUNT); | 53 server_config_state, SERVER_CONFIG_COUNT); |
54 } | 54 } |
55 | 55 |
56 } // namespace | 56 } // namespace |
57 | 57 |
58 QuicCryptoClientConfig::QuicCryptoClientConfig() | 58 QuicCryptoClientConfig::QuicCryptoClientConfig() |
59 : disable_ecdsa_(false) {} | 59 : disable_ecdsa_(false) { |
| 60 SetDefaults(); |
| 61 } |
60 | 62 |
61 QuicCryptoClientConfig::~QuicCryptoClientConfig() { | 63 QuicCryptoClientConfig::~QuicCryptoClientConfig() { |
62 STLDeleteValues(&cached_states_); | 64 STLDeleteValues(&cached_states_); |
63 } | 65 } |
64 | 66 |
65 QuicCryptoClientConfig::CachedState::CachedState() | 67 QuicCryptoClientConfig::CachedState::CachedState() |
66 : server_config_valid_(false), | 68 : server_config_valid_(false), |
67 generation_counter_(0) {} | 69 generation_counter_(0) {} |
68 | 70 |
69 QuicCryptoClientConfig::CachedState::~CachedState() {} | 71 QuicCryptoClientConfig::CachedState::~CachedState() {} |
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 return; | 859 return; |
858 } | 860 } |
859 | 861 |
860 // Update canonical version to point at the "most recent" entry. | 862 // Update canonical version to point at the "most recent" entry. |
861 canonical_server_map_[suffix_server_id] = server_id; | 863 canonical_server_map_[suffix_server_id] = server_id; |
862 | 864 |
863 server_state->InitializeFrom(*canonical_state); | 865 server_state->InitializeFrom(*canonical_state); |
864 } | 866 } |
865 | 867 |
866 } // namespace net | 868 } // namespace net |
OLD | NEW |