| Index: net/cert/nss_cert_database.h
|
| diff --git a/net/cert/nss_cert_database.h b/net/cert/nss_cert_database.h
|
| index 1c4daf817937c83d328441d491b196be8858af86..120e50da9bec7b214c731c8e53d101ce165f8210 100644
|
| --- a/net/cert/nss_cert_database.h
|
| +++ b/net/cert/nss_cert_database.h
|
| @@ -31,6 +31,8 @@ class CryptoModule;
|
| typedef std::vector<scoped_refptr<CryptoModule> > CryptoModuleList;
|
|
|
| // Provides functions to manipulate the NSS certificate stores.
|
| +// Forwards notifications about certificate changes to the global CertDatabase
|
| +// singleton.
|
| class NET_EXPORT NSSCertDatabase {
|
| public:
|
|
|
| @@ -225,19 +227,6 @@ class NET_EXPORT NSSCertDatabase {
|
| // Check whether cert is stored in a hardware slot.
|
| bool IsHardwareBacked(const X509Certificate* cert) const;
|
|
|
| - // Registers |observer| to receive notifications of certificate changes. The
|
| - // thread on which this is called is the thread on which |observer| will be
|
| - // called back with notifications.
|
| - // NOTE: CertDatabase::AddObserver should be preferred. Observers registered
|
| - // here will only receive notifications generated directly through the
|
| - // NSSCertDatabase, but not those from the CertDatabase. The CertDatabase
|
| - // observers will receive both.
|
| - void AddObserver(Observer* observer);
|
| -
|
| - // Unregisters |observer| from receiving notifications. This must be called
|
| - // on the same thread on which AddObserver() was called.
|
| - void RemoveObserver(Observer* observer);
|
| -
|
| // Overrides task runner that's used for running slow tasks.
|
| void SetSlowTaskRunnerForTest(
|
| const scoped_refptr<base::TaskRunner>& task_runner);
|
| @@ -261,6 +250,18 @@ class NET_EXPORT NSSCertDatabase {
|
| private:
|
| friend struct base::DefaultLazyInstanceTraits<NSSCertDatabase>;
|
|
|
| + // Registers |observer| to receive notifications of certificate changes. The
|
| + // thread on which this is called is the thread on which |observer| will be
|
| + // called back with notifications.
|
| + // NOTE: Observers registered here will only receive notifications generated
|
| + // directly through the NSSCertDatabase, but not those from the CertDatabase.
|
| + // CertDatabase observers will receive all certificate notifications.
|
| + void AddObserver(Observer* observer);
|
| +
|
| + // Unregisters |observer| from receiving notifications. This must be called
|
| + // on the same thread on which AddObserver() was called.
|
| + void RemoveObserver(Observer* observer);
|
| +
|
| // Notifies observers of the removal of |cert| and calls |callback| with
|
| // |success| as argument.
|
| void NotifyCertRemovalAndCallBack(scoped_refptr<X509Certificate> cert,
|
| @@ -276,6 +277,9 @@ class NET_EXPORT NSSCertDatabase {
|
| // it may safely be used on the worker thread.
|
| static bool DeleteCertAndKeyImpl(scoped_refptr<X509Certificate> cert);
|
|
|
| + // A helper observer that forwards events from this database to CertDatabase.
|
| + scoped_ptr<Observer> cert_notification_forwarder_;
|
| +
|
| // Task runner that should be used in tests if set.
|
| scoped_refptr<base::TaskRunner> slow_task_runner_for_test_;
|
|
|
|
|