| 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 24 matching lines...) Expand all Loading... |
| 35 server_config_->primary_config_); | 35 server_config_->primary_config_); |
| 36 } else { | 36 } else { |
| 37 return server_config_->GetConfigWithScid(config_id); | 37 return server_config_->GetConfigWithScid(config_id); |
| 38 } | 38 } |
| 39 } | 39 } |
| 40 | 40 |
| 41 ProofSource* QuicCryptoServerConfigPeer::GetProofSource() const { | 41 ProofSource* QuicCryptoServerConfigPeer::GetProofSource() const { |
| 42 return server_config_->proof_source_.get(); | 42 return server_config_->proof_source_.get(); |
| 43 } | 43 } |
| 44 | 44 |
| 45 void QuicCryptoServerConfigPeer::ResetProofSource( |
| 46 std::unique_ptr<ProofSource> proof_source) { |
| 47 server_config_->proof_source_ = std::move(proof_source); |
| 48 } |
| 49 |
| 45 string QuicCryptoServerConfigPeer::NewSourceAddressToken( | 50 string QuicCryptoServerConfigPeer::NewSourceAddressToken( |
| 46 string config_id, | 51 string config_id, |
| 47 SourceAddressTokens previous_tokens, | 52 SourceAddressTokens previous_tokens, |
| 48 const QuicIpAddress& ip, | 53 const QuicIpAddress& ip, |
| 49 QuicRandom* rand, | 54 QuicRandom* rand, |
| 50 QuicWallTime now, | 55 QuicWallTime now, |
| 51 CachedNetworkParameters* cached_network_params) { | 56 CachedNetworkParameters* cached_network_params) { |
| 52 return server_config_->NewSourceAddressToken(*GetConfig(config_id), | 57 return server_config_->NewSourceAddressToken(*GetConfig(config_id), |
| 53 previous_tokens, ip, rand, now, | 58 previous_tokens, ip, rand, now, |
| 54 cached_network_params); | 59 cached_network_params); |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 uint32_t QuicCryptoServerConfigPeer::source_address_token_future_secs() { | 192 uint32_t QuicCryptoServerConfigPeer::source_address_token_future_secs() { |
| 188 return server_config_->source_address_token_future_secs_; | 193 return server_config_->source_address_token_future_secs_; |
| 189 } | 194 } |
| 190 | 195 |
| 191 uint32_t QuicCryptoServerConfigPeer::source_address_token_lifetime_secs() { | 196 uint32_t QuicCryptoServerConfigPeer::source_address_token_lifetime_secs() { |
| 192 return server_config_->source_address_token_lifetime_secs_; | 197 return server_config_->source_address_token_lifetime_secs_; |
| 193 } | 198 } |
| 194 | 199 |
| 195 } // namespace test | 200 } // namespace test |
| 196 } // namespace net | 201 } // namespace net |
| OLD | NEW |