Chromium Code Reviews| 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..d23f64f2f219a049309fd6593cc7c9a24708929f 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,15 @@ 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/07 01:36:31
(I'll remark in passing that I'm twitchy about the
Julia Tuttle
2016/05/11 20:19:48
Done.
|
| int ResolveHelper(const Key& key, |
| 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 |
| @@ -187,10 +196,15 @@ 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, |
| + 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. |