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 #include "net/base/network_config_watcher_mac.h" | 5 #include "net/base/network_config_watcher_mac.h" |
6 | 6 |
7 #include <SystemConfiguration/SCDynamicStoreKey.h> | 7 #include <SystemConfiguration/SCDynamicStoreKey.h> |
8 #include <SystemConfiguration/SCSchemaDefinitions.h> | 8 #include <SystemConfiguration/SCSchemaDefinitions.h> |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/thread.h" | 12 #include "base/threading/thread.h" |
13 #include "base/mac/scoped_cftyperef.h" | 13 #include "base/mac/scoped_cftyperef.h" |
14 | 14 |
15 namespace net { | 15 namespace net { |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 // Called back by OS. Calls OnNetworkConfigChange(). | 19 // Called back by OS. Calls OnNetworkConfigChange(). |
20 void DynamicStoreCallback(SCDynamicStoreRef /* store */, | 20 void DynamicStoreCallback(SCDynamicStoreRef /* store */, |
21 CFArrayRef changed_keys, | 21 CFArrayRef changed_keys, |
22 void* config_delegate) { | 22 void* config_delegate) { |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 // We create this notifier thread because the notification implementation | 104 // We create this notifier thread because the notification implementation |
105 // needs a thread with a CFRunLoop, and there's no guarantee that | 105 // needs a thread with a CFRunLoop, and there's no guarantee that |
106 // MessageLoop::current() meets that criterion. | 106 // MessageLoop::current() meets that criterion. |
107 base::Thread::Options thread_options(MessageLoop::TYPE_UI, 0); | 107 base::Thread::Options thread_options(MessageLoop::TYPE_UI, 0); |
108 notifier_thread_->StartWithOptions(thread_options); | 108 notifier_thread_->StartWithOptions(thread_options); |
109 } | 109 } |
110 | 110 |
111 NetworkConfigWatcherMac::~NetworkConfigWatcherMac() {} | 111 NetworkConfigWatcherMac::~NetworkConfigWatcherMac() {} |
112 | 112 |
113 } // namespace net | 113 } // namespace net |
OLD | NEW |