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

Unified Diff: net/dns/host_resolver.h

Issue 1898033006: DNS: Add stubs for persisting data across restarts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: *silently glares at editor, reuploads with proper spacing* Created 4 years, 5 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 | « net/dns/dns_test_util.cc ('k') | net/dns/host_resolver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/host_resolver.h
diff --git a/net/dns/host_resolver.h b/net/dns/host_resolver.h
index c5494b7a68e63a7d40b221e02b9bddf4cc3f895a..8af61f170f15a000b8c028e01ddffdbf55dbe44d 100644
--- a/net/dns/host_resolver.h
+++ b/net/dns/host_resolver.h
@@ -186,6 +186,16 @@ class NET_EXPORT HostResolver {
// nullptr if it's configured to always use the system host resolver.
virtual std::unique_ptr<base::Value> GetDnsConfigAsValue() const;
+ typedef base::Callback<void(std::unique_ptr<const base::Value>)>
+ PersistCallback;
+ // Configures the HostResolver to be able to persist data (e.g. observed
+ // performance) between sessions. |persist_callback| is a callback that will
+ // be called when the HostResolver wants to persist data; |old_data| is the
+ // data last persisted by the resolver on the previous session.
+ virtual void InitializePersistence(
+ const PersistCallback& persist_callback,
+ std::unique_ptr<const base::Value> old_data);
+
// Creates a HostResolver implementation that queries the underlying system.
// (Except if a unit-test has changed the global HostResolverProc using
// ScopedHostResolverProc to intercept requests to the system).
« no previous file with comments | « net/dns/dns_test_util.cc ('k') | net/dns/host_resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698