| 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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 static void RemoveConnectionTypeObserver(ConnectionTypeObserver* observer); | 392 static void RemoveConnectionTypeObserver(ConnectionTypeObserver* observer); |
| 393 static void RemoveDNSObserver(DNSObserver* observer); | 393 static void RemoveDNSObserver(DNSObserver* observer); |
| 394 static void RemoveNetworkChangeObserver(NetworkChangeObserver* observer); | 394 static void RemoveNetworkChangeObserver(NetworkChangeObserver* observer); |
| 395 static void RemoveMaxBandwidthObserver(MaxBandwidthObserver* observer); | 395 static void RemoveMaxBandwidthObserver(MaxBandwidthObserver* observer); |
| 396 static void RemoveNetworkObserver(NetworkObserver* observer); | 396 static void RemoveNetworkObserver(NetworkObserver* observer); |
| 397 | 397 |
| 398 // Allow unit tests to trigger notifications. | 398 // Allow unit tests to trigger notifications. |
| 399 static void NotifyObserversOfIPAddressChangeForTests(); | 399 static void NotifyObserversOfIPAddressChangeForTests(); |
| 400 static void NotifyObserversOfConnectionTypeChangeForTests( | 400 static void NotifyObserversOfConnectionTypeChangeForTests( |
| 401 ConnectionType type); | 401 ConnectionType type); |
| 402 static void NotifyObserversOfDNSChangeForTests(); |
| 402 static void NotifyObserversOfNetworkChangeForTests(ConnectionType type); | 403 static void NotifyObserversOfNetworkChangeForTests(ConnectionType type); |
| 403 static void NotifyObserversOfInitialDNSConfigReadForTests(); | 404 static void NotifyObserversOfInitialDNSConfigReadForTests(); |
| 404 static void NotifyObserversOfMaxBandwidthChangeForTests( | 405 static void NotifyObserversOfMaxBandwidthChangeForTests( |
| 405 double max_bandwidth_mbps, | 406 double max_bandwidth_mbps, |
| 406 ConnectionType type); | 407 ConnectionType type); |
| 407 | 408 |
| 408 // Enable or disable notifications from the host. After setting to true, be | 409 // Enable or disable notifications from the host. After setting to true, be |
| 409 // sure to pump the RunLoop until idle to finish any preexisting | 410 // sure to pump the RunLoop until idle to finish any preexisting |
| 410 // notifications. To use this, it must must be called before a | 411 // notifications. To use this, it must must be called before a |
| 411 // NetworkChangeNotifier is created. | 412 // NetworkChangeNotifier is created. |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 | 581 |
| 581 // Set true to disable non-test notifications (to prevent flakes in tests). | 582 // Set true to disable non-test notifications (to prevent flakes in tests). |
| 582 static bool test_notifications_only_; | 583 static bool test_notifications_only_; |
| 583 | 584 |
| 584 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifier); | 585 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifier); |
| 585 }; | 586 }; |
| 586 | 587 |
| 587 } // namespace net | 588 } // namespace net |
| 588 | 589 |
| 589 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_H_ | 590 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_H_ |
| OLD | NEW |