| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 const HostPortPair& host_port_pair, | 470 const HostPortPair& host_port_pair, |
| 471 const SSLInfo& ssl_info); | 471 const SSLInfo& ssl_info); |
| 472 | 472 |
| 473 // For unit tests only; causes ShouldRequireCT() to return |*required| | 473 // For unit tests only; causes ShouldRequireCT() to return |*required| |
| 474 // by default (that is, unless a RequireCTDelegate overrides). Set to | 474 // by default (that is, unless a RequireCTDelegate overrides). Set to |
| 475 // nullptr to reset. | 475 // nullptr to reset. |
| 476 static void SetShouldRequireCTForTesting(bool* required); | 476 static void SetShouldRequireCTForTesting(bool* required); |
| 477 | 477 |
| 478 private: | 478 private: |
| 479 friend class TransportSecurityStateTest; | 479 friend class TransportSecurityStateTest; |
| 480 friend class TransportSecurityStateStaticFuzzer; |
| 480 FRIEND_TEST_ALL_PREFIXES(HttpSecurityHeadersTest, UpdateDynamicPKPOnly); | 481 FRIEND_TEST_ALL_PREFIXES(HttpSecurityHeadersTest, UpdateDynamicPKPOnly); |
| 481 FRIEND_TEST_ALL_PREFIXES(HttpSecurityHeadersTest, UpdateDynamicPKPMaxAge0); | 482 FRIEND_TEST_ALL_PREFIXES(HttpSecurityHeadersTest, UpdateDynamicPKPMaxAge0); |
| 482 FRIEND_TEST_ALL_PREFIXES(HttpSecurityHeadersTest, NoClobberPins); | 483 FRIEND_TEST_ALL_PREFIXES(HttpSecurityHeadersTest, NoClobberPins); |
| 483 FRIEND_TEST_ALL_PREFIXES(URLRequestTestHTTP, ExpectCTHeader); | 484 FRIEND_TEST_ALL_PREFIXES(URLRequestTestHTTP, ExpectCTHeader); |
| 484 | 485 |
| 485 typedef std::map<std::string, STSState> STSStateMap; | 486 typedef std::map<std::string, STSState> STSStateMap; |
| 486 typedef std::map<std::string, PKPState> PKPStateMap; | 487 typedef std::map<std::string, PKPState> PKPStateMap; |
| 487 | 488 |
| 488 // Send an UMA report on pin validation failure, if the host is in a | 489 // Send an UMA report on pin validation failure, if the host is in a |
| 489 // statically-defined list of domains. | 490 // statically-defined list of domains. |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 // rate-limiting. | 598 // rate-limiting. |
| 598 ExpiringCache<std::string, bool, base::TimeTicks, std::less<base::TimeTicks>> | 599 ExpiringCache<std::string, bool, base::TimeTicks, std::less<base::TimeTicks>> |
| 599 sent_reports_cache_; | 600 sent_reports_cache_; |
| 600 | 601 |
| 601 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); | 602 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); |
| 602 }; | 603 }; |
| 603 | 604 |
| 604 } // namespace net | 605 } // namespace net |
| 605 | 606 |
| 606 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ | 607 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ |
| OLD | NEW |