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

Unified Diff: net/http/http_network_transaction.cc

Issue 2898573002: Refactor client cert private key handling. (Closed)
Patch Set: removed no longer needed forward declaration Created 3 years, 6 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/http/http_network_transaction.h ('k') | net/http/http_transaction.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction.cc
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index f06df4d35246ff4254fe211ca7a1e614aa374b2e..7b81b91aad8065407a88ce804d05ed78b684fca1 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -150,8 +150,8 @@ int HttpNetworkTransaction::RestartIgnoringLastError(
}
int HttpNetworkTransaction::RestartWithCertificate(
- X509Certificate* client_cert,
- SSLPrivateKey* client_private_key,
+ scoped_refptr<X509Certificate> client_cert,
+ scoped_refptr<SSLPrivateKey> client_private_key,
const CompletionCallback& callback) {
// In HandleCertificateRequest(), we always tear down existing stream
// requests to force a new connection. So we shouldn't have one here.
@@ -165,8 +165,8 @@ int HttpNetworkTransaction::RestartWithCertificate(
ssl_config->client_cert = client_cert;
ssl_config->client_private_key = client_private_key;
session_->ssl_client_auth_cache()->Add(
- response_.cert_request_info->host_and_port, client_cert,
- client_private_key);
+ response_.cert_request_info->host_and_port, std::move(client_cert),
+ std::move(client_private_key));
// Reset the other member variables.
// Note: this is necessary only with SSL renegotiation.
ResetStateForRestart();
« no previous file with comments | « net/http/http_network_transaction.h ('k') | net/http/http_transaction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698