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

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

Issue 2453113002: Fix object-lifetime issues in async GetProof callpaths (Closed)
Patch Set: Updated patchset dependency Created 4 years, 2 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/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 dd664c8c126dd85f77ea47552a3f1e566fdc44b6..7a6d36d22bab7e86f3296e9f0b0f8c44f3f741c6 100644
--- a/net/quic/test_tools/crypto_test_utils.cc
+++ b/net/quic/test_tools/crypto_test_utils.cc
@@ -278,7 +278,7 @@ class FullChloGenerator {
IPAddress server_ip,
IPEndPoint client_addr,
const QuicClock* clock,
- QuicCryptoProof* proof,
+ scoped_refptr<QuicCryptoProof> proof,
QuicCompressedCertsCache* compressed_certs_cache,
CryptoHandshakeMessage* out)
: crypto_config_(crypto_config),
@@ -287,7 +287,8 @@ class FullChloGenerator {
clock_(clock),
proof_(proof),
compressed_certs_cache_(compressed_certs_cache),
- out_(out) {}
+ out_(out),
+ params_(new QuicCryptoNegotiatedParameters) {}
class ValidateClientHelloCallback : public ValidateClientHelloResultCallback {
public:
@@ -316,7 +317,7 @@ class FullChloGenerator {
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_,
+ clock_, QuicRandom::GetInstance(), compressed_certs_cache_, params_,
proof_, /*total_framing_overhead=*/50, kDefaultMaxPacketSize,
GetProcessClientHelloCallback());
}
@@ -371,11 +372,11 @@ class FullChloGenerator {
IPAddress server_ip_;
IPEndPoint client_addr_;
const QuicClock* clock_;
- QuicCryptoProof* proof_;
+ scoped_refptr<QuicCryptoProof> proof_;
QuicCompressedCertsCache* compressed_certs_cache_;
CryptoHandshakeMessage* out_;
- QuicCryptoNegotiatedParameters params_;
+ scoped_refptr<QuicCryptoNegotiatedParameters> params_;
scoped_refptr<ValidateClientHelloResultCallback::Result> result_;
};
@@ -1005,7 +1006,7 @@ void CryptoTestUtils::GenerateFullCHLO(
IPEndPoint client_addr,
QuicVersion version,
const QuicClock* clock,
- QuicCryptoProof* proof,
+ scoped_refptr<QuicCryptoProof> 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