Index: net/ssl/client_cert_store_mac.cc |
diff --git a/net/ssl/client_cert_store_mac.cc b/net/ssl/client_cert_store_mac.cc |
index a3ef5899155d3a1f3fec7da227c3af7845724fd7..80035244e441e5adba6a47f8f1358309c7fa769a 100644 |
--- a/net/ssl/client_cert_store_mac.cc |
+++ b/net/ssl/client_cert_store_mac.cc |
@@ -236,9 +236,9 @@ ClientCertStoreMac::ClientCertStoreMac() {} |
ClientCertStoreMac::~ClientCertStoreMac() {} |
-void ClientCertStoreMac::GetClientCerts(const SSLCertRequestInfo& request, |
- CertificateList* selected_certs, |
- const base::Closure& callback) { |
+void ClientCertStoreMac::GetClientCerts( |
+ const SSLCertRequestInfo& request, |
+ const ClientCertListCallback& callback) { |
std::string server_domain = request.host_and_port.host(); |
ScopedCFTypeRef<SecIdentityRef> preferred_identity; |
@@ -270,8 +270,7 @@ void ClientCertStoreMac::GetClientCerts(const SSLCertRequestInfo& request, |
err = SecIdentitySearchCreate(NULL, CSSM_KEYUSE_SIGN, &search); |
} |
if (err) { |
- selected_certs->clear(); |
- callback.Run(); |
+ callback.Run(CertificateList()); |
return; |
} |
ScopedCFTypeRef<SecIdentitySearchRef> scoped_search(search); |
@@ -311,14 +310,14 @@ void ClientCertStoreMac::GetClientCerts(const SSLCertRequestInfo& request, |
if (err != errSecItemNotFound) { |
OSSTATUS_LOG(ERROR, err) << "SecIdentitySearch error"; |
- selected_certs->clear(); |
- callback.Run(); |
+ callback.Run(CertificateList()); |
return; |
} |
+ CertificateList selected_certs; |
GetClientCertsImpl(preferred_cert, regular_certs, request, true, |
- selected_certs); |
- callback.Run(); |
+ &selected_certs); |
+ callback.Run(std::move(selected_certs)); |
} |
bool ClientCertStoreMac::SelectClientCertsForTesting( |