| 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/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 | 277 |
| 278 string error_details; | 278 string error_details; |
| 279 ServerConfigState state = | 279 ServerConfigState state = |
| 280 SetServerConfig(server_config, now, expiration_time, &error_details); | 280 SetServerConfig(server_config, now, expiration_time, &error_details); |
| 281 RecordDiskCacheServerConfigState(state); | 281 RecordDiskCacheServerConfigState(state); |
| 282 if (state != SERVER_CONFIG_VALID) { | 282 if (state != SERVER_CONFIG_VALID) { |
| 283 QUIC_DVLOG(1) << "SetServerConfig failed with " << error_details; | 283 QUIC_DVLOG(1) << "SetServerConfig failed with " << error_details; |
| 284 return false; | 284 return false; |
| 285 } | 285 } |
| 286 | 286 |
| 287 chlo_hash.CopyToString(&chlo_hash_); | 287 chlo_hash_.assign(chlo_hash.data(), chlo_hash.size()); |
| 288 signature.CopyToString(&server_config_sig_); | 288 server_config_sig_.assign(signature.data(), signature.size()); |
| 289 source_address_token.CopyToString(&source_address_token_); | 289 source_address_token_.assign(source_address_token.data(), |
| 290 source_address_token.size()); |
| 290 certs_ = certs; | 291 certs_ = certs; |
| 291 cert_sct_ = cert_sct; | 292 cert_sct_ = cert_sct; |
| 292 return true; | 293 return true; |
| 293 } | 294 } |
| 294 | 295 |
| 295 const string& QuicCryptoClientConfig::CachedState::server_config() const { | 296 const string& QuicCryptoClientConfig::CachedState::server_config() const { |
| 296 return server_config_; | 297 return server_config_; |
| 297 } | 298 } |
| 298 | 299 |
| 299 const string& QuicCryptoClientConfig::CachedState::source_address_token() | 300 const string& QuicCryptoClientConfig::CachedState::source_address_token() |
| (...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 992 } | 993 } |
| 993 | 994 |
| 994 // Update canonical version to point at the "most recent" entry. | 995 // Update canonical version to point at the "most recent" entry. |
| 995 canonical_server_map_[suffix_server_id] = server_id; | 996 canonical_server_map_[suffix_server_id] = server_id; |
| 996 | 997 |
| 997 server_state->InitializeFrom(*canonical_state); | 998 server_state->InitializeFrom(*canonical_state); |
| 998 return true; | 999 return true; |
| 999 } | 1000 } |
| 1000 | 1001 |
| 1001 } // namespace net | 1002 } // namespace net |
| OLD | NEW |