| 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_POSIX_H_ | 5 #ifndef NET_DNS_DNS_CONFIG_SERVICE_POSIX_H_ |
| 6 #define NET_DNS_DNS_CONFIG_SERVICE_POSIX_H_ | 6 #define NET_DNS_DNS_CONFIG_SERVICE_POSIX_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <sys/types.h> | 9 #include <sys/types.h> |
| 10 #include <netinet/in.h> | 10 #include <netinet/in.h> |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 private: | 29 private: |
| 30 // NetworkChangeNotifier::DNSObserver: | 30 // NetworkChangeNotifier::DNSObserver: |
| 31 virtual void OnDNSChanged(unsigned detail) OVERRIDE; | 31 virtual void OnDNSChanged(unsigned detail) OVERRIDE; |
| 32 | 32 |
| 33 scoped_refptr<SerialWorker> config_reader_; | 33 scoped_refptr<SerialWorker> config_reader_; |
| 34 scoped_refptr<SerialWorker> hosts_reader_; | 34 scoped_refptr<SerialWorker> hosts_reader_; |
| 35 | 35 |
| 36 DISALLOW_COPY_AND_ASSIGN(DnsConfigServicePosix); | 36 DISALLOW_COPY_AND_ASSIGN(DnsConfigServicePosix); |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 enum ConfigParsePosixResult { |
| 40 CONFIG_PARSE_POSIX_OK = 0, |
| 41 CONFIG_PARSE_POSIX_RES_INIT_FAILED, |
| 42 CONFIG_PARSE_POSIX_RES_INIT_UNSET, |
| 43 CONFIG_PARSE_POSIX_BAD_ADDRESS, |
| 44 CONFIG_PARSE_POSIX_BAD_EXT_STRUCT, |
| 45 CONFIG_PARSE_POSIX_NULL_ADDRESS, |
| 46 CONFIG_PARSE_POSIX_NO_NAMESERVERS, |
| 47 CONFIG_PARSE_POSIX_MISSING_OPTIONS, |
| 48 CONFIG_PARSE_POSIX_UNHANDLED_OPTIONS, |
| 49 CONFIG_PARSE_POSIX_MAX // Bounding values for enumeration. |
| 50 }; |
| 51 |
| 39 // Fills in |dns_config| from |res|. | 52 // Fills in |dns_config| from |res|. |
| 40 bool NET_EXPORT_PRIVATE ConvertResStateToDnsConfig( | 53 ConfigParsePosixResult NET_EXPORT_PRIVATE ConvertResStateToDnsConfig( |
| 41 const struct __res_state& res, DnsConfig* dns_config); | 54 const struct __res_state& res, DnsConfig* dns_config); |
| 42 | 55 |
| 43 } // namespace internal | 56 } // namespace internal |
| 44 | 57 |
| 45 } // namespace net | 58 } // namespace net |
| 46 | 59 |
| 47 #endif // NET_DNS_DNS_CONFIG_SERVICE_POSIX_H_ | 60 #endif // NET_DNS_DNS_CONFIG_SERVICE_POSIX_H_ |
| OLD | NEW |