| Index: ash/system/chromeos/network/tray_vpn.cc
|
| diff --git a/ash/system/chromeos/network/tray_vpn.cc b/ash/system/chromeos/network/tray_vpn.cc
|
| index 05f059621d7490e8842ca495876c673f3c49212d..4f6f02523f0927a116b4db9f92ff634a90deaf2a 100644
|
| --- a/ash/system/chromeos/network/tray_vpn.cc
|
| +++ b/ash/system/chromeos/network/tray_vpn.cc
|
| @@ -23,6 +23,7 @@
|
| #include "ui/base/l10n/l10n_util.h"
|
| #include "ui/base/resource/resource_bundle.h"
|
|
|
| +using chromeos::NetworkHandler;
|
| using chromeos::NetworkState;
|
| using chromeos::NetworkStateHandler;
|
|
|
| @@ -30,8 +31,7 @@ namespace {
|
|
|
| bool UseNewNetworkHandlers() {
|
| return !CommandLine::ForCurrentProcess()->HasSwitch(
|
| - ash::switches::kAshDisableNewNetworkStatusArea) &&
|
| - NetworkStateHandler::IsInitialized();
|
| + ash::switches::kAshDisableNewNetworkStatusArea);
|
| }
|
|
|
| }
|
| @@ -57,7 +57,8 @@ class VpnDefaultView : public TrayItemMore,
|
| static bool ShouldShow() {
|
| // Do not show VPN line in uber tray bubble if VPN is not configured.
|
| if (UseNewNetworkHandlers()) {
|
| - NetworkStateHandler* handler = NetworkStateHandler::Get();
|
| + NetworkStateHandler* handler =
|
| + NetworkHandler::Get()->network_state_handler();
|
| const NetworkState* vpn = handler->FirstNetworkByType(
|
| flimflam::kTypeVPN);
|
| return vpn != NULL;
|
| @@ -100,7 +101,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)) {
|
|
|