| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 // Trigger a certificate load. If a certificate loading task is already in | 100 // Trigger a certificate load. If a certificate loading task is already in |
| 101 // progress, will start a reload once the current task is finished. | 101 // progress, will start a reload once the current task is finished. |
| 102 void LoadCertificates(); | 102 void LoadCertificates(); |
| 103 | 103 |
| 104 // Called if a certificate load task is finished. | 104 // Called if a certificate load task is finished. |
| 105 void UpdateCertificates(scoped_ptr<net::CertificateList> cert_list); | 105 void UpdateCertificates(scoped_ptr<net::CertificateList> cert_list); |
| 106 | 106 |
| 107 void NotifyCertificatesLoaded(bool initial_load); | 107 void NotifyCertificatesLoaded(bool initial_load); |
| 108 | 108 |
| 109 // net::CertDatabase::Observer | 109 // net::CertDatabase::Observer |
| 110 virtual void OnCACertChanged(const net::X509Certificate* cert) OVERRIDE; | 110 virtual void OnCACertChanged(const net::X509Certificate* cert) override; |
| 111 virtual void OnCertAdded(const net::X509Certificate* cert) OVERRIDE; | 111 virtual void OnCertAdded(const net::X509Certificate* cert) override; |
| 112 virtual void OnCertRemoved(const net::X509Certificate* cert) OVERRIDE; | 112 virtual void OnCertRemoved(const net::X509Certificate* cert) override; |
| 113 | 113 |
| 114 ObserverList<Observer> observers_; | 114 ObserverList<Observer> observers_; |
| 115 | 115 |
| 116 // Flags describing current CertLoader state. | 116 // Flags describing current CertLoader state. |
| 117 bool certificates_loaded_; | 117 bool certificates_loaded_; |
| 118 bool certificates_update_required_; | 118 bool certificates_update_required_; |
| 119 bool certificates_update_running_; | 119 bool certificates_update_running_; |
| 120 | 120 |
| 121 // The user-specific NSS certificate database from which the certificates | 121 // The user-specific NSS certificate database from which the certificates |
| 122 // should be loaded. | 122 // should be loaded. |
| 123 net::NSSCertDatabase* database_; | 123 net::NSSCertDatabase* database_; |
| 124 | 124 |
| 125 // Set during tests if |IsHardwareBacked()| should always return true. | 125 // Set during tests if |IsHardwareBacked()| should always return true. |
| 126 bool force_hardware_backed_for_test_; | 126 bool force_hardware_backed_for_test_; |
| 127 | 127 |
| 128 // Cached Certificates loaded from the database. | 128 // Cached Certificates loaded from the database. |
| 129 scoped_ptr<net::CertificateList> cert_list_; | 129 scoped_ptr<net::CertificateList> cert_list_; |
| 130 | 130 |
| 131 base::ThreadChecker thread_checker_; | 131 base::ThreadChecker thread_checker_; |
| 132 | 132 |
| 133 base::WeakPtrFactory<CertLoader> weak_factory_; | 133 base::WeakPtrFactory<CertLoader> weak_factory_; |
| 134 | 134 |
| 135 DISALLOW_COPY_AND_ASSIGN(CertLoader); | 135 DISALLOW_COPY_AND_ASSIGN(CertLoader); |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 } // namespace chromeos | 138 } // namespace chromeos |
| 139 | 139 |
| 140 #endif // CHROMEOS_CERT_LOADER_H_ | 140 #endif // CHROMEOS_CERT_LOADER_H_ |
| OLD | NEW |