Upstream version 11.40.271.0
[platform/framework/web/crosswalk.git] / src / net / cert / ct_ev_whitelist.h
1 // Copyright 2014 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_CT_EV_WHITELIST_H_
6 #define NET_CERT_CT_EV_WHITELIST_H_
7
8 #include <string>
9
10 #include "base/memory/ref_counted.h"
11 #include "net/base/net_export.h"
12
13 namespace net {
14
15 namespace ct {
16
17 class NET_EXPORT EVCertsWhitelist
18     : public base::RefCountedThreadSafe<EVCertsWhitelist> {
19  public:
20   // Returns true if the |certificate_hash| appears in the EV certificate hashes
21   // whitelist.
22   virtual bool ContainsCertificateHash(
23       const std::string& certificate_hash) const = 0;
24
25   // Returns true if the global EV certificate hashes whitelist is non-empty,
26   // false otherwise.
27   virtual bool IsValid() const = 0;
28
29  protected:
30   virtual ~EVCertsWhitelist() {}
31
32  private:
33   friend class base::RefCountedThreadSafe<EVCertsWhitelist>;
34 };
35
36 }  // namespace ct
37
38 }  // namespace net
39
40 #endif  // NET_CERT_CT_EV_WHITELIST_H_