Chromium Code Reviews| Index: ash/system/chromeos/network/network_connect.cc |
| diff --git a/ash/system/chromeos/network/network_connect.cc b/ash/system/chromeos/network/network_connect.cc |
| index 23fd8d990a1ab5aefc4217433b4ce027c9117892..d0765cc217780bc5c4b1634a95694041b65f7902 100644 |
| --- a/ash/system/chromeos/network/network_connect.cc |
| +++ b/ash/system/chromeos/network/network_connect.cc |
| @@ -58,10 +58,11 @@ bool IsDirectActivatedCarrier(const std::string& carrier) { |
| return false; |
| } |
| -void ShowErrorNotification(const std::string& error, |
| +void ShowErrorNotification(const std::string& error_name, |
| + const std::string& shill_error, |
| const std::string& service_path) { |
| Shell::GetInstance()->system_tray_notifier()->network_state_notifier()-> |
| - ShowNetworkConnectError(error, service_path); |
| + ShowNetworkConnectError(error_name, shill_error, service_path); |
| } |
| void OnConnectFailed(const std::string& service_path, |
| @@ -104,7 +105,10 @@ void OnConnectFailed(const std::string& service_path, |
| } |
| // ConnectFailed or unknown error; show a notification. |
| - ShowErrorNotification(error_name, service_path); |
| + std::string shill_error; |
| + error_data.get()->GetString( |
| + chromeos::network_handler::kErrorDetail, &shill_error); |
| + ShowErrorNotification(error_name, shill_error, service_path); |
| // Show a configure dialog for ConnectFailed errors. |
| if (error_name != flimflam::kErrorConnectFailed) |
| @@ -153,7 +157,8 @@ void OnActivateFailed(const std::string& service_path, |
| const std::string& error_name, |
| scoped_ptr<base::DictionaryValue> error_data) { |
| NET_LOG_ERROR("Unable to activate network", service_path); |
| - ShowErrorNotification(network_connect::kErrorActivateFailed, service_path); |
| + ShowErrorNotification( |
| + network_connect::kErrorActivateFailed, "", service_path); |
| } |
| void OnActivateSucceeded(const std::string& service_path) { |
| @@ -163,7 +168,8 @@ void OnActivateSucceeded(const std::string& service_path) { |
| void OnConfigureFailed(const std::string& error_name, |
| scoped_ptr<base::DictionaryValue> error_data) { |
| NET_LOG_ERROR("Unable to configure network", ""); |
| - ShowErrorNotification(NetworkConnectionHandler::kErrorConfigureFailed, ""); |
| + ShowErrorNotification( |
| + NetworkConnectionHandler::kErrorConfigureFailed, "", ""); |
|
armansito
2013/09/14 01:13:12
You may want to always check the contents of |erro
stevenjb
2013/09/16 16:38:07
This still needs a re-factoring / cleanup pass, bu
armansito
2013/09/16 19:24:00
sgtm
|
| } |
| void OnConfigureSucceeded(const std::string& service_path) { |
| @@ -180,7 +186,7 @@ void SetPropertiesFailed(const std::string& desc, |
| scoped_ptr<base::DictionaryValue> error_data) { |
| NET_LOG_ERROR(desc + ": Failed: " + config_error_name, service_path); |
| ShowErrorNotification( |
| - NetworkConnectionHandler::kErrorConfigureFailed, service_path); |
| + NetworkConnectionHandler::kErrorConfigureFailed, "", service_path); |
| } |
| void SetPropertiesToClear(base::DictionaryValue* properties_to_set, |
| @@ -405,7 +411,7 @@ void ConfigureNetworkAndConnect(const std::string& service_path, |
| std::string profile_path; |
| if (!GetNetworkProfilePath(shared, &profile_path)) { |
| ShowErrorNotification( |
| - NetworkConnectionHandler::kErrorConfigureFailed, service_path); |
| + NetworkConnectionHandler::kErrorConfigureFailed, "", service_path); |
| return; |
| } |
| NetworkHandler::Get()->network_configuration_handler()->SetNetworkProfile( |
| @@ -421,7 +427,8 @@ void CreateConfigurationAndConnect(base::DictionaryValue* properties, |
| NET_LOG_USER("CreateConfigurationAndConnect", ""); |
| std::string profile_path; |
| if (!GetNetworkProfilePath(shared, &profile_path)) { |
| - ShowErrorNotification(NetworkConnectionHandler::kErrorConfigureFailed, ""); |
| + ShowErrorNotification( |
| + NetworkConnectionHandler::kErrorConfigureFailed, "", ""); |
| return; |
| } |
| properties->SetStringWithoutPathExpansion( |