| Index: net/base/host_resolver.h
|
| ===================================================================
|
| --- net/base/host_resolver.h (revision 29420)
|
| +++ net/base/host_resolver.h (working copy)
|
| @@ -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 @@
|
| 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 @@
|
| 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 @@
|
| // 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 @@
|
| // 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() { }
|
|
|
|
|