Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(648)

Side by Side Diff: net/dns/dns_config_service_win.cc

Issue 11415066: FilePathWatcher::Watch() - Listen for sub directory changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added more test cases Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/dns/dns_config_service_posix.cc ('k') | remoting/host/config_file_watcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/dns/dns_config_service_posix.cc ('k') | remoting/host/config_file_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698