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

Unified Diff: net/quic/test_tools/crypto_test_utils.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.h ('k') | net/quic/test_tools/crypto_test_utils_test.cc » ('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.cc
diff --git a/net/quic/test_tools/crypto_test_utils.cc b/net/quic/test_tools/crypto_test_utils.cc
index 0f756f0e7dd76ae9c9d403a4baa2e052b2a2db58..416ea3d6f0bc531800c3ab94e402516953550a26 100644
--- a/net/quic/test_tools/crypto_test_utils.cc
+++ b/net/quic/test_tools/crypto_test_utils.cc
@@ -274,13 +274,14 @@ namespace {
// CHLO.
class FullChloGenerator {
public:
- FullChloGenerator(QuicCryptoServerConfig* crypto_config,
- QuicSocketAddress server_addr,
- QuicSocketAddress client_addr,
- const QuicClock* clock,
- scoped_refptr<QuicSignedServerConfig> signed_config,
- QuicCompressedCertsCache* compressed_certs_cache,
- CryptoHandshakeMessage* out)
+ FullChloGenerator(
+ QuicCryptoServerConfig* crypto_config,
+ QuicSocketAddress server_addr,
+ QuicSocketAddress client_addr,
+ const QuicClock* clock,
+ QuicReferenceCountedPointer<QuicSignedServerConfig> signed_config,
+ QuicCompressedCertsCache* compressed_certs_cache,
+ CryptoHandshakeMessage* out)
: crypto_config_(crypto_config),
server_addr_(server_addr),
client_addr_(client_addr),
@@ -294,7 +295,8 @@ class FullChloGenerator {
public:
explicit ValidateClientHelloCallback(FullChloGenerator* generator)
: generator_(generator) {}
- void Run(scoped_refptr<ValidateClientHelloResultCallback::Result> result,
+ void Run(QuicReferenceCountedPointer<
+ ValidateClientHelloResultCallback::Result> result,
std::unique_ptr<ProofSource::Details> /* details */) override {
generator_->ValidateClientHelloDone(std::move(result));
}
@@ -311,7 +313,8 @@ class FullChloGenerator {
private:
void ValidateClientHelloDone(
- scoped_refptr<ValidateClientHelloResultCallback::Result> result) {
+ QuicReferenceCountedPointer<ValidateClientHelloResultCallback::Result>
+ result) {
result_ = result;
crypto_config_->ProcessClientHello(
result_, /*reject_only=*/false, /*connection_id=*/1, server_addr_,
@@ -373,12 +376,13 @@ class FullChloGenerator {
QuicSocketAddress server_addr_;
QuicSocketAddress client_addr_;
const QuicClock* clock_;
- scoped_refptr<QuicSignedServerConfig> signed_config_;
+ QuicReferenceCountedPointer<QuicSignedServerConfig> signed_config_;
QuicCompressedCertsCache* compressed_certs_cache_;
CryptoHandshakeMessage* out_;
- scoped_refptr<QuicCryptoNegotiatedParameters> params_;
- scoped_refptr<ValidateClientHelloResultCallback::Result> result_;
+ QuicReferenceCountedPointer<QuicCryptoNegotiatedParameters> params_;
+ QuicReferenceCountedPointer<ValidateClientHelloResultCallback::Result>
+ result_;
};
} // namespace
@@ -565,7 +569,7 @@ string CryptoTestUtils::GetValueForTag(const CryptoHandshakeMessage& message,
}
uint64_t CryptoTestUtils::LeafCertHashForTesting() {
- scoped_refptr<ProofSource::Chain> chain;
+ QuicReferenceCountedPointer<ProofSource::Chain> chain;
QuicSocketAddress server_address;
QuicCryptoProof proof;
std::unique_ptr<ProofSource> proof_source(
@@ -1006,7 +1010,7 @@ void CryptoTestUtils::GenerateFullCHLO(
QuicSocketAddress client_addr,
QuicVersion version,
const QuicClock* clock,
- scoped_refptr<QuicSignedServerConfig> proof,
+ QuicReferenceCountedPointer<QuicSignedServerConfig> proof,
QuicCompressedCertsCache* compressed_certs_cache,
CryptoHandshakeMessage* out) {
// Pass a inchoate CHLO.
« no previous file with comments | « net/quic/test_tools/crypto_test_utils.h ('k') | net/quic/test_tools/crypto_test_utils_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698