| 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 12 matching lines...) Expand all Loading... |
| 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 class IPAddress; | 31 class IPAddress; |
| 32 | 32 |
| 33 // Always use 1 second timeout (followed by binary exponential backoff). | 33 // Default to 1 second timeout (before exponential backoff). |
| 34 // TODO(szym): Remove code which reads timeout from system. | 34 const int64_t kDnsDefaultTimeoutMs = 1000; |
| 35 const unsigned kDnsTimeoutSeconds = 1; | |
| 36 | 35 |
| 37 // Classifies nameserver address lists for histograms. | 36 // Classifies nameserver address lists for histograms. |
| 38 class NET_EXPORT_PRIVATE NameServerClassifier { | 37 class NET_EXPORT_PRIVATE NameServerClassifier { |
| 39 public: | 38 public: |
| 40 // This is used in a histogram (AsyncDNS.NameServersType); add new entries | 39 // This is used in a histogram (AsyncDNS.NameServersType); add new entries |
| 41 // right before MAX_VALUE. | 40 // right before MAX_VALUE. |
| 42 enum NameServersType { | 41 enum NameServersType { |
| 43 NAME_SERVERS_TYPE_NONE, | 42 NAME_SERVERS_TYPE_NONE, |
| 44 NAME_SERVERS_TYPE_GOOGLE_PUBLIC_DNS, | 43 NAME_SERVERS_TYPE_GOOGLE_PUBLIC_DNS, |
| 45 NAME_SERVERS_TYPE_PRIVATE, | 44 NAME_SERVERS_TYPE_PRIVATE, |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 base::OneShotTimer timer_; | 208 base::OneShotTimer timer_; |
| 210 | 209 |
| 211 NameServerClassifier classifier_; | 210 NameServerClassifier classifier_; |
| 212 | 211 |
| 213 DISALLOW_COPY_AND_ASSIGN(DnsConfigService); | 212 DISALLOW_COPY_AND_ASSIGN(DnsConfigService); |
| 214 }; | 213 }; |
| 215 | 214 |
| 216 } // namespace net | 215 } // namespace net |
| 217 | 216 |
| 218 #endif // NET_DNS_DNS_CONFIG_SERVICE_H_ | 217 #endif // NET_DNS_DNS_CONFIG_SERVICE_H_ |
| OLD | NEW |