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 #include "net/http/transport_security_state.h" | 5 #include "net/http/transport_security_state.h" |
6 | 6 |
7 #if defined(USE_OPENSSL) | 7 #if defined(USE_OPENSSL) |
8 #include <openssl/ecdsa.h> | 8 #include <openssl/ecdsa.h> |
9 #include <openssl/ssl.h> | 9 #include <openssl/ssl.h> |
10 #else // !defined(USE_OPENSSL) | 10 #else // !defined(USE_OPENSSL) |
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 | 548 |
549 return false; | 549 return false; |
550 } | 550 } |
551 | 551 |
552 void TransportSecurityState::SetDelegate( | 552 void TransportSecurityState::SetDelegate( |
553 TransportSecurityState::Delegate* delegate) { | 553 TransportSecurityState::Delegate* delegate) { |
554 DCHECK(CalledOnValidThread()); | 554 DCHECK(CalledOnValidThread()); |
555 delegate_ = delegate; | 555 delegate_ = delegate; |
556 } | 556 } |
557 | 557 |
| 558 void TransportSecurityState::SetReporter( |
| 559 TransportSecurityState::Reporter* reporter) { |
| 560 DCHECK(CalledOnValidThread()); |
| 561 reporter_ = reporter; |
| 562 } |
| 563 |
558 void TransportSecurityState::AddHSTSInternal( | 564 void TransportSecurityState::AddHSTSInternal( |
559 const std::string& host, | 565 const std::string& host, |
560 TransportSecurityState::STSState::UpgradeMode upgrade_mode, | 566 TransportSecurityState::STSState::UpgradeMode upgrade_mode, |
561 const base::Time& expiry, | 567 const base::Time& expiry, |
562 bool include_subdomains) { | 568 bool include_subdomains) { |
563 DCHECK(CalledOnValidThread()); | 569 DCHECK(CalledOnValidThread()); |
564 | 570 |
565 STSState sts_state; | 571 STSState sts_state; |
566 sts_state.last_observed = base::Time::Now(); | 572 sts_state.last_observed = base::Time::Now(); |
567 sts_state.include_subdomains = include_subdomains; | 573 sts_state.include_subdomains = include_subdomains; |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1056 TransportSecurityState::PKPStateIterator::PKPStateIterator( | 1062 TransportSecurityState::PKPStateIterator::PKPStateIterator( |
1057 const TransportSecurityState& state) | 1063 const TransportSecurityState& state) |
1058 : iterator_(state.enabled_pkp_hosts_.begin()), | 1064 : iterator_(state.enabled_pkp_hosts_.begin()), |
1059 end_(state.enabled_pkp_hosts_.end()) { | 1065 end_(state.enabled_pkp_hosts_.end()) { |
1060 } | 1066 } |
1061 | 1067 |
1062 TransportSecurityState::PKPStateIterator::~PKPStateIterator() { | 1068 TransportSecurityState::PKPStateIterator::~PKPStateIterator() { |
1063 } | 1069 } |
1064 | 1070 |
1065 } // namespace | 1071 } // namespace |
OLD | NEW |