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

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

Issue 852803002: Correctly check VPN state in TrayVpn (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_onc_crash
Patch Set: Created 5 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0d4cbeabc53090fb37f4679f01751625c556e2c2..d6c71bf84f773b19941d79abef1ebe64b0c972db 100644
--- a/ash/system/chromeos/network/tray_vpn.cc
+++ b/ash/system/chromeos/network/tray_vpn.cc
@@ -78,7 +78,7 @@ class VpnDefaultView : public TrayItemMore,
NetworkHandler::Get()->network_state_handler();
const NetworkState* vpn =
handler->FirstNetworkByType(NetworkTypePattern::VPN());
- if (!vpn || (vpn->connection_state() == shill::kStateIdle)) {
stevenjb 2015/01/14 17:57:26 This was incorrect if State = 'failure', 'offline'
+ if (!vpn || (!vpn->IsConnectedState() && !vpn->IsConnectingState())) {
*image = ui::network_icon::GetImageForDisconnectedNetwork(
ui::network_icon::ICON_TYPE_DEFAULT_VIEW, shill::kTypeVPN);
if (label) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698