| 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 // the Delegate (if any). | 275 // the Delegate (if any). |
| 276 bool DeleteDynamicDataForHost(const std::string& host); | 276 bool DeleteDynamicDataForHost(const std::string& host); |
| 277 | 277 |
| 278 // Returns true and updates |*sts_result| and |*pkp_result| iff there is a | 278 // Returns true and updates |*sts_result| and |*pkp_result| iff there is a |
| 279 // static (built-in) state for |host|. If multiple entries match |host|, | 279 // static (built-in) state for |host|. If multiple entries match |host|, |
| 280 // the most specific match determines the return value. | 280 // the most specific match determines the return value. |
| 281 bool GetStaticDomainState(const std::string& host, | 281 bool GetStaticDomainState(const std::string& host, |
| 282 STSState* sts_result, | 282 STSState* sts_result, |
| 283 PKPState* pkp_result) const; | 283 PKPState* pkp_result) const; |
| 284 | 284 |
| 285 // Returns true iff there is static (built-in) state for |host| that |
| 286 // references the Google pins. |
| 287 // TODO(rch): Remove this temporary gross layering violation once QUIC 32 is |
| 288 // deployed. |
| 289 bool IsGooglePinnedHost(const std::string& host) const; |
| 290 |
| 285 // Returns true and updates |*expect_ct_result| iff there is a static | 291 // Returns true and updates |*expect_ct_result| iff there is a static |
| 286 // (built-in) state for |host| with expect_ct=true. | 292 // (built-in) state for |host| with expect_ct=true. |
| 287 bool GetStaticExpectCTState(const std::string& host, | 293 bool GetStaticExpectCTState(const std::string& host, |
| 288 ExpectCTState* expect_ct_result) const; | 294 ExpectCTState* expect_ct_result) const; |
| 289 | 295 |
| 290 // Returns true and updates |*result| iff |host| has HSTS (respectively, HPKP) | 296 // Returns true and updates |*result| iff |host| has HSTS (respectively, HPKP) |
| 291 // state. If multiple HSTS (respectively, HPKP) entries match |host|, the | 297 // state. If multiple HSTS (respectively, HPKP) entries match |host|, the |
| 292 // most specific match determines the HSTS (respectively, HPKP) return value. | 298 // most specific match determines the HSTS (respectively, HPKP) return value. |
| 293 // | 299 // |
| 294 // Note that these methods are not const because they opportunistically remove | 300 // Note that these methods are not const because they opportunistically remove |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 // rate-limiting. | 435 // rate-limiting. |
| 430 ExpiringCache<std::string, bool, base::TimeTicks, std::less<base::TimeTicks>> | 436 ExpiringCache<std::string, bool, base::TimeTicks, std::less<base::TimeTicks>> |
| 431 sent_reports_cache_; | 437 sent_reports_cache_; |
| 432 | 438 |
| 433 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); | 439 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); |
| 434 }; | 440 }; |
| 435 | 441 |
| 436 } // namespace net | 442 } // namespace net |
| 437 | 443 |
| 438 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ | 444 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ |
| OLD | NEW |