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

Side by Side Diff: net/dns/dns_config_watcher.h

Issue 10873018: [net] Move DnsConfigService to NetworkChangeNotifier. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add comment Created 8 years, 3 months 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_win.cc ('k') | net/dns/dns_config_watcher_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef NET_DNS_DNS_CONFIG_WATCHER_H_
6 #define NET_DNS_DNS_CONFIG_WATCHER_H_
7
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
10
11 namespace net {
12 namespace internal {
13
14 // Watches when the system DNS settings have changed. It is used by
15 // NetworkChangeNotifier to provide signals to registered DNSObservers.
16 // Depending on the platform, watches files, Windows registry, or libnotify key.
17 // If some watches fail, we keep the working parts, but NetworkChangeNotifier
18 // will mark notifications to DNSObserver with the CHANGE_DNS_WATCH_FAILED bit.
19 class DnsConfigWatcher {
20 public:
21 DnsConfigWatcher();
22 ~DnsConfigWatcher();
23
24 // Starts watching system configuration for changes. The current thread must
25 // have a MessageLoopForIO. The signals will be delivered directly to
26 // the global NetworkChangeNotifier.
27 void Init();
28
29 // Must be called on the same thread as Init. Required if dtor will be called
30 // on a different thread.
31 void CleanUp();
32
33 private:
34 // Platform-specific implementation.
35 class Core;
36 scoped_ptr<Core> core_;
37
38 DISALLOW_COPY_AND_ASSIGN(DnsConfigWatcher);
39 };
40
41 } // namespace internal
42 } // namespace net
43
44 #endif // NET_DNS_DNS_CONFIG_WATCHER_H_
OLDNEW
« no previous file with comments | « net/dns/dns_config_service_win.cc ('k') | net/dns/dns_config_watcher_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698