| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 class NetworkState; | 423 class NetworkState; |
| 424 class NetworkChangeCalculator; | 424 class NetworkChangeCalculator; |
| 425 | 425 |
| 426 void NotifyObserversOfIPAddressChangeImpl(); | 426 void NotifyObserversOfIPAddressChangeImpl(); |
| 427 void NotifyObserversOfConnectionTypeChangeImpl(ConnectionType type); | 427 void NotifyObserversOfConnectionTypeChangeImpl(ConnectionType type); |
| 428 void NotifyObserversOfDNSChangeImpl(); | 428 void NotifyObserversOfDNSChangeImpl(); |
| 429 void NotifyObserversOfInitialDNSConfigReadImpl(); | 429 void NotifyObserversOfInitialDNSConfigReadImpl(); |
| 430 void NotifyObserversOfNetworkChangeImpl(ConnectionType type); | 430 void NotifyObserversOfNetworkChangeImpl(ConnectionType type); |
| 431 void NotifyObserversOfMaxBandwidthChangeImpl(double max_bandwidth_mbps); | 431 void NotifyObserversOfMaxBandwidthChangeImpl(double max_bandwidth_mbps); |
| 432 | 432 |
| 433 const scoped_refptr<ObserverListThreadSafe<IPAddressObserver>> | 433 const scoped_refptr<base::ObserverListThreadSafe<IPAddressObserver>> |
| 434 ip_address_observer_list_; | 434 ip_address_observer_list_; |
| 435 const scoped_refptr<ObserverListThreadSafe<ConnectionTypeObserver>> | 435 const scoped_refptr<base::ObserverListThreadSafe<ConnectionTypeObserver>> |
| 436 connection_type_observer_list_; | 436 connection_type_observer_list_; |
| 437 const scoped_refptr<ObserverListThreadSafe<DNSObserver>> | 437 const scoped_refptr<base::ObserverListThreadSafe<DNSObserver>> |
| 438 resolver_state_observer_list_; | 438 resolver_state_observer_list_; |
| 439 const scoped_refptr<ObserverListThreadSafe<NetworkChangeObserver>> | 439 const scoped_refptr<base::ObserverListThreadSafe<NetworkChangeObserver>> |
| 440 network_change_observer_list_; | 440 network_change_observer_list_; |
| 441 const scoped_refptr<ObserverListThreadSafe<MaxBandwidthObserver>> | 441 const scoped_refptr<base::ObserverListThreadSafe<MaxBandwidthObserver>> |
| 442 max_bandwidth_observer_list_; | 442 max_bandwidth_observer_list_; |
| 443 | 443 |
| 444 // The current network state. Hosts DnsConfig, exposed via GetDnsConfig. | 444 // The current network state. Hosts DnsConfig, exposed via GetDnsConfig. |
| 445 scoped_ptr<NetworkState> network_state_; | 445 scoped_ptr<NetworkState> network_state_; |
| 446 | 446 |
| 447 // A little-piggy-back observer that simply logs UMA histogram data. | 447 // A little-piggy-back observer that simply logs UMA histogram data. |
| 448 scoped_ptr<HistogramWatcher> histogram_watcher_; | 448 scoped_ptr<HistogramWatcher> histogram_watcher_; |
| 449 | 449 |
| 450 // Computes NetworkChange signal from IPAddress and ConnectionType signals. | 450 // Computes NetworkChange signal from IPAddress and ConnectionType signals. |
| 451 scoped_ptr<NetworkChangeCalculator> network_change_calculator_; | 451 scoped_ptr<NetworkChangeCalculator> network_change_calculator_; |
| 452 | 452 |
| 453 // Set true to disable non-test notifications (to prevent flakes in tests). | 453 // Set true to disable non-test notifications (to prevent flakes in tests). |
| 454 bool test_notifications_only_; | 454 bool test_notifications_only_; |
| 455 | 455 |
| 456 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifier); | 456 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifier); |
| 457 }; | 457 }; |
| 458 | 458 |
| 459 } // namespace net | 459 } // namespace net |
| 460 | 460 |
| 461 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_H_ | 461 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_H_ |
| OLD | NEW |