1 // Copyright 2019 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef SERVICES_PROXY_RESOLVER_PROXY_HOST_RESOLVER_H_
6 #define SERVICES_PROXY_RESOLVER_PROXY_HOST_RESOLVER_H_
12 #include "net/base/completion_once_callback.h"
13 #include "net/base/ip_address.h"
14 #include "net/proxy_resolution/proxy_resolve_dns_operation.h"
17 class NetworkAnonymizationKey;
20 namespace proxy_resolver {
22 // Interface for a limited (compared to the standard HostResolver) host resolver
23 // used just for proxy resolution.
24 class ProxyHostResolver {
26 virtual ~ProxyHostResolver() {}
31 virtual int Start(net::CompletionOnceCallback callback) = 0;
32 virtual const std::vector<net::IPAddress>& GetResults() const = 0;
35 virtual std::unique_ptr<Request> CreateRequest(
36 const std::string& hostname,
37 net::ProxyResolveDnsOperation operation,
38 const net::NetworkAnonymizationKey& network_aonymization_key) = 0;
41 } // namespace proxy_resolver
43 #endif // SERVICES_PROXY_RESOLVER_PROXY_HOST_RESOLVER_H_