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

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: Rebase 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
« no previous file with comments | « chromeos/network/managed_network_configuration_handler_impl.cc ('k') | chromeos/network/network_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/network_configuration_handler.cc
diff --git a/chromeos/network/network_configuration_handler.cc b/chromeos/network/network_configuration_handler.cc
index 315f7a81ef4b555c1b6ef5bd0689fe728c7b8f6f..ea81a75cc398d43fbc3113a2003d8226291c6d1c 100644
--- a/chromeos/network/network_configuration_handler.cc
+++ b/chromeos/network/network_configuration_handler.cc
@@ -53,13 +53,6 @@ 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 (call_status != DBUS_METHOD_CALL_SUCCESS) {
// Because network services are added and removed frequently, we will see
// failures regularly, so don't log these.
@@ -67,9 +60,18 @@ void GetPropertiesCallback(
service_path,
network_handler::kDBusFailedError,
network_handler::kDBusFailedErrorMessage);
- } else if (!callback.is_null()) {
- callback.Run(service_path, *properties_copy.get());
+ return;
}
+ if (callback.is_null())
+ return;
+
+ // 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);
+ callback.Run(service_path, *properties_copy.get());
}
void SetNetworkProfileErrorCallback(
@@ -267,15 +269,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;
« no previous file with comments | « chromeos/network/managed_network_configuration_handler_impl.cc ('k') | chromeos/network/network_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698