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 CHROME_BROWSER_CHROMEOS_NET_CLIENT_CERT_STORE_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_NET_CLIENT_CERT_STORE_CHROMEOS_H_ |
6 #define CHROME_BROWSER_CHROMEOS_NET_CLIENT_CERT_STORE_CHROMEOS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_NET_CLIENT_CERT_STORE_CHROMEOS_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // databases that pass the filter |cert_filter| and additionally return | 44 // databases that pass the filter |cert_filter| and additionally return |
45 // certificates provided by |cert_provider|. | 45 // certificates provided by |cert_provider|. |
46 ClientCertStoreChromeOS( | 46 ClientCertStoreChromeOS( |
47 std::unique_ptr<CertificateProvider> cert_provider, | 47 std::unique_ptr<CertificateProvider> cert_provider, |
48 std::unique_ptr<CertFilter> cert_filter, | 48 std::unique_ptr<CertFilter> cert_filter, |
49 const PasswordDelegateFactory& password_delegate_factory); | 49 const PasswordDelegateFactory& password_delegate_factory); |
50 ~ClientCertStoreChromeOS() override; | 50 ~ClientCertStoreChromeOS() override; |
51 | 51 |
52 // net::ClientCertStore: | 52 // net::ClientCertStore: |
53 void GetClientCerts(const net::SSLCertRequestInfo& cert_request_info, | 53 void GetClientCerts(const net::SSLCertRequestInfo& cert_request_info, |
54 net::CertificateList* selected_certs, | 54 const ClientCertListCallback& callback) override; |
55 const base::Closure& callback) override; | |
56 | 55 |
57 private: | 56 private: |
58 void GotAdditionalCerts(const net::SSLCertRequestInfo* request, | 57 void GotAdditionalCerts(const net::SSLCertRequestInfo* request, |
59 net::CertificateList* selected_certs, | 58 const ClientCertListCallback& callback, |
60 const base::Closure& callback, | |
61 const net::CertificateList& additional_certs); | 59 const net::CertificateList& additional_certs); |
62 | 60 |
63 void GetAndFilterCertsOnWorkerThread( | 61 net::CertificateList GetAndFilterCertsOnWorkerThread( |
64 std::unique_ptr<crypto::CryptoModuleBlockingPasswordDelegate> | 62 std::unique_ptr<crypto::CryptoModuleBlockingPasswordDelegate> |
65 password_delegate, | 63 password_delegate, |
66 const net::SSLCertRequestInfo* request, | 64 const net::SSLCertRequestInfo* request, |
67 const net::CertificateList& additional_certs, | 65 const net::CertificateList& additional_certs); |
68 net::CertificateList* selected_certs); | |
69 | 66 |
70 std::unique_ptr<CertificateProvider> cert_provider_; | 67 std::unique_ptr<CertificateProvider> cert_provider_; |
71 std::unique_ptr<CertFilter> cert_filter_; | 68 std::unique_ptr<CertFilter> cert_filter_; |
72 | 69 |
73 // The factory for creating the delegate for requesting a password to a | 70 // The factory for creating the delegate for requesting a password to a |
74 // PKCS#11 token. May be null. | 71 // PKCS#11 token. May be null. |
75 PasswordDelegateFactory password_delegate_factory_; | 72 PasswordDelegateFactory password_delegate_factory_; |
76 | 73 |
77 DISALLOW_COPY_AND_ASSIGN(ClientCertStoreChromeOS); | 74 DISALLOW_COPY_AND_ASSIGN(ClientCertStoreChromeOS); |
78 }; | 75 }; |
79 | 76 |
80 } // namespace chromeos | 77 } // namespace chromeos |
81 | 78 |
82 #endif // CHROME_BROWSER_CHROMEOS_NET_CLIENT_CERT_STORE_CHROMEOS_H_ | 79 #endif // CHROME_BROWSER_CHROMEOS_NET_CLIENT_CERT_STORE_CHROMEOS_H_ |
OLD | NEW |