| 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" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 void RemoveObserver(Observer* observer); | 75 void RemoveObserver(Observer* observer); |
| 76 | 76 |
| 77 #if defined(OS_MACOSX) && !defined(OS_IOS) | 77 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 78 // Configures the current message loop to observe and forward events from | 78 // Configures the current message loop to observe and forward events from |
| 79 // Keychain services. The MessageLoop must have an associated CFRunLoop, | 79 // Keychain services. The MessageLoop must have an associated CFRunLoop, |
| 80 // which means that this must be called from a MessageLoop of TYPE_UI. | 80 // which means that this must be called from a MessageLoop of TYPE_UI. |
| 81 void SetMessageLoopForKeychainEvents(); | 81 void SetMessageLoopForKeychainEvents(); |
| 82 #endif | 82 #endif |
| 83 | 83 |
| 84 #if defined(OS_ANDROID) | 84 #if defined(OS_ANDROID) |
| 85 // On android, the system database is used. When the system notifies the | 85 // On Android, the system key store may be replaced with a device-specific |
| 86 // KeyStore used for storing client certificates. When the Java side replaces |
| 87 // the KeyStore used for client certificates, notifies the observers as if a |
| 88 // new client certificate was added. |
| 89 void OnAndroidKeyStoreChanged(); |
| 90 |
| 91 // On Android, the system database is used. When the system notifies the |
| 86 // application that the certificates changed, the observers must be notified. | 92 // application that the certificates changed, the observers must be notified. |
| 87 void OnAndroidKeyChainChanged(); | 93 void OnAndroidKeyChainChanged(); |
| 88 #endif | 94 #endif |
| 89 | 95 |
| 90 #if defined(USE_NSS) | 96 #if defined(USE_NSS) |
| 91 // Observe events from the |source| and forward them to observers of this | 97 // Observe events from the |source| and forward them to observers of this |
| 92 // CertDatabase. | 98 // CertDatabase. |
| 93 void ObserveNSSCertDatabase(NSSCertDatabase* source); | 99 void ObserveNSSCertDatabase(NSSCertDatabase* source); |
| 94 #endif | 100 #endif |
| 95 | 101 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 111 friend class Notifier; | 117 friend class Notifier; |
| 112 scoped_ptr<Notifier> notifier_; | 118 scoped_ptr<Notifier> notifier_; |
| 113 #endif | 119 #endif |
| 114 | 120 |
| 115 DISALLOW_COPY_AND_ASSIGN(CertDatabase); | 121 DISALLOW_COPY_AND_ASSIGN(CertDatabase); |
| 116 }; | 122 }; |
| 117 | 123 |
| 118 } // namespace net | 124 } // namespace net |
| 119 | 125 |
| 120 #endif // NET_CERT_CERT_DATABASE_H_ | 126 #endif // NET_CERT_CERT_DATABASE_H_ |
| OLD | NEW |