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

Unified Diff: net/ssl/client_cert_store_nss_unittest.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_nss.cc ('k') | net/ssl/client_cert_store_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « net/ssl/client_cert_store_nss.cc ('k') | net/ssl/client_cert_store_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698