| 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..b0a2e392a74553018b6594f42326f9cd3f448fc4 100644
|
| --- a/net/cert/nss_cert_database.h
|
| +++ b/net/cert/nss_cert_database.h
|
| @@ -16,6 +16,7 @@
|
| #include "crypto/scoped_nss_types.h"
|
| #include "net/base/net_errors.h"
|
| #include "net/base/net_export.h"
|
| +#include "net/cert/cert_database.h"
|
| #include "net/cert/cert_type.h"
|
| #include "net/cert/x509_certificate.h"
|
|
|
| @@ -33,31 +34,6 @@ typedef std::vector<scoped_refptr<CryptoModule> > CryptoModuleList;
|
| // Provides functions to manipulate the NSS certificate stores.
|
| class NET_EXPORT NSSCertDatabase {
|
| public:
|
| -
|
| - class NET_EXPORT Observer {
|
| - public:
|
| - virtual ~Observer() {}
|
| -
|
| - // Will be called when a new certificate is added.
|
| - // Called with |cert| == NULL after importing a list of certificates
|
| - // in ImportFromPKCS12().
|
| - virtual void OnCertAdded(const X509Certificate* cert) {}
|
| -
|
| - // Will be called when a certificate is removed.
|
| - virtual void OnCertRemoved(const X509Certificate* cert) {}
|
| -
|
| - // Will be called when a CA certificate is changed.
|
| - // Called with |cert| == NULL after importing a list of certificates
|
| - // in ImportCACerts().
|
| - virtual void OnCACertChanged(const X509Certificate* cert) {}
|
| -
|
| - protected:
|
| - Observer() {}
|
| -
|
| - private:
|
| - DISALLOW_COPY_AND_ASSIGN(Observer);
|
| - };
|
| -
|
| // Stores per-certificate error codes for import failures.
|
| struct NET_EXPORT ImportCertFailure {
|
| public:
|
| @@ -225,19 +201,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 +224,18 @@ class NET_EXPORT NSSCertDatabase {
|
| private:
|
| friend struct base::DefaultLazyInstanceTraits<NSSCertDatabase>;
|
|
|
| + typedef CertDatabase::Observer Observer;
|
| +
|
| + // 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.
|
| + // This is forward notifications a CertDatabase.
|
| + 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,
|
|
|