1// Copyright (c) 2010 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROME_COMMON_NET_RAW_HOST_RESOLVER_PROC_H_
6#define CHROME_COMMON_NET_RAW_HOST_RESOLVER_PROC_H_
7#pragma once
8
9// RawHostResolverProc will eventually be a getaddrinfo() replacement.  It
10// will construct and send DNS queries to the DNS server specified via
11// --dns-server flag and will parse the responses and put it into a cache
12// together with the TTL.  Necessary amendments will be made to cache and
13// HostResolverProc interface to accomodate these.
14
15#include <string>
16
17#include "net/base/host_resolver_proc.h"
18#include "net/base/net_util.h"
19
20namespace chrome_common_net {
21
22class RawHostResolverProc : public net::HostResolverProc {
23 public:
24  RawHostResolverProc(const net::IPAddressNumber& dns_server,
25                      net::HostResolverProc* previous);
26
27  virtual int Resolve(const std::string& host,
28                      net::AddressFamily address_family,
29                      net::HostResolverFlags host_resolver_flags,
30                      net::AddressList* addrlist,
31                      int* os_error);
32 private:
33  virtual ~RawHostResolverProc();
34
35  net::IPAddressNumber dns_server_;
36};
37
38}  // namespace chrome_common_net
39
40#endif  // CHROME_COMMON_NET_RAW_HOST_RESOLVER_PROC_H_
41