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

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

Issue 2339433004: Use unique_ptrs to manage callback lifetimes in some QUIC code (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
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 f7da6f0d4e4159f6dd5c40efe5acf13534db0050..2a1a1af19c74cfd691f6643ba477b32683d6a4df 100644
--- a/net/quic/test_tools/crypto_test_utils.cc
+++ b/net/quic/test_tools/crypto_test_utils.cc
@@ -291,9 +291,8 @@ class FullChloGenerator : public ValidateClientHelloResultCallback {
compressed_certs_cache_(compressed_certs_cache),
out_(out) {}
- void RunImpl(
- std::unique_ptr<ValidateClientHelloResultCallback::Result> result,
- std::unique_ptr<ProofSource::Details> /* details */) override {
+ void Run(std::unique_ptr<ValidateClientHelloResultCallback::Result> result,
+ std::unique_ptr<ProofSource::Details> /* details */) override {
QuicCryptoNegotiatedParameters params;
string error_details;
DiversificationNonce diversification_nonce;
@@ -966,8 +965,9 @@ void CryptoTestUtils::GenerateFullCHLO(
// Pass a inchoate CHLO.
crypto_config->ValidateClientHello(
inchoate_chlo, client_addr.address(), server_ip, version, clock, proof,
- new FullChloGenerator(crypto_config, server_ip, client_addr, clock, proof,
- compressed_certs_cache, out));
+ std::unique_ptr<FullChloGenerator>(
+ new FullChloGenerator(crypto_config, server_ip, client_addr, clock,
+ proof, compressed_certs_cache, out)));
}
} // namespace test

Powered by Google App Engine
This is Rietveld 408576698