OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_HTTP_TRANSPORT_SECURITY_STATE_H_ | 5 #ifndef NET_HTTP_TRANSPORT_SECURITY_STATE_H_ |
6 #define NET_HTTP_TRANSPORT_SECURITY_STATE_H_ | 6 #define NET_HTTP_TRANSPORT_SECURITY_STATE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
61 // These numbers must match those in hsts_view.js, function modeToString. | 61 // These numbers must match those in hsts_view.js, function modeToString. |
62 MODE_FORCE_HTTPS = 0, | 62 MODE_FORCE_HTTPS = 0, |
63 MODE_DEFAULT = 1, | 63 MODE_DEFAULT = 1, |
64 }; | 64 }; |
65 | 65 |
66 DomainState(); | 66 DomainState(); |
67 ~DomainState(); | 67 ~DomainState(); |
68 | 68 |
69 struct STSState { | 69 struct STSState { |
70 STSState(); | 70 STSState(); |
71 STSState(const STSState& rhs); | |
davidben
2015/05/12 19:10:30
Probably worth a comment for why this silliness is
| |
71 ~STSState(); | 72 ~STSState(); |
72 | 73 |
73 // The absolute time (UTC) when the |upgrade_mode| (and other state) was | 74 // The absolute time (UTC) when the |upgrade_mode| (and other state) was |
74 // observed. | 75 // observed. |
75 base::Time last_observed; | 76 base::Time last_observed; |
76 | 77 |
77 // The absolute time (UTC) when the |upgrade_mode|, if set to | 78 // The absolute time (UTC) when the |upgrade_mode|, if set to |
78 // MODE_FORCE_HTTPS, downgrades to MODE_DEFAULT. | 79 // MODE_FORCE_HTTPS, downgrades to MODE_DEFAULT. |
79 base::Time expiry; | 80 base::Time expiry; |
80 | 81 |
81 UpgradeMode upgrade_mode; | 82 UpgradeMode upgrade_mode; |
82 | 83 |
83 // Are subdomains subject to this policy state? | 84 // Are subdomains subject to this policy state? |
84 bool include_subdomains; | 85 bool include_subdomains; |
85 | 86 |
86 // The domain which matched during a search for this DomainState entry. | 87 // The domain which matched during a search for this DomainState entry. |
87 // Updated by |GetDynamicDomainState| and |GetStaticDomainState|. | 88 // Updated by |GetDynamicDomainState| and |GetStaticDomainState|. |
88 std::string domain; | 89 std::string domain; |
89 }; | 90 }; |
90 | 91 |
91 struct PKPState { | 92 struct PKPState { |
92 PKPState(); | 93 PKPState(); |
94 PKPState(const PKPState& rhs); | |
93 ~PKPState(); | 95 ~PKPState(); |
94 | 96 |
95 // The absolute time (UTC) when the |spki_hashes| (and other state) were | 97 // The absolute time (UTC) when the |spki_hashes| (and other state) were |
96 // observed. | 98 // observed. |
97 base::Time last_observed; | 99 base::Time last_observed; |
98 | 100 |
99 // The absolute time (UTC) when the |spki_hashes| expire. | 101 // The absolute time (UTC) when the |spki_hashes| expire. |
100 base::Time expiry; | 102 base::Time expiry; |
101 | 103 |
102 // Optional; hashes of pinned SubjectPublicKeyInfos. | 104 // Optional; hashes of pinned SubjectPublicKeyInfos. |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
333 | 335 |
334 // True if static pins should be used. | 336 // True if static pins should be used. |
335 bool enable_static_pins_; | 337 bool enable_static_pins_; |
336 | 338 |
337 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); | 339 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); |
338 }; | 340 }; |
339 | 341 |
340 } // namespace net | 342 } // namespace net |
341 | 343 |
342 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ | 344 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ |
OLD | NEW |