summaryrefslogtreecommitdiff
path: root/chromium/net/http/transport_security_persister.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-12 14:27:29 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-13 09:35:20 +0000
commitc30a6232df03e1efbd9f3b226777b07e087a1122 (patch)
treee992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/net/http/transport_security_persister.h
parent7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff)
downloadqtwebengine-chromium-c30a6232df03e1efbd9f3b226777b07e087a1122.tar.gz
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/net/http/transport_security_persister.h')
-rw-r--r--chromium/net/http/transport_security_persister.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/chromium/net/http/transport_security_persister.h b/chromium/net/http/transport_security_persister.h
index a7a92839c32..9d6be48f3b6 100644
--- a/chromium/net/http/transport_security_persister.h
+++ b/chromium/net/http/transport_security_persister.h
@@ -45,6 +45,7 @@
namespace base {
class SequencedTaskRunner;
+class Value;
}
namespace net {
@@ -107,20 +108,27 @@ class NET_EXPORT TransportSecurityPersister
// Clears any existing non-static entries, and then re-populates
// |transport_security_state_|.
//
- // Sets |*dirty| to true if the new state differs from the persisted
- // state; false otherwise.
- bool LoadEntries(const std::string& serialized, bool* dirty);
+ // Sets |*data_in_old_format| to true if the loaded data is in an older format
+ // and should be overwritten with data in the newest format.
+ bool LoadEntries(const std::string& serialized, bool* data_in_old_format);
private:
// Populates |state| from the JSON string |serialized|. Returns true if
// all entries were parsed and deserialized correctly.
//
- // Sets |*dirty| to true if the new state differs from the persisted
- // state; false otherwise.
+ // Sets |*data_in_old_format| to true if the old data is in the old file
+ // format and needs to be overwritten with data in the newer format; false
+ // otherwise.
static bool Deserialize(const std::string& serialized,
- bool* dirty,
+ bool* data_in_old_format,
TransportSecurityState* state);
+ // Used internally by Deserialize() to handle older dictionaries.
+ // TODO(https://crbug.com/1086975): This should be removed in Chrome 88.
+ static bool DeserializeObsoleteData(const base::Value& value,
+ bool* dirty,
+ TransportSecurityState* state);
+
void CompleteLoad(const std::string& state);
void OnWriteFinished(base::OnceClosure callback);