summaryrefslogtreecommitdiffstats
path: root/net/base/host_resolver.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/base/host_resolver.h')
-rw-r--r--net/base/host_resolver.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/net/base/host_resolver.h b/net/base/host_resolver.h
index fe91b4d..4829c1c 100644
--- a/net/base/host_resolver.h
+++ b/net/base/host_resolver.h
@@ -9,6 +9,7 @@
#include "base/ref_counted.h"
#include "googleurl/src/gurl.h"
+#include "net/base/address_family.h"
#include "net/base/completion_callback.h"
class MessageLoop;
@@ -36,6 +37,7 @@ class HostResolver : public base::RefCountedThreadSafe<HostResolver> {
public:
RequestInfo(const std::string& hostname, int port)
: hostname_(hostname),
+ address_family_(ADDRESS_FAMILY_UNSPECIFIED),
port_(port),
allow_cached_response_(true),
is_speculative_(false) {}
@@ -43,6 +45,11 @@ class HostResolver : public base::RefCountedThreadSafe<HostResolver> {
const int port() const { return port_; }
const std::string& hostname() const { return hostname_; }
+ AddressFamily address_family() const { return address_family_; }
+ void set_address_family(AddressFamily address_family) {
+ address_family_ = address_family;
+ }
+
bool allow_cached_response() const { return allow_cached_response_; }
void set_allow_cached_response(bool b) { allow_cached_response_ = b; }
@@ -56,6 +63,9 @@ class HostResolver : public base::RefCountedThreadSafe<HostResolver> {
// The hostname to resolve.
std::string hostname_;
+ // The address family to restrict results to.
+ AddressFamily address_family_;
+
// The port number to set in the result's sockaddrs.
int port_;
@@ -138,6 +148,9 @@ class HostResolver : public base::RefCountedThreadSafe<HostResolver> {
// TODO(eroman): temp hack for http://crbug.com/18373
virtual void Shutdown() = 0;
+ // Disables or enables support for IPv6 results.
+ virtual void DisableIPv6(bool disable_ipv6) {}
+
protected:
HostResolver() { }