Index: chromeos/network/network_state.cc |
diff --git a/chromeos/network/network_state.cc b/chromeos/network/network_state.cc |
index f4ad9599cfa98a0dbaf20eaffe4ca1304873c6e4..93c12e41a29256afaf2d163dd058c5f7059ed4ad 100644 |
--- a/chromeos/network/network_state.cc |
+++ b/chromeos/network/network_state.cc |
@@ -231,8 +231,6 @@ void NetworkState::GetStateProperties(base::DictionaryValue* dictionary) const { |
profile_path()); |
if (visible()) { |
- if (!error().empty()) |
- dictionary->SetStringWithoutPathExpansion(shill::kErrorProperty, error()); |
dictionary->SetStringWithoutPathExpansion(shill::kStateProperty, |
connection_state()); |
} |
@@ -398,6 +396,12 @@ bool NetworkState::UpdateName(const base::DictionaryValue& properties) { |
return false; |
} |
+std::string NetworkState::GetErrorState() const { |
+ if (ErrorIsValid(error())) |
+ return error(); |
+ return last_error(); |
+} |
+ |
// static |
bool NetworkState::StateIsConnected(const std::string& connection_state) { |
return (connection_state == shill::kStateReady || |