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

Unified Diff: net/cert/nss_cert_database.h

Issue 2363653002: Cleanup unreachable cert adding code (Closed)
Patch Set: Rebased Created 4 years, 2 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 | « net/cert/cert_database_win.cc ('k') | net/cert/nss_cert_database.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/nss_cert_database.h
diff --git a/net/cert/nss_cert_database.h b/net/cert/nss_cert_database.h
index 00e72f3f19b196703c65a49694b1891ab54bb611..2ee859dbb71603bd2d36b94d41ed6eaf88212c53 100644
--- a/net/cert/nss_cert_database.h
+++ b/net/cert/nss_cert_database.h
@@ -42,18 +42,10 @@ class NET_EXPORT NSSCertDatabase {
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) {}
+ virtual void OnCertDBChanged(const X509Certificate* cert) {}
protected:
Observer() {}
@@ -199,6 +191,7 @@ class NET_EXPORT NSSCertDatabase {
// already be installed, otherwise we return ERR_NO_PRIVATE_KEY_FOR_CERT.
// Returns OK or a network error code.
int ImportUserCert(const std::string& data);
+ int ImportUserCert(X509Certificate* cert);
// Import CA certificates.
// Tries to import all the certificates given. The root will be trusted
@@ -275,9 +268,7 @@ class NET_EXPORT NSSCertDatabase {
protected:
// Broadcasts notifications to all registered observers.
- void NotifyObserversOfCertAdded(const X509Certificate* cert);
- void NotifyObserversOfCertRemoved(const X509Certificate* cert);
- void NotifyObserversOfCACertChanged(const X509Certificate* cert);
+ void NotifyObserversCertDBChanged(const X509Certificate* cert);
private:
// Registers |observer| to receive notifications of certificate changes. The
« no previous file with comments | « net/cert/cert_database_win.cc ('k') | net/cert/nss_cert_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698