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

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

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
« no previous file with comments | « net/net.gypi ('k') | net/quic/test_tools/quic_crypto_server_config_peer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef NET_QUIC_TEST_TOOLS_QUIC_CRYPTO_SERVER_CONFIG_PEER_H_ 5 #ifndef NET_QUIC_TEST_TOOLS_QUIC_CRYPTO_SERVER_CONFIG_PEER_H_
6 #define NET_QUIC_TEST_TOOLS_QUIC_CRYPTO_SERVER_CONFIG_PEER_H_ 6 #define NET_QUIC_TEST_TOOLS_QUIC_CRYPTO_SERVER_CONFIG_PEER_H_
7 7
8 #include "net/quic/core/crypto/quic_crypto_server_config.h" 8 #include "net/quic/core/crypto/quic_crypto_server_config.h"
9 9
10 namespace net { 10 namespace net {
11 namespace test { 11 namespace test {
12 12
13 // Peer for accessing otherwise private members of a QuicCryptoServerConfig. 13 // Peer for accessing otherwise private members of a QuicCryptoServerConfig.
14 class QuicCryptoServerConfigPeer { 14 class QuicCryptoServerConfigPeer {
15 public: 15 public:
16 explicit QuicCryptoServerConfigPeer( 16 explicit QuicCryptoServerConfigPeer(
17 const QuicCryptoServerConfig* server_config) 17 const QuicCryptoServerConfig* server_config)
18 : server_config_(server_config) {} 18 : server_config_(server_config) {}
19 19
20 // Returns the proof source. 20 // Returns the proof source.
21 ProofSource* GetProofSource(); 21 ProofSource* GetProofSource();
22 22
23 // Returns the primary config. 23 // Returns the primary config.
24 scoped_refptr<QuicCryptoServerConfig::Config> GetPrimaryConfig(); 24 scoped_refptr<QuicCryptoServerConfig::Config> GetPrimaryConfig();
25 25
26 // Returns the config associated with |config_id|. 26 // Returns the config associated with |config_id|.
27 scoped_refptr<QuicCryptoServerConfig::Config> GetConfig( 27 scoped_refptr<QuicCryptoServerConfig::Config> GetConfig(
28 std::string config_id); 28 std::string config_id);
29 29
30 // Returns a pointer to the ProofSource object.
31 ProofSource* GetProofSource() const;
32
30 // Generates a new valid source address token. 33 // Generates a new valid source address token.
31 std::string NewSourceAddressToken( 34 std::string NewSourceAddressToken(
32 std::string config_id, 35 std::string config_id,
33 SourceAddressTokens previous_tokens, 36 SourceAddressTokens previous_tokens,
34 const IPAddress& ip, 37 const IPAddress& ip,
35 QuicRandom* rand, 38 QuicRandom* rand,
36 QuicWallTime now, 39 QuicWallTime now,
37 CachedNetworkParameters* cached_network_params); 40 CachedNetworkParameters* cached_network_params);
38 41
39 // Attempts to validate the tokens in |tokens|. 42 // Attempts to validate the tokens in |tokens|.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 uint32_t server_nonce_strike_register_window_secs(); 103 uint32_t server_nonce_strike_register_window_secs();
101 104
102 private: 105 private:
103 const QuicCryptoServerConfig* server_config_; 106 const QuicCryptoServerConfig* server_config_;
104 }; 107 };
105 108
106 } // namespace test 109 } // namespace test
107 } // namespace net 110 } // namespace net
108 111
109 #endif // NET_QUIC_TEST_TOOLS_QUIC_CRYPTO_SERVER_CONFIG_PEER_H_ 112 #endif // NET_QUIC_TEST_TOOLS_QUIC_CRYPTO_SERVER_CONFIG_PEER_H_
OLDNEW
« no previous file with comments | « net/net.gypi ('k') | net/quic/test_tools/quic_crypto_server_config_peer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698