| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 public: | 59 public: |
| 60 enum UpgradeMode { | 60 enum UpgradeMode { |
| 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 NET_EXPORT STSState { |
| 70 STSState(); | 70 STSState(); |
| 71 ~STSState(); | 71 ~STSState(); |
| 72 | 72 |
| 73 // The absolute time (UTC) when the |upgrade_mode| (and other state) was | 73 // The absolute time (UTC) when the |upgrade_mode| (and other state) was |
| 74 // observed. | 74 // observed. |
| 75 base::Time last_observed; | 75 base::Time last_observed; |
| 76 | 76 |
| 77 // The absolute time (UTC) when the |upgrade_mode|, if set to | 77 // The absolute time (UTC) when the |upgrade_mode|, if set to |
| 78 // MODE_FORCE_HTTPS, downgrades to MODE_DEFAULT. | 78 // MODE_FORCE_HTTPS, downgrades to MODE_DEFAULT. |
| 79 base::Time expiry; | 79 base::Time expiry; |
| 80 | 80 |
| 81 UpgradeMode upgrade_mode; | 81 UpgradeMode upgrade_mode; |
| 82 | 82 |
| 83 // Are subdomains subject to this policy state? | 83 // Are subdomains subject to this policy state? |
| 84 bool include_subdomains; | 84 bool include_subdomains; |
| 85 | 85 |
| 86 // The domain which matched during a search for this DomainState entry. | 86 // The domain which matched during a search for this DomainState entry. |
| 87 // Updated by |GetDynamicDomainState| and |GetStaticDomainState|. | 87 // Updated by |GetDynamicDomainState| and |GetStaticDomainState|. |
| 88 std::string domain; | 88 std::string domain; |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 struct PKPState { | 91 struct NET_EXPORT PKPState { |
| 92 PKPState(); | 92 PKPState(); |
| 93 ~PKPState(); | 93 ~PKPState(); |
| 94 | 94 |
| 95 // The absolute time (UTC) when the |spki_hashes| (and other state) were | 95 // The absolute time (UTC) when the |spki_hashes| (and other state) were |
| 96 // observed. | 96 // observed. |
| 97 base::Time last_observed; | 97 base::Time last_observed; |
| 98 | 98 |
| 99 // The absolute time (UTC) when the |spki_hashes| expire. | 99 // The absolute time (UTC) when the |spki_hashes| expire. |
| 100 base::Time expiry; | 100 base::Time expiry; |
| 101 | 101 |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 | 333 |
| 334 // True if static pins should be used. | 334 // True if static pins should be used. |
| 335 bool enable_static_pins_; | 335 bool enable_static_pins_; |
| 336 | 336 |
| 337 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); | 337 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); |
| 338 }; | 338 }; |
| 339 | 339 |
| 340 } // namespace net | 340 } // namespace net |
| 341 | 341 |
| 342 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ | 342 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ |
| OLD | NEW |