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

Unified Diff: chromeos/dbus/shill_device_client.cc

Issue 11192024: Add chromeos::NetworkStateManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup, comment, and add unit tests Created 8 years, 2 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
Index: chromeos/dbus/shill_device_client.cc
diff --git a/chromeos/dbus/shill_device_client.cc b/chromeos/dbus/shill_device_client.cc
index b2cc011991a85b2cb2db28ca95cbadbf47f7c8b6..e9dee239404a40078d783ec519f5108f58ae37a1 100644
--- a/chromeos/dbus/shill_device_client.cc
+++ b/chromeos/dbus/shill_device_client.cc
@@ -218,8 +218,21 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
class ShillDeviceClientStubImpl : public ShillDeviceClient {
public:
ShillDeviceClientStubImpl() : weak_ptr_factory_(this) {
- // Add a cellular device for SMS. Note: name matches Manager entry.
- const char kStubCellular1[] = "stub_cellular1";
+ // Add a wifi device. Note: name matches Manager entry.
+ base::DictionaryValue* wifi_properties = new base::DictionaryValue;
+ wifi_properties->SetWithoutPathExpansion(
+ flimflam::kTypeProperty,
+ base::Value::CreateStringValue(flimflam::kTypeWifi));
+ wifi_properties->SetWithoutPathExpansion(
+ flimflam::kDBusConnectionProperty,
+ base::Value::CreateStringValue("/stub"));
+ wifi_properties->SetWithoutPathExpansion(
+ flimflam::kDBusObjectProperty,
+ base::Value::CreateStringValue("/device/wifi1"));
+ stub_devices_.Set("stub_wifi_device1", wifi_properties);
+
+ // Add a cellular device. Used in SMS stub.
+ // Note: name matches Manager entry.
base::DictionaryValue* cellular_properties = new base::DictionaryValue;
cellular_properties->SetWithoutPathExpansion(
flimflam::kTypeProperty,
@@ -230,12 +243,11 @@ class ShillDeviceClientStubImpl : public ShillDeviceClient {
cellular_properties->SetWithoutPathExpansion(
flimflam::kDBusObjectProperty,
base::Value::CreateStringValue("/device/cellular1"));
- stub_devices_.Set(kStubCellular1, cellular_properties);
+ stub_devices_.Set("stub_cellular_device1", cellular_properties);
// Create a second device stubbing a modem managed by
// ModemManager1 interfaces.
// Note: name matches Manager entry.
- const char kStubCellular2[] = "stub_cellular2";
cellular_properties = new base::DictionaryValue;
cellular_properties->SetWithoutPathExpansion(
flimflam::kTypeProperty,
@@ -247,7 +259,7 @@ class ShillDeviceClientStubImpl : public ShillDeviceClient {
flimflam::kDBusObjectProperty,
base::Value::CreateStringValue(
"/org/freedesktop/ModemManager1/stub/0"));
- stub_devices_.Set(kStubCellular2, cellular_properties);
+ stub_devices_.Set("stub_cellular_device2", cellular_properties);
}
virtual ~ShillDeviceClientStubImpl() {}

Powered by Google App Engine
This is Rietveld 408576698