Chromium Code Reviews| 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_structs.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 // Sets the transport security state data source. | |
| 32 void NET_EXPORT_PRIVATE | |
| 33 SetTransportSecurityStateSource(const TransportSecurityStateSource* source); | |
|
Ryan Sleevi
2017/03/13 18:31:18
When is this used? Testing only?
SetTransportSecu
martijnc
2017/03/13 21:51:40
Yes, this is only used in tests. Renamed.
| |
| 34 | |
| 35 // Sets the transport security state data source back to the default source | |
| 36 // (transport_security_state_static.h). | |
| 37 void NET_EXPORT_PRIVATE SetDefaultTransportSecurityStateSource(); | |
|
Ryan Sleevi
2017/03/13 18:31:18
Why is this needed? Our normal pattern for overrid
martijnc
2017/03/13 21:51:40
This was used to set the source back to the defaul
| |
| 38 | |
| 30 // Tracks which hosts have enabled strict transport security and/or public | 39 // Tracks which hosts have enabled strict transport security and/or public |
| 31 // key pins. | 40 // key pins. |
| 32 // | 41 // |
| 33 // This object manages the in-memory store. Register a Delegate with | 42 // This object manages the in-memory store. Register a Delegate with |
| 34 // |SetDelegate| to persist the state to disk. | 43 // |SetDelegate| to persist the state to disk. |
| 35 // | 44 // |
| 36 // HTTP strict transport security (HSTS) is defined in | 45 // HTTP strict transport security (HSTS) is defined in |
| 37 // http://tools.ietf.org/html/ietf-websec-strict-transport-sec, and | 46 // http://tools.ietf.org/html/ietf-websec-strict-transport-sec, and |
| 38 // HTTP-based dynamic public key pinning (HPKP) is defined in | 47 // HTTP-based dynamic public key pinning (HPKP) is defined in |
| 39 // http://tools.ietf.org/html/ietf-websec-key-pinning. | 48 // 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. | 607 // rate-limiting. |
| 599 ExpiringCache<std::string, bool, base::TimeTicks, std::less<base::TimeTicks>> | 608 ExpiringCache<std::string, bool, base::TimeTicks, std::less<base::TimeTicks>> |
| 600 sent_reports_cache_; | 609 sent_reports_cache_; |
| 601 | 610 |
| 602 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); | 611 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); |
| 603 }; | 612 }; |
| 604 | 613 |
| 605 } // namespace net | 614 } // namespace net |
| 606 | 615 |
| 607 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ | 616 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ |
| OLD | NEW |