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

Unified Diff: net/ssl/client_cert_store_win.cc

Issue 2838243002: Remove client_certs from SSLCertRequestInfo. (Closed)
Patch Set: revert stray whitespace change Created 3 years, 8 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/ssl/client_cert_store_win.h ('k') | net/ssl/ssl_cert_request_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ssl/client_cert_store_win.cc
diff --git a/net/ssl/client_cert_store_win.cc b/net/ssl/client_cert_store_win.cc
index cdeee46c12ca889a2c0dfb062fd1471c51b5a0a8..fec9c33ae67b7d108e0468e4d686e606822213a1 100644
--- a/net/ssl/client_cert_store_win.cc
+++ b/net/ssl/client_cert_store_win.cc
@@ -171,15 +171,16 @@ ClientCertStoreWin::ClientCertStoreWin(HCERTSTORE cert_store) {
ClientCertStoreWin::~ClientCertStoreWin() {}
-void ClientCertStoreWin::GetClientCerts(const SSLCertRequestInfo& request,
- CertificateList* selected_certs,
- const base::Closure& callback) {
+void ClientCertStoreWin::GetClientCerts(
+ const SSLCertRequestInfo& request,
+ const ClientCertListCallback& callback) {
+ CertificateList selected_certs;
if (cert_store_) {
// Use the existing client cert store. Note: Under some situations,
// it's possible for this to return certificates that aren't usable
// (see below).
- GetClientCertsImpl(cert_store_, request, selected_certs);
- callback.Run();
+ GetClientCertsImpl(cert_store_, request, &selected_certs);
+ callback.Run(std::move(selected_certs));
return;
}
@@ -190,14 +191,12 @@ void ClientCertStoreWin::GetClientCerts(const SSLCertRequestInfo& request,
ScopedHCERTSTORE my_cert_store(CertOpenSystemStore(NULL, L"MY"));
if (!my_cert_store) {
PLOG(ERROR) << "Could not open the \"MY\" system certificate store: ";
- selected_certs->clear();
- callback.Run();
+ callback.Run(CertificateList());
return;
}
- GetClientCertsImpl(my_cert_store, request, selected_certs);
-
- callback.Run();
+ GetClientCertsImpl(my_cert_store, request, &selected_certs);
+ callback.Run(std::move(selected_certs));
}
bool ClientCertStoreWin::SelectClientCertsForTesting(
« no previous file with comments | « net/ssl/client_cert_store_win.h ('k') | net/ssl/ssl_cert_request_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698