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

Unified Diff: net/dns/host_resolver_impl.h

Issue 1138833003: Reduce frequency of IPv6 probes in HostResolverImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | net/dns/host_resolver_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/host_resolver_impl.h
diff --git a/net/dns/host_resolver_impl.h b/net/dns/host_resolver_impl.h
index 80907424645ca4b43b7255de554eb0e2e7eef05b..e6a7a6db73f23f34874e41bddd78db126880a040 100644
--- a/net/dns/host_resolver_impl.h
+++ b/net/dns/host_resolver_impl.h
@@ -200,7 +200,12 @@ class NET_EXPORT HostResolverImpl
// family when the request leaves it unspecified.
Key GetEffectiveKeyForRequest(const RequestInfo& info,
const IPAddressNumber* ip_number,
- const BoundNetLog& net_log) const;
+ const BoundNetLog& net_log);
+
+ // Probes IPv6 support and returns true if IPv6 support is enabled.
+ // Results are cached, i.e. when called repeatedly this method returns result
+ // from the first probe for some time before probing again.
+ bool IsIPv6Reachable(const BoundNetLog& net_log);
// Records the result in cache if cache is present.
void CacheResult(const Key& key,
@@ -284,6 +289,9 @@ class NET_EXPORT HostResolverImpl
// local IPv6 connectivity. Disables probing.
bool use_local_ipv6_;
+ base::TimeTicks last_ipv6_probe_time_;
+ bool last_ipv6_probe_result_;
+
// True iff ProcTask has successfully resolved a hostname known to have IPv6
// addresses using ADDRESS_FAMILY_UNSPECIFIED. Reset on IP address change.
bool resolved_known_ipv6_hostname_;
« no previous file with comments | « no previous file | net/dns/host_resolver_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698