From a28d3c7da15c91a645b5d8697dac603081dc0d10 Mon Sep 17 00:00:00 2001 From: "stevenjb@chromium.org" Date: Fri, 14 Mar 2014 21:54:50 +0000 Subject: Suppress non-error network error notifications BUG=333955 R=armansito@chromium.org Review URL: https://codereview.chromium.org/134733014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257219 0039d316-1c4b-4281-b951-d872f2087c98 --- ash/system/chromeos/network/network_state_notifier.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ash/system/chromeos/network/network_state_notifier.cc b/ash/system/chromeos/network/network_state_notifier.cc index fb90fca..223c663 100644 --- a/ash/system/chromeos/network/network_state_notifier.cc +++ b/ash/system/chromeos/network/network_state_notifier.cc @@ -214,6 +214,14 @@ void NetworkStateNotifier::ConnectErrorPropertiesSucceeded( const std::string& shill_error, const std::string& service_path, const base::DictionaryValue& shill_properties) { + std::string state; + shill_properties.GetStringWithoutPathExpansion(shill::kStateProperty, &state); + if (chromeos::NetworkState::StateIsConnected(state) || + chromeos::NetworkState::StateIsConnecting(state)) { + // Network is no longer in an error state. This can happen if an unexpected + // Idle state transition occurs, see crbug.com/333955. + return; + } ShowConnectErrorNotification(error_name, shill_error, service_path, shill_properties); } -- cgit v1.1