| OLD | NEW |
| 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" |
| 11 #include "net/base/net_export.h" | 11 #include "net/base/net_export.h" |
| 12 #include "net/cert/x509_certificate.h" | 12 #include "net/cert/x509_certificate.h" |
| 13 | 13 |
| 14 template <typename T> struct DefaultSingletonTraits; | 14 template <typename T> struct DefaultSingletonTraits; |
| 15 |
| 16 namespace base { |
| 15 template <class ObserverType> class ObserverListThreadSafe; | 17 template <class ObserverType> class ObserverListThreadSafe; |
| 18 } |
| 16 | 19 |
| 17 namespace net { | 20 namespace net { |
| 18 | 21 |
| 19 // This class provides cross-platform functions to verify and add user | 22 // This class provides cross-platform functions to verify and add user |
| 20 // certificates, and to observe changes to the underlying certificate stores. | 23 // certificates, and to observe changes to the underlying certificate stores. |
| 21 | 24 |
| 22 // TODO(gauravsh): This class could be augmented with methods | 25 // TODO(gauravsh): This class could be augmented with methods |
| 23 // for all operations that manipulate the underlying system | 26 // for all operations that manipulate the underlying system |
| 24 // certificate store. | 27 // certificate store. |
| 25 | 28 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 void NotifyObserversOfCertAdded(const X509Certificate* cert); | 102 void NotifyObserversOfCertAdded(const X509Certificate* cert); |
| 100 void NotifyObserversOfCertRemoved(const X509Certificate* cert); | 103 void NotifyObserversOfCertRemoved(const X509Certificate* cert); |
| 101 void NotifyObserversOfCACertChanged(const X509Certificate* cert); | 104 void NotifyObserversOfCACertChanged(const X509Certificate* cert); |
| 102 | 105 |
| 103 private: | 106 private: |
| 104 friend struct DefaultSingletonTraits<CertDatabase>; | 107 friend struct DefaultSingletonTraits<CertDatabase>; |
| 105 | 108 |
| 106 CertDatabase(); | 109 CertDatabase(); |
| 107 ~CertDatabase(); | 110 ~CertDatabase(); |
| 108 | 111 |
| 109 const scoped_refptr<ObserverListThreadSafe<Observer> > observer_list_; | 112 const scoped_refptr<base::ObserverListThreadSafe<Observer>> observer_list_; |
| 110 | 113 |
| 111 #if defined(OS_MACOSX) && !defined(OS_IOS) | 114 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 112 class Notifier; | 115 class Notifier; |
| 113 friend class Notifier; | 116 friend class Notifier; |
| 114 scoped_ptr<Notifier> notifier_; | 117 scoped_ptr<Notifier> notifier_; |
| 115 #endif | 118 #endif |
| 116 | 119 |
| 117 DISALLOW_COPY_AND_ASSIGN(CertDatabase); | 120 DISALLOW_COPY_AND_ASSIGN(CertDatabase); |
| 118 }; | 121 }; |
| 119 | 122 |
| 120 } // namespace net | 123 } // namespace net |
| 121 | 124 |
| 122 #endif // NET_CERT_CERT_DATABASE_H_ | 125 #endif // NET_CERT_CERT_DATABASE_H_ |
| OLD | NEW |