diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-06 12:48:11 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:33:43 +0000 |
commit | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (patch) | |
tree | fa14ba0ca8d2683ba2efdabd246dc9b18a1229c6 /chromium/net/dns/host_cache.h | |
parent | 79b4f909db1049fca459c07cca55af56a9b54fe3 (diff) | |
download | qtwebengine-chromium-7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3.tar.gz |
BASELINE: Update Chromium to 84.0.4147.141
Change-Id: Ib85eb4cfa1cbe2b2b81e5022c8cad5c493969535
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/net/dns/host_cache.h')
-rw-r--r-- | chromium/net/dns/host_cache.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/chromium/net/dns/host_cache.h b/chromium/net/dns/host_cache.h index 7b2e130c839..11f92932edd 100644 --- a/chromium/net/dns/host_cache.h +++ b/chromium/net/dns/host_cache.h @@ -280,6 +280,18 @@ class NET_EXPORT HostCache { using EntryMap = std::map<Key, Entry>; + // The two ways to serialize the cache to a value. + enum class SerializationType { + // Entries with transient NetworkIsolationKeys are not serialized, and + // RestoreFromListValue() can load the returned value. + kRestorable, + // Entries with transient NetworkIsolationKeys are serialized, and + // RestoreFromListValue() cannot load the returned value, since the debug + // serialization of NetworkIsolationKeys is used instead of the + // deserializable representation. + kDebug, + }; + // A HostCache::EntryStaleness representing a non-stale (fresh) cache entry. static const HostCache::EntryStaleness kNotStale; @@ -341,15 +353,10 @@ class NET_EXPORT HostCache { // Fills the provided base::ListValue with the contents of the cache for // serialization. |entry_list| must be non-null and will be cleared before - // adding the cache contents. Entries with ephemeral NetworkIsolationKeys will - // not be written to the resulting list. - // - // TODO(mmenke): This is used both in combination with RestoreFromListValue() - // and for NetLog. Update the NetLogViewer's display to handle - // NetworkIsolationKeys, and add some way for to get a result with ephemeral - // NIKs included. + // adding the cache contents. void GetAsListValue(base::ListValue* entry_list, - bool include_staleness) const; + bool include_staleness, + SerializationType serialization_type) const; // Takes a base::ListValue representing cache entries and stores them in the // cache, skipping any that already have entries. Returns true on success, // false on failure. |