OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 NET_CERT_NSS_CERT_DATABASE_H_ | 5 #ifndef NET_CERT_NSS_CERT_DATABASE_H_ |
6 #define NET_CERT_NSS_CERT_DATABASE_H_ | 6 #define NET_CERT_NSS_CERT_DATABASE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 // Check whether cert is stored in a readonly slot. | 204 // Check whether cert is stored in a readonly slot. |
205 bool IsReadOnly(const X509Certificate* cert) const; | 205 bool IsReadOnly(const X509Certificate* cert) const; |
206 | 206 |
207 // Check whether cert is stored in a hardware slot. | 207 // Check whether cert is stored in a hardware slot. |
208 bool IsHardwareBacked(const X509Certificate* cert) const; | 208 bool IsHardwareBacked(const X509Certificate* cert) const; |
209 | 209 |
210 // Registers |observer| to receive notifications of certificate changes. The | 210 // Registers |observer| to receive notifications of certificate changes. The |
211 // thread on which this is called is the thread on which |observer| will be | 211 // thread on which this is called is the thread on which |observer| will be |
212 // called back with notifications. | 212 // called back with notifications. |
213 // NOTE: CertDatabase::AddObserver should be preferred. Observers registered | 213 // NOTE: CertDatabase::AddObserver should be preferred. Observers registered |
214 // here will only recieve notifications generated directly through the | 214 // here will only receive notifications generated directly through the |
215 // NSSCertDatabase, but not those from the CertDatabase. The CertDatabase | 215 // NSSCertDatabase, but not those from the CertDatabase. The CertDatabase |
216 // observers will recieve both. | 216 // observers will receive both. |
217 void AddObserver(Observer* observer); | 217 void AddObserver(Observer* observer); |
218 | 218 |
219 // Unregisters |observer| from receiving notifications. This must be called | 219 // Unregisters |observer| from receiving notifications. This must be called |
220 // on the same thread on which AddObserver() was called. | 220 // on the same thread on which AddObserver() was called. |
221 void RemoveObserver(Observer* observer); | 221 void RemoveObserver(Observer* observer); |
222 | 222 |
223 // Overrides task runner that's used for running slow tasks. | 223 // Overrides task runner that's used for running slow tasks. |
224 void SetSlowTaskRunnerForTest( | 224 void SetSlowTaskRunnerForTest( |
225 const scoped_refptr<base::TaskRunner>& task_runner); | 225 const scoped_refptr<base::TaskRunner>& task_runner); |
226 | 226 |
(...skipping 22 matching lines...) Expand all Loading... |
249 scoped_refptr<base::TaskRunner> slow_task_runner_for_test_; | 249 scoped_refptr<base::TaskRunner> slow_task_runner_for_test_; |
250 | 250 |
251 const scoped_refptr<ObserverListThreadSafe<Observer> > observer_list_; | 251 const scoped_refptr<ObserverListThreadSafe<Observer> > observer_list_; |
252 | 252 |
253 DISALLOW_COPY_AND_ASSIGN(NSSCertDatabase); | 253 DISALLOW_COPY_AND_ASSIGN(NSSCertDatabase); |
254 }; | 254 }; |
255 | 255 |
256 } // namespace net | 256 } // namespace net |
257 | 257 |
258 #endif // NET_CERT_NSS_CERT_DATABASE_H_ | 258 #endif // NET_CERT_NSS_CERT_DATABASE_H_ |
OLD | NEW |