| 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> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/callback.h" | 13 #include "base/callback.h" |
| 14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/strings/string_piece.h" | 16 #include "base/strings/string_piece.h" |
| 17 #include "base/threading/non_thread_safe.h" | 17 #include "base/threading/non_thread_safe.h" |
| 18 #include "base/time/time.h" | 18 #include "base/time/time.h" |
| 19 #include "net/base/expiring_cache.h" | 19 #include "net/base/expiring_cache.h" |
| 20 #include "net/base/hash_value.h" | 20 #include "net/base/hash_value.h" |
| 21 #include "net/base/net_export.h" | 21 #include "net/base/net_export.h" |
| 22 #include "net/http/transport_security_state_source.h" |
| 22 #include "url/gurl.h" | 23 #include "url/gurl.h" |
| 23 | 24 |
| 24 namespace net { | 25 namespace net { |
| 25 | 26 |
| 26 class HostPortPair; | 27 class HostPortPair; |
| 27 class SSLInfo; | 28 class SSLInfo; |
| 28 class X509Certificate; | 29 class X509Certificate; |
| 29 | 30 |
| 31 void NET_EXPORT_PRIVATE SetTransportSecurityStateSourceForTesting( |
| 32 const TransportSecurityStateSource* source); |
| 33 |
| 30 // Tracks which hosts have enabled strict transport security and/or public | 34 // Tracks which hosts have enabled strict transport security and/or public |
| 31 // key pins. | 35 // key pins. |
| 32 // | 36 // |
| 33 // This object manages the in-memory store. Register a Delegate with | 37 // This object manages the in-memory store. Register a Delegate with |
| 34 // |SetDelegate| to persist the state to disk. | 38 // |SetDelegate| to persist the state to disk. |
| 35 // | 39 // |
| 36 // HTTP strict transport security (HSTS) is defined in | 40 // HTTP strict transport security (HSTS) is defined in |
| 37 // http://tools.ietf.org/html/ietf-websec-strict-transport-sec, and | 41 // http://tools.ietf.org/html/ietf-websec-strict-transport-sec, and |
| 38 // HTTP-based dynamic public key pinning (HPKP) is defined in | 42 // HTTP-based dynamic public key pinning (HPKP) is defined in |
| 39 // http://tools.ietf.org/html/ietf-websec-key-pinning. | 43 // http://tools.ietf.org/html/ietf-websec-key-pinning. |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 // rate-limiting. | 602 // rate-limiting. |
| 599 ExpiringCache<std::string, bool, base::TimeTicks, std::less<base::TimeTicks>> | 603 ExpiringCache<std::string, bool, base::TimeTicks, std::less<base::TimeTicks>> |
| 600 sent_reports_cache_; | 604 sent_reports_cache_; |
| 601 | 605 |
| 602 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); | 606 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); |
| 603 }; | 607 }; |
| 604 | 608 |
| 605 } // namespace net | 609 } // namespace net |
| 606 | 610 |
| 607 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ | 611 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ |
| OLD | NEW |