summaryrefslogtreecommitdiffstats
path: root/ash/system
diff options
context:
space:
mode:
authorstevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-28 18:33:30 +0000
committerstevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-28 18:33:30 +0000
commit437a9f8fd20379f3314d1f515dca115dac0aaaaf (patch)
tree41f0d877f211d43bc87d2ef6e2a323d116227f2a /ash/system
parent4520d538e9fe0beb97609e1f6438e6a71924c227 (diff)
downloadchromium_src-437a9f8fd20379f3314d1f515dca115dac0aaaaf.zip
chromium_src-437a9f8fd20379f3314d1f515dca115dac0aaaaf.tar.gz
chromium_src-437a9f8fd20379f3314d1f515dca115dac0aaaaf.tar.bz2
Add NetworkHandler to own network handlers in src/chromeos/network
This is just some code cleanup and should have no behavior changes. BUG=239073 For webui/chromeos, browser/geolocation: TBR=nkostylev@chromium.org,joth@chromium.org Review URL: https://chromiumcodereview.appspot.com/14729017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202609 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/system')
-rw-r--r--ash/system/chromeos/network/network_icon.cc13
-rw-r--r--ash/system/chromeos/network/network_state_list_detailed_view.cc36
-rw-r--r--ash/system/chromeos/network/network_state_notifier.cc14
-rw-r--r--ash/system/chromeos/network/network_state_notifier_unittest.cc9
-rw-r--r--ash/system/chromeos/network/tray_network.cc20
-rw-r--r--ash/system/chromeos/network/tray_network_state_observer.cc13
-rw-r--r--ash/system/chromeos/network/tray_vpn.cc14
7 files changed, 64 insertions, 55 deletions
diff --git a/ash/system/chromeos/network/network_icon.cc b/ash/system/chromeos/network/network_icon.cc
index 6ac05a7..d2402de 100644
--- a/ash/system/chromeos/network/network_icon.cc
+++ b/ash/system/chromeos/network/network_icon.cc
@@ -23,8 +23,9 @@
#include "ui/gfx/size_conversions.h"
using chromeos::DeviceState;
-using chromeos::NetworkStateHandler;
+using chromeos::NetworkHandler;
using chromeos::NetworkState;
+using chromeos::NetworkStateHandler;
namespace ash {
namespace network_icon {
@@ -444,7 +445,7 @@ gfx::ImageSkia GetIcon(const NetworkState* network,
// Get connecting images
gfx::ImageSkia GetConnectingVpnImage(IconType icon_type) {
- NetworkStateHandler* handler = NetworkStateHandler::Get();
+ NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
const NetworkState* connected_network = NULL;
if (icon_type == ICON_TYPE_TRAY) {
connected_network = handler->ConnectedNetworkByType(
@@ -546,8 +547,8 @@ bool NetworkIconImpl::UpdateCellularState(const NetworkState* network) {
}
bool NetworkIconImpl::UpdateVPNBadge() {
- const NetworkState* vpn =
- NetworkStateHandler::Get()->ConnectedNetworkByType(flimflam::kTypeVPN);
+ const NetworkState* vpn = NetworkHandler::Get()->network_state_handler()->
+ ConnectedNetworkByType(flimflam::kTypeVPN);
if (vpn && vpn_badge_ == NULL) {
vpn_badge_ = BadgeForVPN(icon_type_);
return true;
@@ -561,7 +562,7 @@ bool NetworkIconImpl::UpdateVPNBadge() {
void NetworkIconImpl::GetBadges(const NetworkState* network, Badges* badges) {
DCHECK(network);
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- NetworkStateHandler* handler = NetworkStateHandler::Get();
+ NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
const std::string& type = network->type();
if (type == flimflam::kTypeWifi) {
@@ -691,7 +692,7 @@ int GetCellularUninitializedMsg() {
static base::Time s_uninitialized_state_time;
static int s_uninitialized_msg(0);
- NetworkStateHandler* handler = NetworkStateHandler::Get();
+ NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
if (handler->GetTechnologyState(NetworkStateHandler::kMatchTypeMobile)
== NetworkStateHandler::TECHNOLOGY_UNINITIALIZED) {
s_uninitialized_msg = IDS_ASH_STATUS_TRAY_INITIALIZING_CELLULAR;
diff --git a/ash/system/chromeos/network/network_state_list_detailed_view.cc b/ash/system/chromeos/network/network_state_list_detailed_view.cc
index b55bed5..a55e2a8 100644
--- a/ash/system/chromeos/network/network_state_list_detailed_view.cc
+++ b/ash/system/chromeos/network/network_state_list_detailed_view.cc
@@ -40,9 +40,10 @@
#include "ui/views/widget/widget.h"
using chromeos::DeviceState;
+using chromeos::NetworkConnectionHandler;
+using chromeos::NetworkHandler;
using chromeos::NetworkState;
using chromeos::NetworkStateHandler;
-using chromeos::NetworkConnectionHandler;
namespace ash {
namespace internal {
@@ -169,7 +170,7 @@ void NetworkStateListDetailedView::ManagerChanged() {
void NetworkStateListDetailedView::NetworkListChanged() {
NetworkStateList network_list;
- NetworkStateHandler::Get()->GetNetworkList(&network_list);
+ NetworkHandler::Get()->network_state_handler()->GetNetworkList(&network_list);
UpdateNetworks(network_list);
UpdateNetworkList();
UpdateHeaderButtons();
@@ -197,7 +198,7 @@ void NetworkStateListDetailedView::Init() {
CreateHeaderButtons();
NetworkStateList network_list;
- NetworkStateHandler::Get()->GetNetworkList(&network_list);
+ NetworkHandler::Get()->network_state_handler()->GetNetworkList(&network_list);
UpdateNetworks(network_list);
UpdateNetworkList();
UpdateHeaderButtons();
@@ -222,7 +223,7 @@ void NetworkStateListDetailedView::ButtonPressed(views::Button* sender,
// If the info bubble was visible, close it when some other item is clicked.
ResetInfoBubble();
- NetworkStateHandler* handler = NetworkStateHandler::Get();
+ NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
ash::SystemTrayDelegate* delegate =
ash::Shell::GetInstance()->system_tray_delegate();
if (sender == button_wifi_) {
@@ -268,8 +269,8 @@ void NetworkStateListDetailedView::OnViewClicked(views::View* sender) {
network_map_.find(sender);
if (found != network_map_.end()) {
const std::string& service_path = found->second;
- const NetworkState* network =
- NetworkStateHandler::Get()->GetNetworkState(service_path);
+ const NetworkState* network = NetworkHandler::Get()->
+ network_state_handler()->GetNetworkState(service_path);
if (!network ||
network->IsConnectedState() || network->IsConnectingState()) {
Shell::GetInstance()->system_tray_delegate()->ShowNetworkSettings(
@@ -372,7 +373,7 @@ void NetworkStateListDetailedView::CreateNetworkExtra() {
// Update UI components.
void NetworkStateListDetailedView::UpdateHeaderButtons() {
- NetworkStateHandler* handler = NetworkStateHandler::Get();
+ NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
if (button_wifi_)
UpdateTechnologyButton(button_wifi_, flimflam::kTypeWifi);
if (button_mobile_) {
@@ -389,7 +390,8 @@ void NetworkStateListDetailedView::UpdateTechnologyButton(
TrayPopupHeaderButton* button,
const std::string& technology) {
NetworkStateHandler::TechnologyState state =
- NetworkStateHandler::Get()->GetTechnologyState(technology);
+ NetworkHandler::Get()->network_state_handler()->
+ GetTechnologyState(technology);
if (state == NetworkStateHandler::TECHNOLOGY_UNAVAILABLE) {
button->SetVisible(false);
return;
@@ -427,7 +429,7 @@ void NetworkStateListDetailedView::UpdateNetworks(
}
void NetworkStateListDetailedView::UpdateNetworkList() {
- NetworkStateHandler* handler = NetworkStateHandler::Get();
+ NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
// First, update state for all networks
bool animating = false;
@@ -546,7 +548,7 @@ bool NetworkStateListDetailedView::UpdateNetworkListEntries(
std::set<std::string>* new_service_paths) {
bool needs_relayout = false;
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- NetworkStateHandler* handler = NetworkStateHandler::Get();
+ NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
// Insert child views
int index = 0;
@@ -635,7 +637,7 @@ void NetworkStateListDetailedView::UpdateNetworkExtra() {
return;
View* layout_parent = NULL; // All these buttons have the same parent.
- NetworkStateHandler* handler = NetworkStateHandler::Get();
+ NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
if (other_wifi_) {
DCHECK(turn_on_wifi_);
NetworkStateHandler::TechnologyState state =
@@ -717,7 +719,7 @@ bool NetworkStateListDetailedView::ResetInfoBubble() {
views::View* NetworkStateListDetailedView::CreateNetworkInfoView() {
ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- NetworkStateHandler* handler = NetworkStateHandler::Get();
+ NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
std::string ip_address("0.0.0.0");
const NetworkState* network = handler->DefaultNetwork();
@@ -769,14 +771,14 @@ views::View* NetworkStateListDetailedView::CreateNetworkInfoView() {
void NetworkStateListDetailedView::ConnectToNetwork(
const std::string& service_path) {
- const NetworkState* network =
- NetworkStateHandler::Get()->GetNetworkState(service_path);
+ const NetworkState* network = NetworkHandler::Get()->network_state_handler()->
+ GetNetworkState(service_path);
if (!network)
return;
if (CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kUseNewNetworkConfigurationHandlers)) {
const bool ignore_error_state = false;
- NetworkConnectionHandler::Get()->ConnectToNetwork(
+ NetworkHandler::Get()->network_connection_handler()->ConnectToNetwork(
service_path,
base::Bind(&base::DoNothing),
base::Bind(&NetworkStateListDetailedView::OnConnectFailed,
@@ -812,7 +814,7 @@ void NetworkStateListDetailedView::OnConnectFailed(
void NetworkStateListDetailedView::CallRequestScan() {
VLOG(1) << "Requesting Network Scan.";
- NetworkStateHandler::Get()->RequestScan();
+ NetworkHandler::Get()->network_state_handler()->RequestScan();
// Periodically request a scan while this UI is open.
base::MessageLoopForUI::current()->PostDelayedTask(
FROM_HERE,
@@ -821,7 +823,7 @@ void NetworkStateListDetailedView::CallRequestScan() {
}
void NetworkStateListDetailedView::ToggleMobile() {
- NetworkStateHandler* handler = NetworkStateHandler::Get();
+ NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
bool enabled =
handler->IsTechnologyEnabled(NetworkStateHandler::kMatchTypeMobile);
if (enabled) {
diff --git a/ash/system/chromeos/network/network_state_notifier.cc b/ash/system/chromeos/network/network_state_notifier.cc
index e1cef84..26584485 100644
--- a/ash/system/chromeos/network/network_state_notifier.cc
+++ b/ash/system/chromeos/network/network_state_notifier.cc
@@ -17,6 +17,7 @@
#include "third_party/cros_system_api/dbus/service_constants.h"
#include "ui/base/l10n/l10n_util.h"
+using chromeos::NetworkHandler;
using chromeos::NetworkState;
using chromeos::NetworkStateHandler;
@@ -107,15 +108,12 @@ namespace internal {
NetworkStateNotifier::NetworkStateNotifier()
: cellular_out_of_credits_(false) {
- if (!NetworkStateHandler::Get())
- return;
- NetworkStateHandler::Get()->AddObserver(this);
+ NetworkHandler::Get()->network_state_handler()->AddObserver(this);
InitializeNetworks();
}
NetworkStateNotifier::~NetworkStateNotifier() {
- if (NetworkStateHandler::Get())
- NetworkStateHandler::Get()->RemoveObserver(this);
+ NetworkHandler::Get()->network_state_handler()->RemoveObserver(this);
}
void NetworkStateNotifier::DefaultNetworkChanged(const NetworkState* network) {
@@ -130,7 +128,7 @@ void NetworkStateNotifier::DefaultNetworkChanged(const NetworkState* network) {
void NetworkStateNotifier::NetworkConnectionStateChanged(
const NetworkState* network) {
- NetworkStateHandler* handler = NetworkStateHandler::Get();
+ NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
std::string prev_state;
std::string new_state = network->connection_state();
CachedStateMap::iterator iter = cached_state_.find(network->path());
@@ -215,7 +213,7 @@ void NetworkStateNotifier::NotificationLinkClicked(
void NetworkStateNotifier::InitializeNetworks() {
NetworkStateList network_list;
- NetworkStateHandler::Get()->GetNetworkList(&network_list);
+ NetworkHandler::Get()->network_state_handler()->GetNetworkList(&network_list);
VLOG(1) << "NetworkStateNotifier:InitializeNetworks: "
<< network_list.size();
for (NetworkStateList::iterator iter = network_list.begin();
@@ -225,7 +223,7 @@ void NetworkStateNotifier::InitializeNetworks() {
cached_state_[network->path()] = network->connection_state();
}
const NetworkState* default_network =
- NetworkStateHandler::Get()->DefaultNetwork();
+ NetworkHandler::Get()->network_state_handler()->DefaultNetwork();
if (default_network && default_network->IsConnectedState())
last_active_network_ = default_network->path();
}
diff --git a/ash/system/chromeos/network/network_state_notifier_unittest.cc b/ash/system/chromeos/network/network_state_notifier_unittest.cc
index fde1ad0..292587c 100644
--- a/ash/system/chromeos/network/network_state_notifier_unittest.cc
+++ b/ash/system/chromeos/network/network_state_notifier_unittest.cc
@@ -25,8 +25,9 @@ ash::SystemTray* GetSystemTray() {
} // namespace
-using chromeos::NetworkStateHandler;
using chromeos::DBusThreadManager;
+using chromeos::NetworkHandler;
+using chromeos::NetworkStateHandler;
using chromeos::ShillDeviceClient;
using chromeos::ShillServiceClient;
@@ -43,14 +44,14 @@ class NetworkStateNotifierTest : public AshTestBase {
virtual void SetUp() OVERRIDE {
DBusThreadManager::InitializeWithStub();
SetupDefaultShillState();
- NetworkStateHandler::Initialize();
+ NetworkHandler::Initialize();
RunAllPendingInMessageLoop();
AshTestBase::SetUp();
}
virtual void TearDown() OVERRIDE {
AshTestBase::TearDown();
- NetworkStateHandler::Shutdown();
+ NetworkHandler::Shutdown();
DBusThreadManager::Shutdown();
}
@@ -96,7 +97,7 @@ TEST_F(NetworkStateNotifierTest, ConnectionFailure) {
EXPECT_FALSE(GetSystemTray()->CloseNotificationBubbleForTest());
// State -> Failure for connecting network should spawn a notification
SetServiceState("wifi1", flimflam::kStateAssociation);
- NetworkStateHandler::Get()->SetConnectingNetwork("wifi1");
+ NetworkHandler::Get()->network_state_handler()->SetConnectingNetwork("wifi1");
SetServiceState("wifi1", flimflam::kStateFailure);
EXPECT_TRUE(GetSystemTray()->CloseNotificationBubbleForTest());
// Failure -> Idle should not spawn a notification
diff --git a/ash/system/chromeos/network/tray_network.cc b/ash/system/chromeos/network/tray_network.cc
index 333a263..be94a5e 100644
--- a/ash/system/chromeos/network/tray_network.cc
+++ b/ash/system/chromeos/network/tray_network.cc
@@ -36,6 +36,7 @@
using ash::internal::TrayNetwork;
using ash::NetworkObserver;
+using chromeos::NetworkHandler;
using chromeos::NetworkState;
using chromeos::NetworkStateHandler;
@@ -120,7 +121,8 @@ class NetworkTrayView : public TrayItemView,
}
void UpdateNetworkStateHandlerIcon() {
- NetworkStateHandler* handler = NetworkStateHandler::Get();
+ NetworkStateHandler* handler =
+ NetworkHandler::Get()->network_state_handler();
gfx::ImageSkia image;
base::string16 name;
bool animating = false;
@@ -265,8 +267,8 @@ class NetworkWifiDetailedView : public NetworkDetailedView {
private:
void Update() {
- bool wifi_enabled =
- NetworkStateHandler::Get()->IsTechnologyEnabled(flimflam::kTypeWifi);
+ bool wifi_enabled = NetworkHandler::Get()->network_state_handler()->
+ IsTechnologyEnabled(flimflam::kTypeWifi);
const int image_id = wifi_enabled ?
IDR_AURA_UBER_TRAY_WIFI_ENABLED : IDR_AURA_UBER_TRAY_WIFI_DISABLED;
ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
@@ -401,7 +403,7 @@ TrayNetwork::TrayNetwork(SystemTray* system_tray)
messages_(new tray::NetworkMessages()),
request_wifi_view_(false) {
network_state_observer_.reset(new TrayNetworkStateObserver(this));
- if (NetworkStateHandler::IsInitialized())
+ if (NetworkHandler::IsInitialized())
network_state_notifier_.reset(new NetworkStateNotifier());
Shell::GetInstance()->system_tray_notifier()->AddNetworkObserver(this);
}
@@ -413,7 +415,7 @@ TrayNetwork::~TrayNetwork() {
views::View* TrayNetwork::CreateTrayView(user::LoginStatus status) {
CHECK(tray_ == NULL);
- if (!chromeos::NetworkStateHandler::IsInitialized())
+ if (!chromeos::NetworkHandler::IsInitialized())
return NULL;
tray_ = new tray::NetworkTrayView(this);
return tray_;
@@ -421,7 +423,7 @@ views::View* TrayNetwork::CreateTrayView(user::LoginStatus status) {
views::View* TrayNetwork::CreateDefaultView(user::LoginStatus status) {
CHECK(default_ == NULL);
- if (!chromeos::NetworkStateHandler::IsInitialized())
+ if (!chromeos::NetworkHandler::IsInitialized())
return NULL;
CHECK(tray_ != NULL);
default_ = new tray::NetworkDefaultView(
@@ -431,7 +433,7 @@ views::View* TrayNetwork::CreateDefaultView(user::LoginStatus status) {
views::View* TrayNetwork::CreateDetailedView(user::LoginStatus status) {
CHECK(detailed_ == NULL);
- if (!chromeos::NetworkStateHandler::IsInitialized())
+ if (!chromeos::NetworkHandler::IsInitialized())
return NULL;
// Clear any notifications when showing the detailed view.
messages_->messages().clear();
@@ -514,7 +516,7 @@ void TrayNetwork::RequestToggleWifi() {
request_wifi_view_ = true;
PopupDetailedView(kTrayPopupAutoCloseDelayForTextInSeconds, false);
}
- NetworkStateHandler* handler = NetworkStateHandler::Get();
+ NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
bool enabled = handler->IsTechnologyEnabled(flimflam::kTypeWifi);
handler->SetTechnologyEnabled(
flimflam::kTypeWifi, !enabled,
@@ -544,7 +546,7 @@ void TrayNetwork::GetNetworkStateHandlerImageAndLabel(
gfx::ImageSkia* image,
base::string16* label,
bool* animating) {
- NetworkStateHandler* handler = NetworkStateHandler::Get();
+ NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
const NetworkState* connected_network = handler->ConnectedNetworkByType(
NetworkStateHandler::kMatchTypeNonVirtual);
const NetworkState* connecting_network = handler->ConnectingNetworkByType(
diff --git a/ash/system/chromeos/network/tray_network_state_observer.cc b/ash/system/chromeos/network/tray_network_state_observer.cc
index f1c6ed6..15eb6d1 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);
}
diff --git a/ash/system/chromeos/network/tray_vpn.cc b/ash/system/chromeos/network/tray_vpn.cc
index 2d7ab0e..31c6d6a 100644
--- a/ash/system/chromeos/network/tray_vpn.cc
+++ b/ash/system/chromeos/network/tray_vpn.cc
@@ -20,6 +20,7 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
+using chromeos::NetworkHandler;
using chromeos::NetworkState;
using chromeos::NetworkStateHandler;
@@ -42,9 +43,9 @@ class VpnDefaultView : public TrayItemMore,
static bool ShouldShow() {
// Do not show VPN line in uber tray bubble if VPN is not configured.
- NetworkStateHandler* handler = NetworkStateHandler::Get();
- const NetworkState* vpn = handler->FirstNetworkByType(
- flimflam::kTypeVPN);
+ NetworkStateHandler* handler =
+ NetworkHandler::Get()->network_state_handler();
+ const NetworkState* vpn = handler->FirstNetworkByType(flimflam::kTypeVPN);
return vpn != NULL;
}
@@ -71,7 +72,8 @@ class VpnDefaultView : public TrayItemMore,
void GetNetworkStateHandlerImageAndLabel(gfx::ImageSkia* image,
base::string16* label,
bool* animating) {
- NetworkStateHandler* handler = NetworkStateHandler::Get();
+ NetworkStateHandler* handler =
+ NetworkHandler::Get()->network_state_handler();
const NetworkState* vpn = handler->FirstNetworkByType(
flimflam::kTypeVPN);
if (!vpn || (vpn->connection_state() == flimflam::kStateIdle)) {
@@ -114,7 +116,7 @@ views::View* TrayVPN::CreateTrayView(user::LoginStatus status) {
views::View* TrayVPN::CreateDefaultView(user::LoginStatus status) {
CHECK(default_ == NULL);
- if (!chromeos::NetworkStateHandler::IsInitialized())
+ if (!chromeos::NetworkHandler::IsInitialized())
return NULL;
if (status == user::LOGGED_IN_NONE)
return NULL;
@@ -127,7 +129,7 @@ views::View* TrayVPN::CreateDefaultView(user::LoginStatus status) {
views::View* TrayVPN::CreateDetailedView(user::LoginStatus status) {
CHECK(detailed_ == NULL);
- if (!chromeos::NetworkStateHandler::IsInitialized())
+ if (!chromeos::NetworkHandler::IsInitialized())
return NULL;
detailed_ = new tray::NetworkStateListDetailedView(