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_WIN_H_ | 5 #ifndef NET_BASE_NETWORK_CHANGE_NOTIFIER_WIN_H_ |
6 #define NET_BASE_NETWORK_CHANGE_NOTIFIER_WIN_H_ | 6 #define NET_BASE_NETWORK_CHANGE_NOTIFIER_WIN_H_ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 bool is_watching() { return is_watching_; } | 45 bool is_watching() { return is_watching_; } |
46 void set_is_watching(bool is_watching) { is_watching_ = is_watching; } | 46 void set_is_watching(bool is_watching) { is_watching_ = is_watching; } |
47 int sequential_failures() { return sequential_failures_; } | 47 int sequential_failures() { return sequential_failures_; } |
48 | 48 |
49 private: | 49 private: |
50 class DnsConfigServiceThread; | 50 class DnsConfigServiceThread; |
51 friend class NetworkChangeNotifierWinTest; | 51 friend class NetworkChangeNotifierWinTest; |
52 | 52 |
53 // NetworkChangeNotifier methods: | 53 // NetworkChangeNotifier methods: |
54 virtual ConnectionType GetCurrentConnectionType() const override; | 54 virtual ConnectionType GetCurrentConnectionType() const override; |
| 55 std::string GetCurrentWiFiSSID() const override; |
55 | 56 |
56 // ObjectWatcher::Delegate methods: | 57 // ObjectWatcher::Delegate methods: |
57 // Must only be called on the thread |this| was created on. | 58 // Must only be called on the thread |this| was created on. |
58 virtual void OnObjectSignaled(HANDLE object) override; | 59 virtual void OnObjectSignaled(HANDLE object) override; |
59 | 60 |
60 // Does the actual work to determine the current connection type. | 61 // Does the actual work to determine the current connection type. |
61 // It is not thread safe, see crbug.com/324913. | 62 // It is not thread safe, see crbug.com/324913. |
62 virtual ConnectionType RecomputeCurrentConnectionType() const; | 63 virtual ConnectionType RecomputeCurrentConnectionType() const; |
63 | 64 |
64 void SetCurrentConnectionType(ConnectionType connection_type); | 65 void SetCurrentConnectionType(ConnectionType connection_type); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 110 |
110 // Used for calling WatchForAddressChange again on failure. | 111 // Used for calling WatchForAddressChange again on failure. |
111 base::WeakPtrFactory<NetworkChangeNotifierWin> weak_factory_; | 112 base::WeakPtrFactory<NetworkChangeNotifierWin> weak_factory_; |
112 | 113 |
113 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierWin); | 114 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierWin); |
114 }; | 115 }; |
115 | 116 |
116 } // namespace net | 117 } // namespace net |
117 | 118 |
118 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_WIN_H_ | 119 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_WIN_H_ |
OLD | NEW |