Commit 88662d49 authored by Eric Orth's avatar Eric Orth Committed by Commit Bot

Remove legacy cache-only from HostResolver fuzzer

Cache-only is now selected through |source|, and the fuzzer already
supports fuzzing that to the LOCAL_ONLY value.

Bug: 922699
Change-Id: Ie5660de4d67e801426f8ec73c10e7e255bd06465
Reviewed-on: https://chromium-review.googlesource.com/c/1459783
Auto-Submit: Eric Orth <ericorth@chromium.org>
Reviewed-by: default avatarAsanka Herath <asanka@chromium.org>
Commit-Queue: Eric Orth <ericorth@chromium.org>
Cr-Commit-Position: refs/heads/master@{#631802}
parent 7fc1f1d4
......@@ -27,11 +27,6 @@ namespace {
const char* kHostNames[] = {"foo", "foo.com", "a.foo.com",
"bar", "localhost", "localhost6"};
net::AddressFamily kAddressFamilies[] = {
net::ADDRESS_FAMILY_UNSPECIFIED, net::ADDRESS_FAMILY_IPV4,
net::ADDRESS_FAMILY_IPV6,
};
class DnsRequest {
public:
DnsRequest(net::HostResolver* host_resolver,
......@@ -133,19 +128,6 @@ class DnsRequest {
// Starts the DNS request, using a fuzzed set of parameters.
int Start() {
// Cache-only resolve still uses old HostResolver API.
if (data_provider_->ConsumeBool()) {
const char* hostname = data_provider_->PickValueInArray(kHostNames);
net::HostResolver::RequestInfo info(net::HostPortPair(hostname, 80));
info.set_address_family(
data_provider_->PickValueInArray(kAddressFamilies));
if (data_provider_->ConsumeBool())
info.set_host_resolver_flags(net::HOST_RESOLVER_CANONNAME);
return host_resolver_->ResolveFromCache(info, &address_list_,
net::NetLogWithSource());
}
net::HostResolver::ResolveHostParameters parameters;
parameters.dns_query_type =
data_provider_->PickValueInArray(net::kDnsQueryTypes);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment