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 <string> |
| 9 |
8 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
11 #include "net/base/net_export.h" | 13 #include "net/base/net_export.h" |
12 #include "net/base/network_change_notifier.h" | 14 #include "net/base/network_change_notifier.h" |
13 | 15 |
14 namespace net { | 16 namespace net { |
15 | 17 |
16 class NET_EXPORT_PRIVATE NetworkChangeNotifierLinux | 18 class NET_EXPORT_PRIVATE NetworkChangeNotifierLinux |
17 : public NetworkChangeNotifier { | 19 : public NetworkChangeNotifier { |
18 public: | 20 public: |
19 static NetworkChangeNotifierLinux* Create(); | 21 static NetworkChangeNotifierLinux* Create(); |
20 | 22 |
21 private: | 23 private: |
22 class Thread; | 24 class Thread; |
23 | 25 |
24 NetworkChangeNotifierLinux(); | 26 NetworkChangeNotifierLinux(); |
25 ~NetworkChangeNotifierLinux() override; | 27 ~NetworkChangeNotifierLinux() override; |
26 static NetworkChangeCalculatorParams NetworkChangeCalculatorParamsLinux(); | 28 static NetworkChangeCalculatorParams NetworkChangeCalculatorParamsLinux(); |
27 | 29 |
28 // NetworkChangeNotifier: | 30 // NetworkChangeNotifier: |
29 ConnectionType GetCurrentConnectionType() const override; | 31 ConnectionType GetCurrentConnectionType() const override; |
| 32 std::string GetCurrentWiFiSSID() const override; |
30 | 33 |
31 const internal::AddressTrackerLinux* GetAddressTrackerInternal() | 34 const internal::AddressTrackerLinux* GetAddressTrackerInternal() |
32 const override; | 35 const override; |
33 | 36 |
34 // The thread used to listen for notifications. This relays the notification | 37 // The thread used to listen for notifications. This relays the notification |
35 // to the registered observers without posting back to the thread the object | 38 // to the registered observers without posting back to the thread the object |
36 // was created on. | 39 // was created on. |
37 // Also used for DnsConfigService which requires TYPE_IO message loop. | 40 // Also used for DnsConfigService which requires TYPE_IO message loop. |
38 scoped_ptr<Thread> notifier_thread_; | 41 scoped_ptr<Thread> notifier_thread_; |
39 | 42 |
40 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierLinux); | 43 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierLinux); |
41 }; | 44 }; |
42 | 45 |
43 } // namespace net | 46 } // namespace net |
44 | 47 |
45 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_LINUX_H_ | 48 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_LINUX_H_ |
OLD | NEW |