Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Unified Diff: ash/system/chromeos/network/tray_network_state_observer.cc

Issue 14729017: Add NetworkHandler to own network handlers in src/chromeos/network (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix chromeos_unittests Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/chromeos/network/tray_network.cc ('k') | ash/system/chromeos/network/tray_vpn.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/network/tray_network_state_observer.cc
diff --git a/ash/system/chromeos/network/tray_network_state_observer.cc b/ash/system/chromeos/network/tray_network_state_observer.cc
index f1c6ed6d9f83bdefb23b72f72e8eee39a5f82ccb..15eb6d13a643df6b38f12d398024038e69717b54 100644
--- a/ash/system/chromeos/network/tray_network_state_observer.cc
+++ b/ash/system/chromeos/network/tray_network_state_observer.cc
@@ -11,18 +11,20 @@
#include "chromeos/network/network_state_handler.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
+using chromeos::NetworkHandler;
+
namespace ash {
namespace internal {
TrayNetworkStateObserver::TrayNetworkStateObserver(Delegate* delegate)
: delegate_(delegate) {
- if (chromeos::NetworkStateHandler::IsInitialized())
- chromeos::NetworkStateHandler::Get()->AddObserver(this);
+ if (NetworkHandler::IsInitialized())
+ NetworkHandler::Get()->network_state_handler()->AddObserver(this);
}
TrayNetworkStateObserver::~TrayNetworkStateObserver() {
- if (chromeos::NetworkStateHandler::IsInitialized())
- chromeos::NetworkStateHandler::Get()->RemoveObserver(this);
+ if (NetworkHandler::IsInitialized())
+ NetworkHandler::Get()->network_state_handler()->RemoveObserver(this);
}
void TrayNetworkStateObserver::NetworkManagerChanged() {
@@ -44,7 +46,8 @@ void TrayNetworkStateObserver::DefaultNetworkChanged(
void TrayNetworkStateObserver::NetworkPropertiesUpdated(
const chromeos::NetworkState* network) {
- if (network == chromeos::NetworkStateHandler::Get()->DefaultNetwork())
+ if (network ==
+ NetworkHandler::Get()->network_state_handler()->DefaultNetwork())
delegate_->NetworkStateChanged(true);
delegate_->NetworkServiceChanged(network);
}
« no previous file with comments | « ash/system/chromeos/network/tray_network.cc ('k') | ash/system/chromeos/network/tray_vpn.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698