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

Side by Side Diff: net/cert/nss_cert_database_chromeos.h

Issue 144423007: Make NSSCertDatabase::ListCerts work async on a worker thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: aa Created 6 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_CHROMEOS_ 5 #ifndef NET_CERT_NSS_CERT_DATABASE_CHROMEOS_
6 #define NET_CERT_NSS_CERT_DATABASE_CHROMEOS_ 6 #define NET_CERT_NSS_CERT_DATABASE_CHROMEOS_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h"
9 #include "crypto/scoped_nss_types.h" 10 #include "crypto/scoped_nss_types.h"
11 #include "net/base/net_export.h"
10 #include "net/cert/nss_cert_database.h" 12 #include "net/cert/nss_cert_database.h"
11 #include "net/cert/nss_profile_filter_chromeos.h" 13 #include "net/cert/nss_profile_filter_chromeos.h"
12 14
13 namespace net { 15 namespace net {
14 16
15 class NET_EXPORT NSSCertDatabaseChromeOS : public NSSCertDatabase { 17 class NET_EXPORT NSSCertDatabaseChromeOS : public NSSCertDatabase {
16 public: 18 public:
17 NSSCertDatabaseChromeOS(crypto::ScopedPK11Slot public_slot, 19 NSSCertDatabaseChromeOS(crypto::ScopedPK11Slot public_slot,
18 crypto::ScopedPK11Slot private_slot); 20 crypto::ScopedPK11Slot private_slot);
19 virtual ~NSSCertDatabaseChromeOS(); 21 virtual ~NSSCertDatabaseChromeOS();
20 22
21 // NSSCertDatabase implementation. 23 // NSSCertDatabase implementation.
22 virtual void ListCerts(CertificateList* certs) OVERRIDE; 24 virtual void ListCertsSync(CertificateList* certs) OVERRIDE;
25 virtual scoped_refptr<NSSDatabaseFilter> GetDatabaseFilter() const OVERRIDE;
23 virtual crypto::ScopedPK11Slot GetPublicSlot() const OVERRIDE; 26 virtual crypto::ScopedPK11Slot GetPublicSlot() const OVERRIDE;
24 virtual crypto::ScopedPK11Slot GetPrivateSlot() const OVERRIDE; 27 virtual crypto::ScopedPK11Slot GetPrivateSlot() const OVERRIDE;
25 virtual void ListModules(CryptoModuleList* modules, bool need_rw) const 28 virtual void ListModulesSync(CryptoModuleList* modules, bool need_rw) const
26 OVERRIDE; 29 OVERRIDE;
27 30
28 // TODO(mattm): handle trust setting, deletion, etc correctly when certs exist 31 // TODO(mattm): handle trust setting, deletion, etc correctly when certs exist
29 // in multiple slots. 32 // in multiple slots.
30 // TODO(mattm): handle trust setting correctly for certs in read-only slots. 33 // TODO(mattm): handle trust setting correctly for certs in read-only slots.
31 34
32 private: 35 private:
33 crypto::ScopedPK11Slot public_slot_; 36 crypto::ScopedPK11Slot public_slot_;
34 crypto::ScopedPK11Slot private_slot_; 37 crypto::ScopedPK11Slot private_slot_;
35 NSSProfileFilterChromeOS profile_filter_; 38 scoped_refptr<NSSProfileFilterChromeOS> profile_filter_;
36 39
37 DISALLOW_COPY_AND_ASSIGN(NSSCertDatabaseChromeOS); 40 DISALLOW_COPY_AND_ASSIGN(NSSCertDatabaseChromeOS);
38 }; 41 };
39 42
40 } // namespace net 43 } // namespace net
41 44
42 #endif // NET_CERT_NSS_CERT_DATABASE_CHROMEOS_ 45 #endif // NET_CERT_NSS_CERT_DATABASE_CHROMEOS_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698