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

Unified Diff: net/base/mock_host_resolver.h

Issue 1705001: Unit tests for HttpAuthHandlerNegotiate (Closed)
Patch Set: Respond to eroman's concerns. Created 10 years, 8 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
« no previous file with comments | « net/base/address_list.cc ('k') | net/base/mock_host_resolver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « net/base/address_list.cc ('k') | net/base/mock_host_resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698