| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 bool Equals(const DnsConfig& d) const; | 71 bool Equals(const DnsConfig& d) const; |
| 72 | 72 |
| 73 bool EqualsIgnoreHosts(const DnsConfig& d) const; | 73 bool EqualsIgnoreHosts(const DnsConfig& d) const; |
| 74 | 74 |
| 75 void CopyIgnoreHosts(const DnsConfig& src); | 75 void CopyIgnoreHosts(const DnsConfig& src); |
| 76 | 76 |
| 77 // Returns a Value representation of |this|. Caller takes ownership of the | 77 // Returns a Value representation of |this|. Caller takes ownership of the |
| 78 // returned Value. For performance reasons, the Value only contains the | 78 // returned Value. For performance reasons, the Value only contains the |
| 79 // number of hosts rather than the full list. | 79 // number of hosts rather than the full list. |
| 80 base::Value* ToValue() const; | 80 scoped_ptr<base::Value> ToValue() const; |
| 81 | 81 |
| 82 bool IsValid() const { | 82 bool IsValid() const { |
| 83 return !nameservers.empty(); | 83 return !nameservers.empty(); |
| 84 } | 84 } |
| 85 | 85 |
| 86 // List of name server addresses. | 86 // List of name server addresses. |
| 87 std::vector<IPEndPoint> nameservers; | 87 std::vector<IPEndPoint> nameservers; |
| 88 // Suffix search list; used on first lookup when number of dots in given name | 88 // Suffix search list; used on first lookup when number of dots in given name |
| 89 // is less than |ndots|. | 89 // is less than |ndots|. |
| 90 std::vector<std::string> search; | 90 std::vector<std::string> search; |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 base::OneShotTimer<DnsConfigService> timer_; | 207 base::OneShotTimer<DnsConfigService> timer_; |
| 208 | 208 |
| 209 NameServerClassifier classifier_; | 209 NameServerClassifier classifier_; |
| 210 | 210 |
| 211 DISALLOW_COPY_AND_ASSIGN(DnsConfigService); | 211 DISALLOW_COPY_AND_ASSIGN(DnsConfigService); |
| 212 }; | 212 }; |
| 213 | 213 |
| 214 } // namespace net | 214 } // namespace net |
| 215 | 215 |
| 216 #endif // NET_DNS_DNS_CONFIG_SERVICE_H_ | 216 #endif // NET_DNS_DNS_CONFIG_SERVICE_H_ |
| OLD | NEW |