| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 } | 173 } |
| 174 | 174 |
| 175 if (now.IsAfter(expiration_time_)) { | 175 if (now.IsAfter(expiration_time_)) { |
| 176 *error_details = "SCFG has expired"; | 176 *error_details = "SCFG has expired"; |
| 177 return SERVER_CONFIG_EXPIRED; | 177 return SERVER_CONFIG_EXPIRED; |
| 178 } | 178 } |
| 179 | 179 |
| 180 if (!matches_existing) { | 180 if (!matches_existing) { |
| 181 server_config_ = server_config.as_string(); | 181 server_config_ = server_config.as_string(); |
| 182 SetProofInvalid(); | 182 SetProofInvalid(); |
| 183 scfg_.reset(new_scfg_storage.release()); | 183 scfg_ = std::move(new_scfg_storage); |
| 184 } | 184 } |
| 185 return SERVER_CONFIG_VALID; | 185 return SERVER_CONFIG_VALID; |
| 186 } | 186 } |
| 187 | 187 |
| 188 void QuicCryptoClientConfig::CachedState::InvalidateServerConfig() { | 188 void QuicCryptoClientConfig::CachedState::InvalidateServerConfig() { |
| 189 server_config_.clear(); | 189 server_config_.clear(); |
| 190 scfg_.reset(); | 190 scfg_.reset(); |
| 191 SetProofInvalid(); | 191 SetProofInvalid(); |
| 192 std::queue<QuicConnectionId> empty_queue; | 192 std::queue<QuicConnectionId> empty_queue; |
| 193 swap(server_designated_connection_ids_, empty_queue); | 193 swap(server_designated_connection_ids_, empty_queue); |
| (...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 976 } | 976 } |
| 977 | 977 |
| 978 // Update canonical version to point at the "most recent" entry. | 978 // Update canonical version to point at the "most recent" entry. |
| 979 canonical_server_map_[suffix_server_id] = server_id; | 979 canonical_server_map_[suffix_server_id] = server_id; |
| 980 | 980 |
| 981 server_state->InitializeFrom(*canonical_state); | 981 server_state->InitializeFrom(*canonical_state); |
| 982 return true; | 982 return true; |
| 983 } | 983 } |
| 984 | 984 |
| 985 } // namespace net | 985 } // namespace net |
| OLD | NEW |