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

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

Issue 2338013004: Simplify lifetime management of ValidateClientHelloResultCallback::Result objects (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
« no previous file with comments | « net/quic/core/quic_crypto_server_stream.cc ('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 a4aaab97b0a8492527659622445a158cf1e25107..f7da6f0d4e4159f6dd5c40efe5acf13534db0050 100644
--- a/net/quic/test_tools/crypto_test_utils.cc
+++ b/net/quic/test_tools/crypto_test_utils.cc
@@ -291,15 +291,15 @@ class FullChloGenerator : public ValidateClientHelloResultCallback {
compressed_certs_cache_(compressed_certs_cache),
out_(out) {}
- void RunImpl(const CryptoHandshakeMessage& client_hello,
- const ValidateClientHelloResultCallback::Result& result,
- std::unique_ptr<ProofSource::Details> /* details */) override {
+ void RunImpl(
+ std::unique_ptr<ValidateClientHelloResultCallback::Result> result,
+ std::unique_ptr<ProofSource::Details> /* details */) override {
QuicCryptoNegotiatedParameters params;
string error_details;
DiversificationNonce diversification_nonce;
CryptoHandshakeMessage rej;
crypto_config_->ProcessClientHello(
- result, /*reject_only=*/false, /*connection_id=*/1, server_ip_,
+ *result, /*reject_only=*/false, /*connection_id=*/1, server_ip_,
client_addr_, AllSupportedVersions().front(), AllSupportedVersions(),
/*use_stateless_rejects=*/true, /*server_designated_connection_id=*/0,
clock_, QuicRandom::GetInstance(), compressed_certs_cache_, &params,
@@ -321,7 +321,7 @@ class FullChloGenerator : public ValidateClientHelloResultCallback {
StringPiece scid;
ASSERT_TRUE(server_config->GetStringPiece(kSCID, &scid));
- *out_ = client_hello;
+ *out_ = result->client_hello;
out_->SetStringPiece(kSCID, scid);
out_->SetStringPiece(kSourceAddressTokenTag, srct);
uint64_t xlct = CryptoTestUtils::LeafCertHashForTesting();
« no previous file with comments | « net/quic/core/quic_crypto_server_stream.cc ('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