| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/test_tools/quic_crypto_server_config_peer.h" | 5 #include "net/quic/test_tools/quic_crypto_server_config_peer.h" |
| 6 | 6 |
| 7 #include <cstdarg> | 7 #include <cstdarg> |
| 8 | 8 |
| 9 #include "net/quic/test_tools/mock_clock.h" | 9 #include "net/quic/test_tools/mock_clock.h" |
| 10 #include "net/quic/test_tools/mock_random.h" | 10 #include "net/quic/test_tools/mock_random.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 QuicCryptoServerConfigPeer::GetConfig(string config_id) { | 33 QuicCryptoServerConfigPeer::GetConfig(string config_id) { |
| 34 base::AutoLock locked(server_config_->configs_lock_); | 34 base::AutoLock locked(server_config_->configs_lock_); |
| 35 if (config_id == "<primary>") { | 35 if (config_id == "<primary>") { |
| 36 return scoped_refptr<QuicCryptoServerConfig::Config>( | 36 return scoped_refptr<QuicCryptoServerConfig::Config>( |
| 37 server_config_->primary_config_); | 37 server_config_->primary_config_); |
| 38 } else { | 38 } else { |
| 39 return server_config_->GetConfigWithScid(config_id); | 39 return server_config_->GetConfigWithScid(config_id); |
| 40 } | 40 } |
| 41 } | 41 } |
| 42 | 42 |
| 43 ProofSource* QuicCryptoServerConfigPeer::GetProofSource() const { |
| 44 return server_config_->proof_source_.get(); |
| 45 } |
| 46 |
| 43 string QuicCryptoServerConfigPeer::NewSourceAddressToken( | 47 string QuicCryptoServerConfigPeer::NewSourceAddressToken( |
| 44 string config_id, | 48 string config_id, |
| 45 SourceAddressTokens previous_tokens, | 49 SourceAddressTokens previous_tokens, |
| 46 const IPAddress& ip, | 50 const IPAddress& ip, |
| 47 QuicRandom* rand, | 51 QuicRandom* rand, |
| 48 QuicWallTime now, | 52 QuicWallTime now, |
| 49 CachedNetworkParameters* cached_network_params) { | 53 CachedNetworkParameters* cached_network_params) { |
| 50 return server_config_->NewSourceAddressToken(*GetConfig(config_id), | 54 return server_config_->NewSourceAddressToken(*GetConfig(config_id), |
| 51 previous_tokens, ip, rand, now, | 55 previous_tokens, ip, rand, now, |
| 52 cached_network_params); | 56 cached_network_params); |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 return server_config_->server_nonce_strike_register_max_entries_; | 207 return server_config_->server_nonce_strike_register_max_entries_; |
| 204 } | 208 } |
| 205 | 209 |
| 206 uint32_t | 210 uint32_t |
| 207 QuicCryptoServerConfigPeer::server_nonce_strike_register_window_secs() { | 211 QuicCryptoServerConfigPeer::server_nonce_strike_register_window_secs() { |
| 208 return server_config_->server_nonce_strike_register_window_secs_; | 212 return server_config_->server_nonce_strike_register_window_secs_; |
| 209 } | 213 } |
| 210 | 214 |
| 211 } // namespace test | 215 } // namespace test |
| 212 } // namespace net | 216 } // namespace net |
| OLD | NEW |