| 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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 ConnectionType type); | 531 ConnectionType type); |
| 532 static void NotifyObserversOfSpecificNetworkChange(NetworkChangeType type, | 532 static void NotifyObserversOfSpecificNetworkChange(NetworkChangeType type, |
| 533 NetworkHandle network); | 533 NetworkHandle network); |
| 534 | 534 |
| 535 // Stores |config| in NetworkState and notifies OnDNSChanged observers. | 535 // Stores |config| in NetworkState and notifies OnDNSChanged observers. |
| 536 static void SetDnsConfig(const DnsConfig& config); | 536 static void SetDnsConfig(const DnsConfig& config); |
| 537 // Stores |config| in NetworkState and notifies OnInitialDNSConfigRead | 537 // Stores |config| in NetworkState and notifies OnInitialDNSConfigRead |
| 538 // observers. | 538 // observers. |
| 539 static void SetInitialDnsConfig(const DnsConfig& config); | 539 static void SetInitialDnsConfig(const DnsConfig& config); |
| 540 | 540 |
| 541 // Infer connection type from |GetNetworkList|. If all network interfaces |
| 542 // have the same type, return it, otherwise return CONNECTION_UNKNOWN. |
| 543 static ConnectionType ConnectionTypeFromInterfaces(); |
| 544 |
| 541 private: | 545 private: |
| 542 friend class HostResolverImplDnsTest; | 546 friend class HostResolverImplDnsTest; |
| 543 friend class NetworkChangeNotifierAndroidTest; | 547 friend class NetworkChangeNotifierAndroidTest; |
| 544 friend class NetworkChangeNotifierLinuxTest; | 548 friend class NetworkChangeNotifierLinuxTest; |
| 545 friend class NetworkChangeNotifierWinTest; | 549 friend class NetworkChangeNotifierWinTest; |
| 546 | 550 |
| 547 class NetworkState; | 551 class NetworkState; |
| 548 class NetworkChangeCalculator; | 552 class NetworkChangeCalculator; |
| 549 | 553 |
| 550 void NotifyObserversOfIPAddressChangeImpl(); | 554 void NotifyObserversOfIPAddressChangeImpl(); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 581 | 585 |
| 582 // Set true to disable non-test notifications (to prevent flakes in tests). | 586 // Set true to disable non-test notifications (to prevent flakes in tests). |
| 583 static bool test_notifications_only_; | 587 static bool test_notifications_only_; |
| 584 | 588 |
| 585 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifier); | 589 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifier); |
| 586 }; | 590 }; |
| 587 | 591 |
| 588 } // namespace net | 592 } // namespace net |
| 589 | 593 |
| 590 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_H_ | 594 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_H_ |
| OLD | NEW |