summaryrefslogtreecommitdiffstats
path: root/net/base/host_resolver_impl.h
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-25 06:42:19 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-25 06:42:19 +0000
commit05b88274fffd678b41c68106aa573fb1187ea95b (patch)
treec4d8d1da429fcd39dbb25ed7c8ec23f8bab0d10a /net/base/host_resolver_impl.h
parent3846bac495aaba9ab3362ac373edb78d50f1f6c4 (diff)
downloadchromium_src-05b88274fffd678b41c68106aa573fb1187ea95b.zip
chromium_src-05b88274fffd678b41c68106aa573fb1187ea95b.tar.gz
chromium_src-05b88274fffd678b41c68106aa573fb1187ea95b.tar.bz2
Refine IPv6 probe to require that the client has an IPv6 address on an interface
This currently only works on Posix, not windows. Network changes are monitored, and the test is repeated each time interfaces change (which is a subset of any IP addresses changing). The test performed is still relatively low latency, and we *may* need to eventually move to an high latency test, such as a DNS resolution, or an actual test connection. If we move in that direction, then we'll need to post a task to perform the work, rather than immediately returning. BUG=25680 BUG=12754 r=wtc,eroman Review URL: http://codereview.chromium.org/652072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39996 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/host_resolver_impl.h')
-rw-r--r--net/base/host_resolver_impl.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/net/base/host_resolver_impl.h b/net/base/host_resolver_impl.h
index 3e273cd..b92b78b 100644
--- a/net/base/host_resolver_impl.h
+++ b/net/base/host_resolver_impl.h
@@ -88,9 +88,12 @@ class HostResolverImpl : public HostResolver,
virtual void AddObserver(HostResolver::Observer* observer);
virtual void RemoveObserver(HostResolver::Observer* observer);
- virtual void SetDefaultAddressFamily(AddressFamily address_family) {
- default_address_family_ = address_family;
- }
+ // Set address family, and disable IPv6 probe support.
+ virtual void SetDefaultAddressFamily(AddressFamily address_family);
+
+ // Continuously observe whether IPv6 is supported, and set the allowable
+ // address family to IPv4 iff IPv6 is not supported.
+ void ProbeIPv6Support();
virtual HostResolverImpl* GetAsHostResolverImpl() { return this; }
@@ -244,6 +247,11 @@ class HostResolverImpl : public HostResolver,
NetworkChangeNotifier* const network_change_notifier_;
+ // Indicate if probing is done after each network change event to set address
+ // family.
+ // When false, explicit setting of address family is used.
+ bool ipv6_probe_monitoring_;
+
scoped_refptr<RequestsTrace> requests_trace_;
DISALLOW_COPY_AND_ASSIGN(HostResolverImpl);