| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "net/base/network_change_notifier.h" | 5 #include "net/base/network_change_notifier.h" |
| 6 #include "build/build_config.h" | 6 #include "build/build_config.h" |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include "net/base/network_change_notifier_win.h" | 8 #include "net/base/network_change_notifier_win.h" |
| 9 #elif defined(OS_LINUX) | 9 #elif defined(OS_LINUX) |
| 10 #include "net/base/network_change_notifier_linux.h" | 10 #include "net/base/network_change_notifier_linux.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 } | 99 } |
| 100 | 100 |
| 101 void NetworkChangeNotifier::NotifyObserversOfIPAddressChange() { | 101 void NetworkChangeNotifier::NotifyObserversOfIPAddressChange() { |
| 102 if (g_network_change_notifier) { | 102 if (g_network_change_notifier) { |
| 103 g_network_change_notifier->ip_address_observer_list_->Notify( | 103 g_network_change_notifier->ip_address_observer_list_->Notify( |
| 104 &IPAddressObserver::OnIPAddressChanged); | 104 &IPAddressObserver::OnIPAddressChanged); |
| 105 } | 105 } |
| 106 } | 106 } |
| 107 | 107 |
| 108 void NetworkChangeNotifier::NotifyObserversOfOnlineStateChange() { | 108 void NetworkChangeNotifier::NotifyObserversOfOnlineStateChange() { |
| 109 online_state_observer_list_->Notify( | 109 if (g_network_change_notifier) { |
| 110 &OnlineStateObserver::OnOnlineStateChanged, !IsOffline()); | 110 g_network_change_notifier->online_state_observer_list_->Notify( |
| 111 &OnlineStateObserver::OnOnlineStateChanged, !IsOffline()); |
| 112 } |
| 111 } | 113 } |
| 112 | 114 |
| 113 } // namespace net | 115 } // namespace net |
| OLD | NEW |