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

Unified Diff: net/quic/test_tools/crypto_test_utils_test.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_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 e082b63feff774979f96d4e0683f827f7a65d135..5e27e668e0b8becd6640c6732f2069cb549dc449 100644
--- a/net/quic/test_tools/crypto_test_utils_test.cc
+++ b/net/quic/test_tools/crypto_test_utils_test.cc
@@ -32,9 +32,8 @@ class ShloVerifier : public ValidateClientHelloResultCallback {
compressed_certs_cache_(compressed_certs_cache) {}
// Verify that the output message is a SHLO.
- 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;
@@ -119,8 +118,9 @@ TEST(CryptoTestUtilsTest, TestGenerateFullCHLO) {
// Verify that full_chlo can pass crypto_config's verification.
crypto_config.ValidateClientHello(
full_chlo, client_addr.address(), server_ip, version, &clock, &proof,
- new ShloVerifier(&crypto_config, server_ip, client_addr, &clock, &proof,
- &compressed_certs_cache));
+ std::unique_ptr<ShloVerifier>(
+ new ShloVerifier(&crypto_config, server_ip, client_addr, &clock,
+ &proof, &compressed_certs_cache)));
}
} // namespace test

Powered by Google App Engine
This is Rietveld 408576698