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_NSS_CERT_DATABASE_H_ | 5 #ifndef NET_CERT_NSS_CERT_DATABASE_H_ |
6 #define NET_CERT_NSS_CERT_DATABASE_H_ | 6 #define NET_CERT_NSS_CERT_DATABASE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
123 virtual void ListCerts(const ListCertsCallback& callback); | 123 virtual void ListCerts(const ListCertsCallback& callback); |
124 | 124 |
125 // Get a list of certificates in the certificate database of the given slot. | 125 // Get a list of certificates in the certificate database of the given slot. |
126 // Note that the callback may be run even after the database is deleted. | 126 // Note that the callback may be run even after the database is deleted. |
127 // Must be called on the IO thread and it calls |callback| on the IO thread. | 127 // Must be called on the IO thread and it calls |callback| on the IO thread. |
128 // This does not block by retrieving the certs asynchronously on a worker | 128 // This does not block by retrieving the certs asynchronously on a worker |
129 // thread. Never calls |callback| synchronously. | 129 // thread. Never calls |callback| synchronously. |
130 virtual void ListCertsInSlot(const ListCertsCallback& callback, | 130 virtual void ListCertsInSlot(const ListCertsCallback& callback, |
131 PK11SlotInfo* slot); | 131 PK11SlotInfo* slot); |
132 | 132 |
133 #if defined(OS_CHROMEOS) | |
Ryan Sleevi
2014/07/29 23:53:15
This feels like a layering violation to me, to hav
pneubeck (no reviews)
2014/07/30 06:27:39
Yes! Totally agreed. This shouldn't be present on
Ryan Sleevi
2014/07/30 06:45:30
That would still be a pretty egregious layering vi
| |
134 // Get the slot for system-wide key data. May be NULL if the system token was | |
135 // not explicitly set. | |
136 virtual crypto::ScopedPK11Slot GetSystemSlot() const; | |
137 #endif | |
138 | |
133 // Get the default slot for public key data. | 139 // Get the default slot for public key data. |
134 crypto::ScopedPK11Slot GetPublicSlot() const; | 140 crypto::ScopedPK11Slot GetPublicSlot() const; |
135 | 141 |
136 // Get the default slot for private key or mixed private/public key data. | 142 // Get the default slot for private key or mixed private/public key data. |
137 crypto::ScopedPK11Slot GetPrivateSlot() const; | 143 crypto::ScopedPK11Slot GetPrivateSlot() const; |
138 | 144 |
139 // Get the default module for public key data. | 145 // Get the default module for public key data. |
140 // The returned pointer must be stored in a scoped_refptr<CryptoModule>. | 146 // The returned pointer must be stored in a scoped_refptr<CryptoModule>. |
141 // DEPRECATED: use GetPublicSlot instead. | 147 // DEPRECATED: use GetPublicSlot instead. |
142 // TODO(mattm): remove usage of this method and remove it. | 148 // TODO(mattm): remove usage of this method and remove it. |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
291 const scoped_refptr<ObserverListThreadSafe<Observer> > observer_list_; | 297 const scoped_refptr<ObserverListThreadSafe<Observer> > observer_list_; |
292 | 298 |
293 base::WeakPtrFactory<NSSCertDatabase> weak_factory_; | 299 base::WeakPtrFactory<NSSCertDatabase> weak_factory_; |
294 | 300 |
295 DISALLOW_COPY_AND_ASSIGN(NSSCertDatabase); | 301 DISALLOW_COPY_AND_ASSIGN(NSSCertDatabase); |
296 }; | 302 }; |
297 | 303 |
298 } // namespace net | 304 } // namespace net |
299 | 305 |
300 #endif // NET_CERT_NSS_CERT_DATABASE_H_ | 306 #endif // NET_CERT_NSS_CERT_DATABASE_H_ |
OLD | NEW |