OLD | NEW |
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 #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 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "net/base/network_change_notifier.h" | 21 #include "net/base/network_change_notifier.h" |
22 #include "net/base/net_export.h" | 22 #include "net/base/net_export.h" |
23 #include "net/dns/dns_hosts.h" | 23 #include "net/dns/dns_hosts.h" |
24 | 24 |
25 namespace base { | 25 namespace base { |
26 class Value; | 26 class Value; |
27 } | 27 } |
28 | 28 |
29 namespace net { | 29 namespace net { |
30 | 30 |
| 31 // Always use 1 second timeout (followed by binary exponential backoff). |
| 32 // TODO(szym): Remove code which reads timeout from system. |
| 33 const unsigned kDnsTimeoutSeconds = 1; |
| 34 |
31 // DnsConfig stores configuration of the system resolver. | 35 // DnsConfig stores configuration of the system resolver. |
32 struct NET_EXPORT_PRIVATE DnsConfig { | 36 struct NET_EXPORT_PRIVATE DnsConfig { |
33 DnsConfig(); | 37 DnsConfig(); |
34 virtual ~DnsConfig(); | 38 virtual ~DnsConfig(); |
35 | 39 |
36 bool Equals(const DnsConfig& d) const; | 40 bool Equals(const DnsConfig& d) const; |
37 | 41 |
38 bool EqualsIgnoreHosts(const DnsConfig& d) const; | 42 bool EqualsIgnoreHosts(const DnsConfig& d) const; |
39 | 43 |
40 void CopyIgnoreHosts(const DnsConfig& src); | 44 void CopyIgnoreHosts(const DnsConfig& src); |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 148 |
145 // Started in Invalidate*, cleared in On*Read. | 149 // Started in Invalidate*, cleared in On*Read. |
146 base::OneShotTimer<DnsConfigService> timer_; | 150 base::OneShotTimer<DnsConfigService> timer_; |
147 | 151 |
148 DISALLOW_COPY_AND_ASSIGN(DnsConfigService); | 152 DISALLOW_COPY_AND_ASSIGN(DnsConfigService); |
149 }; | 153 }; |
150 | 154 |
151 } // namespace net | 155 } // namespace net |
152 | 156 |
153 #endif // NET_DNS_DNS_CONFIG_SERVICE_H_ | 157 #endif // NET_DNS_DNS_CONFIG_SERVICE_H_ |
OLD | NEW |