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

Unified Diff: net/cert/cert_database.h

Issue 370633003: Break cyclic dependency between CertDatabase and NSSCertDatabase. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporating suggestions Created 6 years, 5 months 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
« no previous file with comments | « no previous file | net/cert/cert_database_nss.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/cert_database.h
diff --git a/net/cert/cert_database.h b/net/cert/cert_database.h
index 865d685097d691e763c156c8cc714b995016f22f..250738e573b45de83e3a3b70bc0b3cb34d3f91a5 100644
--- a/net/cert/cert_database.h
+++ b/net/cert/cert_database.h
@@ -16,8 +16,6 @@ template <class ObserverType> class ObserverListThreadSafe;
namespace net {
-class NSSCertDatabase;
-
// This class provides cross-platform functions to verify and add user
// certificates, and to observe changes to the underlying certificate stores.
@@ -28,15 +26,16 @@ class NSSCertDatabase;
class NET_EXPORT CertDatabase {
public:
// A CertDatabase::Observer will be notified on certificate database changes.
- // The change could be either a new user certificate is added or trust on
- // a certificate is changed. Observers can register themselves
- // via CertDatabase::AddObserver, and can un-register with
+ // The change could be either a user certificate is added/removed or trust on
+ // a certificate is changed. Observers can be registered via
+ // CertDatabase::AddObserver, and can un-register with
// CertDatabase::RemoveObserver.
class NET_EXPORT Observer {
public:
virtual ~Observer() {}
// Will be called when a new certificate is added.
+ // Called with |cert| == NULL after an import of multiple certificates.
Ryan Sleevi 2014/07/10 21:17:14 I feel like this is committing too much of the int
pneubeck (no reviews) 2014/07/11 08:39:07 Done.
virtual void OnCertAdded(const X509Certificate* cert) {}
// Will be called when a certificate is removed.
@@ -44,6 +43,7 @@ class NET_EXPORT CertDatabase {
// Will be called when a CA certificate was added, removed, or its trust
// changed. This can also mean that a client certificate's trust changed.
+ // Called with |cert| == NULL after an import of multiple certificates.
Ryan Sleevi 2014/07/10 21:17:13 This comment feels like an implementation detail t
pneubeck (no reviews) 2014/07/11 08:39:07 Done.
virtual void OnCACertChanged(const X509Certificate* cert) {}
protected:
@@ -93,11 +93,10 @@ class NET_EXPORT CertDatabase {
void OnAndroidKeyChainChanged();
#endif
-#if defined(USE_NSS)
- // Observe events from the |source| and forward them to observers of this
- // CertDatabase.
- void ObserveNSSCertDatabase(NSSCertDatabase* source);
-#endif
+ // Broadcasts notifications to all registered observers.
Ryan Sleevi 2014/07/10 21:17:13 Perhaps reword, to indicate // Synthetically inje
+ void NotifyObserversOfCertAdded(const X509Certificate* cert);
+ void NotifyObserversOfCertRemoved(const X509Certificate* cert);
+ void NotifyObserversOfCACertChanged(const X509Certificate* cert);
private:
friend struct DefaultSingletonTraits<CertDatabase>;
@@ -105,14 +104,9 @@ class NET_EXPORT CertDatabase {
CertDatabase();
~CertDatabase();
- // Broadcasts notifications to all registered observers.
- void NotifyObserversOfCertAdded(const X509Certificate* cert);
- void NotifyObserversOfCertRemoved(const X509Certificate* cert);
- void NotifyObserversOfCACertChanged(const X509Certificate* cert);
-
const scoped_refptr<ObserverListThreadSafe<Observer> > observer_list_;
-#if defined(USE_NSS) || (defined(OS_MACOSX) && !defined(OS_IOS))
+#if defined(OS_MACOSX) && !defined(OS_IOS)
class Notifier;
friend class Notifier;
scoped_ptr<Notifier> notifier_;
« no previous file with comments | « no previous file | net/cert/cert_database_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698