Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "net/dns/dns_config_service_win.h" | 5 #include "net/dns/dns_config_service_win.h" |
| 6 | 6 |
| 7 #include <iphlpapi.h> | 7 #include <iphlpapi.h> |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 233 // Should be called on WorkerPool. | 233 // Should be called on WorkerPool. |
| 234 dns_config_ = DnsConfig(); | 234 dns_config_ = DnsConfig(); |
| 235 if (!ReadIpHelper(&dns_config_)) | 235 if (!ReadIpHelper(&dns_config_)) |
| 236 return; // no point reading the rest | 236 return; // no point reading the rest |
| 237 | 237 |
| 238 // check global registry overrides | 238 // check global registry overrides |
| 239 if (!ReadSearchList(policy_watcher_, &dns_config_)) | 239 if (!ReadSearchList(policy_watcher_, &dns_config_)) |
| 240 ReadSearchList(tcpip_watcher_, &dns_config_); | 240 ReadSearchList(tcpip_watcher_, &dns_config_); |
| 241 | 241 |
| 242 // TODO(szym): add support for DNS suffix devolution BUG=99510 | 242 // TODO(szym): add support for DNS suffix devolution BUG=99510 |
| 243 // TODO(szym): read AppendToMultiLabelName to determine ndots BUG=109902 | |
|
mmenke
2012/01/19 17:24:47
Why remove this comment?
| |
| 243 } | 244 } |
| 244 | 245 |
| 245 void OnWorkFinished() OVERRIDE { | 246 void OnWorkFinished() OVERRIDE { |
| 246 DCHECK(loop()->BelongsToCurrentThread()); | 247 DCHECK(loop()->BelongsToCurrentThread()); |
| 247 DCHECK(!IsCancelled()); | 248 DCHECK(!IsCancelled()); |
| 248 if (dns_config_.IsValid()) { | 249 if (dns_config_.IsValid()) { |
| 249 service_->OnConfigRead(dns_config_); | 250 service_->OnConfigRead(dns_config_); |
| 250 } else { | 251 } else { |
| 251 LOG(WARNING) << "Failed to read name servers from registry"; | 252 LOG(WARNING) << "Failed to read name servers from registry"; |
| 252 } | 253 } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 284 hosts_watcher_->StartWatch(hosts_path, new DnsHostsReader(hosts_path, this)); | 285 hosts_watcher_->StartWatch(hosts_path, new DnsHostsReader(hosts_path, this)); |
| 285 } | 286 } |
| 286 | 287 |
| 287 // static | 288 // static |
| 288 DnsConfigService* DnsConfigService::CreateSystemService() { | 289 DnsConfigService* DnsConfigService::CreateSystemService() { |
| 289 return new DnsConfigServiceWin(); | 290 return new DnsConfigServiceWin(); |
| 290 } | 291 } |
| 291 | 292 |
| 292 } // namespace net | 293 } // namespace net |
| 293 | 294 |
| OLD | NEW |