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

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

Issue 9190031: DnsClient refactoring + features (timeout, suffix search, server rotation). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added unit tests. Depends on CL 9251019 Created 8 years, 11 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef NET_DNS_DNS_CONFIG_SERVICE_H_ 5 #ifndef NET_DNS_DNS_CONFIG_SERVICE_H_
6 #define NET_DNS_DNS_CONFIG_SERVICE_H_ 6 #define NET_DNS_DNS_CONFIG_SERVICE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 26 matching lines...) Expand all
37 37
38 // List of name server addresses. 38 // List of name server addresses.
39 std::vector<IPEndPoint> nameservers; 39 std::vector<IPEndPoint> nameservers;
40 // Suffix search list; used on first lookup when number of dots in given name 40 // Suffix search list; used on first lookup when number of dots in given name
41 // is less than |ndots|. 41 // is less than |ndots|.
42 std::vector<std::string> search; 42 std::vector<std::string> search;
43 43
44 DnsHosts hosts; 44 DnsHosts hosts;
45 45
46 // Resolver options; see man resolv.conf. 46 // Resolver options; see man resolv.conf.
47 // TODO(szym): use |ndots| and |search| to determine the sequence of FQDNs
48 // to query given a specific name.
49 // TODO(szym): implement DNS Devolution for windows 47 // TODO(szym): implement DNS Devolution for windows
50 48
51 // Minimum number of dots before global resolution precedes |search|. 49 // Minimum number of dots before global resolution precedes |search|.
52 int ndots; 50 int ndots;
53 // Time between retransmissions, see res_state.retrans. 51 // Time between retransmissions, see res_state.retrans.
54 base::TimeDelta timeout; 52 base::TimeDelta timeout;
55 // Maximum number of retries, see res_state.retry. 53 // Maximum number of attempts, see res_state.retry.
56 int attempts; 54 int attempts;
57 // Round robin entries in |nameservers| for subsequent requests. 55 // Round robin entries in |nameservers| for subsequent requests.
58 bool rotate; 56 bool rotate;
59 // Enable EDNS0 extensions. 57 // Enable EDNS0 extensions.
60 bool edns0; 58 bool edns0;
61 }; 59 };
62 60
63 61
64 // Service for watching when the system DNS settings have changed. 62 // Service for watching when the system DNS settings have changed.
65 // Depending on the platform, watches files in /etc/ or win registry. 63 // Depending on the platform, watches files in /etc/ or win registry.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // Written in DoRead, read in OnReadFinished, no locking necessary. 127 // Written in DoRead, read in OnReadFinished, no locking necessary.
130 DnsHosts dns_hosts_; 128 DnsHosts dns_hosts_;
131 bool success_; 129 bool success_;
132 130
133 DISALLOW_COPY_AND_ASSIGN(DnsHostsReader); 131 DISALLOW_COPY_AND_ASSIGN(DnsHostsReader);
134 }; 132 };
135 133
136 } // namespace net 134 } // namespace net
137 135
138 #endif // NET_DNS_DNS_CONFIG_SERVICE_H_ 136 #endif // NET_DNS_DNS_CONFIG_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698