Index: net/cert/nss_cert_database.h |
diff --git a/net/cert/nss_cert_database.h b/net/cert/nss_cert_database.h |
index 120e50da9bec7b214c731c8e53d101ce165f8210..ba99b965e9d6255771054af8cb01e97c3468222e 100644 |
--- a/net/cert/nss_cert_database.h |
+++ b/net/cert/nss_cert_database.h |
@@ -20,7 +20,6 @@ |
#include "net/cert/x509_certificate.h" |
namespace base { |
-template <typename T> struct DefaultLazyInstanceTraits; |
class TaskRunner; |
} |
template <class ObserverType> class ObserverListThreadSafe; |
@@ -35,7 +34,6 @@ typedef std::vector<scoped_refptr<CryptoModule> > CryptoModuleList; |
// singleton. |
class NET_EXPORT NSSCertDatabase { |
public: |
- |
class NET_EXPORT Observer { |
public: |
virtual ~Observer() {} |
@@ -102,8 +100,11 @@ class NET_EXPORT NSSCertDatabase { |
typedef base::Callback<void(bool)> DeleteCertCallback; |
- // DEPRECATED: See http://crbug.com/329735. |
- static NSSCertDatabase* GetInstance(); |
+ // Only use this outside of unit test if you really know what you're doing. |
+ // Both slots must not be NULL but can be identical. |
Ryan Sleevi
2014/07/24 23:19:10
Well that's not very helpful of a comment. How do
pneubeck (no reviews)
2014/07/25 08:15:21
Done.
|
+ NSSCertDatabase(crypto::ScopedPK11Slot public_slot, |
+ crypto::ScopedPK11Slot private_slot); |
+ virtual ~NSSCertDatabase(); |
// Get a list of unique certificates in the certificate database (one |
// instance of all certificates). |
@@ -124,10 +125,10 @@ class NET_EXPORT NSSCertDatabase { |
PK11SlotInfo* slot); |
// Get the default slot for public key data. |
- virtual crypto::ScopedPK11Slot GetPublicSlot() const; |
+ crypto::ScopedPK11Slot GetPublicSlot() const; |
// Get the default slot for private key or mixed private/public key data. |
- virtual crypto::ScopedPK11Slot GetPrivateSlot() const; |
+ crypto::ScopedPK11Slot GetPrivateSlot() const; |
// Get the default module for public key data. |
// The returned pointer must be stored in a scoped_refptr<CryptoModule>. |
@@ -232,9 +233,6 @@ class NET_EXPORT NSSCertDatabase { |
const scoped_refptr<base::TaskRunner>& task_runner); |
protected: |
- NSSCertDatabase(); |
- virtual ~NSSCertDatabase(); |
- |
// Certificate listing implementation used by |ListCerts*| and |
// |ListCertsSync|. Static so it may safely be used on the worker thread. |
// If |slot| is NULL, obtains the certs of all slots, otherwise only of |
@@ -248,8 +246,6 @@ class NET_EXPORT NSSCertDatabase { |
scoped_refptr<base::TaskRunner> GetSlowTaskRunner() const; |
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. |
@@ -277,6 +273,9 @@ class NET_EXPORT NSSCertDatabase { |
// it may safely be used on the worker thread. |
static bool DeleteCertAndKeyImpl(scoped_refptr<X509Certificate> cert); |
+ crypto::ScopedPK11Slot public_slot_; |
+ crypto::ScopedPK11Slot private_slot_; |
+ |
// A helper observer that forwards events from this database to CertDatabase. |
scoped_ptr<Observer> cert_notification_forwarder_; |