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

Unified Diff: net/quic/quic_crypto_client_stream.cc

Issue 2126023002: use std::unique_ptr for the callback argument of QUIC's ProofVerifier::Verify proof to make ownersh… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@126327823
Patch Set: Created 4 years, 5 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/quic_crypto_client_stream.cc
diff --git a/net/quic/quic_crypto_client_stream.cc b/net/quic/quic_crypto_client_stream.cc
index 1fe0b5c5dd27e7f4b03948ff48a28f46d254fd3d..7ac7fc5050d9b8cbd50de8ea5f52f46390be5b54 100644
--- a/net/quic/quic_crypto_client_stream.cc
+++ b/net/quic/quic_crypto_client_stream.cc
@@ -476,7 +476,8 @@ QuicAsyncStatus QuicCryptoClientStream::DoVerifyProof(
server_id_.host(), server_id_.port(), cached->server_config(),
session()->connection()->version(), chlo_hash_, cached->certs(),
cached->cert_sct(), cached->signature(), verify_context_.get(),
- &verify_error_details_, &verify_details_, proof_verify_callback);
+ &verify_error_details_, &verify_details_,
+ std::unique_ptr<ProofVerifierCallback>(proof_verify_callback));
switch (status) {
case QUIC_PENDING:
@@ -484,10 +485,8 @@ QuicAsyncStatus QuicCryptoClientStream::DoVerifyProof(
DVLOG(1) << "Doing VerifyProof";
break;
case QUIC_FAILURE:
- delete proof_verify_callback;
break;
case QUIC_SUCCESS:
- delete proof_verify_callback;
verify_ok_ = true;
break;
}

Powered by Google App Engine
This is Rietveld 408576698