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

Unified Diff: net/quic/test_tools/crypto_test_utils_test.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/test_tools/crypto_test_utils.cc ('k') | net/quic/test_tools/fake_proof_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/crypto_test_utils_test.cc
diff --git a/net/quic/test_tools/crypto_test_utils_test.cc b/net/quic/test_tools/crypto_test_utils_test.cc
index b8f662d5ea20f05f22da832a59eb783642630436..033855674c3293fd6cf0ebed83afc70931e095e9 100644
--- a/net/quic/test_tools/crypto_test_utils_test.cc
+++ b/net/quic/test_tools/crypto_test_utils_test.cc
@@ -18,12 +18,13 @@ namespace test {
class ShloVerifier {
public:
- ShloVerifier(QuicCryptoServerConfig* crypto_config,
- QuicSocketAddress server_addr,
- QuicSocketAddress client_addr,
- const QuicClock* clock,
- scoped_refptr<QuicSignedServerConfig> signed_config,
- QuicCompressedCertsCache* compressed_certs_cache)
+ ShloVerifier(
+ QuicCryptoServerConfig* crypto_config,
+ QuicSocketAddress server_addr,
+ QuicSocketAddress client_addr,
+ const QuicClock* clock,
+ QuicReferenceCountedPointer<QuicSignedServerConfig> signed_config,
+ QuicCompressedCertsCache* compressed_certs_cache)
: crypto_config_(crypto_config),
server_addr_(server_addr),
client_addr_(client_addr),
@@ -36,7 +37,8 @@ class ShloVerifier {
public:
explicit ValidateClientHelloCallback(ShloVerifier* shlo_verifier)
: shlo_verifier_(shlo_verifier) {}
- void Run(scoped_refptr<ValidateClientHelloResultCallback::Result> result,
+ void Run(QuicReferenceCountedPointer<
+ ValidateClientHelloResultCallback::Result> result,
std::unique_ptr<ProofSource::Details> /* details */) override {
shlo_verifier_->ValidateClientHelloDone(result);
}
@@ -53,7 +55,8 @@ class ShloVerifier {
private:
void ValidateClientHelloDone(
- const scoped_refptr<ValidateClientHelloResultCallback::Result>& result) {
+ const QuicReferenceCountedPointer<
+ ValidateClientHelloResultCallback::Result>& result) {
result_ = result;
crypto_config_->ProcessClientHello(
result_, /*reject_only=*/false, /*connection_id=*/1, server_addr_,
@@ -96,11 +99,12 @@ class ShloVerifier {
QuicSocketAddress server_addr_;
QuicSocketAddress client_addr_;
const QuicClock* clock_;
- scoped_refptr<QuicSignedServerConfig> signed_config_;
+ QuicReferenceCountedPointer<QuicSignedServerConfig> signed_config_;
QuicCompressedCertsCache* compressed_certs_cache_;
- scoped_refptr<QuicCryptoNegotiatedParameters> params_;
- scoped_refptr<ValidateClientHelloResultCallback::Result> result_;
+ QuicReferenceCountedPointer<QuicCryptoNegotiatedParameters> params_;
+ QuicReferenceCountedPointer<ValidateClientHelloResultCallback::Result>
+ result_;
};
TEST(CryptoTestUtilsTest, TestGenerateFullCHLO) {
@@ -110,7 +114,7 @@ TEST(CryptoTestUtilsTest, TestGenerateFullCHLO) {
CryptoTestUtils::ProofSourceForTesting());
QuicSocketAddress server_addr;
QuicSocketAddress client_addr(QuicIpAddress::Loopback4(), 1);
- scoped_refptr<QuicSignedServerConfig> signed_config(
+ QuicReferenceCountedPointer<QuicSignedServerConfig> signed_config(
new QuicSignedServerConfig);
QuicCompressedCertsCache compressed_certs_cache(
QuicCompressedCertsCache::kQuicCompressedCertsCacheSize);
« no previous file with comments | « net/quic/test_tools/crypto_test_utils.cc ('k') | net/quic/test_tools/fake_proof_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698