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

Unified Diff: net/base/host_resolver_proc.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_proc.h
===================================================================
--- net/base/host_resolver_proc.h (revision 29420)
+++ net/base/host_resolver_proc.h (working copy)
@@ -8,6 +8,7 @@
#include <string>
#include "base/ref_counted.h"
+#include "net/base/address_family.h"
namespace net {
@@ -25,14 +26,18 @@
explicit HostResolverProc(HostResolverProc* previous);
virtual ~HostResolverProc() {}
- // Resolves |host| to an address list. If successful returns OK and fills
- // |addrlist| with a list of socket addresses. Otherwise returns a
- // network error code.
- virtual int Resolve(const std::string& host, AddressList* addrlist) = 0;
+ // Resolves |host| to an address list, restricting the results to addresses
+ // in |address_family|. If successful returns OK and fills |addrlist| with
+ // a list of socket addresses. Otherwise returns a network error code.
+ virtual int Resolve(const std::string& host,
+ AddressFamily address_family,
+ AddressList* addrlist) = 0;
protected:
// Asks the fallback procedure (if set) to do the resolve.
- int ResolveUsingPrevious(const std::string& host, AddressList* addrlist);
+ int ResolveUsingPrevious(const std::string& host,
+ AddressFamily address_family,
+ AddressList* addrlist);
private:
friend class HostResolverImpl;
@@ -62,7 +67,9 @@
// (i.e. this calls out to getaddrinfo()). If successful returns OK and fills
// |addrlist| with a list of socket addresses. Otherwise returns a
// network error code.
-int SystemHostResolverProc(const std::string& host, AddressList* addrlist);
+int SystemHostResolverProc(const std::string& host,
+ AddressFamily address_family,
+ AddressList* addrlist);
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698