OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef NET_CERT_NSS_PROFILE_FILTER_CHROMEOS | |
6 #define NET_CERT_NSS_PROFILE_FILTER_CHROMEOS | |
7 | |
8 #include "base/callback_forward.h" | |
9 #include "crypto/scoped_nss_types.h" | |
10 #include "net/base/crypto_module.h" | |
11 #include "net/cert/x509_certificate.h" | |
12 | |
13 namespace content { | |
14 class ResourceContext; | |
15 } // namespace content | |
16 | |
17 namespace net { | |
18 | |
19 class NET_EXPORT NSSProfileFilterChromeOS { | |
20 public: | |
21 NSSProfileFilterChromeOS(); | |
22 ~NSSProfileFilterChromeOS(); | |
23 | |
24 // Initialize with slot handles. | |
25 void Init(crypto::ScopedPK11Slot public_slot, | |
26 crypto::ScopedPK11Slot private_slot); | |
27 | |
28 bool IsModuleAllowed(PK11SlotInfo* slot) const; | |
29 bool IsCertAllowed(const scoped_refptr<X509Certificate>& cert) const; | |
30 | |
31 class CertNotAllowedForProfilePredicate { | |
32 public: | |
33 CertNotAllowedForProfilePredicate(const NSSProfileFilterChromeOS& filter); | |
Ryan Sleevi
2013/12/12 00:53:27
explicit
mattm
2013/12/12 02:58:49
Done.
| |
34 bool operator()(const scoped_refptr<X509Certificate>& cert) const; | |
35 | |
36 private: | |
37 const NSSProfileFilterChromeOS& filter_; | |
38 }; | |
39 | |
40 class ModuleNotAllowedForProfilePredicate { | |
41 public: | |
42 ModuleNotAllowedForProfilePredicate(const NSSProfileFilterChromeOS& filter); | |
Ryan Sleevi
2013/12/12 00:53:27
explicit
mattm
2013/12/12 02:58:49
Done.
| |
43 bool operator()(const scoped_refptr<CryptoModule>& module) const; | |
44 | |
45 private: | |
46 const NSSProfileFilterChromeOS& filter_; | |
47 }; | |
48 | |
49 private: | |
50 crypto::ScopedPK11Slot public_slot_; | |
51 crypto::ScopedPK11Slot private_slot_; | |
52 | |
53 DISALLOW_COPY_AND_ASSIGN(NSSProfileFilterChromeOS); | |
54 }; | |
55 | |
56 } // namespace net | |
57 | |
58 #endif // NET_CERT_NSS_PROFILE_FILTER_CHROMEOS | |
OLD | NEW |