diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-26 17:59:51 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-26 17:59:51 +0000 |
commit | 0c7798459922d970a2eb43039a2a5733bb94ae2e (patch) | |
tree | 648b15f61e1d7135f12fb648195e0806b8193dd2 /net/base/host_resolver_impl.h | |
parent | c248be0e84cda8fb1870db68a3127b2e9fae057c (diff) | |
download | chromium_src-0c7798459922d970a2eb43039a2a5733bb94ae2e.zip chromium_src-0c7798459922d970a2eb43039a2a5733bb94ae2e.tar.gz chromium_src-0c7798459922d970a2eb43039a2a5733bb94ae2e.tar.bz2 |
Refactor: Change the interface from HostResolver::DisableIPv6() to HostResolver::SetDefaultAddressFamily(), to make it more general.
This came up in a codereview comment, but was after I had checked in.
Review URL: http://codereview.chromium.org/303026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30063 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/host_resolver_impl.h')
-rw-r--r-- | net/base/host_resolver_impl.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/net/base/host_resolver_impl.h b/net/base/host_resolver_impl.h index b641b0b..5399e69 100644 --- a/net/base/host_resolver_impl.h +++ b/net/base/host_resolver_impl.h @@ -70,10 +70,8 @@ class HostResolverImpl : public HostResolver { // TODO(eroman): temp hack for http://crbug.com/15513 virtual void Shutdown(); - // Prevents returning IPv6 addresses from Resolve(). - // The default is to allow IPv6 results. - virtual void DisableIPv6(bool disable_ipv6) { - disable_ipv6_ = disable_ipv6; + virtual void SetDefaultAddressFamily(AddressFamily address_family) { + default_address_family_ = address_family; } private: @@ -139,8 +137,8 @@ class HostResolverImpl : public HostResolver { // in the case of unit-tests which inject custom host resolving behaviors. scoped_refptr<HostResolverProc> resolver_proc_; - // Set to true if only IPv4 address are to be returned by Resolve(). - bool disable_ipv6_; + // Address family to use when the request doesn't specify one. + AddressFamily default_address_family_; // TODO(eroman): temp hack for http://crbug.com/15513 bool shutdown_; |