| 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_BASE_TRANSPORT_SECURITY_STATE_H_ | 5 #ifndef NET_BASE_TRANSPORT_SECURITY_STATE_H_ |
| 6 #define NET_BASE_TRANSPORT_SECURITY_STATE_H_ | 6 #define NET_BASE_TRANSPORT_SECURITY_STATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 // CA.) | 75 // CA.) |
| 76 // | 76 // |
| 77 // |bad_preloaded_spki_hashes| contains public keys that we don't want to | 77 // |bad_preloaded_spki_hashes| contains public keys that we don't want to |
| 78 // trust. | 78 // trust. |
| 79 bool IsChainOfPublicKeysPermitted(const FingerprintVector& hashes); | 79 bool IsChainOfPublicKeysPermitted(const FingerprintVector& hashes); |
| 80 | 80 |
| 81 // Returns true if |this| describes a more strict policy than |other|. | 81 // Returns true if |this| describes a more strict policy than |other|. |
| 82 // Used to see if a dynamic DomainState should override a preloaded one. | 82 // Used to see if a dynamic DomainState should override a preloaded one. |
| 83 bool IsMoreStrict(const DomainState& other); | 83 bool IsMoreStrict(const DomainState& other); |
| 84 | 84 |
| 85 // ShouldCertificateErrorsBeFatal returns true iff, given the |mode| of this | |
| 86 // DomainState, certificate errors on this domain should be fatal (i.e. no | |
| 87 // user bypass). | |
| 88 bool ShouldCertificateErrorsBeFatal() const; | |
| 89 | |
| 90 // ShouldRedirectHTTPToHTTPS returns true iff, given the |mode| of this | 85 // ShouldRedirectHTTPToHTTPS returns true iff, given the |mode| of this |
| 91 // DomainState, HTTP requests should be internally redirected to HTTPS. | 86 // DomainState, HTTP requests should be internally redirected to HTTPS. |
| 92 bool ShouldRedirectHTTPToHTTPS() const; | 87 bool ShouldRedirectHTTPToHTTPS() const; |
| 93 | 88 |
| 94 Mode mode; | 89 Mode mode; |
| 95 base::Time created; // when this host entry was first created | 90 base::Time created; // when this host entry was first created |
| 96 base::Time expiry; // the absolute time (UTC) when this record expires | 91 base::Time expiry; // the absolute time (UTC) when this record expires |
| 97 bool include_subdomains; // subdomains included? | 92 bool include_subdomains; // subdomains included? |
| 98 | 93 |
| 99 // Optional; hashes of preloaded "pinned" SubjectPublicKeyInfos. Unless | 94 // Optional; hashes of preloaded "pinned" SubjectPublicKeyInfos. Unless |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 | 272 |
| 278 // Our delegate who gets notified when we are dirtied, or NULL. | 273 // Our delegate who gets notified when we are dirtied, or NULL. |
| 279 Delegate* delegate_; | 274 Delegate* delegate_; |
| 280 | 275 |
| 281 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); | 276 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); |
| 282 }; | 277 }; |
| 283 | 278 |
| 284 } // namespace net | 279 } // namespace net |
| 285 | 280 |
| 286 #endif // NET_BASE_TRANSPORT_SECURITY_STATE_H_ | 281 #endif // NET_BASE_TRANSPORT_SECURITY_STATE_H_ |
| OLD | NEW |