| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_SSL_CLIENT_CERT_STORE_MAC_H_ | 5 #ifndef NET_SSL_CLIENT_CERT_STORE_MAC_H_ |
| 6 #define NET_SSL_CLIENT_CERT_STORE_MAC_H_ | 6 #define NET_SSL_CLIENT_CERT_STORE_MAC_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "net/base/net_export.h" | 10 #include "net/base/net_export.h" |
| 11 #include "net/ssl/client_cert_store.h" | 11 #include "net/ssl/client_cert_store.h" |
| 12 #include "net/ssl/ssl_cert_request_info.h" | 12 #include "net/ssl/ssl_cert_request_info.h" |
| 13 | 13 |
| 14 namespace net { | 14 namespace net { |
| 15 | 15 |
| 16 class NET_EXPORT ClientCertStoreMac : public ClientCertStore { | 16 class NET_EXPORT ClientCertStoreMac : public ClientCertStore { |
| 17 public: | 17 public: |
| 18 ClientCertStoreMac(); | 18 ClientCertStoreMac(); |
| 19 ~ClientCertStoreMac() override; | 19 ~ClientCertStoreMac() override; |
| 20 | 20 |
| 21 // ClientCertStore: | 21 // ClientCertStore: |
| 22 void GetClientCerts(const SSLCertRequestInfo& cert_request_info, | 22 void GetClientCerts(const SSLCertRequestInfo& cert_request_info, |
| 23 CertificateList* selected_certs, | 23 const ClientCertListCallback& callback) override; |
| 24 const base::Closure& callback) override; | |
| 25 | 24 |
| 26 private: | 25 private: |
| 27 friend class ClientCertStoreMacTest; | 26 friend class ClientCertStoreMacTest; |
| 28 friend class ClientCertStoreMacTestDelegate; | 27 friend class ClientCertStoreMacTestDelegate; |
| 29 | 28 |
| 30 // A hook for testing. Filters |input_certs| using the logic being used to | 29 // A hook for testing. Filters |input_certs| using the logic being used to |
| 31 // filter the system store when GetClientCerts() is called. | 30 // filter the system store when GetClientCerts() is called. |
| 32 // Implemented by creating a list of certificates that otherwise would be | 31 // Implemented by creating a list of certificates that otherwise would be |
| 33 // extracted from the system store and filtering it using the common logic | 32 // extracted from the system store and filtering it using the common logic |
| 34 // (less adequate than the approach used on Windows). | 33 // (less adequate than the approach used on Windows). |
| (...skipping 10 matching lines...) Expand all Loading... |
| 45 const CertificateList& regular_certs, | 44 const CertificateList& regular_certs, |
| 46 const SSLCertRequestInfo& request, | 45 const SSLCertRequestInfo& request, |
| 47 CertificateList* selected_certs); | 46 CertificateList* selected_certs); |
| 48 | 47 |
| 49 DISALLOW_COPY_AND_ASSIGN(ClientCertStoreMac); | 48 DISALLOW_COPY_AND_ASSIGN(ClientCertStoreMac); |
| 50 }; | 49 }; |
| 51 | 50 |
| 52 } // namespace net | 51 } // namespace net |
| 53 | 52 |
| 54 #endif // NET_SSL_CLIENT_CERT_STORE_MAC_H_ | 53 #endif // NET_SSL_CLIENT_CERT_STORE_MAC_H_ |
| OLD | NEW |