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

Unified Diff: net/base/mock_host_resolver.h

Issue 155618: Use manually constructed IPv6 socket addresses for tests, rather than system ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 11 years, 5 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/host_resolver_impl_unittest.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
===================================================================
--- net/base/mock_host_resolver.h (revision 21052)
+++ net/base/mock_host_resolver.h (working copy)
@@ -98,6 +98,13 @@
void AddRule(const std::string& host_pattern,
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.
+ void AddIPv6Rule(const std::string& host_pattern,
+ const std::string& ipv6_literal);
+
void AddRuleWithLatency(const std::string& host_pattern,
const std::string& replacement,
int latency_ms);
@@ -115,6 +122,7 @@
private:
struct Rule;
typedef std::list<Rule> RuleList;
+
RuleList rules_;
};
« no previous file with comments | « net/base/host_resolver_impl_unittest.cc ('k') | net/base/mock_host_resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698