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

Unified Diff: net/base/host_resolver.h

Issue 302010: Add a mechanism to disable IPv6.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Address darin's comments Created 11 years, 2 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
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() { }

Powered by Google App Engine
This is Rietveld 408576698