| 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_H_ | 5 #ifndef NET_BASE_NETWORK_CHANGE_NOTIFIER_H_ |
| 6 #define NET_BASE_NETWORK_CHANGE_NOTIFIER_H_ | 6 #define NET_BASE_NETWORK_CHANGE_NOTIFIER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 virtual ~MaxBandwidthObserver() {} | 204 virtual ~MaxBandwidthObserver() {} |
| 205 | 205 |
| 206 private: | 206 private: |
| 207 DISALLOW_COPY_AND_ASSIGN(MaxBandwidthObserver); | 207 DISALLOW_COPY_AND_ASSIGN(MaxBandwidthObserver); |
| 208 }; | 208 }; |
| 209 | 209 |
| 210 // Opaque handle for device-wide connection to a particular network. For | 210 // Opaque handle for device-wide connection to a particular network. For |
| 211 // example an association with a particular WiFi network with a particular | 211 // example an association with a particular WiFi network with a particular |
| 212 // SSID or a connection to particular cellular network. | 212 // SSID or a connection to particular cellular network. |
| 213 // The meaning of this handle is target-dependent. On Android NetworkHandles | 213 // The meaning of this handle is target-dependent. On Android NetworkHandles |
| 214 // are equivalent to the framework's concept of NetIDs (e.g. Network.netId). | 214 // are equivalent to: |
| 215 typedef int32_t NetworkHandle; | 215 // On Lollipop, the framework's concept of NetIDs (e.g. Network.netId), and |
| 216 // On Marshmallow and newer releases, network handles |
| 217 // (e.g. Network.getNetworkHandle()). |
| 218 typedef int64_t NetworkHandle; |
| 216 | 219 |
| 217 // A list of networks. | 220 // A list of networks. |
| 218 typedef std::vector<NetworkHandle> NetworkList; | 221 typedef std::vector<NetworkHandle> NetworkList; |
| 219 | 222 |
| 220 // An interface that when implemented and added via AddNeworkObserver(), | 223 // An interface that when implemented and added via AddNeworkObserver(), |
| 221 // provides notifications when networks come and go. | 224 // provides notifications when networks come and go. |
| 222 // Only implemented for Android (Lollipop and newer), no callbacks issued when | 225 // Only implemented for Android (Lollipop and newer), no callbacks issued when |
| 223 // unimplemented. | 226 // unimplemented. |
| 224 class NET_EXPORT NetworkObserver { | 227 class NET_EXPORT NetworkObserver { |
| 225 public: | 228 public: |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 | 575 |
| 573 // Set true to disable non-test notifications (to prevent flakes in tests). | 576 // Set true to disable non-test notifications (to prevent flakes in tests). |
| 574 static bool test_notifications_only_; | 577 static bool test_notifications_only_; |
| 575 | 578 |
| 576 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifier); | 579 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifier); |
| 577 }; | 580 }; |
| 578 | 581 |
| 579 } // namespace net | 582 } // namespace net |
| 580 | 583 |
| 581 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_H_ | 584 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_H_ |
| OLD | NEW |