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 #include "net/dns/dns_config_service_win.h" | 5 #include "net/dns/dns_config_service_win.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 | 522 |
523 // DNS suffix search list and devolution can be configured via group | 523 // DNS suffix search list and devolution can be configured via group |
524 // policy which sets this registry key. If the key is missing, the policy | 524 // policy which sets this registry key. If the key is missing, the policy |
525 // does not apply, and the DNS client uses Tcpip and Dnscache settings. | 525 // does not apply, and the DNS client uses Tcpip and Dnscache settings. |
526 // If a policy is installed, DnsConfigService will need to be restarted. | 526 // If a policy is installed, DnsConfigService will need to be restarted. |
527 // BUG=99509 | 527 // BUG=99509 |
528 | 528 |
529 dnscache_watcher_.Watch(kDnscachePath, callback); | 529 dnscache_watcher_.Watch(kDnscachePath, callback); |
530 policy_watcher_.Watch(kPolicyPath, callback); | 530 policy_watcher_.Watch(kPolicyPath, callback); |
531 | 531 |
532 if (!hosts_watcher_.Watch(GetHostsPath(), | 532 if (!hosts_watcher_.Watch(GetHostsPath(), false, |
533 base::Bind(&Watcher::OnHostsChanged, | 533 base::Bind(&Watcher::OnHostsChanged, |
534 base::Unretained(this)))) { | 534 base::Unretained(this)))) { |
535 LOG(ERROR) << "DNS hosts watch failed to start."; | 535 LOG(ERROR) << "DNS hosts watch failed to start."; |
536 success = false; | 536 success = false; |
537 } else { | 537 } else { |
538 // Also need to observe changes to local non-loopback IP for DnsHosts. | 538 // Also need to observe changes to local non-loopback IP for DnsHosts. |
539 NetworkChangeNotifier::AddIPAddressObserver(this); | 539 NetworkChangeNotifier::AddIPAddressObserver(this); |
540 } | 540 } |
541 return success; | 541 return success; |
542 } | 542 } |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 } | 696 } |
697 | 697 |
698 } // namespace internal | 698 } // namespace internal |
699 | 699 |
700 // static | 700 // static |
701 scoped_ptr<DnsConfigService> DnsConfigService::CreateSystemService() { | 701 scoped_ptr<DnsConfigService> DnsConfigService::CreateSystemService() { |
702 return scoped_ptr<DnsConfigService>(new internal::DnsConfigServiceWin()); | 702 return scoped_ptr<DnsConfigService>(new internal::DnsConfigServiceWin()); |
703 } | 703 } |
704 | 704 |
705 } // namespace net | 705 } // namespace net |
706 | |
OLD | NEW |