| 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 #ifndef NET_BASE_NETWORK_CHANGE_NOTIFIER_LINUX_H_ | 5 #ifndef NET_BASE_NETWORK_CHANGE_NOTIFIER_LINUX_H_ |
| 6 #define NET_BASE_NETWORK_CHANGE_NOTIFIER_LINUX_H_ | 6 #define NET_BASE_NETWORK_CHANGE_NOTIFIER_LINUX_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 static NetworkChangeNotifierLinux* Create(); | 23 static NetworkChangeNotifierLinux* Create(); |
| 24 | 24 |
| 25 // Unittests inject a mock bus. | 25 // Unittests inject a mock bus. |
| 26 static NetworkChangeNotifierLinux* CreateForTest(dbus::Bus* bus); | 26 static NetworkChangeNotifierLinux* CreateForTest(dbus::Bus* bus); |
| 27 | 27 |
| 28 private: | 28 private: |
| 29 class Thread; | 29 class Thread; |
| 30 | 30 |
| 31 explicit NetworkChangeNotifierLinux(dbus::Bus* bus); | 31 explicit NetworkChangeNotifierLinux(dbus::Bus* bus); |
| 32 virtual ~NetworkChangeNotifierLinux(); | 32 virtual ~NetworkChangeNotifierLinux(); |
| 33 static NetworkChangeCalculatorParams NetworkChangeCalculatorParamsLinux(); |
| 33 | 34 |
| 34 // NetworkChangeNotifier: | 35 // NetworkChangeNotifier: |
| 35 virtual ConnectionType GetCurrentConnectionType() const OVERRIDE; | 36 virtual ConnectionType GetCurrentConnectionType() const OVERRIDE; |
| 36 | 37 |
| 37 virtual const internal::AddressTrackerLinux* | 38 virtual const internal::AddressTrackerLinux* |
| 38 GetAddressTrackerInternal() const OVERRIDE; | 39 GetAddressTrackerInternal() const OVERRIDE; |
| 39 | 40 |
| 40 // The thread used to listen for notifications. This relays the notification | 41 // The thread used to listen for notifications. This relays the notification |
| 41 // to the registered observers without posting back to the thread the object | 42 // to the registered observers without posting back to the thread the object |
| 42 // was created on. | 43 // was created on. |
| 43 // Also used for DnsConfigService which requires TYPE_IO message loop. | 44 // Also used for DnsConfigService which requires TYPE_IO message loop. |
| 44 scoped_ptr<Thread> notifier_thread_; | 45 scoped_ptr<Thread> notifier_thread_; |
| 45 | 46 |
| 46 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierLinux); | 47 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierLinux); |
| 47 }; | 48 }; |
| 48 | 49 |
| 49 } // namespace net | 50 } // namespace net |
| 50 | 51 |
| 51 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_LINUX_H_ | 52 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_LINUX_H_ |
| OLD | NEW |