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

Unified Diff: net/dns/host_resolver_impl.h

Issue 1903263002: DNS: Expose stale results through HostResolverImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dns_stale1
Patch Set: rebase Created 4 years, 8 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
Index: net/dns/host_resolver_impl.h
diff --git a/net/dns/host_resolver_impl.h b/net/dns/host_resolver_impl.h
index 24f17a7d6c78c292c981d1646e7ecbf5d01f4e30..895c1e77570445e586d2a575dfc9121b781c1a35 100644
--- a/net/dns/host_resolver_impl.h
+++ b/net/dns/host_resolver_impl.h
@@ -140,6 +140,10 @@ class NET_EXPORT HostResolverImpl
int ResolveFromCache(const RequestInfo& info,
AddressList* addresses,
const BoundNetLog& source_net_log) override;
+ int ResolveStaleFromCache(const RequestInfo& info,
+ AddressList* addresses,
+ HostCache::EntryStaleness* stale_info,
+ const BoundNetLog& source_net_log) override;
void CancelRequest(RequestHandle req) override;
void SetDnsClientEnabled(bool enabled) override;
HostCache* GetHostCache() override;
@@ -172,6 +176,7 @@ class NET_EXPORT HostResolverImpl
const RequestInfo& info,
const IPAddress* ip_address,
AddressList* addresses,
+ HostCache::EntryStaleness* stale_info,
const BoundNetLog& request_net_log);
// Tries to resolve |key| as an IP, returns true and sets |net_error| if
@@ -188,7 +193,8 @@ class NET_EXPORT HostResolverImpl
bool ServeFromCache(const Key& key,
const RequestInfo& info,
int* net_error,
- AddressList* addresses);
+ AddressList* addresses,
+ HostCache::EntryStaleness* stale_info);
// If we have a DnsClient with a valid DnsConfig, and |key| is found in the
// HOSTS file, returns true and fills |addresses|. Otherwise returns false.

Powered by Google App Engine
This is Rietveld 408576698