Index: chromeos/network/network_configuration_handler.cc |
diff --git a/chromeos/network/network_configuration_handler.cc b/chromeos/network/network_configuration_handler.cc |
index ff81dee84805d5593f011e9e802e93429e93b383..fad949e3406dcbedf7b46e0f2110985de232ef2c 100644 |
--- a/chromeos/network/network_configuration_handler.cc |
+++ b/chromeos/network/network_configuration_handler.cc |
@@ -53,12 +53,15 @@ void GetPropertiesCallback( |
const std::string& service_path, |
DBusMethodCallStatus call_status, |
const base::DictionaryValue& properties) { |
- // Get the correct name from WifiHex if necessary. |
scoped_ptr<base::DictionaryValue> properties_copy(properties.DeepCopy()); |
- std::string name = |
- shill_property_util::GetNameFromProperties(service_path, properties); |
- if (!name.empty()) { |
- properties_copy->SetStringWithoutPathExpansion(shill::kNameProperty, name); |
+ if (properties.HasKey(shill::kTypeProperty)) { |
pneubeck (no reviews)
2014/03/21 09:33:42
isn't this a major error and should stop the conne
stevenjb
2014/03/21 17:08:51
This one happens regularly, but it's because somet
|
+ // Get the correct name from WifiHex if necessary. |
+ std::string name = |
+ shill_property_util::GetNameFromProperties(service_path, properties); |
+ if (!name.empty()) { |
+ properties_copy->SetStringWithoutPathExpansion( |
+ shill::kNameProperty, name); |
+ } |
} |
if (call_status != DBUS_METHOD_CALL_SUCCESS) { |
// Because network services are added and removed frequently, we will see |
@@ -279,15 +282,17 @@ void NetworkConfigurationHandler::CreateConfiguration( |
DBusThreadManager::Get()->GetShillManagerClient(); |
std::string type; |
properties.GetStringWithoutPathExpansion(shill::kTypeProperty, &type); |
+ DCHECK(!type.empty()); |
if (NetworkTypePattern::Ethernet().MatchesType(type)) { |
InvokeErrorCallback( |
- "" /* no service path */, |
+ shill_property_util::GetNetworkIdFromProperties(properties), |
error_callback, |
- "ConfigureServiceForProfile is not implemented for Ethernet"); |
+ "ConfigureServiceForProfile: Invalid type: " + type); |
return; |
} |
- NET_LOG_USER("CreateConfiguration", type); |
+ NET_LOG_USER("CreateConfiguration: " + type, |
+ shill_property_util::GetNetworkIdFromProperties(properties)); |
LogConfigProperties("Configure", type, properties); |
std::string profile; |