OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 CHROMEOS_CERT_LOADER_H_ | 5 #ifndef CHROMEOS_CERT_LOADER_H_ |
6 #define CHROMEOS_CERT_LOADER_H_ | 6 #define CHROMEOS_CERT_LOADER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 // Trigger a certificate load. If a certificate loading task is already in | 97 // Trigger a certificate load. If a certificate loading task is already in |
98 // progress, will start a reload once the current task is finished. | 98 // progress, will start a reload once the current task is finished. |
99 void LoadCertificates(); | 99 void LoadCertificates(); |
100 | 100 |
101 // Called if a certificate load task is finished. | 101 // Called if a certificate load task is finished. |
102 void UpdateCertificates(std::unique_ptr<net::CertificateList> cert_list); | 102 void UpdateCertificates(std::unique_ptr<net::CertificateList> cert_list); |
103 | 103 |
104 void NotifyCertificatesLoaded(bool initial_load); | 104 void NotifyCertificatesLoaded(bool initial_load); |
105 | 105 |
106 // net::CertDatabase::Observer | 106 // net::CertDatabase::Observer |
107 void OnCertDBChanged(const net::X509Certificate* cert) override; | 107 void OnCertDBChanged() override; |
108 | 108 |
109 base::ObserverList<Observer> observers_; | 109 base::ObserverList<Observer> observers_; |
110 | 110 |
111 // Flags describing current CertLoader state. | 111 // Flags describing current CertLoader state. |
112 bool certificates_loaded_; | 112 bool certificates_loaded_; |
113 bool certificates_update_required_; | 113 bool certificates_update_required_; |
114 bool certificates_update_running_; | 114 bool certificates_update_running_; |
115 | 115 |
116 // The user-specific NSS certificate database from which the certificates | 116 // The user-specific NSS certificate database from which the certificates |
117 // should be loaded. | 117 // should be loaded. |
118 net::NSSCertDatabase* database_; | 118 net::NSSCertDatabase* database_; |
119 | 119 |
120 // Cached Certificates loaded from the database. | 120 // Cached Certificates loaded from the database. |
121 std::unique_ptr<net::CertificateList> cert_list_; | 121 std::unique_ptr<net::CertificateList> cert_list_; |
122 | 122 |
123 base::ThreadChecker thread_checker_; | 123 base::ThreadChecker thread_checker_; |
124 | 124 |
125 base::WeakPtrFactory<CertLoader> weak_factory_; | 125 base::WeakPtrFactory<CertLoader> weak_factory_; |
126 | 126 |
127 DISALLOW_COPY_AND_ASSIGN(CertLoader); | 127 DISALLOW_COPY_AND_ASSIGN(CertLoader); |
128 }; | 128 }; |
129 | 129 |
130 } // namespace chromeos | 130 } // namespace chromeos |
131 | 131 |
132 #endif // CHROMEOS_CERT_LOADER_H_ | 132 #endif // CHROMEOS_CERT_LOADER_H_ |
OLD | NEW |