Chromium Code Reviews| Index: net/cert/nss_profile_filter_chromeos.h |
| diff --git a/net/cert/nss_profile_filter_chromeos.h b/net/cert/nss_profile_filter_chromeos.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..17c7bbd6180e6f3dcb3b71fce3c723e9d891933d |
| --- /dev/null |
| +++ b/net/cert/nss_profile_filter_chromeos.h |
| @@ -0,0 +1,58 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef NET_CERT_NSS_PROFILE_FILTER_CHROMEOS |
| +#define NET_CERT_NSS_PROFILE_FILTER_CHROMEOS |
| + |
| +#include "base/callback_forward.h" |
| +#include "crypto/scoped_nss_types.h" |
| +#include "net/base/crypto_module.h" |
| +#include "net/cert/x509_certificate.h" |
| + |
| +namespace content { |
| +class ResourceContext; |
| +} // namespace content |
| + |
| +namespace net { |
| + |
| +class NET_EXPORT NSSProfileFilterChromeOS { |
| + public: |
| + NSSProfileFilterChromeOS(); |
| + ~NSSProfileFilterChromeOS(); |
| + |
| + // Initialize with slot handles. |
| + void Init(crypto::ScopedPK11Slot public_slot, |
| + crypto::ScopedPK11Slot private_slot); |
| + |
| + bool IsModuleAllowed(PK11SlotInfo* slot) const; |
| + bool IsCertAllowed(const scoped_refptr<X509Certificate>& cert) const; |
| + |
| + class CertNotAllowedForProfilePredicate { |
| + public: |
| + CertNotAllowedForProfilePredicate(const NSSProfileFilterChromeOS& filter); |
|
Ryan Sleevi
2013/12/12 00:53:27
explicit
mattm
2013/12/12 02:58:49
Done.
|
| + bool operator()(const scoped_refptr<X509Certificate>& cert) const; |
| + |
| + private: |
| + const NSSProfileFilterChromeOS& filter_; |
| + }; |
| + |
| + class ModuleNotAllowedForProfilePredicate { |
| + public: |
| + ModuleNotAllowedForProfilePredicate(const NSSProfileFilterChromeOS& filter); |
|
Ryan Sleevi
2013/12/12 00:53:27
explicit
mattm
2013/12/12 02:58:49
Done.
|
| + bool operator()(const scoped_refptr<CryptoModule>& module) const; |
| + |
| + private: |
| + const NSSProfileFilterChromeOS& filter_; |
| + }; |
| + |
| + private: |
| + crypto::ScopedPK11Slot public_slot_; |
| + crypto::ScopedPK11Slot private_slot_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(NSSProfileFilterChromeOS); |
| +}; |
| + |
| +} // namespace net |
| + |
| +#endif // NET_CERT_NSS_PROFILE_FILTER_CHROMEOS |