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

Side by Side Diff: net/dns/dns_config_service.cc

Issue 14225015: [net/dns] Use only NullDnsSocketPool. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/dns/dns_config_service.h" 5 #include "net/dns/dns_config_service.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "net/base/ip_endpoint.h" 10 #include "net/base/ip_endpoint.h"
11 11
12 namespace net { 12 namespace net {
13 13
14 // Default values are taken from glibc resolv.h except timeout which is set to 14 // Default values are taken from glibc resolv.h except timeout which is set to
15 // |kDnsTimeoutSeconds|. 15 // |kDnsTimeoutSeconds|.
16 DnsConfig::DnsConfig() 16 DnsConfig::DnsConfig()
17 : append_to_multi_label_name(true), 17 : append_to_multi_label_name(true),
18 randomize_ports(true), 18 randomize_ports(false),
19 ndots(1), 19 ndots(1),
20 timeout(base::TimeDelta::FromSeconds(kDnsTimeoutSeconds)), 20 timeout(base::TimeDelta::FromSeconds(kDnsTimeoutSeconds)),
21 attempts(2), 21 attempts(2),
22 rotate(false), 22 rotate(false),
23 edns0(false) {} 23 edns0(false) {}
24 24
25 DnsConfig::~DnsConfig() {} 25 DnsConfig::~DnsConfig() {}
26 26
27 bool DnsConfig::Equals(const DnsConfig& d) const { 27 bool DnsConfig::Equals(const DnsConfig& d) const {
28 return EqualsIgnoreHosts(d) && (hosts == d.hosts); 28 return EqualsIgnoreHosts(d) && (hosts == d.hosts);
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 if (watch_failed_) { 217 if (watch_failed_) {
218 // If a watch failed, the config may not be accurate, so report empty. 218 // If a watch failed, the config may not be accurate, so report empty.
219 callback_.Run(DnsConfig()); 219 callback_.Run(DnsConfig());
220 } else { 220 } else {
221 callback_.Run(dns_config_); 221 callback_.Run(dns_config_);
222 } 222 }
223 } 223 }
224 224
225 } // namespace net 225 } // namespace net
226 226
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698