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

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

Issue 2589983002: Create a QUIC wrapper around scoped_refptr. (Closed)
Patch Set: rm = nullptr Created 4 years 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 #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 QuicReferenceCountedPointer<QuicCryptoServerConfig::Config>
25 GetPrimaryConfig();
25 26
26 // Returns the config associated with |config_id|. 27 // Returns the config associated with |config_id|.
27 scoped_refptr<QuicCryptoServerConfig::Config> GetConfig( 28 QuicReferenceCountedPointer<QuicCryptoServerConfig::Config> GetConfig(
28 std::string config_id); 29 std::string config_id);
29 30
30 // Returns a pointer to the ProofSource object. 31 // Returns a pointer to the ProofSource object.
31 ProofSource* GetProofSource() const; 32 ProofSource* GetProofSource() const;
32 33
33 // Generates a new valid source address token. 34 // Generates a new valid source address token.
34 std::string NewSourceAddressToken( 35 std::string NewSourceAddressToken(
35 std::string config_id, 36 std::string config_id,
36 SourceAddressTokens previous_tokens, 37 SourceAddressTokens previous_tokens,
37 const QuicIpAddress& ip, 38 const QuicIpAddress& ip,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 76
76 // ConfigsDebug returns a std::string that contains debugging information 77 // ConfigsDebug returns a std::string that contains debugging information
77 // about 78 // about
78 // the set of Configs loaded in |server_config_| and their status. 79 // the set of Configs loaded in |server_config_| and their status.
79 std::string ConfigsDebug(); 80 std::string ConfigsDebug();
80 81
81 void SelectNewPrimaryConfig(int seconds); 82 void SelectNewPrimaryConfig(int seconds);
82 83
83 static std::string CompressChain( 84 static std::string CompressChain(
84 QuicCompressedCertsCache* compressed_certs_cache, 85 QuicCompressedCertsCache* compressed_certs_cache,
85 const scoped_refptr<ProofSource::Chain>& chain, 86 const QuicReferenceCountedPointer<ProofSource::Chain>& chain,
86 const std::string& client_common_set_hashes, 87 const std::string& client_common_set_hashes,
87 const std::string& client_cached_cert_hashes, 88 const std::string& client_cached_cert_hashes,
88 const CommonCertSets* common_sets); 89 const CommonCertSets* common_sets);
89 90
90 uint32_t source_address_token_future_secs(); 91 uint32_t source_address_token_future_secs();
91 92
92 uint32_t source_address_token_lifetime_secs(); 93 uint32_t source_address_token_lifetime_secs();
93 94
94 private: 95 private:
95 const QuicCryptoServerConfig* server_config_; 96 const QuicCryptoServerConfig* server_config_;
96 }; 97 };
97 98
98 } // namespace test 99 } // namespace test
99 } // namespace net 100 } // namespace net
100 101
101 #endif // NET_QUIC_TEST_TOOLS_QUIC_CRYPTO_SERVER_CONFIG_PEER_H_ 102 #endif // NET_QUIC_TEST_TOOLS_QUIC_CRYPTO_SERVER_CONFIG_PEER_H_
OLDNEW
« no previous file with comments | « net/quic/test_tools/fake_proof_source.cc ('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