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_OPTIONS_CERT_LIBRARY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_OPTIONS_CERT_LIBRARY_H_ |
6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_CERT_LIBRARY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_CERT_LIBRARY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // found. This function may be slow depending on the number of stored | 76 // found. This function may be slow depending on the number of stored |
77 // certificates. | 77 // certificates. |
78 // TOOD(pneubeck): Either make this more efficient, asynchronous or get rid of | 78 // TOOD(pneubeck): Either make this more efficient, asynchronous or get rid of |
79 // it. | 79 // it. |
80 int GetServerCACertIndexByPEM(const std::string& pem_encoded) const; | 80 int GetServerCACertIndexByPEM(const std::string& pem_encoded) const; |
81 // Same as above but for a PKCS#11 id. | 81 // Same as above but for a PKCS#11 id. |
82 int GetUserCertIndexByPkcs11Id(const std::string& pkcs11_id) const; | 82 int GetUserCertIndexByPkcs11Id(const std::string& pkcs11_id) const; |
83 | 83 |
84 // CertLoader::Observer | 84 // CertLoader::Observer |
85 virtual void OnCertificatesLoaded(const net::CertificateList&, | 85 virtual void OnCertificatesLoaded(const net::CertificateList&, |
86 bool initial_load) OVERRIDE; | 86 bool initial_load) override; |
87 | 87 |
88 private: | 88 private: |
89 CertLibrary(); | 89 CertLibrary(); |
90 virtual ~CertLibrary(); | 90 virtual ~CertLibrary(); |
91 | 91 |
92 net::X509Certificate* GetCertificateAt(CertType type, int index) const; | 92 net::X509Certificate* GetCertificateAt(CertType type, int index) const; |
93 const net::CertificateList& GetCertificateListForType(CertType type) const; | 93 const net::CertificateList& GetCertificateListForType(CertType type) const; |
94 | 94 |
95 ObserverList<CertLibrary::Observer> observer_list_; | 95 ObserverList<CertLibrary::Observer> observer_list_; |
96 | 96 |
97 // Sorted certificate lists | 97 // Sorted certificate lists |
98 net::CertificateList certs_; | 98 net::CertificateList certs_; |
99 net::CertificateList user_certs_; | 99 net::CertificateList user_certs_; |
100 net::CertificateList server_certs_; | 100 net::CertificateList server_certs_; |
101 net::CertificateList server_ca_certs_; | 101 net::CertificateList server_ca_certs_; |
102 | 102 |
103 DISALLOW_COPY_AND_ASSIGN(CertLibrary); | 103 DISALLOW_COPY_AND_ASSIGN(CertLibrary); |
104 }; | 104 }; |
105 | 105 |
106 } // namespace chromeos | 106 } // namespace chromeos |
107 | 107 |
108 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_CERT_LIBRARY_H_ | 108 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_CERT_LIBRARY_H_ |
OLD | NEW |