Index: net/http/transport_security_state.cc |
diff --git a/net/http/transport_security_state.cc b/net/http/transport_security_state.cc |
index c24fc1f500716fa1356c107b13814342e713db19..528bb45ba4f51870dcbaada15df80abc1189b2f4 100644 |
--- a/net/http/transport_security_state.cc |
+++ b/net/http/transport_security_state.cc |
@@ -586,7 +586,8 @@ void TransportSecurityState::AddHPKPInternal(const std::string& host, |
const base::Time& last_observed, |
const base::Time& expiry, |
bool include_subdomains, |
- const HashValueVector& hashes) { |
+ const HashValueVector& hashes, |
+ const std::string& report_uri) { |
DCHECK(CalledOnValidThread()); |
// Copy-and-modify the existing DomainState for this host (if any). |
@@ -601,6 +602,7 @@ void TransportSecurityState::AddHPKPInternal(const std::string& host, |
domain_state.pkp.expiry = expiry; |
domain_state.pkp.include_subdomains = include_subdomains; |
domain_state.pkp.spki_hashes = hashes; |
+ domain_state.pkp.report_uri = report_uri; |
EnableHost(host, domain_state); |
} |
@@ -718,14 +720,17 @@ bool TransportSecurityState::AddHPKPHeader(const std::string& host, |
base::TimeDelta max_age; |
bool include_subdomains; |
HashValueVector spki_hashes; |
+ std::string report_uri; |
+ |
if (!ParseHPKPHeader(value, ssl_info.public_key_hashes, &max_age, |
- &include_subdomains, &spki_hashes)) { |
+ &include_subdomains, &spki_hashes, &report_uri)) { |
return false; |
} |
// Handle max-age == 0. |
if (max_age.InSeconds() == 0) |
spki_hashes.clear(); |
- AddHPKPInternal(host, now, now + max_age, include_subdomains, spki_hashes); |
+ AddHPKPInternal(host, now, now + max_age, include_subdomains, spki_hashes, |
+ report_uri); |
return true; |
} |
@@ -740,9 +745,11 @@ void TransportSecurityState::AddHSTS(const std::string& host, |
void TransportSecurityState::AddHPKP(const std::string& host, |
const base::Time& expiry, |
bool include_subdomains, |
- const HashValueVector& hashes) { |
+ const HashValueVector& hashes, |
+ const std::string& report_uri) { |
DCHECK(CalledOnValidThread()); |
- AddHPKPInternal(host, base::Time::Now(), expiry, include_subdomains, hashes); |
+ AddHPKPInternal(host, base::Time::Now(), expiry, include_subdomains, hashes, |
+ report_uri); |
} |
// static |