| 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/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 } // namespace | 53 } // namespace |
| 54 | 54 |
| 55 QuicCryptoClientConfig::QuicCryptoClientConfig( | 55 QuicCryptoClientConfig::QuicCryptoClientConfig( |
| 56 std::unique_ptr<ProofVerifier> proof_verifier) | 56 std::unique_ptr<ProofVerifier> proof_verifier) |
| 57 : proof_verifier_(std::move(proof_verifier)) { | 57 : proof_verifier_(std::move(proof_verifier)) { |
| 58 DCHECK(proof_verifier_.get()); | 58 DCHECK(proof_verifier_.get()); |
| 59 SetDefaults(); | 59 SetDefaults(); |
| 60 } | 60 } |
| 61 | 61 |
| 62 QuicCryptoClientConfig::~QuicCryptoClientConfig() { | 62 QuicCryptoClientConfig::~QuicCryptoClientConfig() {} |
| 63 } | |
| 64 | 63 |
| 65 QuicCryptoClientConfig::CachedState::CachedState() | 64 QuicCryptoClientConfig::CachedState::CachedState() |
| 66 : server_config_valid_(false), | 65 : server_config_valid_(false), |
| 67 expiration_time_(QuicWallTime::Zero()), | 66 expiration_time_(QuicWallTime::Zero()), |
| 68 generation_counter_(0) {} | 67 generation_counter_(0) {} |
| 69 | 68 |
| 70 QuicCryptoClientConfig::CachedState::~CachedState() {} | 69 QuicCryptoClientConfig::CachedState::~CachedState() {} |
| 71 | 70 |
| 72 bool QuicCryptoClientConfig::CachedState::IsComplete(QuicWallTime now) const { | 71 bool QuicCryptoClientConfig::CachedState::IsComplete(QuicWallTime now) const { |
| 73 if (server_config_.empty()) { | 72 if (server_config_.empty()) { |
| (...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 986 } | 985 } |
| 987 | 986 |
| 988 // Update canonical version to point at the "most recent" entry. | 987 // Update canonical version to point at the "most recent" entry. |
| 989 canonical_server_map_[suffix_server_id] = server_id; | 988 canonical_server_map_[suffix_server_id] = server_id; |
| 990 | 989 |
| 991 server_state->InitializeFrom(*canonical_state); | 990 server_state->InitializeFrom(*canonical_state); |
| 992 return true; | 991 return true; |
| 993 } | 992 } |
| 994 | 993 |
| 995 } // namespace net | 994 } // namespace net |
| OLD | NEW |