summaryrefslogtreecommitdiffstats
path: root/net/base/mock_host_resolver.h
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-08 23:25:04 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-08 23:25:04 +0000
commit5439283ff95a6f7d8b9e6d86c0fd178b0238acaa (patch)
tree6b067f14016e3c39adf8eb654ff18fc2ff1886de /net/base/mock_host_resolver.h
parentec561333496a9b4f7f29718aef43094596f2d489 (diff)
downloadchromium_src-5439283ff95a6f7d8b9e6d86c0fd178b0238acaa.zip
chromium_src-5439283ff95a6f7d8b9e6d86c0fd178b0238acaa.tar.gz
chromium_src-5439283ff95a6f7d8b9e6d86c0fd178b0238acaa.tar.bz2
Allow bypassing a block of IP addresses using CIDR notation in the proxy bypass list.
For example: 10.3.1.3/16 2020:ffff::/96 Note that similar to firefox, this is only applied to IP literals in URLs, and NOT to the resolved addresses of URLs. BUG=9835 Review URL: http://codereview.chromium.org/2663001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49211 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/mock_host_resolver.h')
-rw-r--r--net/base/mock_host_resolver.h24
1 files changed, 6 insertions, 18 deletions
diff --git a/net/base/mock_host_resolver.h b/net/base/mock_host_resolver.h
index 1fe4f06..ee1e55a 100644
--- a/net/base/mock_host_resolver.h
+++ b/net/base/mock_host_resolver.h
@@ -107,26 +107,14 @@ class RuleBasedHostResolverProc : public HostResolverProc {
AddressFamily address_family,
const std::string& replacement);
- // 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]".
+ // Same as AddRule(), but the replacement is expected to be an IPv4 or IPv6
+ // literal. This can be used in place of AddRule() to bypass the system's
+ // host resolver (the address list will be constructed manually).
// 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& canonical_name);
+ void AddIPLiteralRule(const std::string& host_pattern,
+ const std::string& ip_literal,
+ const std::string& canonical_name);
void AddRuleWithLatency(const std::string& host_pattern,
const std::string& replacement,