Index: net/dns/host_resolver_impl.h |
diff --git a/net/dns/host_resolver_impl.h b/net/dns/host_resolver_impl.h |
index 5c3124cba5962bce899455a799e9e77e65a10bd4..394b755bddbe48edaa68035aa4b54dd51353e337 100644 |
--- a/net/dns/host_resolver_impl.h |
+++ b/net/dns/host_resolver_impl.h |
@@ -137,12 +137,16 @@ class NET_EXPORT HostResolverImpl |
const CompletionCallback& callback, |
RequestHandle* out_req, |
const BoundNetLog& source_net_log) override; |
- int ResolveFromCache(const RequestInfo& info, |
- AddressList* addresses, |
- const BoundNetLog& source_net_log) override; |
void ChangeRequestPriority(RequestHandle req, |
RequestPriority priority) override; |
void CancelRequest(RequestHandle req) override; |
+ 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 SetDnsClientEnabled(bool enabled) override; |
HostCache* GetHostCache() override; |
std::unique_ptr<base::Value> GetDnsConfigAsValue() const override; |
@@ -170,10 +174,16 @@ class NET_EXPORT HostResolverImpl |
// ERR_NAME_NOT_RESOLVED if either hostname is invalid or IP literal is |
// incompatible, ERR_DNS_CACHE_MISS if entry was not found in cache and |
// HOSTS and is not localhost. |
+ // |
+ // If |stale_info| is non-null, then stale cache entries can be returned, and |
+ // |*stale_info| will be filled in with details of the entry's staleness (if |
+ // an entry, fresh or stale, was returned). |
Randy Smith (Not in Mondays)
2016/05/17 20:39:35
I think this comment needs to be updated? |allow_
Julia Tuttle
2016/05/20 17:54:42
Done.
|
int ResolveHelper(const Key& key, |
const RequestInfo& info, |
const IPAddress* ip_address, |
AddressList* addresses, |
+ bool allow_stale, |
+ HostCache::EntryStaleness* stale_info, |
const BoundNetLog& request_net_log); |
// Tries to resolve |key| as an IP, returns true and sets |net_error| if |
@@ -187,10 +197,16 @@ class NET_EXPORT HostResolverImpl |
// If |key| is not found in cache returns false, otherwise returns |
// true, sets |net_error| to the cached error code and fills |addresses| |
// if it is a positive entry. |
+ // |
+ // If |stale_info| is non-null, then stale cache entries can be returned, and |
+ // |*stale_info| will be filled in with details of the entry's staleness (if |
+ // an entry, fresh or stale, was returned). |
bool ServeFromCache(const Key& key, |
const RequestInfo& info, |
int* net_error, |
- AddressList* addresses); |
+ AddressList* addresses, |
+ bool allow_stale, |
+ 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. |