Index: chromeos/dbus/shill_device_client_stub.cc |
diff --git a/chromeos/dbus/shill_device_client_stub.cc b/chromeos/dbus/shill_device_client_stub.cc |
index 7ede6dc615249ab4b138407235510cb8618c64e3..b82f0d0b27a895762e8399284a1e8fe3fe344478 100644 |
--- a/chromeos/dbus/shill_device_client_stub.cc |
+++ b/chromeos/dbus/shill_device_client_stub.cc |
@@ -235,11 +235,30 @@ void ShillDeviceClientStub::ClearDevices(){ |
void ShillDeviceClientStub::SetDeviceProperty(const std::string& device_path, |
const std::string& name, |
const base::Value& value){ |
+ VLOG(1) << "SetDeviceProperty: " << device_path |
+ << ": " << name << " = " << value; |
SetProperty(dbus::ObjectPath(device_path), name, value, |
base::Bind(&base::DoNothing), |
base::Bind(&ErrorFunction)); |
} |
+std::string ShillDeviceClientStub::GetDevicePathForType( |
+ const std::string& type) { |
+ for (base::DictionaryValue::Iterator iter(stub_devices_); |
+ !iter.IsAtEnd(); iter.Advance()) { |
+ const base::DictionaryValue* properties = NULL; |
+ if (!iter.value().GetAsDictionary(&properties)) |
+ continue; |
+ std::string prop_type; |
+ if (!properties->GetStringWithoutPathExpansion( |
+ flimflam::kTypeProperty, &prop_type) || |
+ prop_type != type) |
+ continue; |
+ return iter.key(); |
+ } |
+ return std::string(); |
+} |
+ |
void ShillDeviceClientStub::SetDefaultProperties() { |
// Add a wifi device. Note: path matches Manager entry. |
AddDevice("stub_wifi_device1", flimflam::kTypeWifi, "/device/wifi1"); |