summaryrefslogtreecommitdiffstats
path: root/chromeos
diff options
context:
space:
mode:
authorbenchan@chromium.org <benchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-24 07:02:28 +0000
committerbenchan@chromium.org <benchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-24 07:02:28 +0000
commitd9766a6b680026983287e66670f5ef2e8006bc8d (patch)
tree9d782775dbfb805e719f441a1eef82793903fb0f /chromeos
parentfe2a870e7930404fd8525ddeedea0bcfb434c9bd (diff)
downloadchromium_src-d9766a6b680026983287e66670f5ef2e8006bc8d.zip
chromium_src-d9766a6b680026983287e66670f5ef2e8006bc8d.tar.gz
chromium_src-d9766a6b680026983287e66670f5ef2e8006bc8d.tar.bz2
Migrate DBus service constants from flimflam namespace to shill namespace.
All shill DBus service constants have been moved from the flimflam namespace to the shill namespace. This CL makes the corresponding changes on the Chrome side. Related CLs: https://chromium-review.googlesource.com/#/c/170123/ https://chromium-review.googlesource.com/#/c/170205/ https://chromium-review.googlesource.com/#/c/170206/ https://chromium-review.googlesource.com/#/c/170207/ https://chromium-review.googlesource.com/#/c/170208/ https://chromium-review.googlesource.com/#/c/170209/ https://chromium-review.googlesource.com/#/c/170223/ https://chromium-review.googlesource.com/#/c/170230/ https://chromium-review.googlesource.com/#/c/170231/ BUG=295425 R=stevenjb@chromium.org Review URL: https://chromiumcodereview.appspot.com/24286008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224934 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos')
-rw-r--r--chromeos/dbus/shill_client_helper.cc2
-rw-r--r--chromeos/dbus/shill_client_unittest_base.cc25
-rw-r--r--chromeos/dbus/shill_device_client.cc48
-rw-r--r--chromeos/dbus/shill_device_client_stub.cc8
-rw-r--r--chromeos/dbus/shill_device_client_unittest.cc54
-rw-r--r--chromeos/dbus/shill_ipconfig_client.cc22
-rw-r--r--chromeos/dbus/shill_ipconfig_client_unittest.cc34
-rw-r--r--chromeos/dbus/shill_manager_client.cc47
-rw-r--r--chromeos/dbus/shill_manager_client_stub.cc137
-rw-r--r--chromeos/dbus/shill_manager_client_unittest.cc52
-rw-r--r--chromeos/dbus/shill_profile_client.cc16
-rw-r--r--chromeos/dbus/shill_profile_client_stub.cc8
-rw-r--r--chromeos/dbus/shill_profile_client_unittest.cc30
-rw-r--r--chromeos/dbus/shill_service_client.cc40
-rw-r--r--chromeos/dbus/shill_service_client_stub.cc61
-rw-r--r--chromeos/dbus/shill_service_client_unittest.cc40
-rw-r--r--chromeos/dbus/shill_stub_helper.cc93
17 files changed, 354 insertions, 363 deletions
diff --git a/chromeos/dbus/shill_client_helper.cc b/chromeos/dbus/shill_client_helper.cc
index 87b526c..b430609 100644
--- a/chromeos/dbus/shill_client_helper.cc
+++ b/chromeos/dbus/shill_client_helper.cc
@@ -214,7 +214,7 @@ void ShillClientHelper::MonitorPropertyChangedInternal(
// We are not using dbus::PropertySet to monitor PropertyChanged signal
// because the interface is not "org.freedesktop.DBus.Properties".
proxy_->ConnectToSignal(interface_name,
- flimflam::kMonitorPropertyChanged,
+ shill::kMonitorPropertyChanged,
base::Bind(&ShillClientHelper::OnPropertyChanged,
weak_ptr_factory_.GetWeakPtr()),
base::Bind(&ShillClientHelper::OnSignalConnected,
diff --git a/chromeos/dbus/shill_client_unittest_base.cc b/chromeos/dbus/shill_client_unittest_base.cc
index afce041..ab5937e 100644
--- a/chromeos/dbus/shill_client_unittest_base.cc
+++ b/chromeos/dbus/shill_client_unittest_base.cc
@@ -43,8 +43,7 @@ base::DictionaryValue* PopStringToStringDictionary(
!entry_reader.PopString(&key) ||
!entry_reader.PopString(&value))
return NULL;
- result->SetWithoutPathExpansion(key,
- base::Value::CreateStringValue(value));
+ result->SetWithoutPathExpansion(key, base::Value::CreateStringValue(value));
}
return result.release();
}
@@ -131,7 +130,7 @@ void ShillClientUnittestBase::SetUp() {
// Create a mock proxy.
mock_proxy_ = new dbus::MockObjectProxy(
mock_bus_.get(),
- flimflam::kFlimflamServiceName,
+ shill::kFlimflamServiceName,
object_path_);
// Set an expectation so mock_proxy's CallMethod() will use OnCallMethod()
@@ -149,14 +148,14 @@ void ShillClientUnittestBase::SetUp() {
// OnConnectToSignal() to run the callback.
EXPECT_CALL(
*mock_proxy_.get(),
- ConnectToSignal(interface_name_, flimflam::kMonitorPropertyChanged, _, _))
+ ConnectToSignal(interface_name_, shill::kMonitorPropertyChanged, _, _))
.WillRepeatedly(
Invoke(this, &ShillClientUnittestBase::OnConnectToSignal));
// Set an expectation so mock_bus's GetObjectProxy() for the given
// service name and the object path will return mock_proxy_.
EXPECT_CALL(*mock_bus_.get(),
- GetObjectProxy(flimflam::kFlimflamServiceName, object_path_))
+ GetObjectProxy(shill::kFlimflamServiceName, object_path_))
.WillOnce(Return(mock_proxy_.get()));
// Set an expectation so mock_bus's PostTaskToDBusThread() will run the
@@ -287,20 +286,20 @@ base::DictionaryValue*
ShillClientUnittestBase::CreateExampleServiceProperties() {
base::DictionaryValue* properties = new base::DictionaryValue;
properties->SetWithoutPathExpansion(
- flimflam::kGuidProperty,
+ shill::kGuidProperty,
base::Value::CreateStringValue("00000000-0000-0000-0000-000000000000"));
properties->SetWithoutPathExpansion(
- flimflam::kModeProperty,
- base::Value::CreateStringValue(flimflam::kModeManaged));
+ shill::kModeProperty,
+ base::Value::CreateStringValue(shill::kModeManaged));
properties->SetWithoutPathExpansion(
- flimflam::kTypeProperty,
- base::Value::CreateStringValue(flimflam::kTypeWifi));
+ shill::kTypeProperty,
+ base::Value::CreateStringValue(shill::kTypeWifi));
properties->SetWithoutPathExpansion(
- flimflam::kSSIDProperty,
+ shill::kSSIDProperty,
base::Value::CreateStringValue("testssid"));
properties->SetWithoutPathExpansion(
- flimflam::kSecurityProperty,
- base::Value::CreateStringValue(flimflam::kSecurityPsk));
+ shill::kSecurityProperty,
+ base::Value::CreateStringValue(shill::kSecurityPsk));
return properties;
}
diff --git a/chromeos/dbus/shill_device_client.cc b/chromeos/dbus/shill_device_client.cc
index 420f586..931e71a 100644
--- a/chromeos/dbus/shill_device_client.cc
+++ b/chromeos/dbus/shill_device_client.cc
@@ -57,15 +57,15 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
virtual void GetProperties(const dbus::ObjectPath& device_path,
const DictionaryValueCallback& callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamDeviceInterface,
- flimflam::kGetPropertiesFunction);
+ dbus::MethodCall method_call(shill::kFlimflamDeviceInterface,
+ shill::kGetPropertiesFunction);
GetHelper(device_path)->CallDictionaryValueMethod(&method_call, callback);
}
virtual void ProposeScan(const dbus::ObjectPath& device_path,
const VoidDBusMethodCallback& callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamDeviceInterface,
- flimflam::kProposeScanFunction);
+ dbus::MethodCall method_call(shill::kFlimflamDeviceInterface,
+ shill::kProposeScanFunction);
GetHelper(device_path)->CallVoidMethod(&method_call, callback);
}
@@ -74,8 +74,8 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
const base::Value& value,
const base::Closure& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamDeviceInterface,
- flimflam::kSetPropertyFunction);
+ dbus::MethodCall method_call(shill::kFlimflamDeviceInterface,
+ shill::kSetPropertyFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(name);
ShillClientHelper::AppendValueDataAsVariant(&writer, value);
@@ -87,8 +87,8 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
virtual void ClearProperty(const dbus::ObjectPath& device_path,
const std::string& name,
const VoidDBusMethodCallback& callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamDeviceInterface,
- flimflam::kClearPropertyFunction);
+ dbus::MethodCall method_call(shill::kFlimflamDeviceInterface,
+ shill::kClearPropertyFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(name);
GetHelper(device_path)->CallVoidMethod(&method_call, callback);
@@ -98,8 +98,8 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
const dbus::ObjectPath& device_path,
const std::string& method,
const ObjectPathDBusMethodCallback& callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamDeviceInterface,
- flimflam::kAddIPConfigFunction);
+ dbus::MethodCall method_call(shill::kFlimflamDeviceInterface,
+ shill::kAddIPConfigFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(method);
GetHelper(device_path)->CallObjectPathMethod(&method_call, callback);
@@ -110,8 +110,8 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
bool require,
const base::Closure& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamDeviceInterface,
- flimflam::kRequirePinFunction);
+ dbus::MethodCall method_call(shill::kFlimflamDeviceInterface,
+ shill::kRequirePinFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(pin);
writer.AppendBool(require);
@@ -123,8 +123,8 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
const std::string& pin,
const base::Closure& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamDeviceInterface,
- flimflam::kEnterPinFunction);
+ dbus::MethodCall method_call(shill::kFlimflamDeviceInterface,
+ shill::kEnterPinFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(pin);
GetHelper(device_path)->CallVoidMethodWithErrorCallback(
@@ -136,8 +136,8 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
const std::string& pin,
const base::Closure& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamDeviceInterface,
- flimflam::kUnblockPinFunction);
+ dbus::MethodCall method_call(shill::kFlimflamDeviceInterface,
+ shill::kUnblockPinFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(puk);
writer.AppendString(pin);
@@ -150,8 +150,8 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
const std::string& new_pin,
const base::Closure& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamDeviceInterface,
- flimflam::kChangePinFunction);
+ dbus::MethodCall method_call(shill::kFlimflamDeviceInterface,
+ shill::kChangePinFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(old_pin);
writer.AppendString(new_pin);
@@ -163,8 +163,8 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
const std::string& network_id,
const base::Closure& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamDeviceInterface,
- flimflam::kRegisterFunction);
+ dbus::MethodCall method_call(shill::kFlimflamDeviceInterface,
+ shill::kRegisterFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(network_id);
GetHelper(device_path)->CallVoidMethodWithErrorCallback(
@@ -175,7 +175,7 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
const std::string& carrier,
const base::Closure& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamDeviceInterface,
+ dbus::MethodCall method_call(shill::kFlimflamDeviceInterface,
shill::kSetCarrierFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(carrier);
@@ -186,7 +186,7 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
virtual void Reset(const dbus::ObjectPath& device_path,
const base::Closure& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamDeviceInterface,
+ dbus::MethodCall method_call(shill::kFlimflamDeviceInterface,
shill::kResetFunction);
GetHelper(device_path)->CallVoidMethodWithErrorCallback(
&method_call, callback, error_callback);
@@ -214,10 +214,10 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
// There is no helper for the profile, create it.
dbus::ObjectProxy* object_proxy =
- bus_->GetObjectProxy(flimflam::kFlimflamServiceName, device_path);
+ bus_->GetObjectProxy(shill::kFlimflamServiceName, device_path);
ShillClientHelper* helper = new ShillClientHelper(bus_, object_proxy);
CHECK(helper) << "Unable to create Shill client helper.";
- helper->MonitorPropertyChanged(flimflam::kFlimflamDeviceInterface);
+ helper->MonitorPropertyChanged(shill::kFlimflamDeviceInterface);
helpers_.insert(HelperMap::value_type(device_path.value(), helper));
return helper;
}
diff --git a/chromeos/dbus/shill_device_client_stub.cc b/chromeos/dbus/shill_device_client_stub.cc
index c58ed23..d1a89a7 100644
--- a/chromeos/dbus/shill_device_client_stub.cc
+++ b/chromeos/dbus/shill_device_client_stub.cc
@@ -181,13 +181,13 @@ void ShillDeviceClientStub::AddDevice(const std::string& device_path,
base::DictionaryValue* properties = GetDeviceProperties(device_path);
properties->SetWithoutPathExpansion(
- flimflam::kTypeProperty,
+ shill::kTypeProperty,
base::Value::CreateStringValue(type));
properties->SetWithoutPathExpansion(
- flimflam::kDBusObjectProperty,
+ shill::kDBusObjectProperty,
base::Value::CreateStringValue(object_path));
properties->SetWithoutPathExpansion(
- flimflam::kDBusConnectionProperty,
+ shill::kDBusConnectionProperty,
base::Value::CreateStringValue("/stub"));
}
@@ -224,7 +224,7 @@ std::string ShillDeviceClientStub::GetDevicePathForType(
continue;
std::string prop_type;
if (!properties->GetStringWithoutPathExpansion(
- flimflam::kTypeProperty, &prop_type) ||
+ shill::kTypeProperty, &prop_type) ||
prop_type != type)
continue;
return iter.key();
diff --git a/chromeos/dbus/shill_device_client_unittest.cc b/chromeos/dbus/shill_device_client_unittest.cc
index 52e50a9..bce00dd 100644
--- a/chromeos/dbus/shill_device_client_unittest.cc
+++ b/chromeos/dbus/shill_device_client_unittest.cc
@@ -52,7 +52,7 @@ void ExpectTwoStringArguments(const std::string& expected_string1,
class ShillDeviceClientTest : public ShillClientUnittestBase {
public:
ShillDeviceClientTest()
- : ShillClientUnittestBase(flimflam::kFlimflamDeviceInterface,
+ : ShillClientUnittestBase(shill::kFlimflamDeviceInterface,
dbus::ObjectPath(kExampleDevicePath)) {
}
@@ -76,19 +76,18 @@ class ShillDeviceClientTest : public ShillClientUnittestBase {
TEST_F(ShillDeviceClientTest, PropertyChanged) {
const bool kValue = true;
// Create a signal.
- dbus::Signal signal(flimflam::kFlimflamDeviceInterface,
- flimflam::kMonitorPropertyChanged);
+ dbus::Signal signal(shill::kFlimflamDeviceInterface,
+ shill::kMonitorPropertyChanged);
dbus::MessageWriter writer(&signal);
- writer.AppendString(flimflam::kCellularAllowRoamingProperty);
+ writer.AppendString(shill::kCellularAllowRoamingProperty);
writer.AppendVariantOfBool(kValue);
// Set expectations.
const base::FundamentalValue value(kValue);
MockPropertyChangeObserver observer;
EXPECT_CALL(observer,
- OnPropertyChanged(
- flimflam::kCellularAllowRoamingProperty,
- ValueEq(ByRef(value)))).Times(1);
+ OnPropertyChanged(shill::kCellularAllowRoamingProperty,
+ ValueEq(ByRef(value)))).Times(1);
// Add the observer
client_->AddPropertyChangedObserver(
@@ -104,9 +103,8 @@ TEST_F(ShillDeviceClientTest, PropertyChanged) {
&observer);
EXPECT_CALL(observer,
- OnPropertyChanged(
- flimflam::kCellularAllowRoamingProperty,
- ValueEq(ByRef(value)))).Times(0);
+ OnPropertyChanged(shill::kCellularAllowRoamingProperty,
+ ValueEq(ByRef(value)))).Times(0);
// Run the signal callback again and make sure the observer isn't called.
SendPropertyChangedSignal(&signal);
@@ -121,16 +119,16 @@ TEST_F(ShillDeviceClientTest, GetProperties) {
writer.OpenArray("{sv}", &array_writer);
dbus::MessageWriter entry_writer(NULL);
array_writer.OpenDictEntry(&entry_writer);
- entry_writer.AppendString(flimflam::kCellularAllowRoamingProperty);
+ entry_writer.AppendString(shill::kCellularAllowRoamingProperty);
entry_writer.AppendVariantOfBool(kValue);
array_writer.CloseContainer(&entry_writer);
writer.CloseContainer(&array_writer);
// Set expectations.
base::DictionaryValue value;
- value.SetWithoutPathExpansion(flimflam::kCellularAllowRoamingProperty,
+ value.SetWithoutPathExpansion(shill::kCellularAllowRoamingProperty,
base::Value::CreateBooleanValue(kValue));
- PrepareForMethodCall(flimflam::kGetPropertiesFunction,
+ PrepareForMethodCall(shill::kGetPropertiesFunction,
base::Bind(&ExpectNoArgument),
response.get());
// Call method.
@@ -145,7 +143,7 @@ TEST_F(ShillDeviceClientTest, ProposeScan) {
scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
// Set expectations.
- PrepareForMethodCall(flimflam::kProposeScanFunction,
+ PrepareForMethodCall(shill::kProposeScanFunction,
base::Bind(&ExpectNoArgument),
response.get());
// Call method.
@@ -162,16 +160,16 @@ TEST_F(ShillDeviceClientTest, SetProperty) {
// Set expectations.
const base::FundamentalValue value(kValue);
- PrepareForMethodCall(flimflam::kSetPropertyFunction,
+ PrepareForMethodCall(shill::kSetPropertyFunction,
base::Bind(&ExpectStringAndValueArguments,
- flimflam::kCellularAllowRoamingProperty,
+ shill::kCellularAllowRoamingProperty,
&value),
response.get());
// Call method.
MockClosure mock_closure;
MockErrorCallback mock_error_callback;
client_->SetProperty(dbus::ObjectPath(kExampleDevicePath),
- flimflam::kCellularAllowRoamingProperty,
+ shill::kCellularAllowRoamingProperty,
value,
mock_closure.GetCallback(),
mock_error_callback.GetCallback());
@@ -187,13 +185,13 @@ TEST_F(ShillDeviceClientTest, ClearProperty) {
scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
// Set expectations.
- PrepareForMethodCall(flimflam::kClearPropertyFunction,
+ PrepareForMethodCall(shill::kClearPropertyFunction,
base::Bind(&ExpectStringArgument,
- flimflam::kCellularAllowRoamingProperty),
+ shill::kCellularAllowRoamingProperty),
response.get());
// Call method.
client_->ClearProperty(dbus::ObjectPath(kExampleDevicePath),
- flimflam::kCellularAllowRoamingProperty,
+ shill::kCellularAllowRoamingProperty,
base::Bind(&ExpectNoResultValue));
// Run the message loop.
message_loop_.RunUntilIdle();
@@ -207,12 +205,12 @@ TEST_F(ShillDeviceClientTest, AddIPConfig) {
writer.AppendObjectPath(expected_result);
// Set expectations.
- PrepareForMethodCall(flimflam::kAddIPConfigFunction,
- base::Bind(&ExpectStringArgument, flimflam::kTypeDHCP),
+ PrepareForMethodCall(shill::kAddIPConfigFunction,
+ base::Bind(&ExpectStringArgument, shill::kTypeDHCP),
response.get());
// Call method.
client_->AddIPConfig(dbus::ObjectPath(kExampleDevicePath),
- flimflam::kTypeDHCP,
+ shill::kTypeDHCP,
base::Bind(&ExpectObjectPathResult, expected_result));
// Run the message loop.
message_loop_.RunUntilIdle();
@@ -227,7 +225,7 @@ TEST_F(ShillDeviceClientTest, RequirePin) {
// Set expectations.
MockClosure mock_closure;
MockErrorCallback mock_error_callback;
- PrepareForMethodCall(flimflam::kRequirePinFunction,
+ PrepareForMethodCall(shill::kRequirePinFunction,
base::Bind(&ExpectStringAndBoolArguments,
kPin,
kRequired),
@@ -252,7 +250,7 @@ TEST_F(ShillDeviceClientTest, EnterPin) {
// Set expectations.
MockClosure mock_closure;
MockErrorCallback mock_error_callback;
- PrepareForMethodCall(flimflam::kEnterPinFunction,
+ PrepareForMethodCall(shill::kEnterPinFunction,
base::Bind(&ExpectStringArgument,
kPin),
response.get());
@@ -277,7 +275,7 @@ TEST_F(ShillDeviceClientTest, UnblockPin) {
// Set expectations.
MockClosure mock_closure;
MockErrorCallback mock_error_callback;
- PrepareForMethodCall(flimflam::kUnblockPinFunction,
+ PrepareForMethodCall(shill::kUnblockPinFunction,
base::Bind(&ExpectTwoStringArguments, kPuk, kPin),
response.get());
EXPECT_CALL(mock_closure, Run()).Times(1);
@@ -302,7 +300,7 @@ TEST_F(ShillDeviceClientTest, ChangePin) {
// Set expectations.
MockClosure mock_closure;
MockErrorCallback mock_error_callback;
- PrepareForMethodCall(flimflam::kChangePinFunction,
+ PrepareForMethodCall(shill::kChangePinFunction,
base::Bind(&ExpectTwoStringArguments,
kOldPin,
kNewPin),
@@ -328,7 +326,7 @@ TEST_F(ShillDeviceClientTest, Register) {
// Set expectations.
MockClosure mock_closure;
MockErrorCallback mock_error_callback;
- PrepareForMethodCall(flimflam::kRegisterFunction,
+ PrepareForMethodCall(shill::kRegisterFunction,
base::Bind(&ExpectStringArgument, kNetworkId),
response.get());
EXPECT_CALL(mock_closure, Run()).Times(1);
diff --git a/chromeos/dbus/shill_ipconfig_client.cc b/chromeos/dbus/shill_ipconfig_client.cc
index b896220..4483078 100644
--- a/chromeos/dbus/shill_ipconfig_client.cc
+++ b/chromeos/dbus/shill_ipconfig_client.cc
@@ -69,9 +69,9 @@ class ShillIPConfigClientImpl : public ShillIPConfigClient {
// There is no helper for the profile, create it.
dbus::ObjectProxy* object_proxy =
- bus_->GetObjectProxy(flimflam::kFlimflamServiceName, ipconfig_path);
+ bus_->GetObjectProxy(shill::kFlimflamServiceName, ipconfig_path);
ShillClientHelper* helper = new ShillClientHelper(bus_, object_proxy);
- helper->MonitorPropertyChanged(flimflam::kFlimflamIPConfigInterface);
+ helper->MonitorPropertyChanged(shill::kFlimflamIPConfigInterface);
helpers_.insert(HelperMap::value_type(ipconfig_path.value(), helper));
return helper;
}
@@ -91,15 +91,15 @@ ShillIPConfigClientImpl::ShillIPConfigClientImpl()
void ShillIPConfigClientImpl::GetProperties(
const dbus::ObjectPath& ipconfig_path,
const DictionaryValueCallback& callback) {
- dbus::MethodCall method_call(flimflam::kFlimflamIPConfigInterface,
- flimflam::kGetPropertiesFunction);
+ dbus::MethodCall method_call(shill::kFlimflamIPConfigInterface,
+ shill::kGetPropertiesFunction);
GetHelper(ipconfig_path)->CallDictionaryValueMethod(&method_call, callback);
}
void ShillIPConfigClientImpl::Refresh(
const dbus::ObjectPath& ipconfig_path,
const VoidDBusMethodCallback& callback) {
- dbus::MethodCall method_call(flimflam::kFlimflamIPConfigInterface,
+ dbus::MethodCall method_call(shill::kFlimflamIPConfigInterface,
shill::kRefreshFunction);
GetHelper(ipconfig_path)->CallVoidMethod(&method_call, callback);
}
@@ -109,8 +109,8 @@ void ShillIPConfigClientImpl::SetProperty(
const std::string& name,
const base::Value& value,
const VoidDBusMethodCallback& callback) {
- dbus::MethodCall method_call(flimflam::kFlimflamIPConfigInterface,
- flimflam::kSetPropertyFunction);
+ dbus::MethodCall method_call(shill::kFlimflamIPConfigInterface,
+ shill::kSetPropertyFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(name);
// IPConfig supports writing basic type and string array properties.
@@ -150,8 +150,8 @@ void ShillIPConfigClientImpl::ClearProperty(
const dbus::ObjectPath& ipconfig_path,
const std::string& name,
const VoidDBusMethodCallback& callback) {
- dbus::MethodCall method_call(flimflam::kFlimflamIPConfigInterface,
- flimflam::kClearPropertyFunction);
+ dbus::MethodCall method_call(shill::kFlimflamIPConfigInterface,
+ shill::kClearPropertyFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(name);
GetHelper(ipconfig_path)->CallVoidMethod(&method_call, callback);
@@ -160,8 +160,8 @@ void ShillIPConfigClientImpl::ClearProperty(
void ShillIPConfigClientImpl::Remove(
const dbus::ObjectPath& ipconfig_path,
const VoidDBusMethodCallback& callback) {
- dbus::MethodCall method_call(flimflam::kFlimflamIPConfigInterface,
- flimflam::kRemoveConfigFunction);
+ dbus::MethodCall method_call(shill::kFlimflamIPConfigInterface,
+ shill::kRemoveConfigFunction);
GetHelper(ipconfig_path)->CallVoidMethod(&method_call, callback);
}
diff --git a/chromeos/dbus/shill_ipconfig_client_unittest.cc b/chromeos/dbus/shill_ipconfig_client_unittest.cc
index 6c15b15..e55231b 100644
--- a/chromeos/dbus/shill_ipconfig_client_unittest.cc
+++ b/chromeos/dbus/shill_ipconfig_client_unittest.cc
@@ -26,7 +26,7 @@ class ShillIPConfigClientTest : public ShillClientUnittestBase {
public:
ShillIPConfigClientTest()
: ShillClientUnittestBase(
- flimflam::kFlimflamIPConfigInterface,
+ shill::kFlimflamIPConfigInterface,
dbus::ObjectPath(kExampleIPConfigPath)) {
}
@@ -50,15 +50,15 @@ class ShillIPConfigClientTest : public ShillClientUnittestBase {
TEST_F(ShillIPConfigClientTest, PropertyChanged) {
// Create a signal.
const base::FundamentalValue kConnected(true);
- dbus::Signal signal(flimflam::kFlimflamIPConfigInterface,
- flimflam::kMonitorPropertyChanged);
+ dbus::Signal signal(shill::kFlimflamIPConfigInterface,
+ shill::kMonitorPropertyChanged);
dbus::MessageWriter writer(&signal);
- writer.AppendString(flimflam::kConnectedProperty);
+ writer.AppendString(shill::kConnectedProperty);
dbus::AppendBasicTypeValueDataAsVariant(&writer, kConnected);
// Set expectations.
MockPropertyChangeObserver observer;
- EXPECT_CALL(observer, OnPropertyChanged(flimflam::kConnectedProperty,
+ EXPECT_CALL(observer, OnPropertyChanged(shill::kConnectedProperty,
ValueEq(ByRef(kConnected)))).Times(1);
// Add the observer
@@ -92,25 +92,25 @@ TEST_F(ShillIPConfigClientTest, GetProperties) {
dbus::MessageWriter entry_writer(NULL);
// Append address.
array_writer.OpenDictEntry(&entry_writer);
- entry_writer.AppendString(flimflam::kAddressProperty);
+ entry_writer.AppendString(shill::kAddressProperty);
entry_writer.AppendVariantOfString(kAddress);
array_writer.CloseContainer(&entry_writer);
// Append MTU.
array_writer.OpenDictEntry(&entry_writer);
- entry_writer.AppendString(flimflam::kMtuProperty);
+ entry_writer.AppendString(shill::kMtuProperty);
entry_writer.AppendVariantOfInt32(kMtu);
array_writer.CloseContainer(&entry_writer);
writer.CloseContainer(&array_writer);
// Create the expected value.
base::DictionaryValue value;
- value.SetWithoutPathExpansion(flimflam::kAddressProperty,
+ value.SetWithoutPathExpansion(shill::kAddressProperty,
base::Value::CreateStringValue(kAddress));
- value.SetWithoutPathExpansion(flimflam::kMtuProperty,
+ value.SetWithoutPathExpansion(shill::kMtuProperty,
base::Value::CreateIntegerValue(kMtu));
// Set expectations.
- PrepareForMethodCall(flimflam::kGetPropertiesFunction,
+ PrepareForMethodCall(shill::kGetPropertiesFunction,
base::Bind(&ExpectNoArgument),
response.get());
// Call method.
@@ -128,14 +128,14 @@ TEST_F(ShillIPConfigClientTest, SetProperty) {
// Set expectations.
base::StringValue value(kAddress);
- PrepareForMethodCall(flimflam::kSetPropertyFunction,
+ PrepareForMethodCall(shill::kSetPropertyFunction,
base::Bind(&ExpectStringAndValueArguments,
- flimflam::kAddressProperty,
+ shill::kAddressProperty,
&value),
response.get());
// Call method.
client_->SetProperty(dbus::ObjectPath(kExampleIPConfigPath),
- flimflam::kAddressProperty,
+ shill::kAddressProperty,
value,
base::Bind(&ExpectNoResultValue));
// Run the message loop.
@@ -147,13 +147,13 @@ TEST_F(ShillIPConfigClientTest, ClearProperty) {
scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
// Set expectations.
- PrepareForMethodCall(flimflam::kClearPropertyFunction,
+ PrepareForMethodCall(shill::kClearPropertyFunction,
base::Bind(&ExpectStringArgument,
- flimflam::kAddressProperty),
+ shill::kAddressProperty),
response.get());
// Call method.
client_->ClearProperty(dbus::ObjectPath(kExampleIPConfigPath),
- flimflam::kAddressProperty,
+ shill::kAddressProperty,
base::Bind(&ExpectNoResultValue));
// Run the message loop.
message_loop_.RunUntilIdle();
@@ -164,7 +164,7 @@ TEST_F(ShillIPConfigClientTest, Remove) {
scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
// Set expectations.
- PrepareForMethodCall(flimflam::kRemoveConfigFunction,
+ PrepareForMethodCall(shill::kRemoveConfigFunction,
base::Bind(&ExpectNoArgument),
response.get());
// Call method.
diff --git a/chromeos/dbus/shill_manager_client.cc b/chromeos/dbus/shill_manager_client.cc
index 70f2095..f3cd1bb 100644
--- a/chromeos/dbus/shill_manager_client.cc
+++ b/chromeos/dbus/shill_manager_client.cc
@@ -39,14 +39,14 @@ class ShillManagerClientImpl : public ShillManagerClient {
}
virtual void GetProperties(const DictionaryValueCallback& callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamManagerInterface,
- flimflam::kGetPropertiesFunction);
+ dbus::MethodCall method_call(shill::kFlimflamManagerInterface,
+ shill::kGetPropertiesFunction);
helper_->CallDictionaryValueMethod(&method_call, callback);
}
virtual void GetNetworksForGeolocation(
const DictionaryValueCallback& callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamManagerInterface,
+ dbus::MethodCall method_call(shill::kFlimflamManagerInterface,
shill::kGetNetworksForGeolocation);
helper_->CallDictionaryValueMethod(&method_call, callback);
}
@@ -55,8 +55,8 @@ class ShillManagerClientImpl : public ShillManagerClient {
const base::Value& value,
const base::Closure& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamManagerInterface,
- flimflam::kSetPropertyFunction);
+ dbus::MethodCall method_call(shill::kFlimflamManagerInterface,
+ shill::kSetPropertyFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(name);
ShillClientHelper::AppendValueDataAsVariant(&writer, value);
@@ -68,8 +68,8 @@ class ShillManagerClientImpl : public ShillManagerClient {
virtual void RequestScan(const std::string& type,
const base::Closure& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamManagerInterface,
- flimflam::kRequestScanFunction);
+ dbus::MethodCall method_call(shill::kFlimflamManagerInterface,
+ shill::kRequestScanFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(type);
helper_->CallVoidMethodWithErrorCallback(&method_call,
@@ -81,8 +81,8 @@ class ShillManagerClientImpl : public ShillManagerClient {
const std::string& type,
const base::Closure& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamManagerInterface,
- flimflam::kEnableTechnologyFunction);
+ dbus::MethodCall method_call(shill::kFlimflamManagerInterface,
+ shill::kEnableTechnologyFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(type);
helper_->CallVoidMethodWithErrorCallback(&method_call,
@@ -94,8 +94,8 @@ class ShillManagerClientImpl : public ShillManagerClient {
const std::string& type,
const base::Closure& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamManagerInterface,
- flimflam::kDisableTechnologyFunction);
+ dbus::MethodCall method_call(shill::kFlimflamManagerInterface,
+ shill::kDisableTechnologyFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(type);
helper_->CallVoidMethodWithErrorCallback(&method_call,
@@ -107,8 +107,8 @@ class ShillManagerClientImpl : public ShillManagerClient {
const base::DictionaryValue& properties,
const ObjectPathCallback& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamManagerInterface,
- flimflam::kConfigureServiceFunction);
+ dbus::MethodCall method_call(shill::kFlimflamManagerInterface,
+ shill::kConfigureServiceFunction);
dbus::MessageWriter writer(&method_call);
ShillClientHelper::AppendServicePropertiesDictionary(&writer, properties);
helper_->CallObjectPathMethodWithErrorCallback(&method_call,
@@ -121,7 +121,7 @@ class ShillManagerClientImpl : public ShillManagerClient {
const base::DictionaryValue& properties,
const ObjectPathCallback& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamManagerInterface,
+ dbus::MethodCall method_call(shill::kFlimflamManagerInterface,
shill::kConfigureServiceForProfileFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendObjectPath(dbus::ObjectPath(profile_path));
@@ -135,8 +135,8 @@ class ShillManagerClientImpl : public ShillManagerClient {
const base::DictionaryValue& properties,
const ObjectPathCallback& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamManagerInterface,
- flimflam::kGetServiceFunction);
+ dbus::MethodCall method_call(shill::kFlimflamManagerInterface,
+ shill::kGetServiceFunction);
dbus::MessageWriter writer(&method_call);
ShillClientHelper::AppendServicePropertiesDictionary(&writer, properties);
helper_->CallObjectPathMethodWithErrorCallback(&method_call,
@@ -147,7 +147,7 @@ class ShillManagerClientImpl : public ShillManagerClient {
virtual void VerifyDestination(const VerificationProperties& properties,
const BooleanCallback& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamManagerInterface,
+ dbus::MethodCall method_call(shill::kFlimflamManagerInterface,
shill::kVerifyDestinationFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(properties.certificate);
@@ -166,7 +166,7 @@ class ShillManagerClientImpl : public ShillManagerClient {
const std::string& service_path,
const StringCallback& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamManagerInterface,
+ dbus::MethodCall method_call(shill::kFlimflamManagerInterface,
shill::kVerifyAndEncryptCredentialsFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(properties.certificate);
@@ -186,7 +186,7 @@ class ShillManagerClientImpl : public ShillManagerClient {
const std::string& data,
const StringCallback& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamManagerInterface,
+ dbus::MethodCall method_call(shill::kFlimflamManagerInterface,
shill::kVerifyAndEncryptDataFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(properties.certificate);
@@ -204,7 +204,7 @@ class ShillManagerClientImpl : public ShillManagerClient {
virtual void ConnectToBestServices(
const base::Closure& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamManagerInterface,
+ dbus::MethodCall method_call(shill::kFlimflamManagerInterface,
shill::kConnectToBestServicesFunction);
helper_->CallVoidMethodWithErrorCallback(&method_call,
callback,
@@ -217,11 +217,10 @@ class ShillManagerClientImpl : public ShillManagerClient {
protected:
virtual void Init(dbus::Bus* bus) OVERRIDE {
- proxy_ =
- bus->GetObjectProxy(flimflam::kFlimflamServiceName,
- dbus::ObjectPath(flimflam::kFlimflamServicePath));
+ proxy_ = bus->GetObjectProxy(shill::kFlimflamServiceName,
+ dbus::ObjectPath(shill::kFlimflamServicePath));
helper_.reset(new ShillClientHelper(bus, proxy_));
- helper_->MonitorPropertyChanged(flimflam::kFlimflamManagerInterface);
+ helper_->MonitorPropertyChanged(shill::kFlimflamManagerInterface);
}
private:
diff --git a/chromeos/dbus/shill_manager_client_stub.cc b/chromeos/dbus/shill_manager_client_stub.cc
index cd368df..946c553 100644
--- a/chromeos/dbus/shill_manager_client_stub.cc
+++ b/chromeos/dbus/shill_manager_client_stub.cc
@@ -56,16 +56,16 @@ void AppendServicesForType(
continue;
}
std::string type;
- properties->GetString(flimflam::kTypeProperty, &type);
+ properties->GetString(shill::kTypeProperty, &type);
if (type != match_type)
continue;
std::string state;
- properties->GetString(flimflam::kStateProperty, &state);
- if (state == flimflam::kStateOnline ||
- state == flimflam::kStateAssociation ||
- state == flimflam::kStateConfiguration ||
- state == flimflam::kStatePortal ||
- state == flimflam::kStateReady) {
+ properties->GetString(shill::kStateProperty, &state);
+ if (state == shill::kStateOnline ||
+ state == shill::kStateAssociation ||
+ state == shill::kStateConfiguration ||
+ state == shill::kStatePortal ||
+ state == shill::kStateReady) {
active_service_list_out->push_back(service_path);
} else {
inactive_service_list_out->push_back(service_path);
@@ -126,7 +126,7 @@ void ShillManagerClientStub::RequestScan(const std::string& type,
const base::Closure& callback,
const ErrorCallback& error_callback) {
// For Stub purposes, default to a Wifi scan.
- std::string device_type = flimflam::kTypeWifi;
+ std::string device_type = shill::kTypeWifi;
if (!type.empty())
device_type = type;
ShillDeviceClient::TestInterface* device_client =
@@ -134,7 +134,7 @@ void ShillManagerClientStub::RequestScan(const std::string& type,
std::string device_path = device_client->GetDevicePathForType(device_type);
if (!device_path.empty()) {
device_client->SetDeviceProperty(device_path,
- flimflam::kScanningProperty,
+ shill::kScanningProperty,
base::FundamentalValue(true));
}
const int kScanDurationSeconds = 3;
@@ -156,7 +156,7 @@ void ShillManagerClientStub::EnableTechnology(
const ErrorCallback& error_callback) {
base::ListValue* enabled_list = NULL;
if (!stub_properties_.GetListWithoutPathExpansion(
- flimflam::kEnabledTechnologiesProperty, &enabled_list)) {
+ shill::kEnabledTechnologiesProperty, &enabled_list)) {
base::MessageLoop::current()->PostTask(FROM_HERE, callback);
base::MessageLoop::current()->PostTask(
FROM_HERE,
@@ -182,7 +182,7 @@ void ShillManagerClientStub::DisableTechnology(
const ErrorCallback& error_callback) {
base::ListValue* enabled_list = NULL;
if (!stub_properties_.GetListWithoutPathExpansion(
- flimflam::kEnabledTechnologiesProperty, &enabled_list)) {
+ shill::kEnabledTechnologiesProperty, &enabled_list)) {
base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(error_callback, "StubError", "Property not found"));
@@ -210,8 +210,8 @@ void ShillManagerClientStub::ConfigureService(
std::string guid;
std::string type;
- if (!properties.GetString(flimflam::kGuidProperty, &guid) ||
- !properties.GetString(flimflam::kTypeProperty, &type)) {
+ if (!properties.GetString(shill::kGuidProperty, &guid) ||
+ !properties.GetString(shill::kTypeProperty, &type)) {
LOG(ERROR) << "ConfigureService requies GUID and Type to be defined";
// If the properties aren't filled out completely, then just return an empty
// object path.
@@ -235,7 +235,7 @@ void ShillManagerClientStub::ConfigureService(
// Add a new service to the service client stub because none exists, yet.
// This calls AddManagerService.
service_client->AddServiceWithIPConfig(service_path, guid, type,
- flimflam::kStateIdle, ipconfig_path,
+ shill::kStateIdle, ipconfig_path,
true /* visible */,
true /* watch */);
existing_properties = service_client->GetServiceProperties(service_path);
@@ -253,7 +253,7 @@ void ShillManagerClientStub::ConfigureService(
// If the Profile property is set, add it to ProfileClient.
std::string profile_path;
- merged_properties->GetStringWithoutPathExpansion(flimflam::kProfileProperty,
+ merged_properties->GetStringWithoutPathExpansion(shill::kProfileProperty,
&profile_path);
if (!profile_path.empty()) {
DBusThreadManager::Get()->GetShillProfileClient()->GetTestInterface()->
@@ -270,7 +270,7 @@ void ShillManagerClientStub::ConfigureServiceForProfile(
const ObjectPathCallback& callback,
const ErrorCallback& error_callback) {
std::string profile_property;
- properties.GetStringWithoutPathExpansion(flimflam::kProfileProperty,
+ properties.GetStringWithoutPathExpansion(shill::kProfileProperty,
&profile_property);
CHECK(profile_property == profile_path.value());
ConfigureService(properties, callback, error_callback);
@@ -322,51 +322,51 @@ ShillManagerClient::TestInterface* ShillManagerClientStub::GetTestInterface() {
// ShillManagerClient::TestInterface overrides.
void ShillManagerClientStub::AddDevice(const std::string& device_path) {
- if (GetListProperty(flimflam::kDevicesProperty)->AppendIfNotPresent(
+ if (GetListProperty(shill::kDevicesProperty)->AppendIfNotPresent(
base::Value::CreateStringValue(device_path))) {
- CallNotifyObserversPropertyChanged(flimflam::kDevicesProperty, 0);
+ CallNotifyObserversPropertyChanged(shill::kDevicesProperty, 0);
}
}
void ShillManagerClientStub::RemoveDevice(const std::string& device_path) {
base::StringValue device_path_value(device_path);
- if (GetListProperty(flimflam::kDevicesProperty)->Remove(
+ if (GetListProperty(shill::kDevicesProperty)->Remove(
device_path_value, NULL)) {
- CallNotifyObserversPropertyChanged(flimflam::kDevicesProperty, 0);
+ CallNotifyObserversPropertyChanged(shill::kDevicesProperty, 0);
}
}
void ShillManagerClientStub::ClearDevices() {
- GetListProperty(flimflam::kDevicesProperty)->Clear();
- CallNotifyObserversPropertyChanged(flimflam::kDevicesProperty, 0);
+ GetListProperty(shill::kDevicesProperty)->Clear();
+ CallNotifyObserversPropertyChanged(shill::kDevicesProperty, 0);
}
void ShillManagerClientStub::AddTechnology(const std::string& type,
bool enabled) {
- if (GetListProperty(flimflam::kAvailableTechnologiesProperty)->
+ if (GetListProperty(shill::kAvailableTechnologiesProperty)->
AppendIfNotPresent(base::Value::CreateStringValue(type))) {
CallNotifyObserversPropertyChanged(
- flimflam::kAvailableTechnologiesProperty, 0);
+ shill::kAvailableTechnologiesProperty, 0);
}
if (enabled &&
- GetListProperty(flimflam::kEnabledTechnologiesProperty)->
+ GetListProperty(shill::kEnabledTechnologiesProperty)->
AppendIfNotPresent(base::Value::CreateStringValue(type))) {
CallNotifyObserversPropertyChanged(
- flimflam::kEnabledTechnologiesProperty, 0);
+ shill::kEnabledTechnologiesProperty, 0);
}
}
void ShillManagerClientStub::RemoveTechnology(const std::string& type) {
base::StringValue type_value(type);
- if (GetListProperty(flimflam::kAvailableTechnologiesProperty)->Remove(
+ if (GetListProperty(shill::kAvailableTechnologiesProperty)->Remove(
type_value, NULL)) {
CallNotifyObserversPropertyChanged(
- flimflam::kAvailableTechnologiesProperty, 0);
+ shill::kAvailableTechnologiesProperty, 0);
}
- if (GetListProperty(flimflam::kEnabledTechnologiesProperty)->Remove(
+ if (GetListProperty(shill::kEnabledTechnologiesProperty)->Remove(
type_value, NULL)) {
CallNotifyObserversPropertyChanged(
- flimflam::kEnabledTechnologiesProperty, 0);
+ shill::kEnabledTechnologiesProperty, 0);
}
}
@@ -399,9 +399,9 @@ void ShillManagerClientStub::AddManagerService(const std::string& service_path,
base::Value::CreateStringValue(service_path));
// If visible, add to Services and notify if new.
if (add_to_visible_list &&
- GetListProperty(flimflam::kServicesProperty)->AppendIfNotPresent(
+ GetListProperty(shill::kServicesProperty)->AppendIfNotPresent(
base::Value::CreateStringValue(service_path))) {
- CallNotifyObserversPropertyChanged(flimflam::kServicesProperty, 0);
+ CallNotifyObserversPropertyChanged(shill::kServicesProperty, 0);
}
if (add_to_watch_list)
AddServiceToWatchList(service_path);
@@ -410,36 +410,36 @@ void ShillManagerClientStub::AddManagerService(const std::string& service_path,
void ShillManagerClientStub::RemoveManagerService(
const std::string& service_path) {
base::StringValue service_path_value(service_path);
- if (GetListProperty(flimflam::kServicesProperty)->Remove(
+ if (GetListProperty(shill::kServicesProperty)->Remove(
service_path_value, NULL)) {
- CallNotifyObserversPropertyChanged(flimflam::kServicesProperty, 0);
+ CallNotifyObserversPropertyChanged(shill::kServicesProperty, 0);
}
GetListProperty(shill::kServiceCompleteListProperty)->Remove(
service_path_value, NULL);
- if (GetListProperty(flimflam::kServiceWatchListProperty)->Remove(
+ if (GetListProperty(shill::kServiceWatchListProperty)->Remove(
service_path_value, NULL)) {
CallNotifyObserversPropertyChanged(
- flimflam::kServiceWatchListProperty, 0);
+ shill::kServiceWatchListProperty, 0);
}
}
void ShillManagerClientStub::ClearManagerServices() {
- GetListProperty(flimflam::kServicesProperty)->Clear();
+ GetListProperty(shill::kServicesProperty)->Clear();
GetListProperty(shill::kServiceCompleteListProperty)->Clear();
- GetListProperty(flimflam::kServiceWatchListProperty)->Clear();
- CallNotifyObserversPropertyChanged(flimflam::kServicesProperty, 0);
- CallNotifyObserversPropertyChanged(flimflam::kServiceWatchListProperty, 0);
+ GetListProperty(shill::kServiceWatchListProperty)->Clear();
+ CallNotifyObserversPropertyChanged(shill::kServicesProperty, 0);
+ CallNotifyObserversPropertyChanged(shill::kServiceWatchListProperty, 0);
}
void ShillManagerClientStub::SortManagerServices() {
static const char* ordered_types[] = {
- flimflam::kTypeEthernet,
- flimflam::kTypeWifi,
- flimflam::kTypeCellular,
- flimflam::kTypeWimax,
- flimflam::kTypeVPN
+ shill::kTypeEthernet,
+ shill::kTypeWifi,
+ shill::kTypeCellular,
+ shill::kTypeWimax,
+ shill::kTypeVPN
};
- base::ListValue* service_list = GetListProperty(flimflam::kServicesProperty);
+ base::ListValue* service_list = GetListProperty(shill::kServicesProperty);
if (!service_list || service_list->empty())
return;
std::vector<std::string> active_services;
@@ -454,7 +454,7 @@ void ShillManagerClientStub::SortManagerServices() {
for (size_t i = 0; i < inactive_services.size(); ++i)
service_list->AppendString(inactive_services[i]);
- CallNotifyObserversPropertyChanged(flimflam::kServicesProperty, 0);
+ CallNotifyObserversPropertyChanged(shill::kServicesProperty, 0);
}
void ShillManagerClientStub::AddGeoNetwork(
@@ -470,7 +470,7 @@ void ShillManagerClientStub::AddGeoNetwork(
}
void ShillManagerClientStub::AddProfile(const std::string& profile_path) {
- const char* key = flimflam::kProfilesProperty;
+ const char* key = shill::kProfilesProperty;
if (GetListProperty(key)->AppendIfNotPresent(
new base::StringValue(profile_path))) {
CallNotifyObserversPropertyChanged(key, 0);
@@ -480,12 +480,12 @@ void ShillManagerClientStub::AddProfile(const std::string& profile_path) {
void ShillManagerClientStub::AddServiceToWatchList(
const std::string& service_path) {
// Remove and insert the service, moving it to the front of the watch list.
- GetListProperty(flimflam::kServiceWatchListProperty)->Remove(
+ GetListProperty(shill::kServiceWatchListProperty)->Remove(
base::StringValue(service_path), NULL);
- GetListProperty(flimflam::kServiceWatchListProperty)->Insert(
+ GetListProperty(shill::kServiceWatchListProperty)->Insert(
0, base::Value::CreateStringValue(service_path));
CallNotifyObserversPropertyChanged(
- flimflam::kServiceWatchListProperty, 0);
+ shill::kServiceWatchListProperty, 0);
}
void ShillManagerClientStub::PassStubProperties(
@@ -494,11 +494,11 @@ void ShillManagerClientStub::PassStubProperties(
stub_properties_.DeepCopy());
// Remove disabled services from the list.
stub_properties->SetWithoutPathExpansion(
- flimflam::kServicesProperty,
- GetEnabledServiceList(flimflam::kServicesProperty));
+ shill::kServicesProperty,
+ GetEnabledServiceList(shill::kServicesProperty));
stub_properties->SetWithoutPathExpansion(
- flimflam::kServiceWatchListProperty,
- GetEnabledServiceList(flimflam::kServiceWatchListProperty));
+ shill::kServiceWatchListProperty,
+ GetEnabledServiceList(shill::kServiceWatchListProperty));
callback.Run(DBUS_METHOD_CALL_SUCCESS, *stub_properties);
}
@@ -528,8 +528,8 @@ void ShillManagerClientStub::CallNotifyObserversPropertyChanged(
void ShillManagerClientStub::NotifyObserversPropertyChanged(
const std::string& property) {
- if (property == flimflam::kServicesProperty ||
- property == flimflam::kServiceWatchListProperty) {
+ if (property == shill::kServicesProperty ||
+ property == shill::kServiceWatchListProperty) {
scoped_ptr<base::ListValue> services(GetEnabledServiceList(property));
FOR_EACH_OBSERVER(ShillPropertyChangedObserver,
observer_list_,
@@ -558,12 +558,12 @@ base::ListValue* ShillManagerClientStub::GetListProperty(
}
bool ShillManagerClientStub::TechnologyEnabled(const std::string& type) const {
- if (type == flimflam::kTypeVPN)
+ if (type == shill::kTypeVPN)
return true; // VPN is always "enabled" since there is no associated device
bool enabled = false;
const base::ListValue* technologies;
if (stub_properties_.GetListWithoutPathExpansion(
- flimflam::kEnabledTechnologiesProperty, &technologies)) {
+ shill::kEnabledTechnologiesProperty, &technologies)) {
base::StringValue type_value(type);
if (technologies->Find(type_value) != technologies->end())
enabled = true;
@@ -577,18 +577,18 @@ void ShillManagerClientStub::SetTechnologyEnabled(
bool enabled) {
base::ListValue* enabled_list = NULL;
stub_properties_.GetListWithoutPathExpansion(
- flimflam::kEnabledTechnologiesProperty, &enabled_list);
+ shill::kEnabledTechnologiesProperty, &enabled_list);
DCHECK(enabled_list);
if (enabled)
enabled_list->AppendIfNotPresent(new base::StringValue(type));
else
enabled_list->Remove(base::StringValue(type), NULL);
CallNotifyObserversPropertyChanged(
- flimflam::kEnabledTechnologiesProperty, 0 /* already delayed */);
+ shill::kEnabledTechnologiesProperty, 0 /* already delayed */);
base::MessageLoop::current()->PostTask(FROM_HERE, callback);
// May affect available services
- CallNotifyObserversPropertyChanged(flimflam::kServicesProperty, 0);
- CallNotifyObserversPropertyChanged(flimflam::kServiceWatchListProperty, 0);
+ CallNotifyObserversPropertyChanged(shill::kServicesProperty, 0);
+ CallNotifyObserversPropertyChanged(shill::kServiceWatchListProperty, 0);
}
base::ListValue* ShillManagerClientStub::GetEnabledServiceList(
@@ -610,9 +610,9 @@ base::ListValue* ShillManagerClientStub::GetEnabledServiceList(
continue;
}
std::string name;
- properties->GetString(flimflam::kNameProperty, &name);
+ properties->GetString(shill::kNameProperty, &name);
std::string type;
- properties->GetString(flimflam::kTypeProperty, &type);
+ properties->GetString(shill::kTypeProperty, &type);
if (TechnologyEnabled(type))
new_service_list->Append((*iter)->DeepCopy());
}
@@ -625,12 +625,11 @@ void ShillManagerClientStub::ScanCompleted(const std::string& device_path,
if (!device_path.empty()) {
DBusThreadManager::Get()->GetShillDeviceClient()->GetTestInterface()->
SetDeviceProperty(device_path,
- flimflam::kScanningProperty,
+ shill::kScanningProperty,
base::FundamentalValue(false));
}
- CallNotifyObserversPropertyChanged(flimflam::kServicesProperty, 0);
- CallNotifyObserversPropertyChanged(flimflam::kServiceWatchListProperty,
- 0);
+ CallNotifyObserversPropertyChanged(shill::kServicesProperty, 0);
+ CallNotifyObserversPropertyChanged(shill::kServiceWatchListProperty, 0);
base::MessageLoop::current()->PostTask(FROM_HERE, callback);
}
diff --git a/chromeos/dbus/shill_manager_client_unittest.cc b/chromeos/dbus/shill_manager_client_unittest.cc
index 107458d..2728361b 100644
--- a/chromeos/dbus/shill_manager_client_unittest.cc
+++ b/chromeos/dbus/shill_manager_client_unittest.cc
@@ -52,9 +52,8 @@ void ExpectStringArgumentsFollowedByObjectPath(
class ShillManagerClientTest : public ShillClientUnittestBase {
public:
ShillManagerClientTest()
- : ShillClientUnittestBase(
- flimflam::kFlimflamManagerInterface,
- dbus::ObjectPath(flimflam::kFlimflamServicePath)) {
+ : ShillClientUnittestBase(shill::kFlimflamManagerInterface,
+ dbus::ObjectPath(shill::kFlimflamServicePath)) {
}
virtual void SetUp() {
@@ -77,16 +76,16 @@ class ShillManagerClientTest : public ShillClientUnittestBase {
TEST_F(ShillManagerClientTest, PropertyChanged) {
// Create a signal.
base::FundamentalValue kOfflineMode(true);
- dbus::Signal signal(flimflam::kFlimflamManagerInterface,
- flimflam::kMonitorPropertyChanged);
+ dbus::Signal signal(shill::kFlimflamManagerInterface,
+ shill::kMonitorPropertyChanged);
dbus::MessageWriter writer(&signal);
- writer.AppendString(flimflam::kOfflineModeProperty);
+ writer.AppendString(shill::kOfflineModeProperty);
dbus::AppendBasicTypeValueData(&writer, kOfflineMode);
// Set expectations.
MockPropertyChangeObserver observer;
EXPECT_CALL(observer,
- OnPropertyChanged(flimflam::kOfflineModeProperty,
+ OnPropertyChanged(shill::kOfflineModeProperty,
ValueEq(ByRef(kOfflineMode)))).Times(1);
// Add the observer
@@ -113,22 +112,21 @@ TEST_F(ShillManagerClientTest, GetProperties) {
writer.OpenArray("{sv}", &array_writer);
dbus::MessageWriter entry_writer(NULL);
array_writer.OpenDictEntry(&entry_writer);
- entry_writer.AppendString(flimflam::kOfflineModeProperty);
+ entry_writer.AppendString(shill::kOfflineModeProperty);
entry_writer.AppendVariantOfBool(true);
array_writer.CloseContainer(&entry_writer);
writer.CloseContainer(&array_writer);
// Create the expected value.
base::DictionaryValue value;
- value.SetWithoutPathExpansion(flimflam::kOfflineModeProperty,
+ value.SetWithoutPathExpansion(shill::kOfflineModeProperty,
base::Value::CreateBooleanValue(true));
// Set expectations.
- PrepareForMethodCall(flimflam::kGetPropertiesFunction,
+ PrepareForMethodCall(shill::kGetPropertiesFunction,
base::Bind(&ExpectNoArgument),
response.get());
// Call method.
- client_->GetProperties(base::Bind(&ExpectDictionaryValueResult,
- &value));
+ client_->GetProperties(base::Bind(&ExpectDictionaryValueResult, &value));
// Run the message loop.
message_loop_.RunUntilIdle();
}
@@ -142,7 +140,7 @@ TEST_F(ShillManagerClientTest, GetNetworksForGeolocation) {
writer.OpenArray("{sv}", &type_dict_writer);
dbus::MessageWriter type_entry_writer(NULL);
type_dict_writer.OpenDictEntry(&type_entry_writer);
- type_entry_writer.AppendString(flimflam::kTypeWifi);
+ type_entry_writer.AppendString(shill::kTypeWifi);
dbus::MessageWriter variant_writer(NULL);
type_entry_writer.OpenVariant("aa{ss}", &variant_writer);
dbus::MessageWriter wap_list_writer(NULL);
@@ -188,15 +186,15 @@ TEST_F(ShillManagerClientTest, SetProperty) {
scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
// Set expectations.
base::StringValue value("portal list");
- PrepareForMethodCall(flimflam::kSetPropertyFunction,
+ PrepareForMethodCall(shill::kSetPropertyFunction,
base::Bind(ExpectStringAndValueArguments,
- flimflam::kCheckPortalListProperty,
+ shill::kCheckPortalListProperty,
&value),
response.get());
// Call method.
MockClosure mock_closure;
MockErrorCallback mock_error_callback;
- client_->SetProperty(flimflam::kCheckPortalListProperty,
+ client_->SetProperty(shill::kCheckPortalListProperty,
value,
mock_closure.GetCallback(),
mock_error_callback.GetCallback());
@@ -211,13 +209,13 @@ TEST_F(ShillManagerClientTest, RequestScan) {
// Create response.
scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
// Set expectations.
- PrepareForMethodCall(flimflam::kRequestScanFunction,
- base::Bind(&ExpectStringArgument, flimflam::kTypeWifi),
+ PrepareForMethodCall(shill::kRequestScanFunction,
+ base::Bind(&ExpectStringArgument, shill::kTypeWifi),
response.get());
// Call method.
MockClosure mock_closure;
MockErrorCallback mock_error_callback;
- client_->RequestScan(flimflam::kTypeWifi,
+ client_->RequestScan(shill::kTypeWifi,
mock_closure.GetCallback(),
mock_error_callback.GetCallback());
EXPECT_CALL(mock_closure, Run()).Times(1);
@@ -231,13 +229,13 @@ TEST_F(ShillManagerClientTest, EnableTechnology) {
// Create response.
scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
// Set expectations.
- PrepareForMethodCall(flimflam::kEnableTechnologyFunction,
- base::Bind(&ExpectStringArgument, flimflam::kTypeWifi),
+ PrepareForMethodCall(shill::kEnableTechnologyFunction,
+ base::Bind(&ExpectStringArgument, shill::kTypeWifi),
response.get());
// Call method.
MockClosure mock_closure;
MockErrorCallback mock_error_callback;
- client_->EnableTechnology(flimflam::kTypeWifi,
+ client_->EnableTechnology(shill::kTypeWifi,
mock_closure.GetCallback(),
mock_error_callback.GetCallback());
EXPECT_CALL(mock_closure, Run()).Times(1);
@@ -251,13 +249,13 @@ TEST_F(ShillManagerClientTest, DisableTechnology) {
// Create response.
scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
// Set expectations.
- PrepareForMethodCall(flimflam::kDisableTechnologyFunction,
- base::Bind(&ExpectStringArgument, flimflam::kTypeWifi),
+ PrepareForMethodCall(shill::kDisableTechnologyFunction,
+ base::Bind(&ExpectStringArgument, shill::kTypeWifi),
response.get());
// Call method.
MockClosure mock_closure;
MockErrorCallback mock_error_callback;
- client_->DisableTechnology(flimflam::kTypeWifi,
+ client_->DisableTechnology(shill::kTypeWifi,
mock_closure.GetCallback(),
mock_error_callback.GetCallback());
EXPECT_CALL(mock_closure, Run()).Times(1);
@@ -276,7 +274,7 @@ TEST_F(ShillManagerClientTest, ConfigureService) {
// Create the argument dictionary.
scoped_ptr<base::DictionaryValue> arg(CreateExampleServiceProperties());
// Set expectations.
- PrepareForMethodCall(flimflam::kConfigureServiceFunction,
+ PrepareForMethodCall(shill::kConfigureServiceFunction,
base::Bind(&ExpectDictionaryValueArgument, arg.get()),
response.get());
// Call method.
@@ -300,7 +298,7 @@ TEST_F(ShillManagerClientTest, GetService) {
// Create the argument dictionary.
scoped_ptr<base::DictionaryValue> arg(CreateExampleServiceProperties());
// Set expectations.
- PrepareForMethodCall(flimflam::kGetServiceFunction,
+ PrepareForMethodCall(shill::kGetServiceFunction,
base::Bind(&ExpectDictionaryValueArgument, arg.get()),
response.get());
// Call method.
diff --git a/chromeos/dbus/shill_profile_client.cc b/chromeos/dbus/shill_profile_client.cc
index c0f675d..e0d8a71 100644
--- a/chromeos/dbus/shill_profile_client.cc
+++ b/chromeos/dbus/shill_profile_client.cc
@@ -85,9 +85,9 @@ ShillClientHelper* ShillProfileClientImpl::GetHelper(
// There is no helper for the profile, create it.
dbus::ObjectProxy* object_proxy =
- bus_->GetObjectProxy(flimflam::kFlimflamServiceName, profile_path);
+ bus_->GetObjectProxy(shill::kFlimflamServiceName, profile_path);
ShillClientHelper* helper = new ShillClientHelper(bus_, object_proxy);
- helper->MonitorPropertyChanged(flimflam::kFlimflamProfileInterface);
+ helper->MonitorPropertyChanged(shill::kFlimflamProfileInterface);
helpers_.insert(HelperMap::value_type(profile_path.value(), helper));
return helper;
}
@@ -96,8 +96,8 @@ void ShillProfileClientImpl::GetProperties(
const dbus::ObjectPath& profile_path,
const DictionaryValueCallbackWithoutStatus& callback,
const ErrorCallback& error_callback) {
- dbus::MethodCall method_call(flimflam::kFlimflamProfileInterface,
- flimflam::kGetPropertiesFunction);
+ dbus::MethodCall method_call(shill::kFlimflamProfileInterface,
+ shill::kGetPropertiesFunction);
GetHelper(profile_path)->CallDictionaryValueMethodWithErrorCallback(
&method_call, callback, error_callback);
}
@@ -107,8 +107,8 @@ void ShillProfileClientImpl::GetEntry(
const std::string& entry_path,
const DictionaryValueCallbackWithoutStatus& callback,
const ErrorCallback& error_callback) {
- dbus::MethodCall method_call(flimflam::kFlimflamProfileInterface,
- flimflam::kGetEntryFunction);
+ dbus::MethodCall method_call(shill::kFlimflamProfileInterface,
+ shill::kGetEntryFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(entry_path);
GetHelper(profile_path)->CallDictionaryValueMethodWithErrorCallback(
@@ -120,8 +120,8 @@ void ShillProfileClientImpl::DeleteEntry(
const std::string& entry_path,
const base::Closure& callback,
const ErrorCallback& error_callback) {
- dbus::MethodCall method_call(flimflam::kFlimflamProfileInterface,
- flimflam::kDeleteEntryFunction);
+ dbus::MethodCall method_call(shill::kFlimflamProfileInterface,
+ shill::kDeleteEntryFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(entry_path);
GetHelper(profile_path)->CallVoidMethodWithErrorCallback(
diff --git a/chromeos/dbus/shill_profile_client_stub.cc b/chromeos/dbus/shill_profile_client_stub.cc
index 2f6d431..05cdbb0 100644
--- a/chromeos/dbus/shill_profile_client_stub.cc
+++ b/chromeos/dbus/shill_profile_client_stub.cc
@@ -66,7 +66,7 @@ void ShillProfileClientStub::GetProperties(
scoped_ptr<base::DictionaryValue> properties(profile->properties.DeepCopy());
base::ListValue* entry_paths = new base::ListValue;
- properties->SetWithoutPathExpansion(flimflam::kEntriesProperty, entry_paths);
+ properties->SetWithoutPathExpansion(shill::kEntriesProperty, entry_paths);
for (base::DictionaryValue::Iterator it(profile->entries); !it.IsAtEnd();
it.Advance()) {
entry_paths->AppendString(it.key());
@@ -114,7 +114,7 @@ void ShillProfileClientStub::DeleteEntry(const dbus::ObjectPath& profile_path,
base::StringValue profile_path_value("");
DBusThreadManager::Get()->GetShillServiceClient()->GetTestInterface()->
SetServiceProperty(entry_path,
- flimflam::kProfileProperty,
+ shill::kProfileProperty,
profile_path_value);
base::MessageLoop::current()->PostTask(FROM_HERE, callback);
@@ -167,7 +167,7 @@ bool ShillProfileClientStub::AddService(const std::string& profile_path,
return false;
}
std::string service_profile_path;
- service_properties->GetStringWithoutPathExpansion(flimflam::kProfileProperty,
+ service_properties->GetStringWithoutPathExpansion(shill::kProfileProperty,
&service_profile_path);
if (!service_profile_path.empty() && service_profile_path != profile_path) {
LOG(ERROR) << "Service has non matching profile path: "
@@ -177,7 +177,7 @@ bool ShillProfileClientStub::AddService(const std::string& profile_path,
base::StringValue profile_path_value(profile_path);
service_test->SetServiceProperty(service_path,
- flimflam::kProfileProperty,
+ shill::kProfileProperty,
profile_path_value);
profile->entries.SetWithoutPathExpansion(service_path,
service_properties->DeepCopy());
diff --git a/chromeos/dbus/shill_profile_client_unittest.cc b/chromeos/dbus/shill_profile_client_unittest.cc
index 3352e2d..2112463 100644
--- a/chromeos/dbus/shill_profile_client_unittest.cc
+++ b/chromeos/dbus/shill_profile_client_unittest.cc
@@ -34,7 +34,7 @@ void AppendVariantOfArrayOfStrings(dbus::MessageWriter* writer,
class ShillProfileClientTest : public ShillClientUnittestBase {
public:
ShillProfileClientTest()
- : ShillClientUnittestBase(flimflam::kFlimflamProfileInterface,
+ : ShillClientUnittestBase(shill::kFlimflamProfileInterface,
dbus::ObjectPath(kDefaultProfilePath)) {
}
@@ -57,10 +57,10 @@ class ShillProfileClientTest : public ShillClientUnittestBase {
TEST_F(ShillProfileClientTest, PropertyChanged) {
// Create a signal.
- dbus::Signal signal(flimflam::kFlimflamProfileInterface,
- flimflam::kMonitorPropertyChanged);
+ dbus::Signal signal(shill::kFlimflamProfileInterface,
+ shill::kMonitorPropertyChanged);
dbus::MessageWriter writer(&signal);
- writer.AppendString(flimflam::kEntriesProperty);
+ writer.AppendString(shill::kEntriesProperty);
AppendVariantOfArrayOfStrings(&writer,
std::vector<std::string>(1, kExampleEntryPath));
@@ -70,7 +70,7 @@ TEST_F(ShillProfileClientTest, PropertyChanged) {
MockPropertyChangeObserver observer;
EXPECT_CALL(observer,
OnPropertyChanged(
- flimflam::kEntriesProperty,
+ shill::kEntriesProperty,
ValueEq(value))).Times(1);
// Add the observer
@@ -100,7 +100,7 @@ TEST_F(ShillProfileClientTest, GetProperties) {
writer.OpenArray("{sv}", &array_writer);
dbus::MessageWriter entry_writer(NULL);
array_writer.OpenDictEntry(&entry_writer);
- entry_writer.AppendString(flimflam::kEntriesProperty);
+ entry_writer.AppendString(shill::kEntriesProperty);
AppendVariantOfArrayOfStrings(&entry_writer,
std::vector<std::string>(1, kExampleEntryPath));
array_writer.CloseContainer(&entry_writer);
@@ -110,9 +110,9 @@ TEST_F(ShillProfileClientTest, GetProperties) {
base::ListValue* entries = new base::ListValue;
entries->Append(base::Value::CreateStringValue(kExampleEntryPath));
base::DictionaryValue value;
- value.SetWithoutPathExpansion(flimflam::kEntriesProperty, entries);
+ value.SetWithoutPathExpansion(shill::kEntriesProperty, entries);
// Set expectations.
- PrepareForMethodCall(flimflam::kGetPropertiesFunction,
+ PrepareForMethodCall(shill::kGetPropertiesFunction,
base::Bind(&ExpectNoArgument),
response.get());
// Call method.
@@ -135,18 +135,18 @@ TEST_F(ShillProfileClientTest, GetEntry) {
writer.OpenArray("{sv}", &array_writer);
dbus::MessageWriter entry_writer(NULL);
array_writer.OpenDictEntry(&entry_writer);
- entry_writer.AppendString(flimflam::kTypeProperty);
- entry_writer.AppendVariantOfString(flimflam::kTypeWifi);
+ entry_writer.AppendString(shill::kTypeProperty);
+ entry_writer.AppendVariantOfString(shill::kTypeWifi);
array_writer.CloseContainer(&entry_writer);
writer.CloseContainer(&array_writer);
// Create the expected value.
base::DictionaryValue value;
value.SetWithoutPathExpansion(
- flimflam::kTypeProperty,
- base::Value::CreateStringValue(flimflam::kTypeWifi));
+ shill::kTypeProperty,
+ base::Value::CreateStringValue(shill::kTypeWifi));
// Set expectations.
- PrepareForMethodCall(flimflam::kGetEntryFunction,
+ PrepareForMethodCall(shill::kGetEntryFunction,
base::Bind(&ExpectStringArgument, kExampleEntryPath),
response.get());
// Call method.
@@ -167,10 +167,10 @@ TEST_F(ShillProfileClientTest, DeleteEntry) {
// Create the expected value.
base::DictionaryValue value;
- value.SetWithoutPathExpansion(flimflam::kOfflineModeProperty,
+ value.SetWithoutPathExpansion(shill::kOfflineModeProperty,
base::Value::CreateBooleanValue(true));
// Set expectations.
- PrepareForMethodCall(flimflam::kDeleteEntryFunction,
+ PrepareForMethodCall(shill::kDeleteEntryFunction,
base::Bind(&ExpectStringArgument, kExampleEntryPath),
response.get());
// Call method.
diff --git a/chromeos/dbus/shill_service_client.cc b/chromeos/dbus/shill_service_client.cc
index b4840b6..40143f6 100644
--- a/chromeos/dbus/shill_service_client.cc
+++ b/chromeos/dbus/shill_service_client.cc
@@ -71,8 +71,8 @@ class ShillServiceClientImpl : public ShillServiceClient {
virtual void GetProperties(const dbus::ObjectPath& service_path,
const DictionaryValueCallback& callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamServiceInterface,
- flimflam::kGetPropertiesFunction);
+ dbus::MethodCall method_call(shill::kFlimflamServiceInterface,
+ shill::kGetPropertiesFunction);
GetHelper(service_path)->CallDictionaryValueMethodWithErrorCallback(
&method_call,
base::Bind(callback, DBUS_METHOD_CALL_SUCCESS),
@@ -85,8 +85,8 @@ class ShillServiceClientImpl : public ShillServiceClient {
const base::Value& value,
const base::Closure& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamServiceInterface,
- flimflam::kSetPropertyFunction);
+ dbus::MethodCall method_call(shill::kFlimflamServiceInterface,
+ shill::kSetPropertyFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(name);
ShillClientHelper::AppendValueDataAsVariant(&writer, value);
@@ -99,7 +99,7 @@ class ShillServiceClientImpl : public ShillServiceClient {
const base::DictionaryValue& properties,
const base::Closure& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamServiceInterface,
+ dbus::MethodCall method_call(shill::kFlimflamServiceInterface,
shill::kSetPropertiesFunction);
dbus::MessageWriter writer(&method_call);
ShillClientHelper::AppendServicePropertiesDictionary(&writer, properties);
@@ -112,8 +112,8 @@ class ShillServiceClientImpl : public ShillServiceClient {
const std::string& name,
const base::Closure& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamServiceInterface,
- flimflam::kClearPropertyFunction);
+ dbus::MethodCall method_call(shill::kFlimflamServiceInterface,
+ shill::kClearPropertyFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(name);
GetHelper(service_path)->CallVoidMethodWithErrorCallback(&method_call,
@@ -126,7 +126,7 @@ class ShillServiceClientImpl : public ShillServiceClient {
const std::vector<std::string>& names,
const ListValueCallback& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamServiceInterface,
+ dbus::MethodCall method_call(shill::kFlimflamServiceInterface,
shill::kClearPropertiesFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendArrayOfStrings(names);
@@ -139,8 +139,8 @@ class ShillServiceClientImpl : public ShillServiceClient {
virtual void Connect(const dbus::ObjectPath& service_path,
const base::Closure& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamServiceInterface,
- flimflam::kConnectFunction);
+ dbus::MethodCall method_call(shill::kFlimflamServiceInterface,
+ shill::kConnectFunction);
GetHelper(service_path)->CallVoidMethodWithErrorCallback(
&method_call, callback, error_callback);
}
@@ -148,8 +148,8 @@ class ShillServiceClientImpl : public ShillServiceClient {
virtual void Disconnect(const dbus::ObjectPath& service_path,
const base::Closure& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamServiceInterface,
- flimflam::kDisconnectFunction);
+ dbus::MethodCall method_call(shill::kFlimflamServiceInterface,
+ shill::kDisconnectFunction);
GetHelper(service_path)->CallVoidMethodWithErrorCallback(&method_call,
callback,
error_callback);
@@ -158,8 +158,8 @@ class ShillServiceClientImpl : public ShillServiceClient {
virtual void Remove(const dbus::ObjectPath& service_path,
const base::Closure& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamServiceInterface,
- flimflam::kRemoveServiceFunction);
+ dbus::MethodCall method_call(shill::kFlimflamServiceInterface,
+ shill::kRemoveServiceFunction);
GetHelper(service_path)->CallVoidMethodWithErrorCallback(&method_call,
callback,
error_callback);
@@ -170,8 +170,8 @@ class ShillServiceClientImpl : public ShillServiceClient {
const std::string& carrier,
const base::Closure& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamServiceInterface,
- flimflam::kActivateCellularModemFunction);
+ dbus::MethodCall method_call(shill::kFlimflamServiceInterface,
+ shill::kActivateCellularModemFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(carrier);
GetHelper(service_path)->CallVoidMethodWithErrorCallback(&method_call,
@@ -183,7 +183,7 @@ class ShillServiceClientImpl : public ShillServiceClient {
const dbus::ObjectPath& service_path,
const base::Closure& callback,
const ErrorCallback& error_callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamServiceInterface,
+ dbus::MethodCall method_call(shill::kFlimflamServiceInterface,
shill::kCompleteCellularActivationFunction);
dbus::MessageWriter writer(&method_call);
GetHelper(service_path)->CallVoidMethodWithErrorCallback(&method_call,
@@ -194,7 +194,7 @@ class ShillServiceClientImpl : public ShillServiceClient {
virtual void GetLoadableProfileEntries(
const dbus::ObjectPath& service_path,
const DictionaryValueCallback& callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamServiceInterface,
+ dbus::MethodCall method_call(shill::kFlimflamServiceInterface,
shill::kGetLoadableProfileEntriesFunction);
GetHelper(service_path)->CallDictionaryValueMethodWithErrorCallback(
&method_call,
@@ -223,9 +223,9 @@ class ShillServiceClientImpl : public ShillServiceClient {
// There is no helper for the profile, create it.
dbus::ObjectProxy* object_proxy =
- bus_->GetObjectProxy(flimflam::kFlimflamServiceName, service_path);
+ bus_->GetObjectProxy(shill::kFlimflamServiceName, service_path);
ShillClientHelper* helper = new ShillClientHelper(bus_, object_proxy);
- helper->MonitorPropertyChanged(flimflam::kFlimflamServiceInterface);
+ helper->MonitorPropertyChanged(shill::kFlimflamServiceInterface);
helpers_.insert(HelperMap::value_type(service_path.value(), helper));
return helper;
}
diff --git a/chromeos/dbus/shill_service_client_stub.cc b/chromeos/dbus/shill_service_client_stub.cc
index 25ab4de..1336f05 100644
--- a/chromeos/dbus/shill_service_client_stub.cc
+++ b/chromeos/dbus/shill_service_client_stub.cc
@@ -80,7 +80,7 @@ void ShillServiceClientStub::GetProperties(
if (nested_dict) {
result_properties.reset(nested_dict->DeepCopy());
// Remove credentials that Shill wouldn't send.
- result_properties->RemoveWithoutPathExpansion(flimflam::kPassphraseProperty,
+ result_properties->RemoveWithoutPathExpansion(shill::kPassphraseProperty,
NULL);
call_status = DBUS_METHOD_CALL_SUCCESS;
} else {
@@ -184,9 +184,9 @@ void ShillServiceClientStub::Connect(const dbus::ObjectPath& service_path,
SetOtherServicesOffline(service_path.value());
// Set Associating.
- base::StringValue associating_value(flimflam::kStateAssociation);
+ base::StringValue associating_value(shill::kStateAssociation);
SetServiceProperty(service_path.value(),
- flimflam::kStateProperty,
+ shill::kStateProperty,
associating_value);
// Stay Associating until the state is changed again after a delay.
@@ -221,13 +221,13 @@ void ShillServiceClientStub::Disconnect(const dbus::ObjectPath& service_path,
delay = base::TimeDelta::FromSeconds(kConnectDelaySeconds);
}
// Set Idle after a delay
- base::StringValue idle_value(flimflam::kStateIdle);
+ base::StringValue idle_value(shill::kStateIdle);
base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&ShillServiceClientStub::SetProperty,
weak_ptr_factory_.GetWeakPtr(),
service_path,
- flimflam::kStateProperty,
+ shill::kStateProperty,
idle_value,
base::Bind(&base::DoNothing),
error_callback),
@@ -253,8 +253,8 @@ void ShillServiceClientStub::ActivateCellularModem(
error_callback.Run("Error.InvalidService", "Invalid Service");
}
SetServiceProperty(service_path.value(),
- flimflam::kActivationStateProperty,
- base::StringValue(flimflam::kActivationStateActivating));
+ shill::kActivationStateProperty,
+ base::StringValue(shill::kActivationStateActivating));
base::TimeDelta delay;
if (CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kEnableStubInteractive)) {
@@ -292,7 +292,7 @@ void ShillServiceClientStub::GetLoadableProfileEntries(
if (service_properties) {
std::string profile_path;
if (service_properties->GetStringWithoutPathExpansion(
- flimflam::kProfileProperty, &profile_path)) {
+ shill::kProfileProperty, &profile_path)) {
result_properties->SetStringWithoutPathExpansion(
profile_path, service_path.value());
}
@@ -324,7 +324,7 @@ void ShillServiceClientStub::AddService(const std::string& service_path,
std::string nstate = state;
if (CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kDefaultStubNetworkStateIdle)) {
- nstate = flimflam::kStateIdle;
+ nstate = shill::kStateIdle;
}
AddServiceWithIPConfig(service_path, name, type, nstate, "",
add_to_visible_list, add_to_watch_list);
@@ -345,16 +345,16 @@ void ShillServiceClientStub::AddServiceWithIPConfig(
GetModifiableServiceProperties(service_path, true);
connect_behavior_.erase(service_path);
properties->SetWithoutPathExpansion(
- flimflam::kSSIDProperty,
+ shill::kSSIDProperty,
base::Value::CreateStringValue(service_path));
properties->SetWithoutPathExpansion(
- flimflam::kNameProperty,
+ shill::kNameProperty,
base::Value::CreateStringValue(name));
properties->SetWithoutPathExpansion(
- flimflam::kTypeProperty,
+ shill::kTypeProperty,
base::Value::CreateStringValue(type));
properties->SetWithoutPathExpansion(
- flimflam::kStateProperty,
+ shill::kStateProperty,
base::Value::CreateStringValue(state));
if (!ipconfig_path.empty())
properties->SetWithoutPathExpansion(
@@ -390,9 +390,8 @@ bool ShillServiceClientStub::SetServiceProperty(const std::string& service_path,
// from Shill.
base::DictionaryValue* provider = new base::DictionaryValue;
provider->SetWithoutPathExpansion(property, value.DeepCopy());
- new_properties.SetWithoutPathExpansion(flimflam::kProviderProperty,
- provider);
- changed_property = flimflam::kProviderProperty;
+ new_properties.SetWithoutPathExpansion(shill::kProviderProperty, provider);
+ changed_property = shill::kProviderProperty;
} else {
new_properties.SetWithoutPathExpansion(property, value.DeepCopy());
changed_property = property;
@@ -400,7 +399,7 @@ bool ShillServiceClientStub::SetServiceProperty(const std::string& service_path,
dict->MergeDictionary(&new_properties);
- if (property == flimflam::kStateProperty) {
+ if (property == shill::kStateProperty) {
// When State changes the sort order of Services may change.
DBusThreadManager::Get()->GetShillManagerClient()->GetTestInterface()->
SortManagerServices();
@@ -486,7 +485,7 @@ void ShillServiceClientStub::SetOtherServicesOffline(
return;
}
std::string service_type;
- service_properties->GetString(flimflam::kTypeProperty, &service_type);
+ service_properties->GetString(shill::kTypeProperty, &service_type);
// Set all other services of the same type to offline (Idle).
for (base::DictionaryValue::Iterator iter(stub_services_);
!iter.IsAtEnd(); iter.Advance()) {
@@ -498,12 +497,12 @@ void ShillServiceClientStub::SetOtherServicesOffline(
NOTREACHED();
std::string type;
- properties->GetString(flimflam::kTypeProperty, &type);
+ properties->GetString(shill::kTypeProperty, &type);
if (type != service_type)
continue;
properties->SetWithoutPathExpansion(
- flimflam::kStateProperty,
- base::Value::CreateStringValue(flimflam::kStateIdle));
+ shill::kStateProperty,
+ base::Value::CreateStringValue(shill::kStateIdle));
}
}
@@ -511,12 +510,12 @@ void ShillServiceClientStub::SetCellularActivated(
const dbus::ObjectPath& service_path,
const ErrorCallback& error_callback) {
SetProperty(service_path,
- flimflam::kActivationStateProperty,
- base::StringValue(flimflam::kActivationStateActivated),
+ shill::kActivationStateProperty,
+ base::StringValue(shill::kActivationStateActivated),
base::Bind(&base::DoNothing),
error_callback);
SetProperty(service_path,
- flimflam::kConnectableProperty,
+ shill::kConnectableProperty,
base::FundamentalValue(true),
base::Bind(&base::DoNothing),
error_callback);
@@ -541,25 +540,25 @@ void ShillServiceClientStub::ContinueConnect(
// No custom connect behavior set, continue with the default connect behavior.
std::string passphrase;
service_properties->GetStringWithoutPathExpansion(
- flimflam::kPassphraseProperty, &passphrase);
+ shill::kPassphraseProperty, &passphrase);
if (passphrase == "failure") {
// Simulate a password failure.
SetServiceProperty(service_path,
- flimflam::kStateProperty,
- base::StringValue(flimflam::kStateFailure));
+ shill::kStateProperty,
+ base::StringValue(shill::kStateFailure));
base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(
base::IgnoreResult(&ShillServiceClientStub::SetServiceProperty),
weak_ptr_factory_.GetWeakPtr(),
service_path,
- flimflam::kErrorProperty,
- base::StringValue(flimflam::kErrorBadPassphrase)));
+ shill::kErrorProperty,
+ base::StringValue(shill::kErrorBadPassphrase)));
} else {
// Set Online.
SetServiceProperty(service_path,
- flimflam::kStateProperty,
- base::StringValue(flimflam::kStateOnline));
+ shill::kStateProperty,
+ base::StringValue(shill::kStateOnline));
}
}
diff --git a/chromeos/dbus/shill_service_client_unittest.cc b/chromeos/dbus/shill_service_client_unittest.cc
index 9d70eab..f83f805 100644
--- a/chromeos/dbus/shill_service_client_unittest.cc
+++ b/chromeos/dbus/shill_service_client_unittest.cc
@@ -26,7 +26,7 @@ const char kExampleServicePath[] = "/foo/bar";
class ShillServiceClientTest : public ShillClientUnittestBase {
public:
ShillServiceClientTest()
- : ShillClientUnittestBase(flimflam::kFlimflamServiceInterface,
+ : ShillClientUnittestBase(shill::kFlimflamServiceInterface,
dbus::ObjectPath(kExampleServicePath)) {
}
@@ -50,10 +50,10 @@ class ShillServiceClientTest : public ShillClientUnittestBase {
TEST_F(ShillServiceClientTest, PropertyChanged) {
const int kValue = 42;
// Create a signal.
- dbus::Signal signal(flimflam::kFlimflamServiceInterface,
- flimflam::kMonitorPropertyChanged);
+ dbus::Signal signal(shill::kFlimflamServiceInterface,
+ shill::kMonitorPropertyChanged);
dbus::MessageWriter writer(&signal);
- writer.AppendString(flimflam::kSignalStrengthProperty);
+ writer.AppendString(shill::kSignalStrengthProperty);
writer.AppendVariantOfByte(kValue);
// Set expectations.
@@ -61,7 +61,7 @@ TEST_F(ShillServiceClientTest, PropertyChanged) {
MockPropertyChangeObserver observer;
EXPECT_CALL(observer,
OnPropertyChanged(
- flimflam::kSignalStrengthProperty,
+ shill::kSignalStrengthProperty,
ValueEq(ByRef(value)))).Times(1);
// Add the observer
@@ -92,16 +92,16 @@ TEST_F(ShillServiceClientTest, GetProperties) {
writer.OpenArray("{sv}", &array_writer);
dbus::MessageWriter entry_writer(NULL);
array_writer.OpenDictEntry(&entry_writer);
- entry_writer.AppendString(flimflam::kSignalStrengthProperty);
+ entry_writer.AppendString(shill::kSignalStrengthProperty);
entry_writer.AppendVariantOfByte(kValue);
array_writer.CloseContainer(&entry_writer);
writer.CloseContainer(&array_writer);
// Set expectations.
base::DictionaryValue value;
- value.SetWithoutPathExpansion(flimflam::kSignalStrengthProperty,
+ value.SetWithoutPathExpansion(shill::kSignalStrengthProperty,
base::Value::CreateIntegerValue(kValue));
- PrepareForMethodCall(flimflam::kGetPropertiesFunction,
+ PrepareForMethodCall(shill::kGetPropertiesFunction,
base::Bind(&ExpectNoArgument),
response.get());
// Call method.
@@ -118,16 +118,16 @@ TEST_F(ShillServiceClientTest, SetProperty) {
// Set expectations.
const base::StringValue value(kValue);
- PrepareForMethodCall(flimflam::kSetPropertyFunction,
+ PrepareForMethodCall(shill::kSetPropertyFunction,
base::Bind(&ExpectStringAndValueArguments,
- flimflam::kPassphraseProperty,
+ shill::kPassphraseProperty,
&value),
response.get());
// Call method.
MockClosure mock_closure;
MockErrorCallback mock_error_callback;
client_->SetProperty(dbus::ObjectPath(kExampleServicePath),
- flimflam::kPassphraseProperty,
+ shill::kPassphraseProperty,
value,
mock_closure.GetCallback(),
mock_error_callback.GetCallback());
@@ -167,15 +167,15 @@ TEST_F(ShillServiceClientTest, ClearProperty) {
scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
// Set expectations.
- PrepareForMethodCall(flimflam::kClearPropertyFunction,
+ PrepareForMethodCall(shill::kClearPropertyFunction,
base::Bind(&ExpectStringArgument,
- flimflam::kPassphraseProperty),
+ shill::kPassphraseProperty),
response.get());
// Call method.
MockClosure mock_closure;
MockErrorCallback mock_error_callback;
client_->ClearProperty(dbus::ObjectPath(kExampleServicePath),
- flimflam::kPassphraseProperty,
+ shill::kPassphraseProperty,
mock_closure.GetCallback(),
mock_error_callback.GetCallback());
EXPECT_CALL(mock_closure, Run()).Times(1);
@@ -197,8 +197,8 @@ TEST_F(ShillServiceClientTest, ClearProperties) {
// Set expectations.
std::vector<std::string> keys;
- keys.push_back(flimflam::kPassphraseProperty);
- keys.push_back(flimflam::kSignalStrengthProperty);
+ keys.push_back(shill::kPassphraseProperty);
+ keys.push_back(shill::kSignalStrengthProperty);
PrepareForMethodCall(shill::kClearPropertiesFunction,
base::Bind(&ExpectArrayOfStringsArgument, keys),
response.get());
@@ -223,7 +223,7 @@ TEST_F(ShillServiceClientTest, Connect) {
// Set expectations.
MockClosure mock_closure;
MockErrorCallback mock_error_callback;
- PrepareForMethodCall(flimflam::kConnectFunction,
+ PrepareForMethodCall(shill::kConnectFunction,
base::Bind(&ExpectNoArgument),
response.get());
EXPECT_CALL(mock_closure, Run()).Times(1);
@@ -241,7 +241,7 @@ TEST_F(ShillServiceClientTest, Disconnect) {
scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
// Set expectations.
- PrepareForMethodCall(flimflam::kDisconnectFunction,
+ PrepareForMethodCall(shill::kDisconnectFunction,
base::Bind(&ExpectNoArgument),
response.get());
// Call method.
@@ -262,7 +262,7 @@ TEST_F(ShillServiceClientTest, Remove) {
scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
// Set expectations.
- PrepareForMethodCall(flimflam::kRemoveServiceFunction,
+ PrepareForMethodCall(shill::kRemoveServiceFunction,
base::Bind(&ExpectNoArgument),
response.get());
// Call method.
@@ -284,7 +284,7 @@ TEST_F(ShillServiceClientTest, ActivateCellularModem) {
scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
// Set expectations.
- PrepareForMethodCall(flimflam::kActivateCellularModemFunction,
+ PrepareForMethodCall(shill::kActivateCellularModemFunction,
base::Bind(&ExpectStringArgument, kCarrier),
response.get());
// Call method.
diff --git a/chromeos/dbus/shill_stub_helper.cc b/chromeos/dbus/shill_stub_helper.cc
index 1cbc655..fcf6dfa 100644
--- a/chromeos/dbus/shill_stub_helper.cc
+++ b/chromeos/dbus/shill_stub_helper.cc
@@ -28,8 +28,8 @@ void UpdatePortalledWifiState() {
DBusThreadManager::Get()->GetShillServiceClient()->GetTestInterface();
services->SetServiceProperty(kStubPortalledWifiPath,
- flimflam::kStateProperty,
- base::StringValue(flimflam::kStatePortal));
+ shill::kStateProperty,
+ base::StringValue(shill::kStatePortal));
}
} // namespace
@@ -59,27 +59,27 @@ void SetupDefaultEnvironment() {
// Stub Technologies.
if (!CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kDisableStubEthernet)) {
- manager->AddTechnology(flimflam::kTypeEthernet, true);
+ manager->AddTechnology(shill::kTypeEthernet, true);
}
- manager->AddTechnology(flimflam::kTypeWifi, true);
- manager->AddTechnology(flimflam::kTypeCellular, true);
- manager->AddTechnology(flimflam::kTypeWimax, true);
+ manager->AddTechnology(shill::kTypeWifi, true);
+ manager->AddTechnology(shill::kTypeCellular, true);
+ manager->AddTechnology(shill::kTypeWimax, true);
profiles->AddProfile(kSharedProfilePath, std::string());
// Add a wifi device.
- devices->AddDevice("stub_wifi_device1", flimflam::kTypeWifi, "/device/wifi1");
+ devices->AddDevice("stub_wifi_device1", shill::kTypeWifi, "/device/wifi1");
// Add a cellular device. Used in SMS stub.
devices->AddDevice(
- "stub_cellular_device1", flimflam::kTypeCellular, "/device/cellular1");
+ "stub_cellular_device1", shill::kTypeCellular, "/device/cellular1");
devices->SetDeviceProperty("stub_cellular_device1",
- flimflam::kCarrierProperty,
+ shill::kCarrierProperty,
base::StringValue(shill::kCarrierSprint));
// Add a wimax device.
devices->AddDevice(
- "stub_wimax_device1", flimflam::kTypeWimax, "/device/wimax1");
+ "stub_wimax_device1", shill::kTypeWimax, "/device/wimax1");
const bool add_to_visible = true;
const bool add_to_watchlist = true;
@@ -87,9 +87,9 @@ void SetupDefaultEnvironment() {
if (!CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kDisableStubEthernet)) {
services->AddService("eth1", "eth1",
- flimflam::kTypeEthernet,
- flimflam::kStateOnline,
- add_to_visible, add_to_watchlist);
+ shill::kTypeEthernet,
+ shill::kStateOnline,
+ add_to_visible, add_to_watchlist);
profiles->AddService(kSharedProfilePath, "eth1");
}
@@ -97,41 +97,41 @@ void SetupDefaultEnvironment() {
services->AddService("wifi1",
"wifi1",
- flimflam::kTypeWifi,
- flimflam::kStateOnline,
+ shill::kTypeWifi,
+ shill::kStateOnline,
add_to_visible, add_to_watchlist);
services->SetServiceProperty("wifi1",
- flimflam::kSecurityProperty,
- base::StringValue(flimflam::kSecurityWep));
+ shill::kSecurityProperty,
+ base::StringValue(shill::kSecurityWep));
profiles->AddService(kSharedProfilePath, "wifi1");
services->AddService("wifi2",
"wifi2_PSK",
- flimflam::kTypeWifi,
- flimflam::kStateIdle,
+ shill::kTypeWifi,
+ shill::kStateIdle,
add_to_visible, add_to_watchlist);
services->SetServiceProperty("wifi2",
- flimflam::kSecurityProperty,
- base::StringValue(flimflam::kSecurityPsk));
+ shill::kSecurityProperty,
+ base::StringValue(shill::kSecurityPsk));
base::FundamentalValue strength_value(80);
services->SetServiceProperty(
- "wifi2", flimflam::kSignalStrengthProperty, strength_value);
+ "wifi2", shill::kSignalStrengthProperty, strength_value);
profiles->AddService(kSharedProfilePath, "wifi2");
if (CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kEnableStubPortalledWifi)) {
services->AddService(kStubPortalledWifiPath,
kStubPortalledWifiName,
- flimflam::kTypeWifi,
- flimflam::kStatePortal,
+ shill::kTypeWifi,
+ shill::kStatePortal,
add_to_visible, add_to_watchlist);
services->SetServiceProperty(kStubPortalledWifiPath,
- flimflam::kSecurityProperty,
- base::StringValue(flimflam::kSecurityNone));
+ shill::kSecurityProperty,
+ base::StringValue(shill::kSecurityNone));
services->SetConnectBehavior(kStubPortalledWifiPath,
base::Bind(&UpdatePortalledWifiState));
services->SetServiceProperty(kStubPortalledWifiPath,
- flimflam::kConnectableProperty,
+ shill::kConnectableProperty,
base::FundamentalValue(true));
}
@@ -139,29 +139,29 @@ void SetupDefaultEnvironment() {
services->AddService("wimax1",
"wimax1",
- flimflam::kTypeWimax,
- flimflam::kStateIdle,
+ shill::kTypeWimax,
+ shill::kStateIdle,
add_to_visible, add_to_watchlist);
services->SetServiceProperty(
- "wimax1", flimflam::kConnectableProperty, base::FundamentalValue(true));
+ "wimax1", shill::kConnectableProperty, base::FundamentalValue(true));
// Cellular
services->AddService("cellular1",
"cellular1",
- flimflam::kTypeCellular,
- flimflam::kStateIdle,
+ shill::kTypeCellular,
+ shill::kStateIdle,
add_to_visible, add_to_watchlist);
- base::StringValue technology_value(flimflam::kNetworkTechnologyGsm);
+ base::StringValue technology_value(shill::kNetworkTechnologyGsm);
services->SetServiceProperty(
- "cellular1", flimflam::kNetworkTechnologyProperty, technology_value);
+ "cellular1", shill::kNetworkTechnologyProperty, technology_value);
services->SetServiceProperty(
"cellular1",
- flimflam::kActivationStateProperty,
- base::StringValue(flimflam::kActivationStateNotActivated));
+ shill::kActivationStateProperty,
+ base::StringValue(shill::kActivationStateNotActivated));
services->SetServiceProperty("cellular1",
- flimflam::kRoamingStateProperty,
- base::StringValue(flimflam::kRoamingStateHome));
+ shill::kRoamingStateProperty,
+ base::StringValue(shill::kRoamingStateHome));
// VPN
@@ -170,26 +170,25 @@ void SetupDefaultEnvironment() {
// "Provider" . "Type", etc keys are used. Here we are setting the values
// that will be read (by the UI, tests, etc).
base::DictionaryValue provider_properties;
- provider_properties.SetString(flimflam::kTypeProperty,
- flimflam::kProviderOpenVpn);
- provider_properties.SetString(flimflam::kHostProperty, "vpn_host");
+ provider_properties.SetString(shill::kTypeProperty, shill::kProviderOpenVpn);
+ provider_properties.SetString(shill::kHostProperty, "vpn_host");
services->AddService("vpn1",
"vpn1",
- flimflam::kTypeVPN,
- flimflam::kStateOnline,
+ shill::kTypeVPN,
+ shill::kStateOnline,
add_to_visible, add_to_watchlist);
services->SetServiceProperty(
- "vpn1", flimflam::kProviderProperty, provider_properties);
+ "vpn1", shill::kProviderProperty, provider_properties);
profiles->AddService(kSharedProfilePath, "vpn1");
services->AddService("vpn2",
"vpn2",
- flimflam::kTypeVPN,
- flimflam::kStateOffline,
+ shill::kTypeVPN,
+ shill::kStateOffline,
add_to_visible, add_to_watchlist);
services->SetServiceProperty(
- "vpn2", flimflam::kProviderProperty, provider_properties);
+ "vpn2", shill::kProviderProperty, provider_properties);
manager->SortManagerServices();
}