summaryrefslogtreecommitdiffstats
path: root/net/dns/mock_host_resolver.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/dns/mock_host_resolver.cc')
-rw-r--r--net/dns/mock_host_resolver.cc36
1 files changed, 28 insertions, 8 deletions
diff --git a/net/dns/mock_host_resolver.cc b/net/dns/mock_host_resolver.cc
index fb03836..e6ecf59 100644
--- a/net/dns/mock_host_resolver.cc
+++ b/net/dns/mock_host_resolver.cc
@@ -256,8 +256,13 @@ void RuleBasedHostResolverProc::AddRuleForAddressFamily(
DCHECK(!replacement.empty());
HostResolverFlags flags = HOST_RESOLVER_LOOPBACK_ONLY |
HOST_RESOLVER_DEFAULT_FAMILY_SET_DUE_TO_NO_IPV6;
- Rule rule(Rule::kResolverTypeSystem, host_pattern, address_family, flags,
- replacement, "", 0);
+ Rule rule(Rule::kResolverTypeSystem,
+ host_pattern,
+ address_family,
+ flags,
+ replacement,
+ std::string(),
+ 0);
rules_.push_back(rule);
}
@@ -286,8 +291,13 @@ void RuleBasedHostResolverProc::AddRuleWithLatency(
DCHECK(!replacement.empty());
HostResolverFlags flags = HOST_RESOLVER_LOOPBACK_ONLY |
HOST_RESOLVER_DEFAULT_FAMILY_SET_DUE_TO_NO_IPV6;
- Rule rule(Rule::kResolverTypeSystem, host_pattern, ADDRESS_FAMILY_UNSPECIFIED,
- flags, replacement, "", latency_ms);
+ Rule rule(Rule::kResolverTypeSystem,
+ host_pattern,
+ ADDRESS_FAMILY_UNSPECIFIED,
+ flags,
+ replacement,
+ std::string(),
+ latency_ms);
rules_.push_back(rule);
}
@@ -295,8 +305,13 @@ void RuleBasedHostResolverProc::AllowDirectLookup(
const std::string& host_pattern) {
HostResolverFlags flags = HOST_RESOLVER_LOOPBACK_ONLY |
HOST_RESOLVER_DEFAULT_FAMILY_SET_DUE_TO_NO_IPV6;
- Rule rule(Rule::kResolverTypeSystem, host_pattern, ADDRESS_FAMILY_UNSPECIFIED,
- flags, "", "", 0);
+ Rule rule(Rule::kResolverTypeSystem,
+ host_pattern,
+ ADDRESS_FAMILY_UNSPECIFIED,
+ flags,
+ std::string(),
+ std::string(),
+ 0);
rules_.push_back(rule);
}
@@ -304,8 +319,13 @@ void RuleBasedHostResolverProc::AddSimulatedFailure(
const std::string& host_pattern) {
HostResolverFlags flags = HOST_RESOLVER_LOOPBACK_ONLY |
HOST_RESOLVER_DEFAULT_FAMILY_SET_DUE_TO_NO_IPV6;
- Rule rule(Rule::kResolverTypeFail, host_pattern, ADDRESS_FAMILY_UNSPECIFIED,
- flags, "", "", 0);
+ Rule rule(Rule::kResolverTypeFail,
+ host_pattern,
+ ADDRESS_FAMILY_UNSPECIFIED,
+ flags,
+ std::string(),
+ std::string(),
+ 0);
rules_.push_back(rule);
}