| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 14 #include "base/lock.h" | 14 #include "base/lock.h" |
| 15 #include "base/ref_counted.h" | 15 #include "base/ref_counted.h" |
| 16 #include "base/time.h" | 16 #include "base/time.h" |
| 17 | 17 |
| 18 class GURL; | |
| 19 | |
| 20 namespace net { | 18 namespace net { |
| 21 | 19 |
| 22 // TransportSecurityState | 20 // TransportSecurityState |
| 23 // | 21 // |
| 24 // Tracks which hosts have enabled *-Transport-Security. This object manages | 22 // Tracks which hosts have enabled *-Transport-Security. This object manages |
| 25 // the in-memory store. A separate object must register itself with this object | 23 // the in-memory store. A separate object must register itself with this object |
| 26 // in order to persist the state to disk. | 24 // in order to persist the state to disk. |
| 27 class TransportSecurityState : | 25 class TransportSecurityState : |
| 28 public base::RefCountedThreadSafe<TransportSecurityState> { | 26 public base::RefCountedThreadSafe<TransportSecurityState> { |
| 29 public: | 27 public: |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 static std::string CanonicaliseHost(const std::string& host); | 110 static std::string CanonicaliseHost(const std::string& host); |
| 113 static bool IsPreloadedSTS(const std::string& canonicalised_host, | 111 static bool IsPreloadedSTS(const std::string& canonicalised_host, |
| 114 bool* out_include_subdomains); | 112 bool* out_include_subdomains); |
| 115 | 113 |
| 116 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); | 114 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); |
| 117 }; | 115 }; |
| 118 | 116 |
| 119 } // namespace net | 117 } // namespace net |
| 120 | 118 |
| 121 #endif // NET_BASE_TRANSPORT_SECURITY_STATE_H_ | 119 #endif // NET_BASE_TRANSPORT_SECURITY_STATE_H_ |
| OLD | NEW |