Index: net/ssl/client_cert_store_nss_unittest.cc |
diff --git a/net/ssl/client_cert_store_nss_unittest.cc b/net/ssl/client_cert_store_nss_unittest.cc |
index bc222e87696cb7ae3cfacb263a31af9e3d711a4f..8bfae5313f81bdb3d5e3b47baf89a6224f73d49b 100644 |
--- a/net/ssl/client_cert_store_nss_unittest.cc |
+++ b/net/ssl/client_cert_store_nss_unittest.cc |
@@ -11,6 +11,7 @@ |
#include <memory> |
#include <string> |
+#include "base/bind.h" |
#include "base/memory/ref_counted.h" |
#include "base/run_loop.h" |
#include "crypto/scoped_test_nss_db.h" |
@@ -22,6 +23,17 @@ |
namespace net { |
+namespace { |
+ |
+void SaveCertsAndQuitCallback(CertificateList* out_certs, |
+ base::Closure quit_closure, |
+ CertificateList in_certs) { |
+ *out_certs = std::move(in_certs); |
+ quit_closure.Run(); |
+} |
+ |
+} // namespace |
+ |
class ClientCertStoreNSSTestDelegate { |
public: |
ClientCertStoreNSSTestDelegate() {} |
@@ -68,7 +80,9 @@ TEST(ClientCertStoreNSSTest, BuildsCertificateChain) { |
CertificateList selected_certs; |
base::RunLoop loop; |
- store->GetClientCerts(*request.get(), &selected_certs, loop.QuitClosure()); |
+ store->GetClientCerts(*request.get(), |
+ base::Bind(SaveCertsAndQuitCallback, &selected_certs, |
+ loop.QuitClosure())); |
loop.Run(); |
// The result be |client_1| with no intermediates. |
@@ -88,7 +102,9 @@ TEST(ClientCertStoreNSSTest, BuildsCertificateChain) { |
CertificateList selected_certs; |
base::RunLoop loop; |
- store->GetClientCerts(*request.get(), &selected_certs, loop.QuitClosure()); |
+ store->GetClientCerts(*request.get(), |
+ base::Bind(SaveCertsAndQuitCallback, &selected_certs, |
+ loop.QuitClosure())); |
loop.Run(); |
// The result be |client_1| with |client_1_ca| as an intermediate. |