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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_CERT_CERT_DATABASE_H_ 5 #ifndef NET_CERT_CERT_DATABASE_H_
6 #define NET_CERT_CERT_DATABASE_H_ 6 #define NET_CERT_CERT_DATABASE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // on the same thread on which AddObserver() was called. 71 // on the same thread on which AddObserver() was called.
72 void RemoveObserver(Observer* observer); 72 void RemoveObserver(Observer* observer);
73 73
74 #if defined(OS_MACOSX) && !defined(OS_IOS) 74 #if defined(OS_MACOSX) && !defined(OS_IOS)
75 // Configures the current message loop to observe and forward events from 75 // Configures the current message loop to observe and forward events from
76 // Keychain services. The MessageLoop must have an associated CFRunLoop, 76 // Keychain services. The MessageLoop must have an associated CFRunLoop,
77 // which means that this must be called from a MessageLoop of TYPE_UI. 77 // which means that this must be called from a MessageLoop of TYPE_UI.
78 void SetMessageLoopForKeychainEvents(); 78 void SetMessageLoopForKeychainEvents();
79 #endif 79 #endif
80 80
81 #if defined(OS_ANDROID)
82 // On android, the system database is used. When the system notifies the
83 // application that the certificates changed, the observers must be notified.
84 void OnAndroidKeyChainChanged();
85 #endif
86
81 private: 87 private:
82 friend struct DefaultSingletonTraits<CertDatabase>; 88 friend struct DefaultSingletonTraits<CertDatabase>;
83 89
84 CertDatabase(); 90 CertDatabase();
85 ~CertDatabase(); 91 ~CertDatabase();
86 92
87 // Broadcasts notifications to all registered observers. 93 // Broadcasts notifications to all registered observers.
88 void NotifyObserversOfCertAdded(const X509Certificate* cert); 94 void NotifyObserversOfCertAdded(const X509Certificate* cert);
89 void NotifyObserversOfCertRemoved(const X509Certificate* cert); 95 void NotifyObserversOfCertRemoved(const X509Certificate* cert);
90 void NotifyObserversOfCertTrustChanged(const X509Certificate* cert); 96 void NotifyObserversOfCertTrustChanged(const X509Certificate* cert);
91 97
92 const scoped_refptr<ObserverListThreadSafe<Observer> > observer_list_; 98 const scoped_refptr<ObserverListThreadSafe<Observer> > observer_list_;
93 99
94 #if defined(USE_NSS) || (defined(OS_MACOSX) && !defined(OS_IOS)) 100 #if defined(USE_NSS) || (defined(OS_MACOSX) && !defined(OS_IOS))
95 class Notifier; 101 class Notifier;
96 friend class Notifier; 102 friend class Notifier;
97 scoped_ptr<Notifier> notifier_; 103 scoped_ptr<Notifier> notifier_;
98 #endif 104 #endif
99 105
100 DISALLOW_COPY_AND_ASSIGN(CertDatabase); 106 DISALLOW_COPY_AND_ASSIGN(CertDatabase);
101 }; 107 };
102 108
103 } // namespace net 109 } // namespace net
104 110
105 #endif // NET_CERT_CERT_DATABASE_H_ 111 #endif // NET_CERT_CERT_DATABASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698