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

Unified Diff: chromeos/dbus/shill_device_client_stub.cc

Issue 14069010: Call RequestScan periodically while the network list is open (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 8 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/dbus/shill_device_client_stub.h ('k') | chromeos/dbus/shill_manager_client_stub.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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");
« no previous file with comments | « chromeos/dbus/shill_device_client_stub.h ('k') | chromeos/dbus/shill_manager_client_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698