| Index: net/http/transport_security_persister.cc
|
| diff --git a/net/http/transport_security_persister.cc b/net/http/transport_security_persister.cc
|
| index 74a2e56b1ab568696c84c8cc64b7bb97e9c56f01..9dd5455a4535957498fc20d3ed230f1a4286d5a2 100644
|
| --- a/net/http/transport_security_persister.cc
|
| +++ b/net/http/transport_security_persister.cc
|
| @@ -77,6 +77,7 @@ const char kPinningOnly[] = "pinning-only";
|
| const char kCreated[] = "created";
|
| const char kStsObserved[] = "sts_observed";
|
| const char kPkpObserved[] = "pkp_observed";
|
| +const char kReportUri[] = "report-uri";
|
|
|
| std::string LoadState(const base::FilePath& path) {
|
| std::string result;
|
| @@ -192,6 +193,8 @@ bool TransportSecurityPersister::SerializeData(std::string* output) {
|
| serialized->Set(kDynamicSPKIHashes,
|
| SPKIHashesToListValue(pkp_state.spki_hashes));
|
| }
|
| +
|
| + serialized->SetString(kReportUri, pkp_state.report_uri.spec());
|
| }
|
|
|
| base::JSONWriter::WriteWithOptions(
|
| @@ -282,6 +285,13 @@ bool TransportSecurityPersister::Deserialize(const std::string& serialized,
|
| sts_state.expiry = base::Time::FromDoubleT(expiry);
|
| pkp_state.expiry = base::Time::FromDoubleT(dynamic_spki_hashes_expiry);
|
|
|
| + // Don't fail if this key is not present.
|
| + std::string report_uri_str;
|
| + parsed->GetString(kReportUri, &report_uri_str);
|
| + GURL report_uri(report_uri_str);
|
| + if (report_uri.is_valid())
|
| + pkp_state.report_uri = report_uri;
|
| +
|
| double sts_observed;
|
| double pkp_observed;
|
| if (parsed->GetDouble(kStsObserved, &sts_observed)) {
|
|
|