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

Unified Diff: net/cert/cert_database.h

Issue 27500004: Listen for new system certificates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Follow review. Created 7 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
Index: net/cert/cert_database.h
diff --git a/net/cert/cert_database.h b/net/cert/cert_database.h
index c4ead812f2f6e500b5adb230eb92ef323beec012..39ed42943e611c18eb970c80d8c3aeb78876afac 100644
--- a/net/cert/cert_database.h
+++ b/net/cert/cert_database.h
@@ -43,6 +43,12 @@ class NET_EXPORT CertDatabase {
// Will be called when a certificate's trust is changed.
virtual void OnCertTrustChanged(const X509Certificate* cert) {}
+ // Will be called when the database changed in a unspecified manner. This is
+ // needed because some platforms (for example Android) delegate the
+ // certificate database to the system and do not get precise notifications
+ // of changes.
+ virtual void OnDatabaseChanged() {}
Ryan Sleevi 2013/10/16 17:40:52 I would like to avoid adding a new method, especia
qsr 2013/10/17 09:17:54 Not sure to understand the comment, as the observe
+
protected:
Observer() {}
@@ -78,6 +84,12 @@ class NET_EXPORT CertDatabase {
void SetMessageLoopForKeychainEvents();
#endif
+#if defined(OS_ANDROID)
+ // On android, the system database is used. When the system notifies the
+ // application that the certificates changed, the observers must be notified.
+ void NotifyObserversOfDatabaseChanged();
+#endif
+
private:
friend struct DefaultSingletonTraits<CertDatabase>;

Powered by Google App Engine
This is Rietveld 408576698