| 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 namespace net { | 
|  | 13 | 
|  | 14 namespace transport_security_state { | 
|  | 15 | 
|  | 16 // DomainSecurityEntry represents a preloaded entry. | 
|  | 17 struct DomainSecurityEntry { | 
|  | 18   DomainSecurityEntry(); | 
|  | 19   ~DomainSecurityEntry(); | 
|  | 20 | 
|  | 21   std::string hostname; | 
|  | 22 | 
|  | 23   bool include_subdomains = false; | 
|  | 24   bool force_https = false; | 
|  | 25 | 
|  | 26   bool hpkp_include_subdomains = false; | 
|  | 27   std::string pinset; | 
|  | 28 | 
|  | 29   bool expect_ct = false; | 
|  | 30   std::string expect_ct_report_uri; | 
|  | 31 | 
|  | 32   bool expect_staple = false; | 
|  | 33   bool expect_staple_include_subdomains = false; | 
|  | 34   std::string expect_staple_report_uri; | 
|  | 35 }; | 
|  | 36 | 
|  | 37 using DomainSecurityEntries = std::vector<std::unique_ptr<DomainSecurityEntry>>; | 
|  | 38 | 
|  | 39 // TODO(Martijnc): Remove the domain IDs from the preload format. | 
|  | 40 // https://crbug.com/661206. | 
|  | 41 using DomainIDList = std::vector<std::string>; | 
|  | 42 | 
|  | 43 // ReversedEntry points to a DomainSecurityEntry and contains the reversed | 
|  | 44 // hostname for that entry. This is used to construct the trie. | 
|  | 45 struct ReversedEntry { | 
|  | 46   ReversedEntry(std::vector<uint8_t> reversed_name, | 
|  | 47                 const DomainSecurityEntry* entry); | 
|  | 48   ~ReversedEntry(); | 
|  | 49 | 
|  | 50   std::vector<uint8_t> reversed_name; | 
|  | 51   const DomainSecurityEntry* entry; | 
|  | 52 }; | 
|  | 53 | 
|  | 54 using ReversedEntries = std::vector<std::unique_ptr<ReversedEntry>>; | 
|  | 55 | 
|  | 56 }  // namespace transport_security_state | 
|  | 57 | 
|  | 58 }  // namespace net | 
|  | 59 | 
|  | 60 #endif  // NET_TOOLS_DOMAIN_SECURITY_PRELOAD_GENERATOR_DOMAIN_SECURITY_ENTRY_H_ | 
| OLD | NEW | 
|---|