OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_BASE_NETWORK_CONFIG_WATCHER_MAC_H_ | 5 #ifndef NET_BASE_NETWORK_CONFIG_WATCHER_MAC_H_ |
6 #define NET_BASE_NETWORK_CONFIG_WATCHER_MAC_H_ | 6 #define NET_BASE_NETWORK_CONFIG_WATCHER_MAC_H_ |
7 | 7 |
8 #include <SystemConfiguration/SCDynamicStore.h> | 8 #include <SystemConfiguration/SCDynamicStore.h> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
12 #include "base/scoped_cftyperef.h" | 12 #include "base/mac/scoped_cftyperef.h" |
13 #include "base/scoped_ptr.h" | 13 #include "base/scoped_ptr.h" |
14 | 14 |
15 namespace base { | 15 namespace base { |
16 class Thread; | 16 class Thread; |
17 } | 17 } |
18 | 18 |
19 namespace net { | 19 namespace net { |
20 | 20 |
21 // Base class for watching the Mac OS system network settings. | 21 // Base class for watching the Mac OS system network settings. |
22 class NetworkConfigWatcherMac : public MessageLoop::DestructionObserver { | 22 class NetworkConfigWatcherMac : public MessageLoop::DestructionObserver { |
(...skipping 25 matching lines...) Expand all Loading... |
48 // implementation. The SystemConfiguration calls in this function can lead to | 48 // implementation. The SystemConfiguration calls in this function can lead to |
49 // contention early on, so we invoke this function later on in startup to keep | 49 // contention early on, so we invoke this function later on in startup to keep |
50 // it fast. | 50 // it fast. |
51 void Init(); | 51 void Init(); |
52 | 52 |
53 // The thread used to listen for notifications. This relays the notification | 53 // The thread used to listen for notifications. This relays the notification |
54 // to the registered observers without posting back to the thread the object | 54 // to the registered observers without posting back to the thread the object |
55 // was created on. | 55 // was created on. |
56 scoped_ptr<base::Thread> notifier_thread_; | 56 scoped_ptr<base::Thread> notifier_thread_; |
57 | 57 |
58 scoped_cftyperef<CFRunLoopSourceRef> run_loop_source_; | 58 base::mac::ScopedCFTypeRef<CFRunLoopSourceRef> run_loop_source_; |
59 | 59 |
60 Delegate* const delegate_; | 60 Delegate* const delegate_; |
61 | 61 |
62 DISALLOW_COPY_AND_ASSIGN(NetworkConfigWatcherMac); | 62 DISALLOW_COPY_AND_ASSIGN(NetworkConfigWatcherMac); |
63 }; | 63 }; |
64 | 64 |
65 } // namespace net | 65 } // namespace net |
66 | 66 |
67 #endif // NET_BASE_NETWORK_CONFIG_WATCHER_MAC_H_ | 67 #endif // NET_BASE_NETWORK_CONFIG_WATCHER_MAC_H_ |
OLD | NEW |