Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1946)

Unified Diff: net/cert/nss_cert_database.h

Issue 111273002: NSSCertDatabaseChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gcc fix Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/cert/nss_cert_database.h
diff --git a/net/cert/nss_cert_database.h b/net/cert/nss_cert_database.h
index 28751a46d01c45ac7224b7e9524aae3767ce24b0..94de59705272e215ccea9155e768588de4543663 100644
--- a/net/cert/nss_cert_database.h
+++ b/net/cert/nss_cert_database.h
@@ -16,7 +16,9 @@
#include "net/cert/cert_type.h"
#include "net/cert/x509_certificate.h"
-template <typename T> struct DefaultSingletonTraits;
+namespace base {
+template <typename T> struct DefaultLazyInstanceTraits;
+}
template <class ObserverType> class ObserverListThreadSafe;
namespace net {
@@ -93,13 +95,13 @@ class NET_EXPORT NSSCertDatabase {
// Get a list of unique certificates in the certificate database (one
// instance of all certificates).
- void ListCerts(CertificateList* certs);
+ virtual void ListCerts(CertificateList* certs);
// Get the default slot for public key data.
- crypto::ScopedPK11Slot GetPublicSlot() const;
+ virtual crypto::ScopedPK11Slot GetPublicSlot() const;
// Get the default slot for private key or mixed private/public key data.
- crypto::ScopedPK11Slot GetPrivateSlot() const;
+ virtual crypto::ScopedPK11Slot GetPrivateSlot() const;
// Get the default module for public key data.
// The returned pointer must be stored in a scoped_refptr<CryptoModule>.
@@ -116,7 +118,7 @@ class NET_EXPORT NSSCertDatabase {
// Get all modules.
// If |need_rw| is true, only writable modules will be returned.
// TODO(mattm): come up with better alternative to CryptoModuleList.
- void ListModules(CryptoModuleList* modules, bool need_rw) const;
+ virtual void ListModules(CryptoModuleList* modules, bool need_rw) const;
// Import certificates and private keys from PKCS #12 blob into the module.
// If |is_extractable| is false, mark the private key as being unextractable
@@ -202,11 +204,12 @@ class NET_EXPORT NSSCertDatabase {
// on the same thread on which AddObserver() was called.
void RemoveObserver(Observer* observer);
- private:
- friend struct DefaultSingletonTraits<NSSCertDatabase>;
-
+ protected:
NSSCertDatabase();
- ~NSSCertDatabase();
+ virtual ~NSSCertDatabase();
+
+ private:
+ friend struct base::DefaultLazyInstanceTraits<NSSCertDatabase>;
// Broadcasts notifications to all registered observers.
void NotifyObserversOfCertAdded(const X509Certificate* cert);

Powered by Google App Engine
This is Rietveld 408576698