| 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 OnCACertChanged(const net::X509Certificate* cert) override; | 107 void OnCertDBChanged(const net::X509Certificate* cert) override; |
| 108 void OnCertAdded(const net::X509Certificate* cert) override; | |
| 109 void OnCertRemoved(const net::X509Certificate* cert) override; | |
| 110 | 108 |
| 111 base::ObserverList<Observer> observers_; | 109 base::ObserverList<Observer> observers_; |
| 112 | 110 |
| 113 // Flags describing current CertLoader state. | 111 // Flags describing current CertLoader state. |
| 114 bool certificates_loaded_; | 112 bool certificates_loaded_; |
| 115 bool certificates_update_required_; | 113 bool certificates_update_required_; |
| 116 bool certificates_update_running_; | 114 bool certificates_update_running_; |
| 117 | 115 |
| 118 // The user-specific NSS certificate database from which the certificates | 116 // The user-specific NSS certificate database from which the certificates |
| 119 // should be loaded. | 117 // should be loaded. |
| 120 net::NSSCertDatabase* database_; | 118 net::NSSCertDatabase* database_; |
| 121 | 119 |
| 122 // Cached Certificates loaded from the database. | 120 // Cached Certificates loaded from the database. |
| 123 std::unique_ptr<net::CertificateList> cert_list_; | 121 std::unique_ptr<net::CertificateList> cert_list_; |
| 124 | 122 |
| 125 base::ThreadChecker thread_checker_; | 123 base::ThreadChecker thread_checker_; |
| 126 | 124 |
| 127 base::WeakPtrFactory<CertLoader> weak_factory_; | 125 base::WeakPtrFactory<CertLoader> weak_factory_; |
| 128 | 126 |
| 129 DISALLOW_COPY_AND_ASSIGN(CertLoader); | 127 DISALLOW_COPY_AND_ASSIGN(CertLoader); |
| 130 }; | 128 }; |
| 131 | 129 |
| 132 } // namespace chromeos | 130 } // namespace chromeos |
| 133 | 131 |
| 134 #endif // CHROMEOS_CERT_LOADER_H_ | 132 #endif // CHROMEOS_CERT_LOADER_H_ |
| OLD | NEW |