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

Unified Diff: chrome/common/net/raw_host_resolver_proc.h

Issue 4216001: Initial support for built-in DNS resolver/cache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add missing files Created 10 years, 2 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
Index: chrome/common/net/raw_host_resolver_proc.h
diff --git a/chrome/common/net/raw_host_resolver_proc.h b/chrome/common/net/raw_host_resolver_proc.h
new file mode 100644
index 0000000000000000000000000000000000000000..7ec751a7569c67de97b831041e09025026fa89e3
--- /dev/null
+++ b/chrome/common/net/raw_host_resolver_proc.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_COMMON_NET_RAW_HOST_RESOLVER_PROC_H_
+#define CHROME_COMMON_NET_RAW_HOST_RESOLVER_PROC_H_
+#pragma once
+
+// RawHostResolverProc will eventually be a getaddrinfo() replacement. It
+// will construct and send DNS queries to the DNS server specified via
+// --dns-server flag and will parse the responses and put it into a cache
+// together with the TTL. Necessary amendments will be made to cache and
+// HostResolverProc interface to accomodate these.
+
+#include <string>
+
+#include "net/base/host_resolver_proc.h"
+#include "net/base/net_util.h"
+
+namespace chrome_common_net {
+
+class RawHostResolverProc : public net::HostResolverProc {
+ public:
+ RawHostResolverProc(const net::IPAddressNumber& dns_server,
+ net::HostResolverProc* previous);
+
+ virtual int Resolve(const std::string& host,
+ net::AddressFamily address_family,
+ net::HostResolverFlags host_resolver_flags,
+ net::AddressList* addrlist,
+ int* os_error);
+ private:
+ virtual ~RawHostResolverProc();
+
+ net::IPAddressNumber dns_server_;
+};
+
+} // namespace chrome_common_net
+
+#endif // CHROME_COMMON_NET_RAW_HOST_RESOLVER_PROC_H_

Powered by Google App Engine
This is Rietveld 408576698