| Index: net/cert/nss_database_filter.h
|
| diff --git a/net/cert/nss_database_filter.h b/net/cert/nss_database_filter.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1482686c1a5fa68022737920c6dc16d7d877e0ac
|
| --- /dev/null
|
| +++ b/net/cert/nss_database_filter.h
|
| @@ -0,0 +1,57 @@
|
| +// Copyright 2014 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_DATABASE_FILTER_H_
|
| +#define NET_CERT_NSS_DATABASE_FILTER_H_
|
| +
|
| +#include "base/memory/ref_counted.h"
|
| +#include "crypto/scoped_nss_types.h"
|
| +#include "net/base/crypto_module.h"
|
| +#include "net/base/net_export.h"
|
| +
|
| +namespace net {
|
| +
|
| +class X509Certificate;
|
| +
|
| +class NET_EXPORT NSSDatabaseFilter
|
| + : public base::RefCountedThreadSafe<NSSDatabaseFilter> {
|
| + public:
|
| + class CertNotAllowedPredicate {
|
| + public:
|
| + explicit CertNotAllowedPredicate(
|
| + const scoped_refptr<NSSDatabaseFilter>& filter);
|
| + bool operator()(const scoped_refptr<X509Certificate>& cert) const;
|
| +
|
| + private:
|
| + scoped_refptr<NSSDatabaseFilter> filter_;
|
| + };
|
| +
|
| + class ModuleNotAllowedPredicate {
|
| + public:
|
| + explicit ModuleNotAllowedPredicate(
|
| + const scoped_refptr<NSSDatabaseFilter>& filter);
|
| + bool operator()(const scoped_refptr<CryptoModule>& module) const;
|
| +
|
| + private:
|
| + scoped_refptr<NSSDatabaseFilter> filter_;
|
| + };
|
| +
|
| + NSSDatabaseFilter();
|
| +
|
| + virtual bool IsModuleAllowed(CryptoModule::OSModuleHandle slot) const = 0;
|
| + virtual bool IsCertAllowed(
|
| + const scoped_refptr<X509Certificate>& cert) const = 0;
|
| +
|
| + protected:
|
| + virtual ~NSSDatabaseFilter();
|
| +
|
| + private:
|
| + friend class base::RefCountedThreadSafe<NSSDatabaseFilter>;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(NSSDatabaseFilter);
|
| +};
|
| +
|
| +} // namespace net
|
| +
|
| +#endif // NET_CERT_NSS_DATABASE_FILTER_H_
|
|
|