Index: net/base/mock_host_resolver.h |
diff --git a/net/base/mock_host_resolver.h b/net/base/mock_host_resolver.h |
index 5a1df7f716b78bd46d8298b7a5b8ecfdac3e10de..ad89a483769a6a614ae9b040c4d8a815f7c181ec 100644 |
--- a/net/base/mock_host_resolver.h |
+++ b/net/base/mock_host_resolver.h |
@@ -107,12 +107,26 @@ class RuleBasedHostResolverProc : public HostResolverProc { |
AddressFamily address_family, |
const std::string& replacement); |
- // Same as AddRule(), but the replacement is expected to be an IPV6 literal. |
- // You should use this in place of AddRule(), since the system's host resolver |
- // may not support IPv6 literals on all systems. Whereas this variant |
- // constructs the socket address directly so it will always work. |
+ // Same as AddRule(), but the replacement is expected to be an IPV4 literal. |
+ // This can be used in place of AddRule() to bypass the system's host |
+ // resolver. |ipv4_literal| must be an IPv4 literal, typically taking the form |
+ // of "[0-255].[0-255].[0-255].[0-255]". |
+ // If |canonical-name| is non-empty, it is copied to the resulting AddressList |
+ // but does not impact DNS resolution. |
+ void AddIPv4Rule(const std::string& host_pattern, |
+ const std::string& ipv4_literal, |
+ const std::string& canonical_name); |
+ |
+ // Same as AddRule(), but |ipv6_literal| is expected to be an IPV6 literal, |
+ // without enclosing brackets. You should use this in place of AddRule(), |
+ // since the system's host resolver may not support IPv6 literals on all |
+ // systems. This variant constructs the socket address directly so it will |
+ // always work. |
+ // If |canonical-name| is non-empty, it is copied to the resulting AddressList |
+ // but does not impact DNS resolution. |
void AddIPv6Rule(const std::string& host_pattern, |
- const std::string& ipv6_literal); |
+ const std::string& ipv6_literal, |
+ const std::string& canonical_name); |
void AddRuleWithLatency(const std::string& host_pattern, |
const std::string& replacement, |