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, |
+ *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, |
+ flimflam::kNameServersProperty, |
+ *dns_servers); |
} |
void ShillPropertyHandler::NetworkDevicePropertyChangedCallback( |