| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2016 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_TOOLS_DOMAIN_SECURITY_PRELOAD_GENERATOR_DOMAIN_SECURITY_ENTRY_H_ |
| 6 #define NET_TOOLS_DOMAIN_SECURITY_PRELOAD_GENERATOR_DOMAIN_SECURITY_ENTRY_H_ |
| 7 |
| 8 #include <memory> |
| 9 #include <string> |
| 10 #include <vector> |
| 11 |
| 12 #include "base/macros.h" |
| 13 #include "base/strings/string_piece.h" |
| 14 |
| 15 namespace net { |
| 16 |
| 17 class DomainSecurityEntry { |
| 18 public: |
| 19 DomainSecurityEntry(const std::string& hostname, |
| 20 bool include_subdomains, |
| 21 bool force_https, |
| 22 bool hpkp_include_subdomains, |
| 23 const std::string& pinset, |
| 24 bool expect_ct, |
| 25 const std::string& expect_ct_report_uri, |
| 26 bool expect_staple, |
| 27 bool expect_staple_include_subdomains, |
| 28 const std::string& expect_staple_report_uri); |
| 29 ~DomainSecurityEntry(); |
| 30 |
| 31 const std::string& hostname() const { return hostname_; } |
| 32 |
| 33 bool include_subdomains() const { return include_subdomains_; } |
| 34 bool force_https() const { return force_https_; } |
| 35 |
| 36 bool hpkp_include_subdomains() const { return hpkp_include_subdomains_; } |
| 37 const std::string& pinset() const { return pinset_; } |
| 38 |
| 39 bool expect_ct() const { return expect_ct_; } |
| 40 const std::string& expect_ct_report_uri() const { |
| 41 return expect_ct_report_uri_; |
| 42 } |
| 43 |
| 44 bool expect_staple() const { return expect_staple_; } |
| 45 bool expect_staple_include_subdomains() const { |
| 46 return expect_staple_include_subdomains_; |
| 47 } |
| 48 const std::string& expect_staple_report_uri() const { |
| 49 return expect_staple_report_uri_; |
| 50 } |
| 51 |
| 52 private: |
| 53 std::string hostname_; |
| 54 |
| 55 bool include_subdomains_; |
| 56 bool force_https_; |
| 57 |
| 58 bool hpkp_include_subdomains_; |
| 59 std::string pinset_; |
| 60 |
| 61 bool expect_ct_; |
| 62 std::string expect_ct_report_uri_; |
| 63 |
| 64 bool expect_staple_; |
| 65 bool expect_staple_include_subdomains_; |
| 66 std::string expect_staple_report_uri_; |
| 67 |
| 68 DISALLOW_COPY_AND_ASSIGN(DomainSecurityEntry); |
| 69 }; |
| 70 |
| 71 using DomainSecurityEntries = std::vector<std::unique_ptr<DomainSecurityEntry>>; |
| 72 using DomainIDList = std::vector<std::string>; |
| 73 |
| 74 } // namespace net |
| 75 |
| 76 #endif // NET_TOOLS_DOMAIN_SECURITY_PRELOAD_GENERATOR_DOMAIN_SECURITY_ENTRY_H_ |
| OLD | NEW |