Commit dc457c69 authored by stevenjb's avatar stevenjb Committed by Commit bot

Correctly check VPN state in TrayVpn

BUG=448768

Review URL: https://codereview.chromium.org/852803002

Cr-Commit-Position: refs/heads/master@{#311521}
parent eabe6a4b
...@@ -78,7 +78,7 @@ class VpnDefaultView : public TrayItemMore, ...@@ -78,7 +78,7 @@ class VpnDefaultView : public TrayItemMore,
NetworkHandler::Get()->network_state_handler(); NetworkHandler::Get()->network_state_handler();
const NetworkState* vpn = const NetworkState* vpn =
handler->FirstNetworkByType(NetworkTypePattern::VPN()); handler->FirstNetworkByType(NetworkTypePattern::VPN());
if (!vpn || (vpn->connection_state() == shill::kStateIdle)) { if (!vpn || (!vpn->IsConnectedState() && !vpn->IsConnectingState())) {
*image = ui::network_icon::GetImageForDisconnectedNetwork( *image = ui::network_icon::GetImageForDisconnectedNetwork(
ui::network_icon::ICON_TYPE_DEFAULT_VIEW, shill::kTypeVPN); ui::network_icon::ICON_TYPE_DEFAULT_VIEW, shill::kTypeVPN);
if (label) { if (label) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment