Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Side by Side Diff: net/quic/test_tools/quic_crypto_server_config_peer.cc

Issue 2403743003: Changes to testing Peer classes in preparation for Mentat integration (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_crypto_server_config_peer.h ('k') | net/quic/test_tools/quic_time_wait_list_manager_peer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698