| Index: chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
|
| diff --git a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
|
| index bc63f1f019261044a4c79bb9238af431a181274e..1dd4ae47d9a34820c87e4f35bcd9dbf3df10222c 100644
|
| --- a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
|
| +++ b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
|
| @@ -1227,6 +1227,22 @@ void InternetOptionsHandler::PopulateDictionaryDetailsCallback(
|
| const chromeos::Network* network,
|
| const std::string& service_path,
|
| const base::DictionaryValue* shill_properties) {
|
| + // Have to copy the properties because the object will be out of scope when
|
| + // this function call completes (it's owned by the calling function).
|
| + base::DictionaryValue* shill_props_copy = shill_properties->DeepCopy();
|
| + chromeos::CrosListIPConfigs(
|
| + network->device_path(),
|
| + base::Bind(&InternetOptionsHandler::PopulateIPConfigsCallback,
|
| + weak_factory_.GetWeakPtr(),
|
| + network,
|
| + base::Owned(shill_props_copy)));
|
| +}
|
| +
|
| +void InternetOptionsHandler::PopulateIPConfigsCallback(
|
| + const chromeos::Network* network,
|
| + base::DictionaryValue* shill_properties,
|
| + const chromeos::NetworkIPConfigVector& ipconfigs,
|
| + const std::string& hardware_address) {
|
| if (VLOG_IS_ON(2)) {
|
| std::string properties_json;
|
| base::JSONWriter::WriteWithOptions(shill_properties,
|
| @@ -1244,10 +1260,6 @@ void InternetOptionsHandler::PopulateDictionaryDetailsCallback(
|
| cros_->FindOncForNetwork(network->unique_id());
|
|
|
| base::DictionaryValue dictionary;
|
| - std::string hardware_address;
|
| - chromeos::NetworkIPConfigVector ipconfigs = cros_->GetIPConfigs(
|
| - network->device_path(), &hardware_address,
|
| - chromeos::NetworkLibrary::FORMAT_COLON_SEPARATED_HEX);
|
| if (!hardware_address.empty())
|
| dictionary.SetString(kTagHardwareAddress, hardware_address);
|
|
|
| @@ -1304,7 +1316,8 @@ void InternetOptionsHandler::PopulateDictionaryDetailsCallback(
|
| static_ip_dict.release(),
|
| property_ui_data);
|
| } else {
|
| - LOG(ERROR) << "Unable to fetch IP configuration for " << service_path;
|
| + LOG(ERROR) << "Unable to fetch IP configuration for "
|
| + << network->service_path();
|
| // If we were unable to fetch shill_properties for some reason,
|
| // then just go with some defaults.
|
| dictionary.SetBoolean(kIpConfigAutoConfig, false);
|
|
|