| 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_WIN_H_ | 5 #ifndef NET_DNS_DNS_CONFIG_SERVICE_WIN_H_ |
| 6 #define NET_DNS_DNS_CONFIG_SERVICE_WIN_H_ | 6 #define NET_DNS_DNS_CONFIG_SERVICE_WIN_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 // The sole purpose of dns_config_service_win.h is for unittests so we just | 9 // The sole purpose of dns_config_service_win.h is for unittests so we just |
| 10 // include these headers here. | 10 // include these headers here. |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 DevolutionSetting policy_devolution; | 94 DevolutionSetting policy_devolution; |
| 95 // SYSTEM\CurrentControlSet\Dnscache\Parameters | 95 // SYSTEM\CurrentControlSet\Dnscache\Parameters |
| 96 DevolutionSetting dnscache_devolution; | 96 DevolutionSetting dnscache_devolution; |
| 97 // SYSTEM\CurrentControlSet\Tcpip\Parameters | 97 // SYSTEM\CurrentControlSet\Tcpip\Parameters |
| 98 DevolutionSetting tcpip_devolution; | 98 DevolutionSetting tcpip_devolution; |
| 99 | 99 |
| 100 // SOFTWARE\Policies\Microsoft\Windows NT\DNSClient\AppendToMultiLabelName | 100 // SOFTWARE\Policies\Microsoft\Windows NT\DNSClient\AppendToMultiLabelName |
| 101 RegDword append_to_multi_label_name; | 101 RegDword append_to_multi_label_name; |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 enum ConfigParseWinResult { |
| 105 CONFIG_PARSE_WIN_OK = 0, |
| 106 CONFIG_PARSE_WIN_READ_IPHELPER, |
| 107 CONFIG_PARSE_WIN_READ_POLICY_SEARCHLIST, |
| 108 CONFIG_PARSE_WIN_READ_TCPIP_SEARCHLIST, |
| 109 CONFIG_PARSE_WIN_READ_DOMAIN, |
| 110 CONFIG_PARSE_WIN_READ_POLICY_DEVOLUTION, |
| 111 CONFIG_PARSE_WIN_READ_DNSCACHE_DEVOLUTION, |
| 112 CONFIG_PARSE_WIN_READ_TCPIP_DEVOLUTION, |
| 113 CONFIG_PARSE_WIN_READ_APPEND_MULTILABEL, |
| 114 CONFIG_PARSE_WIN_READ_PRIMARY_SUFFIX, |
| 115 CONFIG_PARSE_WIN_BAD_ADDRESS, |
| 116 CONFIG_PARSE_WIN_NO_NAMESERVERS, |
| 117 CONFIG_PARSE_WIN_MAX // Bounding values for enumeration. |
| 118 }; |
| 119 |
| 104 // Fills in |dns_config| from |settings|. Exposed for tests. | 120 // Fills in |dns_config| from |settings|. Exposed for tests. |
| 105 bool NET_EXPORT_PRIVATE ConvertSettingsToDnsConfig( | 121 ConfigParseWinResult NET_EXPORT_PRIVATE ConvertSettingsToDnsConfig( |
| 106 const DnsSystemSettings& settings, | 122 const DnsSystemSettings& settings, |
| 107 DnsConfig* dns_config); | 123 DnsConfig* dns_config); |
| 108 | 124 |
| 109 // Use DnsConfigService::CreateSystemService to use it outside of tests. | 125 // Use DnsConfigService::CreateSystemService to use it outside of tests. |
| 110 class NET_EXPORT_PRIVATE DnsConfigServiceWin | 126 class NET_EXPORT_PRIVATE DnsConfigServiceWin |
| 111 : public DnsConfigService, | 127 : public DnsConfigService, |
| 112 public NetworkChangeNotifier::IPAddressObserver { | 128 public NetworkChangeNotifier::IPAddressObserver { |
| 113 public: | 129 public: |
| 114 DnsConfigServiceWin(); | 130 DnsConfigServiceWin(); |
| 115 virtual ~DnsConfigServiceWin(); | 131 virtual ~DnsConfigServiceWin(); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 131 | 147 |
| 132 DISALLOW_COPY_AND_ASSIGN(DnsConfigServiceWin); | 148 DISALLOW_COPY_AND_ASSIGN(DnsConfigServiceWin); |
| 133 }; | 149 }; |
| 134 | 150 |
| 135 } // namespace internal | 151 } // namespace internal |
| 136 | 152 |
| 137 } // namespace net | 153 } // namespace net |
| 138 | 154 |
| 139 #endif // NET_DNS_DNS_CONFIG_SERVICE_WIN_H_ | 155 #endif // NET_DNS_DNS_CONFIG_SERVICE_WIN_H_ |
| 140 | 156 |
| OLD | NEW |