Index: chromeos/network/shill_property_handler.cc |
diff --git a/chromeos/network/shill_property_handler.cc b/chromeos/network/shill_property_handler.cc |
index e3083cd0c84a00624f84dc727e5ff4e1234462cd..75594140d609be0b1664fb9aa4017d40301a3072 100644 |
--- a/chromeos/network/shill_property_handler.cc |
+++ b/chromeos/network/shill_property_handler.cc |
@@ -409,7 +409,7 @@ void ShillPropertyHandler::NetworkServicePropertyChangedCallback( |
const std::string& key, |
const base::Value& value) { |
if (key == shill::kIPConfigProperty) { |
- // Handle IPConfig here and call listener_->UpdateNetworkServiceIPAddress |
+ // Request the IPConfig for the network and update network properties |
// when the request completes. |
std::string ip_config_path; |
value.GetAsString(&ip_config_path); |
@@ -428,16 +428,28 @@ void ShillPropertyHandler::GetIPConfigCallback( |
DBusMethodCallStatus call_status, |
const base::DictionaryValue& properties) { |
if (call_status != DBUS_METHOD_CALL_SUCCESS) { |
- LOG(ERROR) << "Failed to get IP properties for: " << service_path; |
+ LOG(ERROR) << "Failed to get IP Config properties for: " << service_path; |
return; |
} |
- std::string ip_address; |
- if (!properties.GetStringWithoutPathExpansion(flimflam::kAddressProperty, |
- &ip_address)) { |
+ const base::Value* ip_address; |
+ if (!properties.GetWithoutPathExpansion(flimflam::kAddressProperty, |
+ &ip_address)) { |
LOG(ERROR) << "Failed to get IP Address property for: " << service_path; |
return; |
} |
- listener_->UpdateNetworkServiceIPAddress(service_path, ip_address); |
+ listener_->UpdateNetworkServiceProperty(service_path, |
+ flimflam::kAddressProperty, |
pneubeck (no reviews)
2013/03/28 10:37:54
Use the complete nested key, like:
printf('%s.%s'
gauravsh
2013/03/28 18:48:54
I don't see the gain. Is it because you are worrie
stevenjb
2013/03/28 19:27:13
Yes, please do not. NetworkState is a convenience
pneubeck (no reviews)
2013/03/29 19:16:52
This comment was based on the proposed changes to
stevenjb
2013/03/29 19:41:25
OK, I thought about it some more, and now agree th
|
+ *ip_address); |
+ |
+ const base::Value* dns_servers = NULL; |
+ if (!properties.GetWithoutPathExpansion(flimflam::kNameServersProperty, |
+ &dns_servers)) { |
+ LOG(ERROR) << "Failed to get Name servers property for: " << service_path; |
+ return; |
+ } |
+ listener_->UpdateNetworkServiceProperty(service_path, |
pneubeck (no reviews)
2013/03/28 10:37:54
ditto
gauravsh
2013/03/28 18:48:54
See my question above.
|
+ flimflam::kNameServersProperty, |
+ *dns_servers); |
} |
void ShillPropertyHandler::NetworkDevicePropertyChangedCallback( |