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

Unified Diff: chromeos/network/network_configuration_handler.cc

Issue 207183003: Cleanup network event logging, add to ManagedNetworkConfigurationHandler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 9 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
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;

Powered by Google App Engine
This is Rietveld 408576698