Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Unified Diff: net/dns/host_cache.h

Issue 2953483003: Add HostCachePersistenceManager for Cronet (Closed)
Patch Set: move constant Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/cronet/host_cache_persistence_manager_unittest.cc ('k') | net/dns/host_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/host_cache.h
diff --git a/net/dns/host_cache.h b/net/dns/host_cache.h
index 13042e3d569557ef3114752d7d95a8de06496525..0045b37be42da381138c887fc099d4f277cd1dd7 100644
--- a/net/dns/host_cache.h
+++ b/net/dns/host_cache.h
@@ -167,9 +167,7 @@ class NET_EXPORT HostCache {
eviction_callback_ = callback;
}
- void set_persistence_delegate(PersistenceDelegate* delegate) {
- delegate_ = delegate;
- }
+ void set_persistence_delegate(PersistenceDelegate* delegate);
// Empties the cache.
void clear();
@@ -178,9 +176,11 @@ class NET_EXPORT HostCache {
void ClearForHosts(
const base::Callback<bool(const std::string&)>& host_filter);
- // Returns the contents of the cache represented as a base::ListValue for
- // serialization.
- std::unique_ptr<base::ListValue> GetAsListValue(bool include_staleness) const;
+ // 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.
+ void GetAsListValue(base::ListValue* entry_list,
+ bool include_staleness) 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.
« no previous file with comments | « components/cronet/host_cache_persistence_manager_unittest.cc ('k') | net/dns/host_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698