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

Unified Diff: net/dns/dns_config_service.cc

Issue 7518028: DnsConfigService and a posix implementation (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Deflaked test. Addressed memory leaks and comments. Created 9 years, 4 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: net/dns/dns_config_service.cc
diff --git a/net/dns/dns_config_service.cc b/net/dns/dns_config_service.cc
new file mode 100644
index 0000000000000000000000000000000000000000..05a5513cfb499575d7f2143a61af5970bccf96c2
--- /dev/null
+++ b/net/dns/dns_config_service.cc
@@ -0,0 +1,29 @@
+// Copyright (c) 2011 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.
+
+#include "net/dns/dns_config_service.h"
+
+#include "net/base/ip_endpoint.h"
+
+namespace net {
+
+// Default values are taken from glibc resolv.h.
+DnsConfig::DnsConfig()
+ : ndots(1),
+ timeout(base::TimeDelta::FromSeconds(5)),
+ attempts(2),
+ rotate(false),
+ edns0(false) {}
+
+bool DnsConfig::Equals(const DnsConfig& d) const {
+ return (nameservers == d.nameservers) &&
+ (search == d.search) &&
+ (ndots == d.ndots) &&
+ (timeout == d.timeout) &&
+ (attempts == d.attempts) &&
+ (rotate == d.rotate) &&
+ (edns0 == d.edns0);
+}
+
+} // namespace net

Powered by Google App Engine
This is Rietveld 408576698