diff options
author | gspencer@chromium.org <gspencer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-07 20:53:56 +0000 |
---|---|---|
committer | gspencer@chromium.org <gspencer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-07 20:53:56 +0000 |
commit | 07c674cd5a7d9f79cd2be1d04437bf97717f79a0 (patch) | |
tree | 8440a6b3d9150fe4b2ea2c28b8eb3d40e868e04c | |
parent | f57c90fa9a0916afd523287767d880499879b031 (diff) | |
download | chromium_src-07c674cd5a7d9f79cd2be1d04437bf97717f79a0.zip chromium_src-07c674cd5a7d9f79cd2be1d04437bf97717f79a0.tar.gz chromium_src-07c674cd5a7d9f79cd2be1d04437bf97717f79a0.tar.bz2 |
Renaming instances of "flimflam" with "shill", now that we're only using shill.
Does not rename things from the flimflam:: namespace in service_constants.h: that will be saved for a later pass.
I think this counts as refactoring, so I'm TBR'ing the OWNERS checks.
TBR=zelidrag@chromium.org,glotov@chromium.org
BUG=chromium:146616
TEST=built and ran
Review URL: https://chromiumcodereview.appspot.com/10915106
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155477 0039d316-1c4b-4281-b951-d872f2087c98
72 files changed, 871 insertions, 871 deletions
diff --git a/chrome/browser/chromeos/cros/cros_network_functions.cc b/chrome/browser/chromeos/cros/cros_network_functions.cc index 08f6ac0..10139fa 100644 --- a/chrome/browser/chromeos/cros/cros_network_functions.cc +++ b/chrome/browser/chromeos/cros/cros_network_functions.cc @@ -12,12 +12,12 @@ #include "chrome/browser/chromeos/cros/sms_watcher.h" #include "chromeos/dbus/cashew_client.h" #include "chromeos/dbus/dbus_thread_manager.h" -#include "chromeos/dbus/flimflam_device_client.h" -#include "chromeos/dbus/flimflam_ipconfig_client.h" -#include "chromeos/dbus/flimflam_manager_client.h" -#include "chromeos/dbus/flimflam_network_client.h" -#include "chromeos/dbus/flimflam_profile_client.h" -#include "chromeos/dbus/flimflam_service_client.h" +#include "chromeos/dbus/shill_device_client.h" +#include "chromeos/dbus/shill_ipconfig_client.h" +#include "chromeos/dbus/shill_manager_client.h" +#include "chromeos/dbus/shill_network_client.h" +#include "chromeos/dbus/shill_profile_client.h" +#include "chromeos/dbus/shill_service_client.h" #include "dbus/object_path.h" #include "third_party/cros_system_api/dbus/service_constants.h" @@ -30,12 +30,12 @@ class NetworkManagerPropertiesWatcher : public CrosNetworkWatcher { public: NetworkManagerPropertiesWatcher( const NetworkPropertiesWatcherCallback& callback) { - DBusThreadManager::Get()->GetFlimflamManagerClient()-> + DBusThreadManager::Get()->GetShillManagerClient()-> SetPropertyChangedHandler(base::Bind(callback, flimflam::kFlimflamServicePath)); } virtual ~NetworkManagerPropertiesWatcher() { - DBusThreadManager::Get()->GetFlimflamManagerClient()-> + DBusThreadManager::Get()->GetShillManagerClient()-> ResetPropertyChangedHandler(); } }; @@ -46,12 +46,12 @@ class NetworkServicePropertiesWatcher : public CrosNetworkWatcher { NetworkServicePropertiesWatcher( const NetworkPropertiesWatcherCallback& callback, const std::string& service_path) : service_path_(service_path) { - DBusThreadManager::Get()->GetFlimflamServiceClient()-> + DBusThreadManager::Get()->GetShillServiceClient()-> SetPropertyChangedHandler(dbus::ObjectPath(service_path), base::Bind(callback, service_path)); } virtual ~NetworkServicePropertiesWatcher() { - DBusThreadManager::Get()->GetFlimflamServiceClient()-> + DBusThreadManager::Get()->GetShillServiceClient()-> ResetPropertyChangedHandler(dbus::ObjectPath(service_path_)); } @@ -65,12 +65,12 @@ class NetworkDevicePropertiesWatcher : public CrosNetworkWatcher { NetworkDevicePropertiesWatcher( const NetworkPropertiesWatcherCallback& callback, const std::string& device_path) : device_path_(device_path) { - DBusThreadManager::Get()->GetFlimflamDeviceClient()-> + DBusThreadManager::Get()->GetShillDeviceClient()-> SetPropertyChangedHandler(dbus::ObjectPath(device_path), base::Bind(callback, device_path)); } virtual ~NetworkDevicePropertiesWatcher() { - DBusThreadManager::Get()->GetFlimflamDeviceClient()-> + DBusThreadManager::Get()->GetShillDeviceClient()-> ResetPropertyChangedHandler(dbus::ObjectPath(device_path_)); } @@ -190,13 +190,13 @@ void RunCallbackWithDictionaryValue(const NetworkPropertiesCallback& callback, callback.Run(path, call_status == DBUS_METHOD_CALL_SUCCESS ? &value : NULL); } -// Used as a callback for FlimflamManagerClient::GetService +// Used as a callback for ShillManagerClient::GetService void OnGetService(const NetworkPropertiesCallback& callback, DBusMethodCallStatus call_status, const dbus::ObjectPath& service_path) { if (call_status == DBUS_METHOD_CALL_SUCCESS) { VLOG(1) << "OnGetServiceService: " << service_path.value(); - DBusThreadManager::Get()->GetFlimflamServiceClient()->GetProperties( + DBusThreadManager::Get()->GetShillServiceClient()->GetProperties( service_path, base::Bind(&RunCallbackWithDictionaryValue, callback, service_path.value())); @@ -255,8 +255,8 @@ std::string ConvertNameSerersListToString(const base::ListValue& name_servers) { bool ParseIPConfig(const std::string& device_path, const std::string& ipconfig_path, NetworkIPConfigVector* ipconfig_vector) { - FlimflamIPConfigClient* ipconfig_client = - DBusThreadManager::Get()->GetFlimflamIPConfigClient(); + ShillIPConfigClient* ipconfig_client = + DBusThreadManager::Get()->GetShillIPConfigClient(); // TODO(hashimoto): Remove this blocking D-Bus method call. crosbug.com/29902 scoped_ptr<base::DictionaryValue> properties( ipconfig_client->CallGetPropertiesAndBlock( @@ -306,7 +306,7 @@ SMS::~SMS() {} bool CrosActivateCellularModem(const std::string& service_path, const std::string& carrier) { - return DBusThreadManager::Get()->GetFlimflamServiceClient()-> + return DBusThreadManager::Get()->GetShillServiceClient()-> CallActivateCellularModemAndBlock(dbus::ObjectPath(service_path), carrier); } @@ -314,41 +314,41 @@ bool CrosActivateCellularModem(const std::string& service_path, void CrosSetNetworkServiceProperty(const std::string& service_path, const std::string& property, const base::Value& value) { - DBusThreadManager::Get()->GetFlimflamServiceClient()->SetProperty( + DBusThreadManager::Get()->GetShillServiceClient()->SetProperty( dbus::ObjectPath(service_path), property, value, base::Bind(&DoNothing)); } void CrosClearNetworkServiceProperty(const std::string& service_path, const std::string& property) { - DBusThreadManager::Get()->GetFlimflamServiceClient()->ClearProperty( + DBusThreadManager::Get()->GetShillServiceClient()->ClearProperty( dbus::ObjectPath(service_path), property, base::Bind(&DoNothing)); } void CrosSetNetworkDeviceProperty(const std::string& device_path, const std::string& property, const base::Value& value) { - DBusThreadManager::Get()->GetFlimflamDeviceClient()->SetProperty( + DBusThreadManager::Get()->GetShillDeviceClient()->SetProperty( dbus::ObjectPath(device_path), property, value, base::Bind(&DoNothing)); } void CrosSetNetworkIPConfigProperty(const std::string& ipconfig_path, const std::string& property, const base::Value& value) { - DBusThreadManager::Get()->GetFlimflamIPConfigClient()->SetProperty( + DBusThreadManager::Get()->GetShillIPConfigClient()->SetProperty( dbus::ObjectPath(ipconfig_path), property, value, base::Bind(&DoNothing)); } void CrosSetNetworkManagerProperty(const std::string& property, const base::Value& value) { - DBusThreadManager::Get()->GetFlimflamManagerClient()->SetProperty( + DBusThreadManager::Get()->GetShillManagerClient()->SetProperty( property, value, base::Bind(&DoNothing)); } void CrosDeleteServiceFromProfile(const std::string& profile_path, const std::string& service_path) { - DBusThreadManager::Get()->GetFlimflamProfileClient()->DeleteEntry( + DBusThreadManager::Get()->GetShillProfileClient()->DeleteEntry( dbus::ObjectPath(profile_path), service_path, base::Bind(&DoNothing)); } @@ -387,7 +387,7 @@ CrosNetworkWatcher* CrosMonitorSMS(const std::string& modem_device_path, void CrosRequestNetworkServiceConnect( const std::string& service_path, const NetworkOperationCallback& callback) { - DBusThreadManager::Get()->GetFlimflamServiceClient()->Connect( + DBusThreadManager::Get()->GetShillServiceClient()->Connect( dbus::ObjectPath(service_path), base::Bind(callback, service_path, NETWORK_METHOD_ERROR_NONE, std::string()), @@ -396,7 +396,7 @@ void CrosRequestNetworkServiceConnect( void CrosRequestNetworkManagerProperties( const NetworkPropertiesCallback& callback) { - DBusThreadManager::Get()->GetFlimflamManagerClient()->GetProperties( + DBusThreadManager::Get()->GetShillManagerClient()->GetProperties( base::Bind(&RunCallbackWithDictionaryValue, callback, flimflam::kFlimflamServicePath)); @@ -405,7 +405,7 @@ void CrosRequestNetworkManagerProperties( void CrosRequestNetworkServiceProperties( const std::string& service_path, const NetworkPropertiesCallback& callback) { - DBusThreadManager::Get()->GetFlimflamServiceClient()->GetProperties( + DBusThreadManager::Get()->GetShillServiceClient()->GetProperties( dbus::ObjectPath(service_path), base::Bind(&RunCallbackWithDictionaryValue, callback, service_path)); } @@ -413,7 +413,7 @@ void CrosRequestNetworkServiceProperties( void CrosRequestNetworkDeviceProperties( const std::string& device_path, const NetworkPropertiesCallback& callback) { - DBusThreadManager::Get()->GetFlimflamDeviceClient()->GetProperties( + DBusThreadManager::Get()->GetShillDeviceClient()->GetProperties( dbus::ObjectPath(device_path), base::Bind(&RunCallbackWithDictionaryValue, callback, device_path)); } @@ -421,7 +421,7 @@ void CrosRequestNetworkDeviceProperties( void CrosRequestNetworkProfileProperties( const std::string& profile_path, const NetworkPropertiesCallback& callback) { - DBusThreadManager::Get()->GetFlimflamProfileClient()->GetProperties( + DBusThreadManager::Get()->GetShillProfileClient()->GetProperties( dbus::ObjectPath(profile_path), base::Bind(&RunCallbackWithDictionaryValue, callback, profile_path)); } @@ -430,7 +430,7 @@ void CrosRequestNetworkProfileEntryProperties( const std::string& profile_path, const std::string& profile_entry_path, const NetworkPropertiesCallback& callback) { - DBusThreadManager::Get()->GetFlimflamProfileClient()->GetEntry( + DBusThreadManager::Get()->GetShillProfileClient()->GetEntry( dbus::ObjectPath(profile_path), profile_entry_path, base::Bind(&RunCallbackWithDictionaryValue, @@ -455,10 +455,10 @@ void CrosRequestHiddenWifiNetworkProperties( properties.SetWithoutPathExpansion( flimflam::kSecurityProperty, base::Value::CreateStringValue(security)); - // flimflam.Manger.GetService() will apply the property changes in + // shill.Manger.GetService() will apply the property changes in // |properties| and return a new or existing service to OnGetService(). // OnGetService will then call GetProperties which will then call callback. - DBusThreadManager::Get()->GetFlimflamManagerClient()->GetService( + DBusThreadManager::Get()->GetShillManagerClient()->GetService( properties, base::Bind(&OnGetService, callback)); } @@ -485,35 +485,35 @@ void CrosRequestVirtualNetworkProperties( flimflam::kVPNDomainProperty, base::Value::CreateStringValue(service_name)); - // flimflam.Manger.GetService() will apply the property changes in + // shill.Manger.GetService() will apply the property changes in // |properties| and pass a new or existing service to OnGetService(). // OnGetService will then call GetProperties which will then call callback. - DBusThreadManager::Get()->GetFlimflamManagerClient()->GetService( + DBusThreadManager::Get()->GetShillManagerClient()->GetService( properties, base::Bind(&OnGetService, callback)); } void CrosRequestNetworkServiceDisconnect(const std::string& service_path) { - DBusThreadManager::Get()->GetFlimflamServiceClient()->Disconnect( + DBusThreadManager::Get()->GetShillServiceClient()->Disconnect( dbus::ObjectPath(service_path), base::Bind(&DoNothing)); } void CrosRequestRemoveNetworkService(const std::string& service_path) { - DBusThreadManager::Get()->GetFlimflamServiceClient()->Remove( + DBusThreadManager::Get()->GetShillServiceClient()->Remove( dbus::ObjectPath(service_path), base::Bind(&DoNothing)); } void CrosRequestNetworkScan(const std::string& network_type) { - DBusThreadManager::Get()->GetFlimflamManagerClient()->RequestScan( + DBusThreadManager::Get()->GetShillManagerClient()->RequestScan( network_type, base::Bind(&DoNothing)); } void CrosRequestNetworkDeviceEnable(const std::string& network_type, bool enable) { if (enable) { - DBusThreadManager::Get()->GetFlimflamManagerClient()->EnableTechnology( + DBusThreadManager::Get()->GetShillManagerClient()->EnableTechnology( network_type, base::Bind(&DoNothing)); } else { - DBusThreadManager::Get()->GetFlimflamManagerClient()->DisableTechnology( + DBusThreadManager::Get()->GetShillManagerClient()->DisableTechnology( network_type, base::Bind(&DoNothing)); } } @@ -522,7 +522,7 @@ void CrosRequestRequirePin(const std::string& device_path, const std::string& pin, bool enable, const NetworkOperationCallback& callback) { - DBusThreadManager::Get()->GetFlimflamDeviceClient()->RequirePin( + DBusThreadManager::Get()->GetShillDeviceClient()->RequirePin( dbus::ObjectPath(device_path), pin, enable, base::Bind(callback, device_path, NETWORK_METHOD_ERROR_NONE, std::string()), @@ -532,7 +532,7 @@ void CrosRequestRequirePin(const std::string& device_path, void CrosRequestEnterPin(const std::string& device_path, const std::string& pin, const NetworkOperationCallback& callback) { - DBusThreadManager::Get()->GetFlimflamDeviceClient()->EnterPin( + DBusThreadManager::Get()->GetShillDeviceClient()->EnterPin( dbus::ObjectPath(device_path), pin, base::Bind(callback, device_path, NETWORK_METHOD_ERROR_NONE, std::string()), @@ -543,7 +543,7 @@ void CrosRequestUnblockPin(const std::string& device_path, const std::string& unblock_code, const std::string& pin, const NetworkOperationCallback& callback) { - DBusThreadManager::Get()->GetFlimflamDeviceClient()->UnblockPin( + DBusThreadManager::Get()->GetShillDeviceClient()->UnblockPin( dbus::ObjectPath(device_path), unblock_code, pin, base::Bind(callback, device_path, NETWORK_METHOD_ERROR_NONE, std::string()), @@ -554,7 +554,7 @@ void CrosRequestChangePin(const std::string& device_path, const std::string& old_pin, const std::string& new_pin, const NetworkOperationCallback& callback) { - DBusThreadManager::Get()->GetFlimflamDeviceClient()->ChangePin( + DBusThreadManager::Get()->GetShillDeviceClient()->ChangePin( dbus::ObjectPath(device_path), old_pin, new_pin, base::Bind(callback, device_path, NETWORK_METHOD_ERROR_NONE, std::string()), @@ -562,14 +562,14 @@ void CrosRequestChangePin(const std::string& device_path, } void CrosProposeScan(const std::string& device_path) { - DBusThreadManager::Get()->GetFlimflamDeviceClient()->ProposeScan( + DBusThreadManager::Get()->GetShillDeviceClient()->ProposeScan( dbus::ObjectPath(device_path), base::Bind(&DoNothing)); } void CrosRequestCellularRegister(const std::string& device_path, const std::string& network_id, const NetworkOperationCallback& callback) { - DBusThreadManager::Get()->GetFlimflamDeviceClient()->Register( + DBusThreadManager::Get()->GetShillDeviceClient()->Register( dbus::ObjectPath(device_path), network_id, base::Bind(callback, device_path, NETWORK_METHOD_ERROR_NONE, std::string()), @@ -578,7 +578,7 @@ void CrosRequestCellularRegister(const std::string& device_path, bool CrosSetOfflineMode(bool offline) { base::FundamentalValue value(offline); - DBusThreadManager::Get()->GetFlimflamManagerClient()->SetProperty( + DBusThreadManager::Get()->GetShillManagerClient()->SetProperty( flimflam::kOfflineModeProperty, value, base::Bind(&DoNothing)); return true; } @@ -590,8 +590,8 @@ bool CrosListIPConfigs(const std::string& device_path, if (hardware_address) hardware_address->clear(); const dbus::ObjectPath device_object_path(device_path); - FlimflamDeviceClient* device_client = - DBusThreadManager::Get()->GetFlimflamDeviceClient(); + ShillDeviceClient* device_client = + DBusThreadManager::Get()->GetShillDeviceClient(); // TODO(hashimoto): Remove this blocking D-Bus method call. // crosbug.com/29902 scoped_ptr<base::DictionaryValue> properties( @@ -649,7 +649,7 @@ bool CrosAddIPConfig(const std::string& device_path, IPConfigType type) { return false; }; const dbus::ObjectPath result = - DBusThreadManager::Get()->GetFlimflamDeviceClient()-> + DBusThreadManager::Get()->GetShillDeviceClient()-> CallAddIPConfigAndBlock(dbus::ObjectPath(device_path), type_str); if (result.value().empty()) { LOG(ERROR) << "Add IPConfig failed for device path " << device_path @@ -660,19 +660,19 @@ bool CrosAddIPConfig(const std::string& device_path, IPConfigType type) { } bool CrosRemoveIPConfig(const std::string& ipconfig_path) { - return DBusThreadManager::Get()->GetFlimflamIPConfigClient()-> + return DBusThreadManager::Get()->GetShillIPConfigClient()-> CallRemoveAndBlock(dbus::ObjectPath(ipconfig_path)); } void CrosRequestIPConfigRefresh(const std::string& ipconfig_path) { - DBusThreadManager::Get()->GetFlimflamIPConfigClient()->Refresh( + DBusThreadManager::Get()->GetShillIPConfigClient()->Refresh( dbus::ObjectPath(ipconfig_path), base::Bind(&DoNothing)); } bool CrosGetWifiAccessPoints(WifiAccessPointVector* result) { scoped_ptr<base::DictionaryValue> manager_properties( - DBusThreadManager::Get()->GetFlimflamManagerClient()-> + DBusThreadManager::Get()->GetShillManagerClient()-> CallGetPropertiesAndBlock()); if (!manager_properties.get()) { LOG(WARNING) << "Couldn't read managers's properties"; @@ -695,7 +695,7 @@ bool CrosGetWifiAccessPoints(WifiAccessPointVector* result) { continue; } scoped_ptr<base::DictionaryValue> device_properties( - DBusThreadManager::Get()->GetFlimflamDeviceClient()-> + DBusThreadManager::Get()->GetShillDeviceClient()-> CallGetPropertiesAndBlock(dbus::ObjectPath(device_path))); if (!device_properties.get()) { LOG(WARNING) << "Couldn't read device's properties " << device_path; @@ -728,7 +728,7 @@ bool CrosGetWifiAccessPoints(WifiAccessPointVector* result) { } scoped_ptr<base::DictionaryValue> network_properties( - DBusThreadManager::Get()->GetFlimflamNetworkClient()-> + DBusThreadManager::Get()->GetShillNetworkClient()-> CallGetPropertiesAndBlock(dbus::ObjectPath(network_path))); if (!network_properties.get()) { LOG(WARNING) << "Couldn't read network's properties " << network_path; @@ -757,7 +757,7 @@ bool CrosGetWifiAccessPoints(WifiAccessPointVector* result) { } void CrosConfigureService(const base::DictionaryValue& properties) { - DBusThreadManager::Get()->GetFlimflamManagerClient()->ConfigureService( + DBusThreadManager::Get()->GetShillManagerClient()->ConfigureService( properties, base::Bind(&DoNothing)); } diff --git a/chrome/browser/chromeos/cros/cros_network_functions.h b/chrome/browser/chromeos/cros/cros_network_functions.h index 7050c87..e41708e 100644 --- a/chrome/browser/chromeos/cros/cros_network_functions.h +++ b/chrome/browser/chromeos/cros/cros_network_functions.h @@ -138,7 +138,7 @@ void CrosDeleteServiceFromProfile(const std::string& profile_path, // object that invoked MonitorCellularDataPlan when up to date data is ready. void CrosRequestCellularDataPlanUpdate(const std::string& modem_service_path); -// Sets up monitoring of the PropertyChanged signal on the flimflam manager. +// Sets up monitoring of the PropertyChanged signal on the shill manager. // The provided |callback| will be called whenever a manager property changes. CrosNetworkWatcher* CrosMonitorNetworkManagerProperties( const NetworkPropertiesWatcherCallback& callback); @@ -215,7 +215,7 @@ void CrosRequestNetworkServiceDisconnect(const std::string& service_path); void CrosRequestRemoveNetworkService(const std::string& service_path); // Requests a scan of services of |type|. -// |type| should be is a string recognized by flimflam's Manager API. +// |type| should be is a string recognized by shill's Manager API. void CrosRequestNetworkScan(const std::string& network_type); // Requests enabling or disabling a device. diff --git a/chrome/browser/chromeos/cros/cros_network_functions_unittest.cc b/chrome/browser/chromeos/cros/cros_network_functions_unittest.cc index d437f13..f092a57 100644 --- a/chrome/browser/chromeos/cros/cros_network_functions_unittest.cc +++ b/chrome/browser/chromeos/cros/cros_network_functions_unittest.cc @@ -9,12 +9,12 @@ #include "chrome/browser/chromeos/cros/sms_watcher.h" #include "chromeos/dbus/mock_cashew_client.h" #include "chromeos/dbus/mock_dbus_thread_manager.h" -#include "chromeos/dbus/mock_flimflam_device_client.h" -#include "chromeos/dbus/mock_flimflam_ipconfig_client.h" -#include "chromeos/dbus/mock_flimflam_manager_client.h" -#include "chromeos/dbus/mock_flimflam_network_client.h" -#include "chromeos/dbus/mock_flimflam_profile_client.h" -#include "chromeos/dbus/mock_flimflam_service_client.h" +#include "chromeos/dbus/mock_shill_device_client.h" +#include "chromeos/dbus/mock_shill_ipconfig_client.h" +#include "chromeos/dbus/mock_shill_manager_client.h" +#include "chromeos/dbus/mock_shill_network_client.h" +#include "chromeos/dbus/mock_shill_profile_client.h" +#include "chromeos/dbus/mock_shill_service_client.h" #include "chromeos/dbus/mock_gsm_sms_client.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/cros_system_api/dbus/service_constants.h" @@ -160,17 +160,17 @@ class CrosNetworkFunctionsTest : public testing::Test { DBusThreadManager::InitializeForTesting(mock_dbus_thread_manager); mock_cashew_client_ = mock_dbus_thread_manager->mock_cashew_client(); mock_device_client_ = - mock_dbus_thread_manager->mock_flimflam_device_client(); + mock_dbus_thread_manager->mock_shill_device_client(); mock_ipconfig_client_ = - mock_dbus_thread_manager->mock_flimflam_ipconfig_client(); + mock_dbus_thread_manager->mock_shill_ipconfig_client(); mock_manager_client_ = - mock_dbus_thread_manager->mock_flimflam_manager_client(); + mock_dbus_thread_manager->mock_shill_manager_client(); mock_network_client_ = - mock_dbus_thread_manager->mock_flimflam_network_client(); + mock_dbus_thread_manager->mock_shill_network_client(); mock_profile_client_ = - mock_dbus_thread_manager->mock_flimflam_profile_client(); + mock_dbus_thread_manager->mock_shill_profile_client(); mock_service_client_ = - mock_dbus_thread_manager->mock_flimflam_service_client(); + mock_dbus_thread_manager->mock_shill_service_client(); mock_gsm_sms_client_ = mock_dbus_thread_manager->mock_gsm_sms_client(); } @@ -179,16 +179,16 @@ class CrosNetworkFunctionsTest : public testing::Test { mock_profile_client_ = NULL; } - // Handles responses for GetProperties method calls for FlimflamManagerClient. + // Handles responses for GetProperties method calls for ShillManagerClient. void OnGetManagerProperties( - const FlimflamClientHelper::DictionaryValueCallback& callback) { + const ShillClientHelper::DictionaryValueCallback& callback) { callback.Run(DBUS_METHOD_CALL_SUCCESS, *dictionary_value_result_); } // Handles responses for GetProperties method calls. void OnGetProperties( const dbus::ObjectPath& path, - const FlimflamClientHelper::DictionaryValueCallback& callback) { + const ShillClientHelper::DictionaryValueCallback& callback) { callback.Run(DBUS_METHOD_CALL_SUCCESS, *dictionary_value_result_); } @@ -196,7 +196,7 @@ class CrosNetworkFunctionsTest : public testing::Test { void OnGetEntry( const dbus::ObjectPath& profile_path, const std::string& entry_path, - const FlimflamClientHelper::DictionaryValueCallback& callback) { + const ShillClientHelper::DictionaryValueCallback& callback) { callback.Run(DBUS_METHOD_CALL_SUCCESS, *dictionary_value_result_); } @@ -212,12 +212,12 @@ class CrosNetworkFunctionsTest : public testing::Test { protected: MockCashewClient* mock_cashew_client_; - MockFlimflamDeviceClient* mock_device_client_; - MockFlimflamIPConfigClient* mock_ipconfig_client_; - MockFlimflamManagerClient* mock_manager_client_; - MockFlimflamNetworkClient* mock_network_client_; - MockFlimflamProfileClient* mock_profile_client_; - MockFlimflamServiceClient* mock_service_client_; + MockShillDeviceClient* mock_device_client_; + MockShillIPConfigClient* mock_ipconfig_client_; + MockShillManagerClient* mock_manager_client_; + MockShillNetworkClient* mock_network_client_; + MockShillProfileClient* mock_profile_client_; + MockShillServiceClient* mock_service_client_; MockGsmSMSClient* mock_gsm_sms_client_; const base::DictionaryValue* dictionary_value_result_; }; @@ -312,7 +312,7 @@ TEST_F(CrosNetworkFunctionsTest, CrosMonitorNetworkManagerProperties) { const int kValue = 42; const base::FundamentalValue value(kValue); // Start monitoring. - FlimflamClientHelper::PropertyChangedHandler handler; + ShillClientHelper::PropertyChangedHandler handler; EXPECT_CALL(*mock_manager_client_, SetPropertyChangedHandler(_)) .WillOnce(SaveArg<0>(&handler)); CrosNetworkWatcher* watcher = CrosMonitorNetworkManagerProperties( @@ -331,7 +331,7 @@ TEST_F(CrosNetworkFunctionsTest, CrosMonitorNetworkServiceProperties) { const int kValue = 42; const base::FundamentalValue value(kValue); // Start monitoring. - FlimflamClientHelper::PropertyChangedHandler handler; + ShillClientHelper::PropertyChangedHandler handler; EXPECT_CALL(*mock_service_client_, SetPropertyChangedHandler(path, _)) .WillOnce(SaveArg<1>(&handler)); NetworkPropertiesWatcherCallback callback = @@ -353,7 +353,7 @@ TEST_F(CrosNetworkFunctionsTest, CrosMonitorNetworkDeviceProperties) { const int kValue = 42; const base::FundamentalValue value(kValue); // Start monitoring. - FlimflamClientHelper::PropertyChangedHandler handler; + ShillClientHelper::PropertyChangedHandler handler; EXPECT_CALL(*mock_device_client_, SetPropertyChangedHandler(path, _)) .WillOnce(SaveArg<1>(&handler)); NetworkPropertiesWatcherCallback callback = @@ -490,7 +490,7 @@ TEST_F(CrosNetworkFunctionsTest, CrosMonitorSMS) { const std::string modem_device_path = "/modem/device/path"; // Set expectations. - FlimflamDeviceClient::DictionaryValueCallback get_properties_callback; + ShillDeviceClient::DictionaryValueCallback get_properties_callback; EXPECT_CALL(*mock_device_client_, GetProperties(dbus::ObjectPath(modem_device_path), _)) .WillOnce(SaveArg<1>(&get_properties_callback)); @@ -663,7 +663,7 @@ TEST_F(CrosNetworkFunctionsTest, CrosRequestHiddenWifiNetworkProperties) { result.SetWithoutPathExpansion(key1, base::Value::CreateStringValue(value1)); result.SetWithoutPathExpansion(key2, base::Value::CreateStringValue(value2)); dictionary_value_result_ = &result; - // Create expected argument to FlimflamManagerClient::GetService. + // Create expected argument to ShillManagerClient::GetService. base::DictionaryValue properties; properties.SetWithoutPathExpansion( flimflam::kModeProperty, @@ -708,7 +708,7 @@ TEST_F(CrosNetworkFunctionsTest, CrosRequestVirtualNetworkProperties) { result.SetWithoutPathExpansion(key1, base::Value::CreateStringValue(value1)); result.SetWithoutPathExpansion(key2, base::Value::CreateStringValue(value2)); dictionary_value_result_ = &result; - // Create expected argument to FlimflamManagerClient::GetService. + // Create expected argument to ShillManagerClient::GetService. base::DictionaryValue properties; properties.SetWithoutPathExpansion( flimflam::kTypeProperty, base::Value::CreateStringValue("vpn")); diff --git a/chrome/browser/chromeos/cros/native_network_constants.cc b/chrome/browser/chromeos/cros/native_network_constants.cc index 29577f0..4a29327 100644 --- a/chrome/browser/chromeos/cros/native_network_constants.cc +++ b/chrome/browser/chromeos/cros/native_network_constants.cc @@ -10,7 +10,7 @@ namespace chromeos { // Format of the Carrier ID: <carrier name> (<carrier country>). const char kCarrierIdFormat[] = "%s (%s)"; -// Path of the default (shared) flimflam profile. +// Path of the default (shared) shill profile. const char kSharedProfilePath[] = "/profile/default"; const char* ConnectionTypeToString(ConnectionType type) { diff --git a/chrome/browser/chromeos/cros/native_network_constants.h b/chrome/browser/chromeos/cros/native_network_constants.h index f793834..ba2966d 100644 --- a/chrome/browser/chromeos/cros/native_network_constants.h +++ b/chrome/browser/chromeos/cros/native_network_constants.h @@ -14,7 +14,7 @@ namespace chromeos { // Format of the Carrier ID. extern const char kCarrierIdFormat[]; -// Path of the default (shared) flimflam profile. +// Path of the default (shared) shill profile. extern const char kSharedProfilePath[]; extern const char* ConnectionTypeToString(ConnectionType type); diff --git a/chrome/browser/chromeos/cros/native_network_parser.cc b/chrome/browser/chromeos/cros/native_network_parser.cc index 79740c4..aa5f5a8 100644 --- a/chrome/browser/chromeos/cros/native_network_parser.cc +++ b/chrome/browser/chromeos/cros/native_network_parser.cc @@ -550,7 +550,7 @@ bool NativeNetworkDeviceParser::ParseSimLockStateFromDictionary( bool* out_enabled) { std::string state_string; // Since RetriesLeft is sent as a uint32, which may overflow int32 range, from - // Flimflam, it may be stored as an integer or a double in DictionaryValue. + // Shill, it may be stored as an integer or a double in DictionaryValue. const base::Value* retries_value = NULL; if (!info.GetString(flimflam::kSIMLockTypeProperty, &state_string) || !info.GetBoolean(flimflam::kSIMLockEnabledProperty, out_enabled) || diff --git a/chrome/browser/chromeos/cros/native_network_parser.h b/chrome/browser/chromeos/cros/native_network_parser.h index 68b7cbc..e80e4d6 100644 --- a/chrome/browser/chromeos/cros/native_network_parser.h +++ b/chrome/browser/chromeos/cros/native_network_parser.h @@ -20,7 +20,7 @@ namespace chromeos { // This is the network device parser that parses the data from the // network stack on the native platform. Currently it parses -// FlimFlam-provided information. +// Shill-provided information. class NativeNetworkDeviceParser : public NetworkDeviceParser { public: NativeNetworkDeviceParser(); @@ -54,7 +54,7 @@ class NativeNetworkDeviceParser : public NetworkDeviceParser { // This is the network parser that parses the data from the network // stack on the native platform. Currently it parses -// FlimFlam-provided information. +// Shill-provided information. class NativeNetworkParser : public NetworkParser { public: NativeNetworkParser(); diff --git a/chrome/browser/chromeos/cros/network_library.cc b/chrome/browser/chromeos/cros/network_library.cc index e98b7de..ad2cb71 100644 --- a/chrome/browser/chromeos/cros/network_library.cc +++ b/chrome/browser/chromeos/cros/network_library.cc @@ -288,7 +288,7 @@ void Network::SetState(ConnectionState new_state) { if (new_state == state_) return; if (state_ == STATE_CONNECT_REQUESTED && new_state == STATE_IDLE) { - // CONNECT_REQUESTED is set internally. Shill/flimflam do not update the + // CONNECT_REQUESTED is set internally. Shill does not update the // state immediately, so ignore any Idle state updates sent while a // connection attempt is in progress. VLOG(2) << "Ignoring idle state change after connection request."; @@ -612,7 +612,7 @@ bool VirtualNetwork::NeedMoreInfoToConnect() const { if (client_cert_id_.empty()) return true; // For now we always need additional info for OpenVPN. - // TODO(stevenjb): Check connectable() once flimflam sets that state + // TODO(stevenjb): Check connectable() once shill sets that state // properly, or define another mechanism to determine when additional // credentials are required. return true; @@ -835,7 +835,7 @@ bool CellularNetwork::StartActivation() { return false; if (!CrosActivateCellularModem(service_path(), "")) return false; - // Don't wait for flimflam to tell us that we are really activating since + // Don't wait for shill to tell us that we are really activating since // other notifications in the message loop might cause us to think that // the process hasn't started yet. activation_state_ = ACTIVATION_STATE_ACTIVATING; @@ -1000,7 +1000,7 @@ WifiNetwork::~WifiNetwork() {} void WifiNetwork::CalculateUniqueId() { ConnectionSecurity encryption = encryption_; - // Flimflam treats wpa and rsn as psk internally, so convert those types + // Shill treats wpa and rsn as psk internally, so convert those types // to psk for unique naming. if (encryption == SECURITY_WPA || encryption == SECURITY_RSN) encryption = SECURITY_PSK; @@ -1047,22 +1047,22 @@ const std::string& WifiNetwork::GetPassphrase() const { } void WifiNetwork::SetPassphrase(const std::string& passphrase) { - // Set the user_passphrase_ only; passphrase_ stores the flimflam value. + // Set the user_passphrase_ only; passphrase_ stores the shill value. // If the user sets an empty passphrase, restore it to the passphrase - // remembered by flimflam. + // remembered by shill. if (!passphrase.empty()) { user_passphrase_ = passphrase; passphrase_ = passphrase; } else { user_passphrase_ = passphrase_; } - // Send the change to flimflam. If the format is valid, it will propagate to + // Send the change to shill. If the format is valid, it will propagate to // passphrase_ with a service update. SetOrClearStringProperty(flimflam::kPassphraseProperty, passphrase, NULL); } -// See src/third_party/flimflam/doc/service-api.txt for properties that -// flimflam will forget when SaveCredentials is false. +// See src/third_party/shill/doc/service-api.txt for properties that +// shill will forget when SaveCredentials is false. void WifiNetwork::EraseCredentials() { WipeString(&passphrase_); WipeString(&user_passphrase_); @@ -1150,7 +1150,7 @@ void WifiNetwork::SetEAPClientCertPkcs11Id(const std::string& pkcs11_id) { VLOG(1) << "SetEAPClientCertPkcs11Id " << pkcs11_id; SetOrClearStringProperty( flimflam::kEapCertIdProperty, pkcs11_id, &eap_client_cert_pkcs11_id_); - // flimflam requires both CertID and KeyID for TLS connections, despite + // shill requires both CertID and KeyID for TLS connections, despite // the fact that by convention they are the same ID. SetOrClearStringProperty(flimflam::kEapKeyIdProperty, pkcs11_id, NULL); } @@ -1214,7 +1214,7 @@ std::string WifiNetwork::GetEncryptionString() const { } bool WifiNetwork::IsPassphraseRequired() const { - // TODO(stevenjb): Remove error_ tests when fixed in flimflam + // TODO(stevenjb): Remove error_ tests when fixed. // (http://crosbug.com/10135). if (error() == ERROR_BAD_PASSPHRASE || error() == ERROR_BAD_WEPKEY) return true; diff --git a/chrome/browser/chromeos/cros/network_library.h b/chrome/browser/chromeos/cros/network_library.h index 40dbc86..4c6ac88 100644 --- a/chrome/browser/chromeos/cros/network_library.h +++ b/chrome/browser/chromeos/cros/network_library.h @@ -75,7 +75,7 @@ const int kPriorityNotSet = 0; // The value of priority if network is preferred. const int kPriorityPreferred = 1; -// Contains data related to the flimflam.Device interface, +// Contains data related to the shill.Device interface, // e.g. ethernet, wifi, cellular. // TODO(dpolukhin): refactor to make base class and device specific derivatives. class NetworkDevice { @@ -568,7 +568,7 @@ class Network { int priority_; // determines order in network list. bool auto_connect_; bool save_credentials_; // save passphrase and EAP credentials to disk. - std::string proxy_config_; // ProxyConfig property in flimflam. + std::string proxy_config_; // ProxyConfig property in shill. ProxyOncConfig proxy_onc_config_; // Only used for parsing ONC proxy value. scoped_ptr<EnrollmentDelegate> enrollment_delegate_; @@ -581,7 +581,7 @@ class Network { // Initialize the IP address field void InitIPAddress(); - // Priority value, corresponds to index in list from flimflam (0 = first) + // Priority value, corresponds to index in list from shill (0 = first) int priority_order_; // Set to true if the UI requested this as a new network. @@ -859,7 +859,7 @@ class CellularNetwork : public WirelessNetwork { // Sets the APN to use in establishing data connections. Only // the fields of the APN that are needed for making connections - // are passed to flimflam. The name, localized_name, and language + // are passed to shill. The name, localized_name, and language // fields are ignored. void SetApn(const CellularApn& apn); @@ -1129,7 +1129,7 @@ class WifiNetwork : public WirelessNetwork { std::string eap_passphrase_; bool eap_save_credentials_; - // Internal state (not stored in flimflam). + // Internal state (not stored in shill). // Passphrase set by user (stored for UI). std::string user_passphrase_; diff --git a/chrome/browser/chromeos/cros/network_library_impl_base.cc b/chrome/browser/chromeos/cros/network_library_impl_base.cc index 4b59bfe..b84597b 100644 --- a/chrome/browser/chromeos/cros/network_library_impl_base.cc +++ b/chrome/browser/chromeos/cros/network_library_impl_base.cc @@ -321,7 +321,7 @@ const VirtualNetworkVector& return remembered_virtual_networks_; } -// Use flimflam's ordering of the services to determine which type of +// Use shill's ordering of the services to determine which type of // network to return (i.e. don't assume priority of network types). // Note: This does not include any virtual networks. namespace { @@ -828,12 +828,12 @@ void NetworkLibraryImplBase::NetworkConnectStartWifi( wifi->passphrase_required()) wifi->SetPassphrase(wifi->user_passphrase_); // For enterprise 802.1X networks, always provide TPM PIN when available. - // flimflam uses the PIN if it needs to access certificates in the TPM and + // shill uses the PIN if it needs to access certificates in the TPM and // ignores it otherwise. if (wifi->encryption() == SECURITY_8021X) { // If the TPM initialization has not completed, GetTpmPin() will return // an empty value, in which case we do not want to clear the PIN since - // that will cause flimflam to flag the network as unconfigured. + // that will cause shill to flag the network as unconfigured. // TODO(stevenjb): We may want to delay attempting to connect, or fail // immediately, rather than let the network layer attempt a connection. std::string tpm_pin = GetTpmPin(); @@ -844,7 +844,7 @@ void NetworkLibraryImplBase::NetworkConnectStartWifi( } void NetworkLibraryImplBase::NetworkConnectStartVPN(VirtualNetwork* vpn) { - // flimflam needs the TPM PIN for some VPN networks to access client + // shill needs the TPM PIN for some VPN networks to access client // certificates, and ignores the PIN if it doesn't need them. Only set this // if the TPM is ready (see comment in NetworkConnectStartWifi). std::string tpm_pin = GetTpmPin(); @@ -920,7 +920,7 @@ void NetworkLibraryImplBase::NetworkConnectCompleted( << " State: " << network->state() << " Status: " << status; - // If the user asked not to save credentials, flimflam will have + // If the user asked not to save credentials, shill will have // forgotten them. Wipe our cache as well. if (!network->save_credentials()) network->EraseCredentials(); @@ -1321,12 +1321,12 @@ bool NetworkLibraryImplBase::SetActiveNetwork( //////////////////////////////////////////////////////////////////////////// // Network list management functions. -// Note: sometimes flimflam still returns networks when the device type is +// Note: sometimes shill still returns networks when the device type is // disabled. Always check the appropriate enabled() state before adding // networks to a list or setting an active network so that we do not show them // in the UI. -// This relies on services being requested from flimflam in priority order, +// This relies on services being requested from shill in priority order, // and the updates getting processed and received in order. void NetworkLibraryImplBase::UpdateActiveNetwork(Network* network) { network->set_is_active(true); @@ -1476,7 +1476,7 @@ bool NetworkLibraryImplBase::ValidateRememberedNetwork(Network* network) { // See if this is a policy-configured network that has meanwhile been removed. // This situation may arise when the full list of remembered networks is not // available to LoadOncNetworks(), which can happen due to the asynchronous - // communication between flimflam and NetworkLibrary. Just tell flimflam to + // communication between shill and NetworkLibrary. Just tell shill to // delete the network now. const NetworkUIData::ONCSource source = network->ui_data().onc_source(); if (source == NetworkUIData::ONC_SOURCE_USER_POLICY || @@ -1507,7 +1507,7 @@ bool NetworkLibraryImplBase::ValidateAndAddRememberedNetwork(Network* network) { } else { NOTREACHED(); } - // Find service path in profiles. Flimflam does not set the Profile + // Find service path in profiles. Shill does not set the Profile // property for remembered networks, only active networks. for (NetworkProfileList::iterator iter = profile_list_.begin(); iter != profile_list_.end(); ++iter) { @@ -1537,7 +1537,7 @@ void NetworkLibraryImplBase::DeleteRememberedNetwork( Network* remembered_network = found->second; // Update any associated network service before removing from profile - // so that flimflam doesn't recreate the service (e.g. when we disconenct it). + // so that shill doesn't recreate the service (e.g. when we disconenct it). Network* network = FindNetworkByUniqueId(remembered_network->unique_id()); if (network) { // Clear the stored credentials for any forgotten networks. diff --git a/chrome/browser/chromeos/cros/network_library_impl_base.h b/chrome/browser/chromeos/cros/network_library_impl_base.h index 29bebfd..75f4862 100644 --- a/chrome/browser/chromeos/cros/network_library_impl_base.h +++ b/chrome/browser/chromeos/cros/network_library_impl_base.h @@ -338,7 +338,7 @@ class NetworkLibraryImplBase : public NetworkLibrary { bool if_found); // Checks whether |network| has meanwhile been pruned by ONC policy. If so, - // instructs flimflam to remove the network, deletes |network| and returns + // instructs shill to remove the network, deletes |network| and returns // false. bool ValidateRememberedNetwork(Network* network); @@ -483,7 +483,7 @@ class NetworkLibraryImplBase : public NetworkLibrary { // True if access network library is locked. bool is_locked_; - // TPM module user slot and PIN, needed by flimflam to access certificates. + // TPM module user slot and PIN, needed by shill to access certificates. std::string tpm_slot_; std::string tpm_pin_; @@ -507,7 +507,7 @@ class NetworkLibraryImplBase : public NetworkLibrary { NetworkOncMap network_onc_map_; // Keeps track of what networks ONC has configured. This is used to weed out - // stray networks that flimflam still has on file, but are not known on the + // stray networks that shill still has on file, but are not known on the // Chrome side. NetworkSourceMap network_source_map_; diff --git a/chrome/browser/chromeos/cros/network_library_impl_cros.cc b/chrome/browser/chromeos/cros/network_library_impl_cros.cc index b0efb58..0f22da9 100644 --- a/chrome/browser/chromeos/cros/network_library_impl_cros.cc +++ b/chrome/browser/chromeos/cros/network_library_impl_cros.cc @@ -998,7 +998,7 @@ void NetworkLibraryImplCros::UpdateProfile( break; } if (iter1 == profile_list_.end()) { - // This can happen if flimflam gets restarted while Chrome is running. + // This can happen if shill gets restarted while Chrome is running. LOG(WARNING) << "Profile not in list: " << profile_path; return; } diff --git a/chrome/browser/chromeos/cros/network_library_impl_stub.cc b/chrome/browser/chromeos/cros/network_library_impl_stub.cc index ad5d8df..887c338 100644 --- a/chrome/browser/chromeos/cros/network_library_impl_stub.cc +++ b/chrome/browser/chromeos/cros/network_library_impl_stub.cc @@ -482,7 +482,7 @@ void NetworkLibraryImplStub::CallConfigureService( const DictionaryValue* info) {} void NetworkLibraryImplStub::CallConnectToNetwork(Network* network) { - // Immediately set the network to active to mimic flimflam's behavior. + // Immediately set the network to active to mimic shill's behavior. SetActiveNetwork(network->type(), network->service_path()); // If a delay has been set (i.e. we are interactive), delay the call to // ConnectToNetwork (but signal observers since we changed connecting state). diff --git a/chrome/browser/chromeos/cros/network_parser.h b/chrome/browser/chromeos/cros/network_parser.h index 33a15ac..86f6206 100644 --- a/chrome/browser/chromeos/cros/network_parser.h +++ b/chrome/browser/chromeos/cros/network_parser.h @@ -20,11 +20,11 @@ namespace chromeos { class NetworkDevice; -// This takes a Value of a particular form, and maps the keys in the -// dictionary to a NetworkDevice object to initialize it properly. -// Subclasses of this can then customize its methods to parse either -// libcros (flimflam) data or network setup information obtained from -// policy or setup file import depending on the EnumMapper supplied. +// This takes a Value of a particular form, and maps the keys in the dictionary +// to a NetworkDevice object to initialize it properly. Subclasses of this can +// then customize its methods to parse either Shill data or network setup +// information obtained from policy or setup file import depending on the +// EnumMapper supplied. class NetworkDeviceParser { public: virtual ~NetworkDeviceParser(); diff --git a/chrome/browser/chromeos/cros/onc_network_parser.cc b/chrome/browser/chromeos/cros/onc_network_parser.cc index 648bdbd..25dea7f 100644 --- a/chrome/browser/chromeos/cros/onc_network_parser.cc +++ b/chrome/browser/chromeos/cros/onc_network_parser.cc @@ -581,7 +581,7 @@ Network* OncNetworkParser::CreateNetworkFromInfo( return NULL; } - // Update the UI data property in flimflam. + // Update the UI data property in shill. std::string ui_data_json; base::DictionaryValue ui_data_dict; network->ui_data().FillDictionary(&ui_data_dict); @@ -791,7 +791,7 @@ bool OncNetworkParser::ParseNetworkConfigurationValue( // Fall back to generic parser. return parser->ParseValue(index, value, network); case PROPERTY_INDEX_NAME: - // flimflam doesn't allow setting name for non-VPN networks. + // shill doesn't allow setting name for non-VPN networks. if (network->type() != TYPE_VPN) { network->UpdatePropertyMap(PROPERTY_INDEX_NAME, NULL); return true; @@ -1230,13 +1230,13 @@ bool OncNetworkParser::ProcessProxySettings(OncNetworkParser* parser, std::string proxy_dict_str = ConvertValueToString(*proxy_dict.get()); // Add ProxyConfig property to property map so that it will be updated in - // flimflam in NetworkLibraryImplCros::CallConfigureService after all parsing + // shill in NetworkLibraryImplCros::CallConfigureService after all parsing // has completed. base::StringValue val(proxy_dict_str); network->UpdatePropertyMap(PROPERTY_INDEX_PROXY_CONFIG, &val); // If |network| is currently being connected to or it exists in memory, - // flimflam will fire PropertyChanged notification in ConfigureService, + // shill will fire PropertyChanged notification in ConfigureService, // chromeos::ProxyConfigServiceImpl will get OnNetworkChanged notification // and, if necessary, activate |proxy_dict_str| on network stack and reflect // it in UI via "Change proxy settings" button. @@ -1737,7 +1737,7 @@ bool OncVirtualNetworkParser::ParseVPNValue(OncNetworkParser* parser, case PROPERTY_INDEX_PROVIDER_HOST: { base::StringValue empty_value(""); virtual_network->set_server_hostname(GetStringValue(value)); - // Flimflam requires a domain property which is unused. + // Shill requires a domain property which is unused. network->UpdatePropertyMap(PROPERTY_INDEX_VPN_DOMAIN, &empty_value); return true; } @@ -1768,7 +1768,7 @@ bool OncVirtualNetworkParser::ParseVPNValue(OncNetworkParser* parser, VLOG(1) << "OpenVPN field not allowed with this VPN type"; return false; } - // The following are needed by flimflam to set up the OpenVPN + // The following are needed by shill to set up the OpenVPN // management channel which every ONC OpenVPN configuration will // use. base::StringValue empty_value(""); @@ -1849,7 +1849,7 @@ bool OncVirtualNetworkParser::ParseIPsecValue(OncNetworkParser* parser, } case PROPERTY_INDEX_IPSEC_IKEVERSION: { if (!value.IsType(TYPE_STRING)) { - // Flimflam wants all provider properties to be strings. + // Shill wants all provider properties to be strings. base::StringValue string_value(ConvertValueToString(value)); virtual_network->UpdatePropertyMap(index, &string_value); } @@ -1953,7 +1953,7 @@ bool OncVirtualNetworkParser::ParseOpenVPNValue(OncNetworkParser* parser, virtual_network->set_ca_cert_nss(GetStringValue(value)); return true; case PROPERTY_INDEX_OPEN_VPN_REMOTECERTKU: { - // ONC supports a list of these, but we flimflam supports only one + // ONC supports a list of these, but we shill supports only one // today. So extract the first. const base::ListValue* value_list = NULL; value.GetAsList(&value_list); @@ -1987,7 +1987,7 @@ bool OncVirtualNetworkParser::ParseOpenVPNValue(OncNetworkParser* parser, case PROPERTY_INDEX_OPEN_VPN_TLSAUTHCONTENTS: case PROPERTY_INDEX_OPEN_VPN_TLSREMOTE: { if (!value.IsType(TYPE_STRING)) { - // Flimflam wants all provider properties to be strings. + // Shill wants all provider properties to be strings. base::StringValue string_value(ConvertValueToString(value)); virtual_network->UpdatePropertyMap(index, &string_value); } diff --git a/chrome/browser/chromeos/cros/onc_network_parser.h b/chrome/browser/chromeos/cros/onc_network_parser.h index c819035..f6502c0 100644 --- a/chrome/browser/chromeos/cros/onc_network_parser.h +++ b/chrome/browser/chromeos/cros/onc_network_parser.h @@ -147,7 +147,7 @@ class OncNetworkParser : public NetworkParser { static std::string GetPkcs11IdFromCertGuid(const std::string& guid); // Process ProxySettings dictionary into a format which is then updated into - // ProxyConfig property in flimflam. + // ProxyConfig property in shill. static bool ProcessProxySettings(OncNetworkParser* parser, const base::Value& value, Network* network); diff --git a/chrome/browser/chromeos/cros/sms_watcher.cc b/chrome/browser/chromeos/cros/sms_watcher.cc index d7efb29..c5a4335 100644 --- a/chrome/browser/chromeos/cros/sms_watcher.cc +++ b/chrome/browser/chromeos/cros/sms_watcher.cc @@ -12,7 +12,7 @@ #include "base/bind.h" #include "base/values.h" #include "chromeos/dbus/dbus_thread_manager.h" -#include "chromeos/dbus/flimflam_device_client.h" +#include "chromeos/dbus/shill_device_client.h" #include "chromeos/dbus/gsm_sms_client.h" #include "chromeos/dbus/modem_messaging_client.h" #include "chromeos/dbus/sms_client.h" @@ -364,7 +364,7 @@ SMSWatcher::SMSWatcher(const std::string& modem_device_path, : weak_ptr_factory_(this), device_path_(modem_device_path), callback_(callback) { - DBusThreadManager::Get()->GetFlimflamDeviceClient()->GetProperties( + DBusThreadManager::Get()->GetShillDeviceClient()->GetProperties( dbus::ObjectPath(modem_device_path), base::Bind(&SMSWatcher::DevicePropertiesCallback, weak_ptr_factory_.GetWeakPtr())); diff --git a/chrome/browser/chromeos/cros/sms_watcher.h b/chrome/browser/chromeos/cros/sms_watcher.h index 658a495..c457c11 100644 --- a/chrome/browser/chromeos/cros/sms_watcher.h +++ b/chrome/browser/chromeos/cros/sms_watcher.h @@ -50,7 +50,7 @@ class SMSWatcher : public CrosNetworkWatcher { virtual ~SMSWatcher(); private: - // Callback for flimflam device's GetProperties() method. + // Callback for shill device's GetProperties() method. void DevicePropertiesCallback(DBusMethodCallStatus call_status, const base::DictionaryValue& properties); diff --git a/chrome/browser/chromeos/login/captive_portal_view.cc b/chrome/browser/chromeos/login/captive_portal_view.cc index 08d5759..82fe100 100644 --- a/chrome/browser/chromeos/login/captive_portal_view.cc +++ b/chrome/browser/chromeos/login/captive_portal_view.cc @@ -81,7 +81,7 @@ void CaptivePortalView::LoadingStateChanged(content::WebContents* source) { SimpleWebViewDialog::LoadingStateChanged(source); // TODO(nkostylev): Fix case of no connectivity, check HTTP code returned. // Disable this heuristic as it has false positives. - // Relying on just flimflam portal check to close dialog is fine. + // Relying on just shill portal check to close dialog is fine. // if (!is_loading && !redirected_) // proxy_->OnOriginalURLLoaded(); } diff --git a/chrome/browser/chromeos/options/wifi_config_view.cc b/chrome/browser/chromeos/options/wifi_config_view.cc index 1385c84..a697b7a 100644 --- a/chrome/browser/chromeos/options/wifi_config_view.cc +++ b/chrome/browser/chromeos/options/wifi_config_view.cc @@ -700,7 +700,7 @@ bool WifiConfigView::Login() { } else { WifiNetwork* wifi = cros->FindWifiNetworkByPath(service_path_); if (!wifi) { - // Flimflam no longer knows about this wifi network (edge case). + // Shill no longer knows about this wifi network (edge case). // TODO(stevenjb): Add a notification (chromium-os13225). LOG(WARNING) << "Wifi network: " << service_path_ << " no longer exists."; return true; diff --git a/chrome/browser/chromeos/options/wimax_config_view.cc b/chrome/browser/chromeos/options/wimax_config_view.cc index 25e7846..c7cea00 100644 --- a/chrome/browser/chromeos/options/wimax_config_view.cc +++ b/chrome/browser/chromeos/options/wimax_config_view.cc @@ -136,7 +136,7 @@ bool WimaxConfigView::Login() { NetworkLibrary* cros = CrosLibrary::Get()->GetNetworkLibrary(); WimaxNetwork* wimax = cros->FindWimaxNetworkByPath(service_path_); if (!wimax) { - // Flimflam no longer knows about this wimax network (edge case). + // Shill no longer knows about this wimax network (edge case). // TODO(stevenjb): Add a notification (chromium-os13225). LOG(WARNING) << "Wimax network: " << service_path_ << " no longer exists."; return true; diff --git a/chrome/browser/chromeos/proxy_config_service_impl.cc b/chrome/browser/chromeos/proxy_config_service_impl.cc index 4d24df5..03228db 100644 --- a/chrome/browser/chromeos/proxy_config_service_impl.cc +++ b/chrome/browser/chromeos/proxy_config_service_impl.cc @@ -392,7 +392,7 @@ ProxyConfigServiceImpl::ProxyConfigServiceImpl(PrefService* pref_service) FetchProxyPolicy(); - // Register for flimflam network notifications. + // Register for shill network notifications. NetworkLibrary* network_lib = CrosLibrary::Get()->GetNetworkLibrary(); OnActiveNetworkChanged(network_lib, network_lib->active_network()); network_lib->AddNetworkManagerObserver(this); @@ -600,7 +600,7 @@ void ProxyConfigServiceImpl::Observe( void ProxyConfigServiceImpl::OnUISetProxyConfig() { if (current_ui_network_.empty()) return; - // Update config to flimflam. + // Update config to shill. std::string value; if (current_ui_config_.SerializeForNetwork(&value)) { VLOG(1) << "Set proxy (mode=" << current_ui_config_.mode @@ -655,7 +655,7 @@ void ProxyConfigServiceImpl::OnActiveNetworkChanged(NetworkLibrary* network_lib, // Register observer for new network. network_lib->AddNetworkObserver(active_network_, this); - // If necessary, migrate config to flimflam. + // If necessary, migrate config to shill. if (active_network->proxy_config().empty() && !device_config_.empty()) { VLOG(1) << "Try migrating device config to " << active_network_; SetProxyConfigForNetwork(active_network_, device_config_, true); diff --git a/chrome/browser/chromeos/proxy_config_service_impl.h b/chrome/browser/chromeos/proxy_config_service_impl.h index a455586..7f17f306 100644 --- a/chrome/browser/chromeos/proxy_config_service_impl.h +++ b/chrome/browser/chromeos/proxy_config_service_impl.h @@ -19,10 +19,10 @@ namespace chromeos { // Implementation of proxy config service for chromeos that: // - extends PrefProxyConfigTrackerImpl (and so lives and runs entirely on UI // thread) to handle proxy from prefs (via PrefProxyConfigTrackerImpl) and -// system i.e. network (via flimflam notifications) +// system i.e. network (via shill notifications) // - exists one per profile and one per local state // - retrieves initial system proxy configuration from cros settings persisted -// on chromeos device from chromeos revisions before migration to flimflam, +// on chromeos device from chromeos revisions before migration to shill, // - persists proxy setting per network in flimflim // - provides network stack with latest effective proxy configuration for // currently active network via PrefProxyConfigTrackerImpl's mechanism of @@ -95,14 +95,14 @@ class ProxyConfigServiceImpl // ManualProxy. Returns NULL if scheme is invalid. ManualProxy* MapSchemeToProxy(const std::string& scheme); - // We've migrated device settings to flimflam, so we only need to + // We've migrated device settings to shill, so we only need to // deserialize previously persisted device settings. // Deserializes from signed setting on device as std::string into a // protobuf and then into the config. bool DeserializeForDevice(const std::string& input); // Serializes config into a ProxyConfigDictionary and then std::string - // persisted as string property in flimflam for a network. + // persisted as string property in shill for a network. bool SerializeForNetwork(std::string* output); // Encodes the proxy server as "<url-scheme>=<proxy-scheme>://<proxy>" @@ -159,7 +159,7 @@ class ProxyConfigServiceImpl void UIGetProxyConfig(ProxyConfig* config); // Called from UI to update proxy configuration for different modes. - // Returns true if config is set properly and persisted to flimflam for the + // Returns true if config is set properly and persisted to shill for the // current network (set via UISetCurrentNetwork/UIMakeActiveNetworkCurrent). // If this network is also currently active, config service proceeds to start // activating it on network stack. @@ -218,12 +218,12 @@ class ProxyConfigServiceImpl // Called from OnNetworkManagerChanged and OnNetworkChanged for currently // active network, to handle previously active network, new active network, - // and if necessary, migrates device settings to flimflam and/or activates + // and if necessary, migrates device settings to shill and/or activates // proxy setting of new network. void OnActiveNetworkChanged(NetworkLibrary* cros, const Network* active_network); - // Sets proxy config for |network_path| into flimflam and activates setting + // Sets proxy config for |network_path| into shill and activates setting // if the network is currently active. If |only_set_if_empty| is true, // proxy will be set and saved only if network has no proxy. void SetProxyConfigForNetwork(const std::string& network_path, @@ -259,7 +259,7 @@ class ProxyConfigServiceImpl // Data members. - // Service path of currently active network (determined via flimflam + // Service path of currently active network (determined via shill // notifications); if effective proxy config is from system, proxy of this // network will be the one taking effect. std::string active_network_; @@ -272,7 +272,7 @@ class ProxyConfigServiceImpl net::ProxyConfig active_config_; // Proxy config retreived from device, in format generated from - // SerializeForNetwork, that can be directly set into flimflam. + // SerializeForNetwork, that can be directly set into shill. std::string device_config_; // Service path of network whose proxy configuration is being displayed or diff --git a/chrome/browser/net/proxy_service_factory.cc b/chrome/browser/net/proxy_service_factory.cc index 6a60a2f..2cdd496 100644 --- a/chrome/browser/net/proxy_service_factory.cc +++ b/chrome/browser/net/proxy_service_factory.cc @@ -38,7 +38,7 @@ ChromeProxyConfigService* ProxyServiceFactory::CreateProxyConfigService( #if !defined(OS_CHROMEOS) // On ChromeOS, base service is NULL; chromeos::ProxyConfigServiceImpl // determines the effective proxy config to take effect in the network layer, - // be it from prefs or system (which is network flimflam on chromeos). + // be it from prefs or system (which is network shill on chromeos). // For other platforms, create a baseline service that provides proxy // configuration in case nothing is configured through prefs (Note: prefs diff --git a/chrome/browser/resources/chromeos/login/screen_error_message.js b/chrome/browser/resources/chromeos/login/screen_error_message.js index 61dd100..54791ef 100644 --- a/chrome/browser/resources/chromeos/login/screen_error_message.js +++ b/chrome/browser/resources/chromeos/login/screen_error_message.js @@ -204,7 +204,7 @@ cr.define('login', function() { !offlineMessage.classList.contains('show-captive-portal')) { // In case of timeout we're suspecting that network might be // a captive portal but would like to check that first. - // Otherwise (signal from flimflam / generate_204 got redirected) + // Otherwise (signal from shill / generate_204 got redirected) // show dialog right away. if (isTimeout) chrome.send('fixCaptivePortal'); diff --git a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc index dabd075..160707b 100644 --- a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc +++ b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc @@ -188,7 +188,7 @@ class SimUnlockHandler : public WebUIMessageHandler, // Processing for the cases when dialog was cancelled. void CancelDialog(); - // Pass PIN/PUK code to flimflam and check status. + // Pass PIN/PUK code to shill and check status. void EnterCode(const std::string& code, SimUnlockCode code_type); // Single handler for PIN/PUK code operations. diff --git a/chromeos/chromeos.gyp b/chromeos/chromeos.gyp index 86b5628..d9f7c85 100644 --- a/chromeos/chromeos.gyp +++ b/chromeos/chromeos.gyp @@ -60,20 +60,20 @@ 'dbus/debug_daemon_client.h', 'dbus/gsm_sms_client.cc', 'dbus/gsm_sms_client.h', - 'dbus/flimflam_ipconfig_client.cc', - 'dbus/flimflam_ipconfig_client.h', - 'dbus/flimflam_client_helper.cc', - 'dbus/flimflam_client_helper.h', - 'dbus/flimflam_device_client.cc', - 'dbus/flimflam_device_client.h', - 'dbus/flimflam_manager_client.cc', - 'dbus/flimflam_manager_client.h', - 'dbus/flimflam_network_client.cc', - 'dbus/flimflam_network_client.h', - 'dbus/flimflam_profile_client.cc', - 'dbus/flimflam_profile_client.h', - 'dbus/flimflam_service_client.cc', - 'dbus/flimflam_service_client.h', + 'dbus/shill_ipconfig_client.cc', + 'dbus/shill_ipconfig_client.h', + 'dbus/shill_client_helper.cc', + 'dbus/shill_client_helper.h', + 'dbus/shill_device_client.cc', + 'dbus/shill_device_client.h', + 'dbus/shill_manager_client.cc', + 'dbus/shill_manager_client.h', + 'dbus/shill_network_client.cc', + 'dbus/shill_network_client.h', + 'dbus/shill_profile_client.cc', + 'dbus/shill_profile_client.h', + 'dbus/shill_service_client.cc', + 'dbus/shill_service_client.h', 'dbus/ibus/ibus_client.cc', 'dbus/ibus/ibus_client.h', 'dbus/ibus/ibus_component.cc', @@ -162,18 +162,18 @@ 'dbus/mock_dbus_thread_manager.h', 'dbus/mock_debug_daemon_client.cc', 'dbus/mock_debug_daemon_client.h', - 'dbus/mock_flimflam_device_client.cc', - 'dbus/mock_flimflam_device_client.h', - 'dbus/mock_flimflam_ipconfig_client.cc', - 'dbus/mock_flimflam_ipconfig_client.h', - 'dbus/mock_flimflam_manager_client.cc', - 'dbus/mock_flimflam_manager_client.h', - 'dbus/mock_flimflam_network_client.cc', - 'dbus/mock_flimflam_network_client.h', - 'dbus/mock_flimflam_profile_client.cc', - 'dbus/mock_flimflam_profile_client.h', - 'dbus/mock_flimflam_service_client.cc', - 'dbus/mock_flimflam_service_client.h', + 'dbus/mock_shill_device_client.cc', + 'dbus/mock_shill_device_client.h', + 'dbus/mock_shill_ipconfig_client.cc', + 'dbus/mock_shill_ipconfig_client.h', + 'dbus/mock_shill_manager_client.cc', + 'dbus/mock_shill_manager_client.h', + 'dbus/mock_shill_network_client.cc', + 'dbus/mock_shill_network_client.h', + 'dbus/mock_shill_profile_client.cc', + 'dbus/mock_shill_profile_client.h', + 'dbus/mock_shill_service_client.cc', + 'dbus/mock_shill_service_client.h', 'dbus/mock_gsm_sms_client.cc', 'dbus/mock_gsm_sms_client.h', 'dbus/mock_image_burner_client.cc', @@ -240,14 +240,14 @@ ], 'sources': [ 'dbus/blocking_method_caller_unittest.cc', - 'dbus/flimflam_client_unittest_base.cc', - 'dbus/flimflam_client_unittest_base.h', - 'dbus/flimflam_device_client_unittest.cc', - 'dbus/flimflam_ipconfig_client_unittest.cc', - 'dbus/flimflam_manager_client_unittest.cc', - 'dbus/flimflam_network_client_unittest.cc', - 'dbus/flimflam_profile_client_unittest.cc', - 'dbus/flimflam_service_client_unittest.cc', + 'dbus/shill_client_unittest_base.cc', + 'dbus/shill_client_unittest_base.h', + 'dbus/shill_device_client_unittest.cc', + 'dbus/shill_ipconfig_client_unittest.cc', + 'dbus/shill_manager_client_unittest.cc', + 'dbus/shill_network_client_unittest.cc', + 'dbus/shill_profile_client_unittest.cc', + 'dbus/shill_service_client_unittest.cc', 'dbus/gsm_sms_client_unittest.cc', 'dbus/ibus/ibus_client_unittest.cc', 'dbus/ibus/ibus_component_unittest.cc', diff --git a/chromeos/dbus/dbus_thread_manager.cc b/chromeos/dbus/dbus_thread_manager.cc index 471f69d..de18de0 100644 --- a/chromeos/dbus/dbus_thread_manager.cc +++ b/chromeos/dbus/dbus_thread_manager.cc @@ -21,12 +21,12 @@ #include "chromeos/dbus/cryptohome_client.h" #include "chromeos/dbus/dbus_client_implementation_type.h" #include "chromeos/dbus/debug_daemon_client.h" -#include "chromeos/dbus/flimflam_device_client.h" -#include "chromeos/dbus/flimflam_ipconfig_client.h" -#include "chromeos/dbus/flimflam_manager_client.h" -#include "chromeos/dbus/flimflam_network_client.h" -#include "chromeos/dbus/flimflam_profile_client.h" -#include "chromeos/dbus/flimflam_service_client.h" +#include "chromeos/dbus/shill_device_client.h" +#include "chromeos/dbus/shill_ipconfig_client.h" +#include "chromeos/dbus/shill_manager_client.h" +#include "chromeos/dbus/shill_network_client.h" +#include "chromeos/dbus/shill_profile_client.h" +#include "chromeos/dbus/shill_service_client.h" #include "chromeos/dbus/gsm_sms_client.h" #include "chromeos/dbus/ibus/ibus_client.h" #include "chromeos/dbus/ibus/ibus_engine_factory_service.h" @@ -97,24 +97,24 @@ class DBusThreadManagerImpl : public DBusThreadManager { // Create the debugdaemon client. debugdaemon_client_.reset( DebugDaemonClient::Create(client_type, system_bus_.get())); - // Create the Flimflam Device client. - flimflam_device_client_.reset( - FlimflamDeviceClient::Create(client_type, system_bus_.get())); - // Create the Flimflam IPConfig client. - flimflam_ipconfig_client_.reset( - FlimflamIPConfigClient::Create(client_type, system_bus_.get())); - // Create the Flimflam Manager client. - flimflam_manager_client_.reset( - FlimflamManagerClient::Create(client_type, system_bus_.get())); - // Create the Flimflam Network client. - flimflam_network_client_.reset( - FlimflamNetworkClient::Create(client_type, system_bus_.get())); - // Create the Flimflam Profile client. - flimflam_profile_client_.reset( - FlimflamProfileClient::Create(client_type, system_bus_.get())); - // Create the Flimflam Service client. - flimflam_service_client_.reset( - FlimflamServiceClient::Create(client_type, system_bus_.get())); + // Create the Shill Device client. + shill_device_client_.reset( + ShillDeviceClient::Create(client_type, system_bus_.get())); + // Create the Shill IPConfig client. + shill_ipconfig_client_.reset( + ShillIPConfigClient::Create(client_type, system_bus_.get())); + // Create the Shill Manager client. + shill_manager_client_.reset( + ShillManagerClient::Create(client_type, system_bus_.get())); + // Create the Shill Network client. + shill_network_client_.reset( + ShillNetworkClient::Create(client_type, system_bus_.get())); + // Create the Shill Profile client. + shill_profile_client_.reset( + ShillProfileClient::Create(client_type, system_bus_.get())); + // Create the Shill Service client. + shill_service_client_.reset( + ShillServiceClient::Create(client_type, system_bus_.get())); // Create the Gsm SMS client. gsm_sms_client_.reset( GsmSMSClient::Create(client_type, system_bus_.get())); @@ -262,33 +262,33 @@ class DBusThreadManagerImpl : public DBusThreadManager { } // DBusThreadManager override. - virtual FlimflamDeviceClient* GetFlimflamDeviceClient() OVERRIDE { - return flimflam_device_client_.get(); + virtual ShillDeviceClient* GetShillDeviceClient() OVERRIDE { + return shill_device_client_.get(); } // DBusThreadManager override. - virtual FlimflamIPConfigClient* GetFlimflamIPConfigClient() OVERRIDE { - return flimflam_ipconfig_client_.get(); + virtual ShillIPConfigClient* GetShillIPConfigClient() OVERRIDE { + return shill_ipconfig_client_.get(); } // DBusThreadManager override. - virtual FlimflamManagerClient* GetFlimflamManagerClient() OVERRIDE { - return flimflam_manager_client_.get(); + virtual ShillManagerClient* GetShillManagerClient() OVERRIDE { + return shill_manager_client_.get(); } // DBusThreadManager override. - virtual FlimflamNetworkClient* GetFlimflamNetworkClient() OVERRIDE { - return flimflam_network_client_.get(); + virtual ShillNetworkClient* GetShillNetworkClient() OVERRIDE { + return shill_network_client_.get(); } // DBusThreadManager override. - virtual FlimflamProfileClient* GetFlimflamProfileClient() OVERRIDE { - return flimflam_profile_client_.get(); + virtual ShillProfileClient* GetShillProfileClient() OVERRIDE { + return shill_profile_client_.get(); } // DBusThreadManager override. - virtual FlimflamServiceClient* GetFlimflamServiceClient() OVERRIDE { - return flimflam_service_client_.get(); + virtual ShillServiceClient* GetShillServiceClient() OVERRIDE { + return shill_service_client_.get(); } // DBusThreadManager override. @@ -402,12 +402,12 @@ class DBusThreadManagerImpl : public DBusThreadManager { scoped_ptr<CrosDisksClient> cros_disks_client_; scoped_ptr<CryptohomeClient> cryptohome_client_; scoped_ptr<DebugDaemonClient> debugdaemon_client_; - scoped_ptr<FlimflamDeviceClient> flimflam_device_client_; - scoped_ptr<FlimflamIPConfigClient> flimflam_ipconfig_client_; - scoped_ptr<FlimflamManagerClient> flimflam_manager_client_; - scoped_ptr<FlimflamNetworkClient> flimflam_network_client_; - scoped_ptr<FlimflamProfileClient> flimflam_profile_client_; - scoped_ptr<FlimflamServiceClient> flimflam_service_client_; + scoped_ptr<ShillDeviceClient> shill_device_client_; + scoped_ptr<ShillIPConfigClient> shill_ipconfig_client_; + scoped_ptr<ShillManagerClient> shill_manager_client_; + scoped_ptr<ShillNetworkClient> shill_network_client_; + scoped_ptr<ShillProfileClient> shill_profile_client_; + scoped_ptr<ShillServiceClient> shill_service_client_; scoped_ptr<GsmSMSClient> gsm_sms_client_; scoped_ptr<ImageBurnerClient> image_burner_client_; scoped_ptr<IntrospectableClient> introspectable_client_; diff --git a/chromeos/dbus/dbus_thread_manager.h b/chromeos/dbus/dbus_thread_manager.h index f9d6f05..90bfe8a 100644 --- a/chromeos/dbus/dbus_thread_manager.h +++ b/chromeos/dbus/dbus_thread_manager.h @@ -33,12 +33,12 @@ class CashewClient; class CrosDisksClient; class CryptohomeClient; class DebugDaemonClient; -class FlimflamDeviceClient; -class FlimflamIPConfigClient; -class FlimflamManagerClient; -class FlimflamNetworkClient; -class FlimflamProfileClient; -class FlimflamServiceClient; +class ShillDeviceClient; +class ShillIPConfigClient; +class ShillManagerClient; +class ShillNetworkClient; +class ShillProfileClient; +class ShillServiceClient; class GsmSMSClient; class IBusClient; class IBusEngineFactoryService; @@ -156,35 +156,35 @@ class CHROMEOS_EXPORT DBusThreadManager { // down. virtual DebugDaemonClient* GetDebugDaemonClient() = 0; - // Returns the Flimflam Device client, owned by DBusThreadManager. + // Returns the Shill Device client, owned by DBusThreadManager. // Do not cache this pointer and use it after DBusThreadManager is shut // down. - virtual FlimflamDeviceClient* GetFlimflamDeviceClient() = 0; + virtual ShillDeviceClient* GetShillDeviceClient() = 0; - // Returns the Flimflam IPConfig client, owned by DBusThreadManager. + // Returns the Shill IPConfig client, owned by DBusThreadManager. // Do not cache this pointer and use it after DBusThreadManager is shut // down. - virtual FlimflamIPConfigClient* GetFlimflamIPConfigClient() = 0; + virtual ShillIPConfigClient* GetShillIPConfigClient() = 0; - // Returns the Flimflam Manager client, owned by DBusThreadManager. + // Returns the Shill Manager client, owned by DBusThreadManager. // Do not cache this pointer and use it after DBusThreadManager is shut // down. - virtual FlimflamManagerClient* GetFlimflamManagerClient() = 0; + virtual ShillManagerClient* GetShillManagerClient() = 0; - // Returns the Flimflam Network client, owned by DBusThreadManager. + // Returns the Shill Network client, owned by DBusThreadManager. // Do not cache this pointer and use it after DBusThreadManager is shut // down. - virtual FlimflamNetworkClient* GetFlimflamNetworkClient() = 0; + virtual ShillNetworkClient* GetShillNetworkClient() = 0; - // Returns the Flimflam Profile client, owned by DBusThreadManager. + // Returns the Shill Profile client, owned by DBusThreadManager. // Do not cache this pointer and use it after DBusThreadManager is shut // down. - virtual FlimflamProfileClient* GetFlimflamProfileClient() = 0; + virtual ShillProfileClient* GetShillProfileClient() = 0; - // Returns the Flimflam Service client, owned by DBusThreadManager. + // Returns the Shill Service client, owned by DBusThreadManager. // Do not cache this pointer and use it after DBusThreadManager is shut // down. - virtual FlimflamServiceClient* GetFlimflamServiceClient() = 0; + virtual ShillServiceClient* GetShillServiceClient() = 0; // Returns the SMS client, owned by DBusThreadManager. // Do not cache this pointer and use it after DBusThreadManager is shut diff --git a/chromeos/dbus/gsm_sms_client.h b/chromeos/dbus/gsm_sms_client.h index c5fc489..4effeff 100644 --- a/chromeos/dbus/gsm_sms_client.h +++ b/chromeos/dbus/gsm_sms_client.h @@ -68,7 +68,7 @@ class CHROMEOS_EXPORT GsmSMSClient { const dbus::ObjectPath& object_path, const ListCallback& callback) = 0; - // Requests a check for new messages. In flimflam this does nothing. The + // Requests a check for new messages. In shill this does nothing. The // stub implementation uses it to generate a sequence of test messages. virtual void RequestUpdate(const std::string& service_name, const dbus::ObjectPath& object_path) = 0; diff --git a/chromeos/dbus/mock_dbus_thread_manager.cc b/chromeos/dbus/mock_dbus_thread_manager.cc index f6ae4b9..c025a07 100644 --- a/chromeos/dbus/mock_dbus_thread_manager.cc +++ b/chromeos/dbus/mock_dbus_thread_manager.cc @@ -14,12 +14,12 @@ #include "chromeos/dbus/mock_cros_disks_client.h" #include "chromeos/dbus/mock_cryptohome_client.h" #include "chromeos/dbus/mock_debug_daemon_client.h" -#include "chromeos/dbus/mock_flimflam_device_client.h" -#include "chromeos/dbus/mock_flimflam_ipconfig_client.h" -#include "chromeos/dbus/mock_flimflam_manager_client.h" -#include "chromeos/dbus/mock_flimflam_network_client.h" -#include "chromeos/dbus/mock_flimflam_profile_client.h" -#include "chromeos/dbus/mock_flimflam_service_client.h" +#include "chromeos/dbus/mock_shill_device_client.h" +#include "chromeos/dbus/mock_shill_ipconfig_client.h" +#include "chromeos/dbus/mock_shill_manager_client.h" +#include "chromeos/dbus/mock_shill_network_client.h" +#include "chromeos/dbus/mock_shill_profile_client.h" +#include "chromeos/dbus/mock_shill_service_client.h" #include "chromeos/dbus/mock_gsm_sms_client.h" #include "chromeos/dbus/mock_image_burner_client.h" #include "chromeos/dbus/mock_introspectable_client.h" @@ -50,12 +50,12 @@ MockDBusThreadManager::MockDBusThreadManager() mock_cros_disks_client_(new MockCrosDisksClient), mock_cryptohome_client_(new MockCryptohomeClient), mock_debugdaemon_client_(new MockDebugDaemonClient), - mock_flimflam_device_client_(new MockFlimflamDeviceClient), - mock_flimflam_ipconfig_client_(new MockFlimflamIPConfigClient), - mock_flimflam_manager_client_(new MockFlimflamManagerClient), - mock_flimflam_network_client_(new MockFlimflamNetworkClient), - mock_flimflam_profile_client_(new MockFlimflamProfileClient), - mock_flimflam_service_client_(new MockFlimflamServiceClient), + mock_shill_device_client_(new MockShillDeviceClient), + mock_shill_ipconfig_client_(new MockShillIPConfigClient), + mock_shill_manager_client_(new MockShillManagerClient), + mock_shill_network_client_(new MockShillNetworkClient), + mock_shill_profile_client_(new MockShillProfileClient), + mock_shill_service_client_(new MockShillServiceClient), mock_gsm_sms_client_(new MockGsmSMSClient), mock_image_burner_client_(new MockImageBurnerClient), mock_introspectable_client_(new MockIntrospectableClient), @@ -88,18 +88,18 @@ MockDBusThreadManager::MockDBusThreadManager() .WillRepeatedly(Return(mock_cryptohome_client())); EXPECT_CALL(*this, GetDebugDaemonClient()) .WillRepeatedly(Return(mock_debugdaemon_client())); - EXPECT_CALL(*this, GetFlimflamDeviceClient()) - .WillRepeatedly(Return(mock_flimflam_device_client())); - EXPECT_CALL(*this, GetFlimflamIPConfigClient()) - .WillRepeatedly(Return(mock_flimflam_ipconfig_client())); - EXPECT_CALL(*this, GetFlimflamManagerClient()) - .WillRepeatedly(Return(mock_flimflam_manager_client())); - EXPECT_CALL(*this, GetFlimflamNetworkClient()) - .WillRepeatedly(Return(mock_flimflam_network_client())); - EXPECT_CALL(*this, GetFlimflamProfileClient()) - .WillRepeatedly(Return(mock_flimflam_profile_client())); - EXPECT_CALL(*this, GetFlimflamServiceClient()) - .WillRepeatedly(Return(mock_flimflam_service_client())); + EXPECT_CALL(*this, GetShillDeviceClient()) + .WillRepeatedly(Return(mock_shill_device_client())); + EXPECT_CALL(*this, GetShillIPConfigClient()) + .WillRepeatedly(Return(mock_shill_ipconfig_client())); + EXPECT_CALL(*this, GetShillManagerClient()) + .WillRepeatedly(Return(mock_shill_manager_client())); + EXPECT_CALL(*this, GetShillNetworkClient()) + .WillRepeatedly(Return(mock_shill_network_client())); + EXPECT_CALL(*this, GetShillProfileClient()) + .WillRepeatedly(Return(mock_shill_profile_client())); + EXPECT_CALL(*this, GetShillServiceClient()) + .WillRepeatedly(Return(mock_shill_service_client())); EXPECT_CALL(*this, GetGsmSMSClient()) .WillRepeatedly(Return(mock_gsm_sms_client())); EXPECT_CALL(*this, GetImageBurnerClient()) diff --git a/chromeos/dbus/mock_dbus_thread_manager.h b/chromeos/dbus/mock_dbus_thread_manager.h index 29ca5ee..10c9907 100644 --- a/chromeos/dbus/mock_dbus_thread_manager.h +++ b/chromeos/dbus/mock_dbus_thread_manager.h @@ -28,12 +28,12 @@ class MockCashewClient; class MockCrosDisksClient; class MockCryptohomeClient; class MockDebugDaemonClient; -class MockFlimflamDeviceClient; -class MockFlimflamIPConfigClient; -class MockFlimflamManagerClient; -class MockFlimflamNetworkClient; -class MockFlimflamProfileClient; -class MockFlimflamServiceClient; +class MockShillDeviceClient; +class MockShillIPConfigClient; +class MockShillManagerClient; +class MockShillNetworkClient; +class MockShillProfileClient; +class MockShillServiceClient; class MockGsmSMSClient; class MockImageBurnerClient; class MockIntrospectableClient; @@ -67,12 +67,12 @@ class MockDBusThreadManager : public DBusThreadManager { MOCK_METHOD0(GetCrosDisksClient, CrosDisksClient*(void)); MOCK_METHOD0(GetCryptohomeClient, CryptohomeClient*(void)); MOCK_METHOD0(GetDebugDaemonClient, DebugDaemonClient*(void)); - MOCK_METHOD0(GetFlimflamDeviceClient, FlimflamDeviceClient*(void)); - MOCK_METHOD0(GetFlimflamIPConfigClient, FlimflamIPConfigClient*(void)); - MOCK_METHOD0(GetFlimflamManagerClient, FlimflamManagerClient*(void)); - MOCK_METHOD0(GetFlimflamNetworkClient, FlimflamNetworkClient*(void)); - MOCK_METHOD0(GetFlimflamProfileClient, FlimflamProfileClient*(void)); - MOCK_METHOD0(GetFlimflamServiceClient, FlimflamServiceClient*(void)); + MOCK_METHOD0(GetShillDeviceClient, ShillDeviceClient*(void)); + MOCK_METHOD0(GetShillIPConfigClient, ShillIPConfigClient*(void)); + MOCK_METHOD0(GetShillManagerClient, ShillManagerClient*(void)); + MOCK_METHOD0(GetShillNetworkClient, ShillNetworkClient*(void)); + MOCK_METHOD0(GetShillProfileClient, ShillProfileClient*(void)); + MOCK_METHOD0(GetShillServiceClient, ShillServiceClient*(void)); MOCK_METHOD0(GetGsmSMSClient, GsmSMSClient*(void)); MOCK_METHOD0(GetImageBurnerClient, ImageBurnerClient*(void)); MOCK_METHOD0(GetIntrospectableClient, IntrospectableClient*(void)); @@ -123,23 +123,23 @@ class MockDBusThreadManager : public DBusThreadManager { MockDebugDaemonClient* mock_debugdaemon_client() { return mock_debugdaemon_client_.get(); } - MockFlimflamDeviceClient* mock_flimflam_device_client() { - return mock_flimflam_device_client_.get(); + MockShillDeviceClient* mock_shill_device_client() { + return mock_shill_device_client_.get(); } - MockFlimflamIPConfigClient* mock_flimflam_ipconfig_client() { - return mock_flimflam_ipconfig_client_.get(); + MockShillIPConfigClient* mock_shill_ipconfig_client() { + return mock_shill_ipconfig_client_.get(); } - MockFlimflamManagerClient* mock_flimflam_manager_client() { - return mock_flimflam_manager_client_.get(); + MockShillManagerClient* mock_shill_manager_client() { + return mock_shill_manager_client_.get(); } - MockFlimflamNetworkClient* mock_flimflam_network_client() { - return mock_flimflam_network_client_.get(); + MockShillNetworkClient* mock_shill_network_client() { + return mock_shill_network_client_.get(); } - MockFlimflamProfileClient* mock_flimflam_profile_client() { - return mock_flimflam_profile_client_.get(); + MockShillProfileClient* mock_shill_profile_client() { + return mock_shill_profile_client_.get(); } - MockFlimflamServiceClient* mock_flimflam_service_client() { - return mock_flimflam_service_client_.get(); + MockShillServiceClient* mock_shill_service_client() { + return mock_shill_service_client_.get(); } MockGsmSMSClient* mock_gsm_sms_client() { return mock_gsm_sms_client_.get(); @@ -187,12 +187,12 @@ class MockDBusThreadManager : public DBusThreadManager { scoped_ptr<MockCrosDisksClient> mock_cros_disks_client_; scoped_ptr<MockCryptohomeClient> mock_cryptohome_client_; scoped_ptr<MockDebugDaemonClient> mock_debugdaemon_client_; - scoped_ptr<MockFlimflamDeviceClient> mock_flimflam_device_client_; - scoped_ptr<MockFlimflamIPConfigClient> mock_flimflam_ipconfig_client_; - scoped_ptr<MockFlimflamManagerClient> mock_flimflam_manager_client_; - scoped_ptr<MockFlimflamNetworkClient> mock_flimflam_network_client_; - scoped_ptr<MockFlimflamProfileClient> mock_flimflam_profile_client_; - scoped_ptr<MockFlimflamServiceClient> mock_flimflam_service_client_; + scoped_ptr<MockShillDeviceClient> mock_shill_device_client_; + scoped_ptr<MockShillIPConfigClient> mock_shill_ipconfig_client_; + scoped_ptr<MockShillManagerClient> mock_shill_manager_client_; + scoped_ptr<MockShillNetworkClient> mock_shill_network_client_; + scoped_ptr<MockShillProfileClient> mock_shill_profile_client_; + scoped_ptr<MockShillServiceClient> mock_shill_service_client_; scoped_ptr<MockGsmSMSClient> mock_gsm_sms_client_; scoped_ptr<MockImageBurnerClient> mock_image_burner_client_; scoped_ptr<MockIntrospectableClient> mock_introspectable_client_; diff --git a/chromeos/dbus/mock_dbus_thread_manager_without_gmock.cc b/chromeos/dbus/mock_dbus_thread_manager_without_gmock.cc index 9a57359..a22e906 100644 --- a/chromeos/dbus/mock_dbus_thread_manager_without_gmock.cc +++ b/chromeos/dbus/mock_dbus_thread_manager_without_gmock.cc @@ -83,38 +83,38 @@ DebugDaemonClient* MockDBusThreadManagerWithoutGMock::GetDebugDaemonClient() { return NULL; } -FlimflamDeviceClient* - MockDBusThreadManagerWithoutGMock::GetFlimflamDeviceClient() { +ShillDeviceClient* + MockDBusThreadManagerWithoutGMock::GetShillDeviceClient() { NOTIMPLEMENTED(); return NULL; } -FlimflamIPConfigClient* - MockDBusThreadManagerWithoutGMock::GetFlimflamIPConfigClient() { +ShillIPConfigClient* + MockDBusThreadManagerWithoutGMock::GetShillIPConfigClient() { NOTIMPLEMENTED(); return NULL; } -FlimflamManagerClient* - MockDBusThreadManagerWithoutGMock::GetFlimflamManagerClient() { +ShillManagerClient* + MockDBusThreadManagerWithoutGMock::GetShillManagerClient() { NOTIMPLEMENTED(); return NULL; } -FlimflamNetworkClient* - MockDBusThreadManagerWithoutGMock::GetFlimflamNetworkClient() { +ShillNetworkClient* + MockDBusThreadManagerWithoutGMock::GetShillNetworkClient() { NOTIMPLEMENTED(); return NULL; } -FlimflamProfileClient* - MockDBusThreadManagerWithoutGMock::GetFlimflamProfileClient() { +ShillProfileClient* + MockDBusThreadManagerWithoutGMock::GetShillProfileClient() { NOTIMPLEMENTED(); return NULL; } -FlimflamServiceClient* - MockDBusThreadManagerWithoutGMock::GetFlimflamServiceClient() { +ShillServiceClient* + MockDBusThreadManagerWithoutGMock::GetShillServiceClient() { NOTIMPLEMENTED(); return NULL; } diff --git a/chromeos/dbus/mock_dbus_thread_manager_without_gmock.h b/chromeos/dbus/mock_dbus_thread_manager_without_gmock.h index a2d7127..8d54646 100644 --- a/chromeos/dbus/mock_dbus_thread_manager_without_gmock.h +++ b/chromeos/dbus/mock_dbus_thread_manager_without_gmock.h @@ -43,12 +43,12 @@ class MockDBusThreadManagerWithoutGMock : public DBusThreadManager { virtual CrosDisksClient* GetCrosDisksClient() OVERRIDE; virtual CryptohomeClient* GetCryptohomeClient() OVERRIDE; virtual DebugDaemonClient* GetDebugDaemonClient() OVERRIDE; - virtual FlimflamDeviceClient* GetFlimflamDeviceClient() OVERRIDE; - virtual FlimflamIPConfigClient* GetFlimflamIPConfigClient() OVERRIDE; - virtual FlimflamManagerClient* GetFlimflamManagerClient() OVERRIDE; - virtual FlimflamNetworkClient* GetFlimflamNetworkClient() OVERRIDE; - virtual FlimflamProfileClient* GetFlimflamProfileClient() OVERRIDE; - virtual FlimflamServiceClient* GetFlimflamServiceClient() OVERRIDE; + virtual ShillDeviceClient* GetShillDeviceClient() OVERRIDE; + virtual ShillIPConfigClient* GetShillIPConfigClient() OVERRIDE; + virtual ShillManagerClient* GetShillManagerClient() OVERRIDE; + virtual ShillNetworkClient* GetShillNetworkClient() OVERRIDE; + virtual ShillProfileClient* GetShillProfileClient() OVERRIDE; + virtual ShillServiceClient* GetShillServiceClient() OVERRIDE; virtual GsmSMSClient* GetGsmSMSClient() OVERRIDE; virtual ImageBurnerClient* GetImageBurnerClient() OVERRIDE; virtual IntrospectableClient* GetIntrospectableClient() OVERRIDE; diff --git a/chromeos/dbus/mock_flimflam_ipconfig_client.cc b/chromeos/dbus/mock_flimflam_ipconfig_client.cc deleted file mode 100644 index 62ca0cf..0000000 --- a/chromeos/dbus/mock_flimflam_ipconfig_client.cc +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chromeos/dbus/mock_flimflam_ipconfig_client.h" - -namespace chromeos { - -MockFlimflamIPConfigClient::MockFlimflamIPConfigClient() {} - -MockFlimflamIPConfigClient::~MockFlimflamIPConfigClient() {} - -} // namespace chromeos diff --git a/chromeos/dbus/mock_flimflam_service_client.cc b/chromeos/dbus/mock_flimflam_service_client.cc deleted file mode 100644 index 72f24d7..0000000 --- a/chromeos/dbus/mock_flimflam_service_client.cc +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chromeos/dbus/mock_flimflam_service_client.h" - -namespace chromeos { - -MockFlimflamServiceClient::MockFlimflamServiceClient() {} - -MockFlimflamServiceClient::~MockFlimflamServiceClient() {} - -} // namespace chromeos diff --git a/chromeos/dbus/mock_flimflam_device_client.cc b/chromeos/dbus/mock_shill_device_client.cc index b26517b..d1f3a96 100644 --- a/chromeos/dbus/mock_flimflam_device_client.cc +++ b/chromeos/dbus/mock_shill_device_client.cc @@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chromeos/dbus/mock_flimflam_device_client.h" +#include "chromeos/dbus/mock_shill_device_client.h" namespace chromeos { -MockFlimflamDeviceClient::MockFlimflamDeviceClient() {} +MockShillDeviceClient::MockShillDeviceClient() {} -MockFlimflamDeviceClient::~MockFlimflamDeviceClient() {} +MockShillDeviceClient::~MockShillDeviceClient() {} } // namespace chromeos diff --git a/chromeos/dbus/mock_flimflam_device_client.h b/chromeos/dbus/mock_shill_device_client.h index 6fb2170..3110ee53 100644 --- a/chromeos/dbus/mock_flimflam_device_client.h +++ b/chromeos/dbus/mock_shill_device_client.h @@ -2,20 +2,20 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_DBUS_MOCK_FLIMFLAM_DEVICE_CLIENT_H_ -#define CHROMEOS_DBUS_MOCK_FLIMFLAM_DEVICE_CLIENT_H_ +#ifndef CHROMEOS_DBUS_MOCK_SHILL_DEVICE_CLIENT_H_ +#define CHROMEOS_DBUS_MOCK_SHILL_DEVICE_CLIENT_H_ #include "base/values.h" -#include "chromeos/dbus/flimflam_device_client.h" +#include "chromeos/dbus/shill_device_client.h" #include "dbus/object_path.h" #include "testing/gmock/include/gmock/gmock.h" namespace chromeos { -class MockFlimflamDeviceClient : public FlimflamDeviceClient { +class MockShillDeviceClient : public ShillDeviceClient { public: - MockFlimflamDeviceClient(); - virtual ~MockFlimflamDeviceClient(); + MockShillDeviceClient(); + virtual ~MockShillDeviceClient(); MOCK_METHOD2(SetPropertyChangedHandler, void(const dbus::ObjectPath& device_path, @@ -68,4 +68,4 @@ class MockFlimflamDeviceClient : public FlimflamDeviceClient { } // namespace chromeos -#endif // CHROMEOS_DBUS_MOCK_FLIMFLAM_DEVICE_CLIENT_H_ +#endif // CHROMEOS_DBUS_MOCK_SHILL_DEVICE_CLIENT_H_ diff --git a/chromeos/dbus/mock_flimflam_profile_client.cc b/chromeos/dbus/mock_shill_ipconfig_client.cc index a9dc01e..00053eb 100644 --- a/chromeos/dbus/mock_flimflam_profile_client.cc +++ b/chromeos/dbus/mock_shill_ipconfig_client.cc @@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chromeos/dbus/mock_flimflam_profile_client.h" +#include "chromeos/dbus/mock_shill_ipconfig_client.h" namespace chromeos { -MockFlimflamProfileClient::MockFlimflamProfileClient() {} +MockShillIPConfigClient::MockShillIPConfigClient() {} -MockFlimflamProfileClient::~MockFlimflamProfileClient() {} +MockShillIPConfigClient::~MockShillIPConfigClient() {} } // namespace chromeos diff --git a/chromeos/dbus/mock_flimflam_ipconfig_client.h b/chromeos/dbus/mock_shill_ipconfig_client.h index 52d2dee..c8416ba 100644 --- a/chromeos/dbus/mock_flimflam_ipconfig_client.h +++ b/chromeos/dbus/mock_shill_ipconfig_client.h @@ -2,20 +2,20 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_DBUS_MOCK_FLIMFLAM_IPCONFIG_CLIENT_H_ -#define CHROMEOS_DBUS_MOCK_FLIMFLAM_IPCONFIG_CLIENT_H_ +#ifndef CHROMEOS_DBUS_MOCK_SHILL_IPCONFIG_CLIENT_H_ +#define CHROMEOS_DBUS_MOCK_SHILL_IPCONFIG_CLIENT_H_ #include "base/values.h" -#include "chromeos/dbus/flimflam_ipconfig_client.h" +#include "chromeos/dbus/shill_ipconfig_client.h" #include "dbus/object_path.h" #include "testing/gmock/include/gmock/gmock.h" namespace chromeos { -class MockFlimflamIPConfigClient : public FlimflamIPConfigClient { +class MockShillIPConfigClient : public ShillIPConfigClient { public: - MockFlimflamIPConfigClient(); - virtual ~MockFlimflamIPConfigClient(); + MockShillIPConfigClient(); + virtual ~MockShillIPConfigClient(); MOCK_METHOD2(SetPropertyChangedHandler, void(const dbus::ObjectPath& ipconfig_path, @@ -42,4 +42,4 @@ class MockFlimflamIPConfigClient : public FlimflamIPConfigClient { } // namespace chromeos -#endif // CHROMEOS_DBUS_MOCK_FLIMFLAM_IPCONFIG_CLIENT_H_ +#endif // CHROMEOS_DBUS_MOCK_SHILL_IPCONFIG_CLIENT_H_ diff --git a/chromeos/dbus/mock_flimflam_manager_client.cc b/chromeos/dbus/mock_shill_manager_client.cc index d72de23..2016e2b 100644 --- a/chromeos/dbus/mock_flimflam_manager_client.cc +++ b/chromeos/dbus/mock_shill_manager_client.cc @@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chromeos/dbus/mock_flimflam_manager_client.h" +#include "chromeos/dbus/mock_shill_manager_client.h" namespace chromeos { -MockFlimflamManagerClient::MockFlimflamManagerClient() {} +MockShillManagerClient::MockShillManagerClient() {} -MockFlimflamManagerClient::~MockFlimflamManagerClient() {} +MockShillManagerClient::~MockShillManagerClient() {} } // namespace chromeos diff --git a/chromeos/dbus/mock_flimflam_manager_client.h b/chromeos/dbus/mock_shill_manager_client.h index d76a7b7..d38dd03 100644 --- a/chromeos/dbus/mock_flimflam_manager_client.h +++ b/chromeos/dbus/mock_shill_manager_client.h @@ -2,19 +2,19 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_DBUS_MOCK_FLIMFLAM_MANAGER_CLIENT_H_ -#define CHROMEOS_DBUS_MOCK_FLIMFLAM_MANAGER_CLIENT_H_ +#ifndef CHROMEOS_DBUS_MOCK_SHILL_MANAGER_CLIENT_H_ +#define CHROMEOS_DBUS_MOCK_SHILL_MANAGER_CLIENT_H_ #include "base/values.h" -#include "chromeos/dbus/flimflam_manager_client.h" +#include "chromeos/dbus/shill_manager_client.h" #include "testing/gmock/include/gmock/gmock.h" namespace chromeos { -class MockFlimflamManagerClient : public FlimflamManagerClient { +class MockShillManagerClient : public ShillManagerClient { public: - MockFlimflamManagerClient(); - virtual ~MockFlimflamManagerClient(); + MockShillManagerClient(); + virtual ~MockShillManagerClient(); MOCK_METHOD1(SetPropertyChangedHandler, void( const PropertyChangedHandler& handler)); @@ -38,4 +38,4 @@ class MockFlimflamManagerClient : public FlimflamManagerClient { } // namespace chromeos -#endif // CHROMEOS_DBUS_MOCK_FLIMFLAM_MANAGER_CLIENT_H_ +#endif // CHROMEOS_DBUS_MOCK_SHILL_MANAGER_CLIENT_H_ diff --git a/chromeos/dbus/mock_flimflam_network_client.cc b/chromeos/dbus/mock_shill_network_client.cc index e190375..3052f47 100644 --- a/chromeos/dbus/mock_flimflam_network_client.cc +++ b/chromeos/dbus/mock_shill_network_client.cc @@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chromeos/dbus/mock_flimflam_network_client.h" +#include "chromeos/dbus/mock_shill_network_client.h" namespace chromeos { -MockFlimflamNetworkClient::MockFlimflamNetworkClient() {} +MockShillNetworkClient::MockShillNetworkClient() {} -MockFlimflamNetworkClient::~MockFlimflamNetworkClient() {} +MockShillNetworkClient::~MockShillNetworkClient() {} } // namespace chromeos diff --git a/chromeos/dbus/mock_flimflam_network_client.h b/chromeos/dbus/mock_shill_network_client.h index 932383a..de701b9 100644 --- a/chromeos/dbus/mock_flimflam_network_client.h +++ b/chromeos/dbus/mock_shill_network_client.h @@ -2,19 +2,19 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_DBUS_MOCK_FLIMFLAM_NETWORK_CLIENT_H_ -#define CHROMEOS_DBUS_MOCK_FLIMFLAM_NETWORK_CLIENT_H_ +#ifndef CHROMEOS_DBUS_MOCK_SHILL_NETWORK_CLIENT_H_ +#define CHROMEOS_DBUS_MOCK_SHILL_NETWORK_CLIENT_H_ -#include "chromeos/dbus/flimflam_network_client.h" +#include "chromeos/dbus/shill_network_client.h" #include "dbus/object_path.h" #include "testing/gmock/include/gmock/gmock.h" namespace chromeos { -class MockFlimflamNetworkClient : public FlimflamNetworkClient { +class MockShillNetworkClient : public ShillNetworkClient { public: - MockFlimflamNetworkClient(); - virtual ~MockFlimflamNetworkClient(); + MockShillNetworkClient(); + virtual ~MockShillNetworkClient(); MOCK_METHOD2(SetPropertyChangedHandler, void(const dbus::ObjectPath& network_path, @@ -29,4 +29,4 @@ class MockFlimflamNetworkClient : public FlimflamNetworkClient { } // namespace chromeos -#endif // CHROMEOS_DBUS_MOCK_FLIMFLAM_NETWORK_CLIENT_H_ +#endif // CHROMEOS_DBUS_MOCK_SHILL_NETWORK_CLIENT_H_ diff --git a/chromeos/dbus/mock_shill_profile_client.cc b/chromeos/dbus/mock_shill_profile_client.cc new file mode 100644 index 0000000..3f47ae8 --- /dev/null +++ b/chromeos/dbus/mock_shill_profile_client.cc @@ -0,0 +1,13 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chromeos/dbus/mock_shill_profile_client.h" + +namespace chromeos { + +MockShillProfileClient::MockShillProfileClient() {} + +MockShillProfileClient::~MockShillProfileClient() {} + +} // namespace chromeos diff --git a/chromeos/dbus/mock_flimflam_profile_client.h b/chromeos/dbus/mock_shill_profile_client.h index 34f9b09..bd0125d 100644 --- a/chromeos/dbus/mock_flimflam_profile_client.h +++ b/chromeos/dbus/mock_shill_profile_client.h @@ -2,20 +2,20 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_DBUS_MOCK_FLIMFLAM_PROFILE_CLIENT_H_ -#define CHROMEOS_DBUS_MOCK_FLIMFLAM_PROFILE_CLIENT_H_ +#ifndef CHROMEOS_DBUS_MOCK_SHILL_PROFILE_CLIENT_H_ +#define CHROMEOS_DBUS_MOCK_SHILL_PROFILE_CLIENT_H_ #include "base/values.h" -#include "chromeos/dbus/flimflam_profile_client.h" +#include "chromeos/dbus/shill_profile_client.h" #include "dbus/object_path.h" #include "testing/gmock/include/gmock/gmock.h" namespace chromeos { -class MockFlimflamProfileClient : public FlimflamProfileClient { +class MockShillProfileClient : public ShillProfileClient { public: - MockFlimflamProfileClient(); - virtual ~MockFlimflamProfileClient(); + MockShillProfileClient(); + virtual ~MockShillProfileClient(); MOCK_METHOD2(SetPropertyChangedHandler, void(const dbus::ObjectPath& profile_path, @@ -34,4 +34,4 @@ class MockFlimflamProfileClient : public FlimflamProfileClient { } // namespace chromeos -#endif // CHROMEOS_DBUS_MOCK_FLIMFLAM_PROFILE_CLIENT_H_ +#endif // CHROMEOS_DBUS_MOCK_SHILL_PROFILE_CLIENT_H_ diff --git a/chromeos/dbus/mock_shill_service_client.cc b/chromeos/dbus/mock_shill_service_client.cc new file mode 100644 index 0000000..5ecbc60 --- /dev/null +++ b/chromeos/dbus/mock_shill_service_client.cc @@ -0,0 +1,13 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chromeos/dbus/mock_shill_service_client.h" + +namespace chromeos { + +MockShillServiceClient::MockShillServiceClient() {} + +MockShillServiceClient::~MockShillServiceClient() {} + +} // namespace chromeos diff --git a/chromeos/dbus/mock_flimflam_service_client.h b/chromeos/dbus/mock_shill_service_client.h index 8bc0a6e..1b3c61e 100644 --- a/chromeos/dbus/mock_flimflam_service_client.h +++ b/chromeos/dbus/mock_shill_service_client.h @@ -2,20 +2,20 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_DBUS_MOCK_FLIMFLAM_SERVICE_CLIENT_H_ -#define CHROMEOS_DBUS_MOCK_FLIMFLAM_SERVICE_CLIENT_H_ +#ifndef CHROMEOS_DBUS_MOCK_SHILL_SERVICE_CLIENT_H_ +#define CHROMEOS_DBUS_MOCK_SHILL_SERVICE_CLIENT_H_ #include "base/values.h" -#include "chromeos/dbus/flimflam_service_client.h" +#include "chromeos/dbus/shill_service_client.h" #include "dbus/object_path.h" #include "testing/gmock/include/gmock/gmock.h" namespace chromeos { -class MockFlimflamServiceClient : public FlimflamServiceClient { +class MockShillServiceClient : public ShillServiceClient { public: - MockFlimflamServiceClient(); - virtual ~MockFlimflamServiceClient(); + MockShillServiceClient(); + virtual ~MockShillServiceClient(); MOCK_METHOD2(SetPropertyChangedHandler, void(const dbus::ObjectPath& service_path, @@ -49,4 +49,4 @@ class MockFlimflamServiceClient : public FlimflamServiceClient { } // namespace chromeos -#endif // CHROMEOS_DBUS_MOCK_FLIMFLAM_SERVICE_CLIENT_H_ +#endif // CHROMEOS_DBUS_MOCK_SHILL_SERVICE_CLIENT_H_ diff --git a/chromeos/dbus/flimflam_client_helper.cc b/chromeos/dbus/shill_client_helper.cc index 3696496..bd421bc 100644 --- a/chromeos/dbus/flimflam_client_helper.cc +++ b/chromeos/dbus/shill_client_helper.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chromeos/dbus/flimflam_client_helper.h" +#include "chromeos/dbus/shill_client_helper.h" #include "base/bind.h" #include "base/values.h" @@ -13,95 +13,95 @@ namespace chromeos { -FlimflamClientHelper::FlimflamClientHelper(dbus::Bus* bus, +ShillClientHelper::ShillClientHelper(dbus::Bus* bus, dbus::ObjectProxy* proxy) : blocking_method_caller_(bus, proxy), proxy_(proxy), weak_ptr_factory_(this) { } -FlimflamClientHelper::~FlimflamClientHelper() { +ShillClientHelper::~ShillClientHelper() { } -void FlimflamClientHelper::SetPropertyChangedHandler( +void ShillClientHelper::SetPropertyChangedHandler( const PropertyChangedHandler& handler) { property_changed_handler_ = handler; } -void FlimflamClientHelper::ResetPropertyChangedHandler() { +void ShillClientHelper::ResetPropertyChangedHandler() { property_changed_handler_.Reset(); } -void FlimflamClientHelper::MonitorPropertyChanged( +void ShillClientHelper::MonitorPropertyChanged( const std::string& interface_name) { // 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, - base::Bind(&FlimflamClientHelper::OnPropertyChanged, + base::Bind(&ShillClientHelper::OnPropertyChanged, weak_ptr_factory_.GetWeakPtr()), - base::Bind(&FlimflamClientHelper::OnSignalConnected, + base::Bind(&ShillClientHelper::OnSignalConnected, weak_ptr_factory_.GetWeakPtr())); } -void FlimflamClientHelper::CallVoidMethod( +void ShillClientHelper::CallVoidMethod( dbus::MethodCall* method_call, const VoidDBusMethodCallback& callback) { proxy_->CallMethod(method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, - base::Bind(&FlimflamClientHelper::OnVoidMethod, + base::Bind(&ShillClientHelper::OnVoidMethod, weak_ptr_factory_.GetWeakPtr(), callback)); } -void FlimflamClientHelper::CallObjectPathMethod( +void ShillClientHelper::CallObjectPathMethod( dbus::MethodCall* method_call, const ObjectPathDBusMethodCallback& callback) { proxy_->CallMethod(method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, - base::Bind(&FlimflamClientHelper::OnObjectPathMethod, + base::Bind(&ShillClientHelper::OnObjectPathMethod, weak_ptr_factory_.GetWeakPtr(), callback)); } -void FlimflamClientHelper::CallDictionaryValueMethod( +void ShillClientHelper::CallDictionaryValueMethod( dbus::MethodCall* method_call, const DictionaryValueCallback& callback) { proxy_->CallMethod(method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, - base::Bind(&FlimflamClientHelper::OnDictionaryValueMethod, + base::Bind(&ShillClientHelper::OnDictionaryValueMethod, weak_ptr_factory_.GetWeakPtr(), callback)); } -void FlimflamClientHelper::CallVoidMethodWithErrorCallback( +void ShillClientHelper::CallVoidMethodWithErrorCallback( dbus::MethodCall* method_call, const base::Closure& callback, const ErrorCallback& error_callback) { proxy_->CallMethodWithErrorCallback( method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, - base::Bind(&FlimflamClientHelper::OnVoidMethodWithErrorCallback, + base::Bind(&ShillClientHelper::OnVoidMethodWithErrorCallback, weak_ptr_factory_.GetWeakPtr(), callback), - base::Bind(&FlimflamClientHelper::OnError, + base::Bind(&ShillClientHelper::OnError, weak_ptr_factory_.GetWeakPtr(), error_callback)); } -void FlimflamClientHelper::CallDictionaryValueMethodWithErrorCallback( +void ShillClientHelper::CallDictionaryValueMethodWithErrorCallback( dbus::MethodCall* method_call, const DictionaryValueCallbackWithoutStatus& callback, const ErrorCallback& error_callback) { proxy_->CallMethodWithErrorCallback( method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, base::Bind( - &FlimflamClientHelper::OnDictionaryValueMethodWithErrorCallback, + &ShillClientHelper::OnDictionaryValueMethodWithErrorCallback, weak_ptr_factory_.GetWeakPtr(), callback, error_callback), - base::Bind(&FlimflamClientHelper::OnError, + base::Bind(&ShillClientHelper::OnError, weak_ptr_factory_.GetWeakPtr(), error_callback)); } -bool FlimflamClientHelper::CallVoidMethodAndBlock( +bool ShillClientHelper::CallVoidMethodAndBlock( dbus::MethodCall* method_call) { scoped_ptr<dbus::Response> response( blocking_method_caller_.CallMethodAndBlock(method_call)); @@ -110,7 +110,7 @@ bool FlimflamClientHelper::CallVoidMethodAndBlock( return true; } -dbus::ObjectPath FlimflamClientHelper::CallObjectPathMethodAndBlock( +dbus::ObjectPath ShillClientHelper::CallObjectPathMethodAndBlock( dbus::MethodCall* method_call) { scoped_ptr<dbus::Response> response( blocking_method_caller_.CallMethodAndBlock(method_call)); @@ -125,7 +125,7 @@ dbus::ObjectPath FlimflamClientHelper::CallObjectPathMethodAndBlock( return result; } -base::DictionaryValue* FlimflamClientHelper::CallDictionaryValueMethodAndBlock( +base::DictionaryValue* ShillClientHelper::CallDictionaryValueMethodAndBlock( dbus::MethodCall* method_call) { scoped_ptr<dbus::Response> response( blocking_method_caller_.CallMethodAndBlock(method_call)); @@ -143,7 +143,7 @@ base::DictionaryValue* FlimflamClientHelper::CallDictionaryValueMethodAndBlock( } // static -void FlimflamClientHelper::AppendValueDataAsVariant(dbus::MessageWriter* writer, +void ShillClientHelper::AppendValueDataAsVariant(dbus::MessageWriter* writer, const base::Value& value) { // Support basic types and string-to-string dictionary. switch (value.GetType()) { @@ -184,14 +184,14 @@ void FlimflamClientHelper::AppendValueDataAsVariant(dbus::MessageWriter* writer, } -void FlimflamClientHelper::OnSignalConnected(const std::string& interface, +void ShillClientHelper::OnSignalConnected(const std::string& interface, const std::string& signal, bool success) { LOG_IF(ERROR, !success) << "Connect to " << interface << " " << signal << " failed."; } -void FlimflamClientHelper::OnPropertyChanged(dbus::Signal* signal) { +void ShillClientHelper::OnPropertyChanged(dbus::Signal* signal) { if (property_changed_handler_.is_null()) return; @@ -205,7 +205,7 @@ void FlimflamClientHelper::OnPropertyChanged(dbus::Signal* signal) { property_changed_handler_.Run(name, *value); } -void FlimflamClientHelper::OnVoidMethod(const VoidDBusMethodCallback& callback, +void ShillClientHelper::OnVoidMethod(const VoidDBusMethodCallback& callback, dbus::Response* response) { if (!response) { callback.Run(DBUS_METHOD_CALL_FAILURE); @@ -214,7 +214,7 @@ void FlimflamClientHelper::OnVoidMethod(const VoidDBusMethodCallback& callback, callback.Run(DBUS_METHOD_CALL_SUCCESS); } -void FlimflamClientHelper::OnObjectPathMethod( +void ShillClientHelper::OnObjectPathMethod( const ObjectPathDBusMethodCallback& callback, dbus::Response* response) { if (!response) { @@ -230,7 +230,7 @@ void FlimflamClientHelper::OnObjectPathMethod( callback.Run(DBUS_METHOD_CALL_SUCCESS, result); } -void FlimflamClientHelper::OnDictionaryValueMethod( +void ShillClientHelper::OnDictionaryValueMethod( const DictionaryValueCallback& callback, dbus::Response* response) { if (!response) { @@ -249,13 +249,13 @@ void FlimflamClientHelper::OnDictionaryValueMethod( callback.Run(DBUS_METHOD_CALL_SUCCESS, *result); } -void FlimflamClientHelper::OnVoidMethodWithErrorCallback( +void ShillClientHelper::OnVoidMethodWithErrorCallback( const base::Closure& callback, dbus::Response* response) { callback.Run(); } -void FlimflamClientHelper::OnDictionaryValueMethodWithErrorCallback( +void ShillClientHelper::OnDictionaryValueMethodWithErrorCallback( const DictionaryValueCallbackWithoutStatus& callback, const ErrorCallback& error_callback, dbus::Response* response) { @@ -271,7 +271,7 @@ void FlimflamClientHelper::OnDictionaryValueMethodWithErrorCallback( callback.Run(*result); } -void FlimflamClientHelper::OnError(const ErrorCallback& error_callback, +void ShillClientHelper::OnError(const ErrorCallback& error_callback, dbus::ErrorResponse* response) { std::string error_name; std::string error_message; diff --git a/chromeos/dbus/flimflam_client_helper.h b/chromeos/dbus/shill_client_helper.h index c2c0c23..84534e0 100644 --- a/chromeos/dbus/flimflam_client_helper.h +++ b/chromeos/dbus/shill_client_helper.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_DBUS_FLIMFLAM_CLIENT_HELPER_H_ -#define CHROMEOS_DBUS_FLIMFLAM_CLIENT_HELPER_H_ +#ifndef CHROMEOS_DBUS_SHILL_CLIENT_HELPER_H_ +#define CHROMEOS_DBUS_SHILL_CLIENT_HELPER_H_ #include <string> @@ -35,8 +35,8 @@ class Signal; namespace chromeos { -// A class to help implement Flimflam clients. -class FlimflamClientHelper { +// A class to help implement Shill clients. +class ShillClientHelper { public: // A callback to handle PropertyChanged signals. typedef base::Callback<void(const std::string& name, @@ -56,9 +56,9 @@ class FlimflamClientHelper { typedef base::Callback<void(const std::string& error_name, const std::string& error_message)> ErrorCallback; - FlimflamClientHelper(dbus::Bus* bus, dbus::ObjectProxy* proxy); + ShillClientHelper(dbus::Bus* bus, dbus::ObjectProxy* proxy); - virtual ~FlimflamClientHelper(); + virtual ~ShillClientHelper(); // Sets PropertyChanged signal handler. void SetPropertyChangedHandler(const PropertyChangedHandler& handler); @@ -153,11 +153,11 @@ class FlimflamClientHelper { // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<FlimflamClientHelper> weak_ptr_factory_; + base::WeakPtrFactory<ShillClientHelper> weak_ptr_factory_; - DISALLOW_COPY_AND_ASSIGN(FlimflamClientHelper); + DISALLOW_COPY_AND_ASSIGN(ShillClientHelper); }; } // namespace chromeos -#endif // CHROMEOS_DBUS_FLIMFLAM_CLIENT_HELPER_H_ +#endif // CHROMEOS_DBUS_SHILL_CLIENT_HELPER_H_ diff --git a/chromeos/dbus/flimflam_client_unittest_base.cc b/chromeos/dbus/shill_client_unittest_base.cc index 67046f9..c02f0bc 100644 --- a/chromeos/dbus/flimflam_client_unittest_base.cc +++ b/chromeos/dbus/shill_client_unittest_base.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chromeos/dbus/flimflam_client_unittest_base.h" +#include "chromeos/dbus/shill_client_unittest_base.h" #include "base/bind.h" #include "base/json/json_writer.h" @@ -30,26 +30,26 @@ void RunTask(const tracked_objects::Location& from_here, } // namespace -FlimflamClientUnittestBase::MockClosure::MockClosure() {} +ShillClientUnittestBase::MockClosure::MockClosure() {} -FlimflamClientUnittestBase::MockClosure::~MockClosure() {} +ShillClientUnittestBase::MockClosure::~MockClosure() {} -base::Closure FlimflamClientUnittestBase::MockClosure::GetCallback() { +base::Closure ShillClientUnittestBase::MockClosure::GetCallback() { return base::Bind(&MockClosure::Run, base::Unretained(this)); } -FlimflamClientUnittestBase::MockErrorCallback::MockErrorCallback() {} +ShillClientUnittestBase::MockErrorCallback::MockErrorCallback() {} -FlimflamClientUnittestBase::MockErrorCallback::~MockErrorCallback() {} +ShillClientUnittestBase::MockErrorCallback::~MockErrorCallback() {} -FlimflamClientHelper::ErrorCallback -FlimflamClientUnittestBase::MockErrorCallback::GetCallback() { +ShillClientHelper::ErrorCallback +ShillClientUnittestBase::MockErrorCallback::GetCallback() { return base::Bind(&MockErrorCallback::Run, base::Unretained(this)); } -FlimflamClientUnittestBase::FlimflamClientUnittestBase( +ShillClientUnittestBase::ShillClientUnittestBase( const std::string& interface_name, const dbus::ObjectPath& object_path) : interface_name_(interface_name), @@ -57,10 +57,10 @@ FlimflamClientUnittestBase::FlimflamClientUnittestBase( response_(NULL) { } -FlimflamClientUnittestBase::~FlimflamClientUnittestBase() { +ShillClientUnittestBase::~ShillClientUnittestBase() { } -void FlimflamClientUnittestBase::SetUp() { +void ShillClientUnittestBase::SetUp() { // Create a mock bus. dbus::Bus::Options options; options.bus_type = dbus::Bus::SYSTEM; @@ -76,18 +76,18 @@ void FlimflamClientUnittestBase::SetUp() { // OnCallMethodAndBlock() to return responses. EXPECT_CALL(*mock_proxy_, CallMethodAndBlock(_, _)) .WillRepeatedly(Invoke( - this, &FlimflamClientUnittestBase::OnCallMethodAndBlock)); + this, &ShillClientUnittestBase::OnCallMethodAndBlock)); // Set an expectation so mock_proxy's CallMethod() will use OnCallMethod() // to return responses. EXPECT_CALL(*mock_proxy_, CallMethod(_, _, _)) - .WillRepeatedly(Invoke(this, &FlimflamClientUnittestBase::OnCallMethod)); + .WillRepeatedly(Invoke(this, &ShillClientUnittestBase::OnCallMethod)); // Set an expectation so mock_proxy's CallMethodWithErrorCallback() will use // OnCallMethodWithErrorCallback() to return responses. EXPECT_CALL(*mock_proxy_, CallMethodWithErrorCallback(_, _, _, _)) .WillRepeatedly(Invoke( - this, &FlimflamClientUnittestBase::OnCallMethodWithErrorCallback)); + this, &ShillClientUnittestBase::OnCallMethodWithErrorCallback)); // Set an expectation so mock_proxy's ConnectToSignal() will use // OnConnectToSignal() to run the callback. @@ -95,7 +95,7 @@ void FlimflamClientUnittestBase::SetUp() { interface_name_, flimflam::kMonitorPropertyChanged, _, _)) .WillRepeatedly(Invoke(this, - &FlimflamClientUnittestBase::OnConnectToSignal)); + &ShillClientUnittestBase::OnConnectToSignal)); // Set an expectation so mock_bus's GetObjectProxy() for the given // service name and the object path will return mock_proxy_. @@ -112,11 +112,11 @@ void FlimflamClientUnittestBase::SetUp() { EXPECT_CALL(*mock_bus_, ShutdownAndBlock()).WillOnce(Return()); } -void FlimflamClientUnittestBase::TearDown() { +void ShillClientUnittestBase::TearDown() { mock_bus_->ShutdownAndBlock(); } -void FlimflamClientUnittestBase::PrepareForMethodCall( +void ShillClientUnittestBase::PrepareForMethodCall( const std::string& method_name, const ArgumentCheckCallback& argument_checker, dbus::Response* response) { @@ -125,14 +125,14 @@ void FlimflamClientUnittestBase::PrepareForMethodCall( response_ = response; } -void FlimflamClientUnittestBase::SendPropertyChangedSignal( +void ShillClientUnittestBase::SendPropertyChangedSignal( dbus::Signal* signal) { ASSERT_FALSE(property_changed_handler_.is_null()); property_changed_handler_.Run(signal); } // static -void FlimflamClientUnittestBase::ExpectPropertyChanged( +void ShillClientUnittestBase::ExpectPropertyChanged( const std::string& expected_name, const base::Value* expected_value, const std::string& name, @@ -142,12 +142,12 @@ void FlimflamClientUnittestBase::ExpectPropertyChanged( } // static -void FlimflamClientUnittestBase::ExpectNoArgument(dbus::MessageReader* reader) { +void ShillClientUnittestBase::ExpectNoArgument(dbus::MessageReader* reader) { EXPECT_FALSE(reader->HasMoreData()); } // static -void FlimflamClientUnittestBase::ExpectStringArgument( +void ShillClientUnittestBase::ExpectStringArgument( const std::string& expected_string, dbus::MessageReader* reader) { std::string str; @@ -157,7 +157,7 @@ void FlimflamClientUnittestBase::ExpectStringArgument( } // static -void FlimflamClientUnittestBase::ExpectValueArgument( +void ShillClientUnittestBase::ExpectValueArgument( const base::Value* expected_value, dbus::MessageReader* reader) { scoped_ptr<base::Value> value(dbus::PopDataAsValue(reader)); @@ -167,7 +167,7 @@ void FlimflamClientUnittestBase::ExpectValueArgument( } // static -void FlimflamClientUnittestBase::ExpectStringAndValueArguments( +void ShillClientUnittestBase::ExpectStringAndValueArguments( const std::string& expected_string, const base::Value* expected_value, dbus::MessageReader* reader) { @@ -181,13 +181,13 @@ void FlimflamClientUnittestBase::ExpectStringAndValueArguments( } // static -void FlimflamClientUnittestBase::ExpectNoResultValue( +void ShillClientUnittestBase::ExpectNoResultValue( DBusMethodCallStatus call_status) { EXPECT_EQ(DBUS_METHOD_CALL_SUCCESS, call_status); } // static -void FlimflamClientUnittestBase::ExpectObjectPathResult( +void ShillClientUnittestBase::ExpectObjectPathResult( const dbus::ObjectPath& expected_result, DBusMethodCallStatus call_status, const dbus::ObjectPath& result) { @@ -196,7 +196,7 @@ void FlimflamClientUnittestBase::ExpectObjectPathResult( } // static -void FlimflamClientUnittestBase::ExpectDictionaryValueResult( +void ShillClientUnittestBase::ExpectDictionaryValueResult( const base::DictionaryValue* expected_result, DBusMethodCallStatus call_status, const base::DictionaryValue& result) { @@ -208,7 +208,7 @@ void FlimflamClientUnittestBase::ExpectDictionaryValueResult( EXPECT_EQ(expected_result_string, result_string); } -void FlimflamClientUnittestBase::OnConnectToSignal( +void ShillClientUnittestBase::OnConnectToSignal( const std::string& interface_name, const std::string& signal_name, const dbus::ObjectProxy::SignalCallback& signal_callback, @@ -222,7 +222,7 @@ void FlimflamClientUnittestBase::OnConnectToSignal( success)); } -void FlimflamClientUnittestBase::OnCallMethod( +void ShillClientUnittestBase::OnCallMethod( dbus::MethodCall* method_call, int timeout_ms, const dbus::ObjectProxy::ResponseCallback& response_callback) { @@ -234,7 +234,7 @@ void FlimflamClientUnittestBase::OnCallMethod( base::Bind(response_callback, response_)); } -void FlimflamClientUnittestBase::OnCallMethodWithErrorCallback( +void ShillClientUnittestBase::OnCallMethodWithErrorCallback( dbus::MethodCall* method_call, int timeout_ms, const dbus::ObjectProxy::ResponseCallback& response_callback, @@ -242,7 +242,7 @@ void FlimflamClientUnittestBase::OnCallMethodWithErrorCallback( OnCallMethod(method_call, timeout_ms, response_callback); } -dbus::Response* FlimflamClientUnittestBase::OnCallMethodAndBlock( +dbus::Response* ShillClientUnittestBase::OnCallMethodAndBlock( dbus::MethodCall* method_call, int timeout_ms) { EXPECT_EQ(interface_name_, method_call->GetInterface()); diff --git a/chromeos/dbus/flimflam_client_unittest_base.h b/chromeos/dbus/shill_client_unittest_base.h index 68ac59c..1c56a17 100644 --- a/chromeos/dbus/flimflam_client_unittest_base.h +++ b/chromeos/dbus/shill_client_unittest_base.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_DBUS_FLIMFLAM_CLIENT_UNITTEST_BASE_H_ -#define CHROMEOS_DBUS_FLIMFLAM_CLIENT_UNITTEST_BASE_H_ +#ifndef CHROMEOS_DBUS_SHILL_CLIENT_UNITTEST_BASE_H_ +#define CHROMEOS_DBUS_SHILL_CLIENT_UNITTEST_BASE_H_ #include <string> @@ -11,7 +11,7 @@ #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" #include "chromeos/dbus/dbus_method_call_status.h" -#include "chromeos/dbus/flimflam_client_helper.h" +#include "chromeos/dbus/shill_client_helper.h" #include "dbus/mock_bus.h" #include "dbus/mock_object_proxy.h" #include "dbus/object_proxy.h" @@ -32,8 +32,8 @@ class MessageReader; namespace chromeos { -// A class to provide functionalities needed for testing Flimflam D-Bus clients. -class FlimflamClientUnittestBase : public testing::Test { +// A class to provide functionalities needed for testing Shill D-Bus clients. +class ShillClientUnittestBase : public testing::Test { public: // A mock Closure. class MockClosure { @@ -51,12 +51,12 @@ class FlimflamClientUnittestBase : public testing::Test { ~MockErrorCallback(); MOCK_METHOD2(Run, void(const std::string& error_name, const std::string& error_mesage)); - FlimflamClientHelper::ErrorCallback GetCallback(); + ShillClientHelper::ErrorCallback GetCallback(); }; - explicit FlimflamClientUnittestBase(const std::string& interface_name, + explicit ShillClientUnittestBase(const std::string& interface_name, const dbus::ObjectPath& object_path); - virtual ~FlimflamClientUnittestBase(); + virtual ~ShillClientUnittestBase(); virtual void SetUp() OVERRIDE; virtual void TearDown() OVERRIDE; @@ -162,4 +162,4 @@ class FlimflamClientUnittestBase : public testing::Test { } // namespace chromeos -#endif // CHROMEOS_DBUS_FLIMFLAM_CLIENT_UNITTEST_BASE_H_ +#endif // CHROMEOS_DBUS_SHILL_CLIENT_UNITTEST_BASE_H_ diff --git a/chromeos/dbus/flimflam_device_client.cc b/chromeos/dbus/shill_device_client.cc index a6d6286..a1c84db 100644 --- a/chromeos/dbus/flimflam_device_client.cc +++ b/chromeos/dbus/shill_device_client.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chromeos/dbus/flimflam_device_client.h" +#include "chromeos/dbus/shill_device_client.h" #include "base/bind.h" #include "base/message_loop.h" @@ -19,16 +19,16 @@ namespace chromeos { namespace { -// The FlimflamDeviceClient implementation. -class FlimflamDeviceClientImpl : public FlimflamDeviceClient { +// The ShillDeviceClient implementation. +class ShillDeviceClientImpl : public ShillDeviceClient { public: - explicit FlimflamDeviceClientImpl(dbus::Bus* bus) + explicit ShillDeviceClientImpl(dbus::Bus* bus) : bus_(bus), helpers_deleter_(&helpers_) { } /////////////////////////////////////// - // FlimflamDeviceClient overrides. + // ShillDeviceClient overrides. virtual void SetPropertyChangedHandler( const dbus::ObjectPath& device_path, const PropertyChangedHandler& handler) OVERRIDE { @@ -70,7 +70,7 @@ class FlimflamDeviceClientImpl : public FlimflamDeviceClient { flimflam::kSetPropertyFunction); dbus::MessageWriter writer(&method_call); writer.AppendString(name); - FlimflamClientHelper::AppendValueDataAsVariant(&writer, value); + ShillClientHelper::AppendValueDataAsVariant(&writer, value); GetHelper(device_path)->CallVoidMethod(&method_call, callback); } @@ -172,10 +172,10 @@ class FlimflamDeviceClientImpl : public FlimflamDeviceClient { } private: - typedef std::map<std::string, FlimflamClientHelper*> HelperMap; + typedef std::map<std::string, ShillClientHelper*> HelperMap; - // Returns the corresponding FlimflamClientHelper for the profile. - FlimflamClientHelper* GetHelper(const dbus::ObjectPath& device_path) { + // Returns the corresponding ShillClientHelper for the profile. + ShillClientHelper* GetHelper(const dbus::ObjectPath& device_path) { HelperMap::iterator it = helpers_.find(device_path.value()); if (it != helpers_.end()) return it->second; @@ -183,7 +183,7 @@ class FlimflamDeviceClientImpl : public FlimflamDeviceClient { // There is no helper for the profile, create it. dbus::ObjectProxy* object_proxy = bus_->GetObjectProxy(flimflam::kFlimflamServiceName, device_path); - FlimflamClientHelper* helper = new FlimflamClientHelper(bus_, object_proxy); + ShillClientHelper* helper = new ShillClientHelper(bus_, object_proxy); helper->MonitorPropertyChanged(flimflam::kFlimflamDeviceInterface); helpers_.insert(HelperMap::value_type(device_path.value(), helper)); return helper; @@ -193,14 +193,14 @@ class FlimflamDeviceClientImpl : public FlimflamDeviceClient { HelperMap helpers_; STLValueDeleter<HelperMap> helpers_deleter_; - DISALLOW_COPY_AND_ASSIGN(FlimflamDeviceClientImpl); + DISALLOW_COPY_AND_ASSIGN(ShillDeviceClientImpl); }; -// A stub implementation of FlimflamDeviceClient. +// A stub implementation of ShillDeviceClient. // Implemented: Stub cellular device for SMS testing. -class FlimflamDeviceClientStubImpl : public FlimflamDeviceClient { +class ShillDeviceClientStubImpl : public ShillDeviceClient { public: - FlimflamDeviceClientStubImpl() : weak_ptr_factory_(this) { + ShillDeviceClientStubImpl() : weak_ptr_factory_(this) { // Add a cellular device for SMS. Note: name matches Manager entry. const char kStubCellular1[] = "stub_cellular1"; base::DictionaryValue* cellular_properties = new base::DictionaryValue; @@ -233,40 +233,40 @@ class FlimflamDeviceClientStubImpl : public FlimflamDeviceClient { stub_devices_.Set(kStubCellular2, cellular_properties); } - virtual ~FlimflamDeviceClientStubImpl() {} + virtual ~ShillDeviceClientStubImpl() {} - // FlimflamDeviceClient override. + // ShillDeviceClient override. virtual void SetPropertyChangedHandler( const dbus::ObjectPath& device_path, const PropertyChangedHandler& handler) OVERRIDE {} - // FlimflamDeviceClient override. + // ShillDeviceClient override. virtual void ResetPropertyChangedHandler( const dbus::ObjectPath& device_path) OVERRIDE {} - // FlimflamDeviceClient override. + // ShillDeviceClient override. virtual void GetProperties(const dbus::ObjectPath& device_path, const DictionaryValueCallback& callback) OVERRIDE { MessageLoop::current()->PostTask( FROM_HERE, - base::Bind(&FlimflamDeviceClientStubImpl::PassStubDevicePrperties, + base::Bind(&ShillDeviceClientStubImpl::PassStubDevicePrperties, weak_ptr_factory_.GetWeakPtr(), device_path, callback)); } - // FlimflamDeviceClient override. + // ShillDeviceClient override. virtual base::DictionaryValue* CallGetPropertiesAndBlock( const dbus::ObjectPath& device_path) OVERRIDE { return new base::DictionaryValue; } - // FlimflamProfileClient override. + // ShillProfileClient override. virtual void ProposeScan(const dbus::ObjectPath& device_path, const VoidDBusMethodCallback& callback) OVERRIDE { PostVoidCallback(callback, DBUS_METHOD_CALL_SUCCESS); } - // FlimflamDeviceClient override. + // ShillDeviceClient override. virtual void SetProperty(const dbus::ObjectPath& device_path, const std::string& name, const base::Value& value, @@ -280,7 +280,7 @@ class FlimflamDeviceClientStubImpl : public FlimflamDeviceClient { PostVoidCallback(callback, DBUS_METHOD_CALL_SUCCESS); } - // FlimflamDeviceClient override. + // ShillDeviceClient override. virtual void ClearProperty(const dbus::ObjectPath& device_path, const std::string& name, const VoidDBusMethodCallback& callback) OVERRIDE { @@ -293,7 +293,7 @@ class FlimflamDeviceClientStubImpl : public FlimflamDeviceClient { PostVoidCallback(callback, DBUS_METHOD_CALL_SUCCESS); } - // FlimflamDeviceClient override. + // ShillDeviceClient override. virtual void AddIPConfig( const dbus::ObjectPath& device_path, const std::string& method, @@ -304,14 +304,14 @@ class FlimflamDeviceClientStubImpl : public FlimflamDeviceClient { dbus::ObjectPath())); } - // FlimflamDeviceClient override. + // ShillDeviceClient override. virtual dbus::ObjectPath CallAddIPConfigAndBlock( const dbus::ObjectPath& device_path, const std::string& method) OVERRIDE { return dbus::ObjectPath(); } - // FlimflamDeviceClient override. + // ShillDeviceClient override. virtual void RequirePin(const dbus::ObjectPath& device_path, const std::string& pin, bool require, @@ -320,7 +320,7 @@ class FlimflamDeviceClientStubImpl : public FlimflamDeviceClient { MessageLoop::current()->PostTask(FROM_HERE, callback); } - // FlimflamDeviceClient override. + // ShillDeviceClient override. virtual void EnterPin(const dbus::ObjectPath& device_path, const std::string& pin, const base::Closure& callback, @@ -328,7 +328,7 @@ class FlimflamDeviceClientStubImpl : public FlimflamDeviceClient { MessageLoop::current()->PostTask(FROM_HERE, callback); } - // FlimflamDeviceClient override. + // ShillDeviceClient override. virtual void UnblockPin(const dbus::ObjectPath& device_path, const std::string& puk, const std::string& pin, @@ -337,7 +337,7 @@ class FlimflamDeviceClientStubImpl : public FlimflamDeviceClient { MessageLoop::current()->PostTask(FROM_HERE, callback); } - // FlimflamDeviceClient override. + // ShillDeviceClient override. virtual void ChangePin(const dbus::ObjectPath& device_path, const std::string& old_pin, const std::string& new_pin, @@ -346,7 +346,7 @@ class FlimflamDeviceClientStubImpl : public FlimflamDeviceClient { MessageLoop::current()->PostTask(FROM_HERE, callback); } - // FlimflamDeviceClient override. + // ShillDeviceClient override. virtual void Register(const dbus::ObjectPath& device_path, const std::string& network_id, const base::Closure& callback, @@ -378,25 +378,25 @@ class FlimflamDeviceClientStubImpl : public FlimflamDeviceClient { // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<FlimflamDeviceClientStubImpl> weak_ptr_factory_; + base::WeakPtrFactory<ShillDeviceClientStubImpl> weak_ptr_factory_; - DISALLOW_COPY_AND_ASSIGN(FlimflamDeviceClientStubImpl); + DISALLOW_COPY_AND_ASSIGN(ShillDeviceClientStubImpl); }; } // namespace -FlimflamDeviceClient::FlimflamDeviceClient() {} +ShillDeviceClient::ShillDeviceClient() {} -FlimflamDeviceClient::~FlimflamDeviceClient() {} +ShillDeviceClient::~ShillDeviceClient() {} // static -FlimflamDeviceClient* FlimflamDeviceClient::Create( +ShillDeviceClient* ShillDeviceClient::Create( DBusClientImplementationType type, dbus::Bus* bus) { if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) - return new FlimflamDeviceClientImpl(bus); + return new ShillDeviceClientImpl(bus); DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); - return new FlimflamDeviceClientStubImpl(); + return new ShillDeviceClientStubImpl(); } } // namespace chromeos diff --git a/chromeos/dbus/flimflam_device_client.h b/chromeos/dbus/shill_device_client.h index 46cf0057..ea55b6d 100644 --- a/chromeos/dbus/flimflam_device_client.h +++ b/chromeos/dbus/shill_device_client.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_DBUS_FLIMFLAM_DEVICE_CLIENT_H_ -#define CHROMEOS_DBUS_FLIMFLAM_DEVICE_CLIENT_H_ +#ifndef CHROMEOS_DBUS_SHILL_DEVICE_CLIENT_H_ +#define CHROMEOS_DBUS_SHILL_DEVICE_CLIENT_H_ #include <string> @@ -11,7 +11,7 @@ #include "base/callback.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client_implementation_type.h" -#include "chromeos/dbus/flimflam_client_helper.h" +#include "chromeos/dbus/shill_client_helper.h" namespace base { @@ -29,20 +29,20 @@ class ObjectPath; namespace chromeos { -// FlimflamDeviceClient is used to communicate with the Flimflam Device service. +// ShillDeviceClient is used to communicate with the Shill Device service. // All methods should be called from the origin thread which initializes the // DBusThreadManager instance. -class CHROMEOS_EXPORT FlimflamDeviceClient { +class CHROMEOS_EXPORT ShillDeviceClient { public: - typedef FlimflamClientHelper::PropertyChangedHandler PropertyChangedHandler; - typedef FlimflamClientHelper::DictionaryValueCallback DictionaryValueCallback; - typedef FlimflamClientHelper::ErrorCallback ErrorCallback; + typedef ShillClientHelper::PropertyChangedHandler PropertyChangedHandler; + typedef ShillClientHelper::DictionaryValueCallback DictionaryValueCallback; + typedef ShillClientHelper::ErrorCallback ErrorCallback; - virtual ~FlimflamDeviceClient(); + virtual ~ShillDeviceClient(); // Factory function, creates a new instance which is owned by the caller. // For normal usage, access the singleton via DBusThreadManager::Get(). - static FlimflamDeviceClient* Create(DBusClientImplementationType type, + static ShillDeviceClient* Create(DBusClientImplementationType type, dbus::Bus* bus); // Sets PropertyChanged signal handler. @@ -142,12 +142,12 @@ class CHROMEOS_EXPORT FlimflamDeviceClient { protected: // Create() should be used instead. - FlimflamDeviceClient(); + ShillDeviceClient(); private: - DISALLOW_COPY_AND_ASSIGN(FlimflamDeviceClient); + DISALLOW_COPY_AND_ASSIGN(ShillDeviceClient); }; } // namespace chromeos -#endif // CHROMEOS_DBUS_FLIMFLAM_DEVICE_CLIENT_H_ +#endif // CHROMEOS_DBUS_SHILL_DEVICE_CLIENT_H_ diff --git a/chromeos/dbus/flimflam_device_client_unittest.cc b/chromeos/dbus/shill_device_client_unittest.cc index 4ef5e68..9ecf5fc 100644 --- a/chromeos/dbus/flimflam_device_client_unittest.cc +++ b/chromeos/dbus/shill_device_client_unittest.cc @@ -4,8 +4,8 @@ #include "base/bind.h" #include "base/values.h" -#include "chromeos/dbus/flimflam_client_unittest_base.h" -#include "chromeos/dbus/flimflam_device_client.h" +#include "chromeos/dbus/shill_client_unittest_base.h" +#include "chromeos/dbus/shill_device_client.h" #include "dbus/message.h" #include "dbus/object_path.h" #include "dbus/values_util.h" @@ -46,31 +46,31 @@ void ExpectTwoStringArguments(const std::string& expected_string1, } // namespace -class FlimflamDeviceClientTest : public FlimflamClientUnittestBase { +class ShillDeviceClientTest : public ShillClientUnittestBase { public: - FlimflamDeviceClientTest() - : FlimflamClientUnittestBase(flimflam::kFlimflamDeviceInterface, + ShillDeviceClientTest() + : ShillClientUnittestBase(flimflam::kFlimflamDeviceInterface, dbus::ObjectPath(kExampleDevicePath)) { } virtual void SetUp() { - FlimflamClientUnittestBase::SetUp(); + ShillClientUnittestBase::SetUp(); // Create a client with the mock bus. - client_.reset(FlimflamDeviceClient::Create(REAL_DBUS_CLIENT_IMPLEMENTATION, + client_.reset(ShillDeviceClient::Create(REAL_DBUS_CLIENT_IMPLEMENTATION, mock_bus_)); // Run the message loop to run the signal connection result callback. message_loop_.RunAllPending(); } virtual void TearDown() { - FlimflamClientUnittestBase::TearDown(); + ShillClientUnittestBase::TearDown(); } protected: - scoped_ptr<FlimflamDeviceClient> client_; + scoped_ptr<ShillDeviceClient> client_; }; -TEST_F(FlimflamDeviceClientTest, PropertyChanged) { +TEST_F(ShillDeviceClientTest, PropertyChanged) { const bool kValue = true; // Create a signal. dbus::Signal signal(flimflam::kFlimflamDeviceInterface, @@ -93,7 +93,7 @@ TEST_F(FlimflamDeviceClientTest, PropertyChanged) { client_->ResetPropertyChangedHandler(dbus::ObjectPath(kExampleDevicePath)); } -TEST_F(FlimflamDeviceClientTest, GetProperties) { +TEST_F(ShillDeviceClientTest, GetProperties) { const bool kValue = true; // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); @@ -121,7 +121,7 @@ TEST_F(FlimflamDeviceClientTest, GetProperties) { message_loop_.RunAllPending(); } -TEST_F(FlimflamDeviceClientTest, CallGetPropertiesAndBlock) { +TEST_F(ShillDeviceClientTest, CallGetPropertiesAndBlock) { const bool kValue = true; // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); @@ -149,7 +149,7 @@ TEST_F(FlimflamDeviceClientTest, CallGetPropertiesAndBlock) { EXPECT_TRUE(result->Equals(&value)); } -TEST_F(FlimflamDeviceClientTest, ProposeScan) { +TEST_F(ShillDeviceClientTest, ProposeScan) { // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); @@ -164,7 +164,7 @@ TEST_F(FlimflamDeviceClientTest, ProposeScan) { message_loop_.RunAllPending(); } -TEST_F(FlimflamDeviceClientTest, SetProperty) { +TEST_F(ShillDeviceClientTest, SetProperty) { const bool kValue = true; // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); @@ -185,7 +185,7 @@ TEST_F(FlimflamDeviceClientTest, SetProperty) { message_loop_.RunAllPending(); } -TEST_F(FlimflamDeviceClientTest, ClearProperty) { +TEST_F(ShillDeviceClientTest, ClearProperty) { // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); @@ -202,7 +202,7 @@ TEST_F(FlimflamDeviceClientTest, ClearProperty) { message_loop_.RunAllPending(); } -TEST_F(FlimflamDeviceClientTest, AddIPConfig) { +TEST_F(ShillDeviceClientTest, AddIPConfig) { const dbus::ObjectPath expected_result("/result/path"); // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); @@ -221,7 +221,7 @@ TEST_F(FlimflamDeviceClientTest, AddIPConfig) { message_loop_.RunAllPending(); } -TEST_F(FlimflamDeviceClientTest, CallAddIPConfigAndBlock) { +TEST_F(ShillDeviceClientTest, CallAddIPConfigAndBlock) { const dbus::ObjectPath expected_result("/result/path"); // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); @@ -238,7 +238,7 @@ TEST_F(FlimflamDeviceClientTest, CallAddIPConfigAndBlock) { EXPECT_EQ(expected_result, result); } -TEST_F(FlimflamDeviceClientTest, RequirePin) { +TEST_F(ShillDeviceClientTest, RequirePin) { const char kPin[] = "123456"; const bool kRequired = true; // Create response. @@ -263,7 +263,7 @@ TEST_F(FlimflamDeviceClientTest, RequirePin) { message_loop_.RunAllPending(); } -TEST_F(FlimflamDeviceClientTest, EnterPin) { +TEST_F(ShillDeviceClientTest, EnterPin) { const char kPin[] = "123456"; // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); @@ -285,7 +285,7 @@ TEST_F(FlimflamDeviceClientTest, EnterPin) { message_loop_.RunAllPending(); } -TEST_F(FlimflamDeviceClientTest, UnblockPin) { +TEST_F(ShillDeviceClientTest, UnblockPin) { const char kPuk[] = "987654"; const char kPin[] = "123456"; // Create response. @@ -308,7 +308,7 @@ TEST_F(FlimflamDeviceClientTest, UnblockPin) { message_loop_.RunAllPending(); } -TEST_F(FlimflamDeviceClientTest, ChangePin) { +TEST_F(ShillDeviceClientTest, ChangePin) { const char kOldPin[] = "123456"; const char kNewPin[] = "234567"; // Create response. @@ -333,7 +333,7 @@ TEST_F(FlimflamDeviceClientTest, ChangePin) { message_loop_.RunAllPending(); } -TEST_F(FlimflamDeviceClientTest, Register) { +TEST_F(ShillDeviceClientTest, Register) { const char kNetworkId[] = "networkid"; // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); diff --git a/chromeos/dbus/flimflam_ipconfig_client.cc b/chromeos/dbus/shill_ipconfig_client.cc index e3f8cbe..509696b 100644 --- a/chromeos/dbus/flimflam_ipconfig_client.cc +++ b/chromeos/dbus/shill_ipconfig_client.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chromeos/dbus/flimflam_ipconfig_client.h" +#include "chromeos/dbus/shill_ipconfig_client.h" #include "base/bind.h" #include "base/message_loop.h" @@ -19,12 +19,12 @@ namespace chromeos { namespace { -// The FlimflamIPConfigClient implementation. -class FlimflamIPConfigClientImpl : public FlimflamIPConfigClient { +// The ShillIPConfigClient implementation. +class ShillIPConfigClientImpl : public ShillIPConfigClient { public: - explicit FlimflamIPConfigClientImpl(dbus::Bus* bus); + explicit ShillIPConfigClientImpl(dbus::Bus* bus); - // FlimflamIPConfigClient overrides: + // ShillIPConfigClient overrides: virtual void SetPropertyChangedHandler( const dbus::ObjectPath& ipconfig_path, const PropertyChangedHandler& handler) OVERRIDE; @@ -49,10 +49,10 @@ class FlimflamIPConfigClientImpl : public FlimflamIPConfigClient { const dbus::ObjectPath& ipconfig_path) OVERRIDE; private: - typedef std::map<std::string, FlimflamClientHelper*> HelperMap; + typedef std::map<std::string, ShillClientHelper*> HelperMap; - // Returns the corresponding FlimflamClientHelper for the profile. - FlimflamClientHelper* GetHelper(const dbus::ObjectPath& ipconfig_path) { + // Returns the corresponding ShillClientHelper for the profile. + ShillClientHelper* GetHelper(const dbus::ObjectPath& ipconfig_path) { HelperMap::iterator it = helpers_.find(ipconfig_path.value()); if (it != helpers_.end()) return it->second; @@ -60,7 +60,7 @@ class FlimflamIPConfigClientImpl : public FlimflamIPConfigClient { // There is no helper for the profile, create it. dbus::ObjectProxy* object_proxy = bus_->GetObjectProxy(flimflam::kFlimflamServiceName, ipconfig_path); - FlimflamClientHelper* helper = new FlimflamClientHelper(bus_, object_proxy); + ShillClientHelper* helper = new ShillClientHelper(bus_, object_proxy); helper->MonitorPropertyChanged(flimflam::kFlimflamIPConfigInterface); helpers_.insert(HelperMap::value_type(ipconfig_path.value(), helper)); return helper; @@ -70,26 +70,26 @@ class FlimflamIPConfigClientImpl : public FlimflamIPConfigClient { HelperMap helpers_; STLValueDeleter<HelperMap> helpers_deleter_; - DISALLOW_COPY_AND_ASSIGN(FlimflamIPConfigClientImpl); + DISALLOW_COPY_AND_ASSIGN(ShillIPConfigClientImpl); }; -FlimflamIPConfigClientImpl::FlimflamIPConfigClientImpl(dbus::Bus* bus) +ShillIPConfigClientImpl::ShillIPConfigClientImpl(dbus::Bus* bus) : bus_(bus), helpers_deleter_(&helpers_) { } -void FlimflamIPConfigClientImpl::SetPropertyChangedHandler( +void ShillIPConfigClientImpl::SetPropertyChangedHandler( const dbus::ObjectPath& ipconfig_path, const PropertyChangedHandler& handler) { GetHelper(ipconfig_path)->SetPropertyChangedHandler(handler); } -void FlimflamIPConfigClientImpl::ResetPropertyChangedHandler( +void ShillIPConfigClientImpl::ResetPropertyChangedHandler( const dbus::ObjectPath& ipconfig_path) { GetHelper(ipconfig_path)->ResetPropertyChangedHandler(); } -void FlimflamIPConfigClientImpl::GetProperties( +void ShillIPConfigClientImpl::GetProperties( const dbus::ObjectPath& ipconfig_path, const DictionaryValueCallback& callback) { dbus::MethodCall method_call(flimflam::kFlimflamIPConfigInterface, @@ -97,7 +97,7 @@ void FlimflamIPConfigClientImpl::GetProperties( GetHelper(ipconfig_path)->CallDictionaryValueMethod(&method_call, callback); } -base::DictionaryValue* FlimflamIPConfigClientImpl::CallGetPropertiesAndBlock( +base::DictionaryValue* ShillIPConfigClientImpl::CallGetPropertiesAndBlock( const dbus::ObjectPath& ipconfig_path) { dbus::MethodCall method_call(flimflam::kFlimflamIPConfigInterface, flimflam::kGetPropertiesFunction); @@ -105,7 +105,7 @@ base::DictionaryValue* FlimflamIPConfigClientImpl::CallGetPropertiesAndBlock( &method_call); } -void FlimflamIPConfigClientImpl::Refresh( +void ShillIPConfigClientImpl::Refresh( const dbus::ObjectPath& ipconfig_path, const VoidDBusMethodCallback& callback) { dbus::MethodCall method_call(flimflam::kFlimflamIPConfigInterface, @@ -113,7 +113,7 @@ void FlimflamIPConfigClientImpl::Refresh( GetHelper(ipconfig_path)->CallVoidMethod(&method_call, callback); } -void FlimflamIPConfigClientImpl::SetProperty( +void ShillIPConfigClientImpl::SetProperty( const dbus::ObjectPath& ipconfig_path, const std::string& name, const base::Value& value, @@ -155,7 +155,7 @@ void FlimflamIPConfigClientImpl::SetProperty( GetHelper(ipconfig_path)->CallVoidMethod(&method_call, callback); } -void FlimflamIPConfigClientImpl::ClearProperty( +void ShillIPConfigClientImpl::ClearProperty( const dbus::ObjectPath& ipconfig_path, const std::string& name, const VoidDBusMethodCallback& callback) { @@ -166,7 +166,7 @@ void FlimflamIPConfigClientImpl::ClearProperty( GetHelper(ipconfig_path)->CallVoidMethod(&method_call, callback); } -void FlimflamIPConfigClientImpl::Remove( +void ShillIPConfigClientImpl::Remove( const dbus::ObjectPath& ipconfig_path, const VoidDBusMethodCallback& callback) { dbus::MethodCall method_call(flimflam::kFlimflamIPConfigInterface, @@ -174,22 +174,22 @@ void FlimflamIPConfigClientImpl::Remove( GetHelper(ipconfig_path)->CallVoidMethod(&method_call, callback); } -bool FlimflamIPConfigClientImpl::CallRemoveAndBlock( +bool ShillIPConfigClientImpl::CallRemoveAndBlock( const dbus::ObjectPath& ipconfig_path) { dbus::MethodCall method_call(flimflam::kFlimflamIPConfigInterface, flimflam::kRemoveConfigFunction); return GetHelper(ipconfig_path)->CallVoidMethodAndBlock(&method_call); } -// A stub implementation of FlimflamIPConfigClient. -class FlimflamIPConfigClientStubImpl : public FlimflamIPConfigClient { +// A stub implementation of ShillIPConfigClient. +class ShillIPConfigClientStubImpl : public ShillIPConfigClient { public: - FlimflamIPConfigClientStubImpl() : weak_ptr_factory_(this) {} + ShillIPConfigClientStubImpl() : weak_ptr_factory_(this) {} - virtual ~FlimflamIPConfigClientStubImpl() {} + virtual ~ShillIPConfigClientStubImpl() {} /////////////////////////////////////////////// - // FlimflamIPConfigClient overrides: + // ShillIPConfigClient overrides: virtual void SetPropertyChangedHandler( const dbus::ObjectPath& ipconfig_path, const PropertyChangedHandler& handler) OVERRIDE {} @@ -203,7 +203,7 @@ class FlimflamIPConfigClientStubImpl : public FlimflamIPConfigClient { virtual void GetProperties(const dbus::ObjectPath& ipconfig_path, const DictionaryValueCallback& callback) OVERRIDE { MessageLoop::current()->PostTask( - FROM_HERE, base::Bind(&FlimflamIPConfigClientStubImpl::PassProperties, + FROM_HERE, base::Bind(&ShillIPConfigClientStubImpl::PassProperties, weak_ptr_factory_.GetWeakPtr(), callback)); } @@ -249,25 +249,25 @@ class FlimflamIPConfigClientStubImpl : public FlimflamIPConfigClient { // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<FlimflamIPConfigClientStubImpl> weak_ptr_factory_; + base::WeakPtrFactory<ShillIPConfigClientStubImpl> weak_ptr_factory_; - DISALLOW_COPY_AND_ASSIGN(FlimflamIPConfigClientStubImpl); + DISALLOW_COPY_AND_ASSIGN(ShillIPConfigClientStubImpl); }; } // namespace -FlimflamIPConfigClient::FlimflamIPConfigClient() {} +ShillIPConfigClient::ShillIPConfigClient() {} -FlimflamIPConfigClient::~FlimflamIPConfigClient() {} +ShillIPConfigClient::~ShillIPConfigClient() {} // static -FlimflamIPConfigClient* FlimflamIPConfigClient::Create( +ShillIPConfigClient* ShillIPConfigClient::Create( DBusClientImplementationType type, dbus::Bus* bus) { if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) - return new FlimflamIPConfigClientImpl(bus); + return new ShillIPConfigClientImpl(bus); DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); - return new FlimflamIPConfigClientStubImpl(); + return new ShillIPConfigClientStubImpl(); } } // namespace chromeos diff --git a/chromeos/dbus/flimflam_ipconfig_client.h b/chromeos/dbus/shill_ipconfig_client.h index e3686fa..c87d829 100644 --- a/chromeos/dbus/flimflam_ipconfig_client.h +++ b/chromeos/dbus/shill_ipconfig_client.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_DBUS_FLIMFLAM_IPCONFIG_CLIENT_H_ -#define CHROMEOS_DBUS_FLIMFLAM_IPCONFIG_CLIENT_H_ +#ifndef CHROMEOS_DBUS_SHILL_IPCONFIG_CLIENT_H_ +#define CHROMEOS_DBUS_SHILL_IPCONFIG_CLIENT_H_ #include <string> @@ -11,7 +11,7 @@ #include "base/callback.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client_implementation_type.h" -#include "chromeos/dbus/flimflam_client_helper.h" +#include "chromeos/dbus/shill_client_helper.h" namespace base { @@ -29,18 +29,18 @@ class ObjectPath; namespace chromeos { -// FlimflamIPConfigClient is used to communicate with the Flimflam IPConfig +// ShillIPConfigClient is used to communicate with the Shill IPConfig // service. All methods should be called from the origin thread which // initializes the DBusThreadManager instance. -class CHROMEOS_EXPORT FlimflamIPConfigClient { +class CHROMEOS_EXPORT ShillIPConfigClient { public: - typedef FlimflamClientHelper::PropertyChangedHandler PropertyChangedHandler; - typedef FlimflamClientHelper::DictionaryValueCallback DictionaryValueCallback; - virtual ~FlimflamIPConfigClient(); + typedef ShillClientHelper::PropertyChangedHandler PropertyChangedHandler; + typedef ShillClientHelper::DictionaryValueCallback DictionaryValueCallback; + virtual ~ShillIPConfigClient(); // Factory function, creates a new instance which is owned by the caller. // For normal usage, access the singleton via DBusThreadManager::Get(). - static FlimflamIPConfigClient* Create(DBusClientImplementationType type, + static ShillIPConfigClient* Create(DBusClientImplementationType type, dbus::Bus* bus); // Sets PropertyChanged signal handler. @@ -98,12 +98,12 @@ class CHROMEOS_EXPORT FlimflamIPConfigClient { protected: // Create() should be used instead. - FlimflamIPConfigClient(); + ShillIPConfigClient(); private: - DISALLOW_COPY_AND_ASSIGN(FlimflamIPConfigClient); + DISALLOW_COPY_AND_ASSIGN(ShillIPConfigClient); }; } // namespace chromeos -#endif // CHROMEOS_DBUS_FLIMFLAM_IPCONFIG_CLIENT_H_ +#endif // CHROMEOS_DBUS_SHILL_IPCONFIG_CLIENT_H_ diff --git a/chromeos/dbus/flimflam_ipconfig_client_unittest.cc b/chromeos/dbus/shill_ipconfig_client_unittest.cc index 1ba8f00..60bca25 100644 --- a/chromeos/dbus/flimflam_ipconfig_client_unittest.cc +++ b/chromeos/dbus/shill_ipconfig_client_unittest.cc @@ -4,8 +4,8 @@ #include "base/bind.h" #include "base/values.h" -#include "chromeos/dbus/flimflam_client_unittest_base.h" -#include "chromeos/dbus/flimflam_ipconfig_client.h" +#include "chromeos/dbus/shill_client_unittest_base.h" +#include "chromeos/dbus/shill_ipconfig_client.h" #include "dbus/message.h" #include "dbus/values_util.h" #include "testing/gtest/include/gtest/gtest.h" @@ -19,32 +19,32 @@ const char kExampleIPConfigPath[] = "/foo/bar"; } // namespace -class FlimflamIPConfigClientTest : public FlimflamClientUnittestBase { +class ShillIPConfigClientTest : public ShillClientUnittestBase { public: - FlimflamIPConfigClientTest() - : FlimflamClientUnittestBase( + ShillIPConfigClientTest() + : ShillClientUnittestBase( flimflam::kFlimflamIPConfigInterface, dbus::ObjectPath(kExampleIPConfigPath)) { } virtual void SetUp() { - FlimflamClientUnittestBase::SetUp(); + ShillClientUnittestBase::SetUp(); // Create a client with the mock bus. - client_.reset(FlimflamIPConfigClient::Create( + client_.reset(ShillIPConfigClient::Create( REAL_DBUS_CLIENT_IMPLEMENTATION, mock_bus_)); // Run the message loop to run the signal connection result callback. message_loop_.RunAllPending(); } virtual void TearDown() { - FlimflamClientUnittestBase::TearDown(); + ShillClientUnittestBase::TearDown(); } protected: - scoped_ptr<FlimflamIPConfigClient> client_; + scoped_ptr<ShillIPConfigClient> client_; }; -TEST_F(FlimflamIPConfigClientTest, PropertyChanged) { +TEST_F(ShillIPConfigClientTest, PropertyChanged) { // Create a signal. const base::FundamentalValue kConnected(true); dbus::Signal signal(flimflam::kFlimflamIPConfigInterface, @@ -65,7 +65,7 @@ TEST_F(FlimflamIPConfigClientTest, PropertyChanged) { client_->ResetPropertyChangedHandler(dbus::ObjectPath(kExampleIPConfigPath)); } -TEST_F(FlimflamIPConfigClientTest, GetProperties) { +TEST_F(ShillIPConfigClientTest, GetProperties) { const char kAddress[] = "address"; const int32 kMtu = 68; @@ -105,7 +105,7 @@ TEST_F(FlimflamIPConfigClientTest, GetProperties) { message_loop_.RunAllPending(); } -TEST_F(FlimflamIPConfigClientTest, CallGetPropertiesAndBlock) { +TEST_F(ShillIPConfigClientTest, CallGetPropertiesAndBlock) { const char kAddress[] = "address"; const int32 kMtu = 68; @@ -146,7 +146,7 @@ TEST_F(FlimflamIPConfigClientTest, CallGetPropertiesAndBlock) { EXPECT_TRUE(result->Equals(&value)); } -TEST_F(FlimflamIPConfigClientTest, SetProperty) { +TEST_F(ShillIPConfigClientTest, SetProperty) { const char kAddress[] = "address"; // Create response. @@ -168,7 +168,7 @@ TEST_F(FlimflamIPConfigClientTest, SetProperty) { message_loop_.RunAllPending(); } -TEST_F(FlimflamIPConfigClientTest, ClearProperty) { +TEST_F(ShillIPConfigClientTest, ClearProperty) { // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); @@ -185,7 +185,7 @@ TEST_F(FlimflamIPConfigClientTest, ClearProperty) { message_loop_.RunAllPending(); } -TEST_F(FlimflamIPConfigClientTest, Remove) { +TEST_F(ShillIPConfigClientTest, Remove) { // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); @@ -201,7 +201,7 @@ TEST_F(FlimflamIPConfigClientTest, Remove) { message_loop_.RunAllPending(); } -TEST_F(FlimflamIPConfigClientTest, CallRemoveAndBlock) { +TEST_F(ShillIPConfigClientTest, CallRemoveAndBlock) { // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); diff --git a/chromeos/dbus/flimflam_manager_client.cc b/chromeos/dbus/shill_manager_client.cc index 034d01e..96d0e3e 100644 --- a/chromeos/dbus/flimflam_manager_client.cc +++ b/chromeos/dbus/shill_manager_client.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chromeos/dbus/flimflam_manager_client.h" +#include "chromeos/dbus/shill_manager_client.h" #include "base/bind.h" #include "base/chromeos/chromeos_version.h" @@ -40,16 +40,16 @@ void AppendServicePropertiesDictionary( dbus::MessageWriter entry_writer(NULL); array_writer.OpenDictEntry(&entry_writer); entry_writer.AppendString(it.key()); - FlimflamClientHelper::AppendValueDataAsVariant(&entry_writer, it.value()); + ShillClientHelper::AppendValueDataAsVariant(&entry_writer, it.value()); array_writer.CloseContainer(&entry_writer); } writer->CloseContainer(&array_writer); } -// The FlimflamManagerClient implementation. -class FlimflamManagerClientImpl : public FlimflamManagerClient { +// The ShillManagerClient implementation. +class ShillManagerClientImpl : public ShillManagerClient { public: - explicit FlimflamManagerClientImpl(dbus::Bus* bus) + explicit ShillManagerClientImpl(dbus::Bus* bus) : proxy_(bus->GetObjectProxy( flimflam::kFlimflamServiceName, dbus::ObjectPath(flimflam::kFlimflamServicePath))), @@ -57,7 +57,7 @@ class FlimflamManagerClientImpl : public FlimflamManagerClient { helper_.MonitorPropertyChanged(flimflam::kFlimflamManagerInterface); } - // FlimflamManagerClient overrides: + // ShillManagerClient overrides: virtual void SetPropertyChangedHandler( const PropertyChangedHandler& handler) OVERRIDE { helper_.SetPropertyChangedHandler(handler); @@ -86,7 +86,7 @@ class FlimflamManagerClientImpl : public FlimflamManagerClient { flimflam::kSetPropertyFunction); dbus::MessageWriter writer(&method_call); writer.AppendString(name); - FlimflamClientHelper::AppendValueDataAsVariant(&writer, value); + ShillClientHelper::AppendValueDataAsVariant(&writer, value); helper_.CallVoidMethod(&method_call, callback); } @@ -142,16 +142,16 @@ class FlimflamManagerClientImpl : public FlimflamManagerClient { private: dbus::ObjectProxy* proxy_; - FlimflamClientHelper helper_; + ShillClientHelper helper_; - DISALLOW_COPY_AND_ASSIGN(FlimflamManagerClientImpl); + DISALLOW_COPY_AND_ASSIGN(ShillManagerClientImpl); }; -// A stub implementation of FlimflamManagerClient. +// A stub implementation of ShillManagerClient. // Implemented: Stub cellular DeviceList entry for SMS testing. -class FlimflamManagerClientStubImpl : public FlimflamManagerClient { +class ShillManagerClientStubImpl : public ShillManagerClient { public: - FlimflamManagerClientStubImpl() : weak_ptr_factory_(this) { + ShillManagerClientStubImpl() : weak_ptr_factory_(this) { base::ListValue* device_list = new base::ListValue; // Note: names match Device stub map. const char kStubCellular1[] = "stub_cellular1"; @@ -161,30 +161,30 @@ class FlimflamManagerClientStubImpl : public FlimflamManagerClient { stub_properties_.Set(flimflam::kDevicesProperty, device_list); } - virtual ~FlimflamManagerClientStubImpl() {} + virtual ~ShillManagerClientStubImpl() {} - // FlimflamManagerClient override. + // ShillManagerClient override. virtual void SetPropertyChangedHandler( const PropertyChangedHandler& handler) OVERRIDE {} - // FlimflamManagerClient override. + // ShillManagerClient override. virtual void ResetPropertyChangedHandler() OVERRIDE {} - // FlimflamManagerClient override. + // ShillManagerClient override. virtual void GetProperties(const DictionaryValueCallback& callback) OVERRIDE { MessageLoop::current()->PostTask( FROM_HERE, base::Bind( - &FlimflamManagerClientStubImpl::PassStubProperties, + &ShillManagerClientStubImpl::PassStubProperties, weak_ptr_factory_.GetWeakPtr(), callback)); } - // FlimflamManagerClient override. + // ShillManagerClient override. virtual base::DictionaryValue* CallGetPropertiesAndBlock() OVERRIDE { return new base::DictionaryValue; } - // FlimflamManagerClient override. + // ShillManagerClient override. virtual void SetProperty(const std::string& name, const base::Value& value, const VoidDBusMethodCallback& callback) OVERRIDE { @@ -194,7 +194,7 @@ class FlimflamManagerClientStubImpl : public FlimflamManagerClient { DBUS_METHOD_CALL_SUCCESS)); } - // FlimflamManagerClient override. + // ShillManagerClient override. virtual void RequestScan(const std::string& type, const VoidDBusMethodCallback& callback) OVERRIDE { MessageLoop::current()->PostTask(FROM_HERE, @@ -202,7 +202,7 @@ class FlimflamManagerClientStubImpl : public FlimflamManagerClient { DBUS_METHOD_CALL_SUCCESS)); } - // FlimflamManagerClient override. + // ShillManagerClient override. virtual void EnableTechnology( const std::string& type, const VoidDBusMethodCallback& callback) OVERRIDE { @@ -211,7 +211,7 @@ class FlimflamManagerClientStubImpl : public FlimflamManagerClient { DBUS_METHOD_CALL_SUCCESS)); } - // FlimflamManagerClient override. + // ShillManagerClient override. virtual void DisableTechnology( const std::string& type, const VoidDBusMethodCallback& callback) OVERRIDE { @@ -220,7 +220,7 @@ class FlimflamManagerClientStubImpl : public FlimflamManagerClient { DBUS_METHOD_CALL_SUCCESS)); } - // FlimflamManagerClient override. + // ShillManagerClient override. virtual void ConfigureService( const base::DictionaryValue& properties, const VoidDBusMethodCallback& callback) OVERRIDE { @@ -229,7 +229,7 @@ class FlimflamManagerClientStubImpl : public FlimflamManagerClient { DBUS_METHOD_CALL_SUCCESS)); } - // FlimflamManagerClient override. + // ShillManagerClient override. virtual void GetService( const base::DictionaryValue& properties, const ObjectPathDBusMethodCallback& callback) OVERRIDE { @@ -248,25 +248,25 @@ class FlimflamManagerClientStubImpl : public FlimflamManagerClient { // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<FlimflamManagerClientStubImpl> weak_ptr_factory_; + base::WeakPtrFactory<ShillManagerClientStubImpl> weak_ptr_factory_; - DISALLOW_COPY_AND_ASSIGN(FlimflamManagerClientStubImpl); + DISALLOW_COPY_AND_ASSIGN(ShillManagerClientStubImpl); }; } // namespace -FlimflamManagerClient::FlimflamManagerClient() {} +ShillManagerClient::ShillManagerClient() {} -FlimflamManagerClient::~FlimflamManagerClient() {} +ShillManagerClient::~ShillManagerClient() {} // static -FlimflamManagerClient* FlimflamManagerClient::Create( +ShillManagerClient* ShillManagerClient::Create( DBusClientImplementationType type, dbus::Bus* bus) { if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) - return new FlimflamManagerClientImpl(bus); + return new ShillManagerClientImpl(bus); DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); - return new FlimflamManagerClientStubImpl(); + return new ShillManagerClientStubImpl(); } } // namespace chromeos diff --git a/chromeos/dbus/flimflam_manager_client.h b/chromeos/dbus/shill_manager_client.h index 98cb9cf..cc21174 100644 --- a/chromeos/dbus/flimflam_manager_client.h +++ b/chromeos/dbus/shill_manager_client.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_DBUS_FLIMFLAM_MANAGER_CLIENT_H_ -#define CHROMEOS_DBUS_FLIMFLAM_MANAGER_CLIENT_H_ +#ifndef CHROMEOS_DBUS_SHILL_MANAGER_CLIENT_H_ +#define CHROMEOS_DBUS_SHILL_MANAGER_CLIENT_H_ #include <string> @@ -11,7 +11,7 @@ #include "base/callback.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client_implementation_type.h" -#include "chromeos/dbus/flimflam_client_helper.h" +#include "chromeos/dbus/shill_client_helper.h" namespace dbus { @@ -21,19 +21,19 @@ class Bus; namespace chromeos { -// FlimflamManagerClient is used to communicate with the Flimflam Manager +// ShillManagerClient is used to communicate with the Shill Manager // service. All methods should be called from the origin thread which // initializes the DBusThreadManager instance. -class CHROMEOS_EXPORT FlimflamManagerClient { +class CHROMEOS_EXPORT ShillManagerClient { public: - typedef FlimflamClientHelper::PropertyChangedHandler PropertyChangedHandler; - typedef FlimflamClientHelper::DictionaryValueCallback DictionaryValueCallback; + typedef ShillClientHelper::PropertyChangedHandler PropertyChangedHandler; + typedef ShillClientHelper::DictionaryValueCallback DictionaryValueCallback; - virtual ~FlimflamManagerClient(); + virtual ~ShillManagerClient(); // Factory function, creates a new instance which is owned by the caller. // For normal usage, access the singleton via DBusThreadManager::Get(). - static FlimflamManagerClient* Create(DBusClientImplementationType type, + static ShillManagerClient* Create(DBusClientImplementationType type, dbus::Bus* bus); // Sets PropertyChanged signal handler. @@ -88,12 +88,12 @@ class CHROMEOS_EXPORT FlimflamManagerClient { protected: // Create() should be used instead. - FlimflamManagerClient(); + ShillManagerClient(); private: - DISALLOW_COPY_AND_ASSIGN(FlimflamManagerClient); + DISALLOW_COPY_AND_ASSIGN(ShillManagerClient); }; } // namespace chromeos -#endif // CHROMEOS_DBUS_FLIMFLAM_MANAGER_CLIENT_H_ +#endif // CHROMEOS_DBUS_SHILL_MANAGER_CLIENT_H_ diff --git a/chromeos/dbus/flimflam_manager_client_unittest.cc b/chromeos/dbus/shill_manager_client_unittest.cc index d50920e..9d37aec 100644 --- a/chromeos/dbus/flimflam_manager_client_unittest.cc +++ b/chromeos/dbus/shill_manager_client_unittest.cc @@ -4,8 +4,8 @@ #include "base/bind.h" #include "base/values.h" -#include "chromeos/dbus/flimflam_client_unittest_base.h" -#include "chromeos/dbus/flimflam_manager_client.h" +#include "chromeos/dbus/shill_client_unittest_base.h" +#include "chromeos/dbus/shill_manager_client.h" #include "dbus/message.h" #include "dbus/object_path.h" #include "dbus/values_util.h" @@ -96,32 +96,32 @@ base::DictionaryValue* CreateExampleProperties() { } // namespace -class FlimflamManagerClientTest : public FlimflamClientUnittestBase { +class ShillManagerClientTest : public ShillClientUnittestBase { public: - FlimflamManagerClientTest() - : FlimflamClientUnittestBase( + ShillManagerClientTest() + : ShillClientUnittestBase( flimflam::kFlimflamManagerInterface, dbus::ObjectPath(flimflam::kFlimflamServicePath)) { } virtual void SetUp() { - FlimflamClientUnittestBase::SetUp(); + ShillClientUnittestBase::SetUp(); // Create a client with the mock bus. - client_.reset(FlimflamManagerClient::Create(REAL_DBUS_CLIENT_IMPLEMENTATION, + client_.reset(ShillManagerClient::Create(REAL_DBUS_CLIENT_IMPLEMENTATION, mock_bus_)); // Run the message loop to run the signal connection result callback. message_loop_.RunAllPending(); } virtual void TearDown() { - FlimflamClientUnittestBase::TearDown(); + ShillClientUnittestBase::TearDown(); } protected: - scoped_ptr<FlimflamManagerClient> client_; + scoped_ptr<ShillManagerClient> client_; }; -TEST_F(FlimflamManagerClientTest, PropertyChanged) { +TEST_F(ShillManagerClientTest, PropertyChanged) { // Create a signal. base::FundamentalValue kOfflineMode(true); dbus::Signal signal(flimflam::kFlimflamManagerInterface, @@ -141,7 +141,7 @@ TEST_F(FlimflamManagerClientTest, PropertyChanged) { client_->ResetPropertyChangedHandler(); } -TEST_F(FlimflamManagerClientTest, GetProperties) { +TEST_F(ShillManagerClientTest, GetProperties) { // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); dbus::MessageWriter writer(response.get()); @@ -169,7 +169,7 @@ TEST_F(FlimflamManagerClientTest, GetProperties) { message_loop_.RunAllPending(); } -TEST_F(FlimflamManagerClientTest, CallGetPropertiesAndBlock) { +TEST_F(ShillManagerClientTest, CallGetPropertiesAndBlock) { // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); dbus::MessageWriter writer(response.get()); @@ -196,7 +196,7 @@ TEST_F(FlimflamManagerClientTest, CallGetPropertiesAndBlock) { EXPECT_TRUE(value.Equals(result.get())); } -TEST_F(FlimflamManagerClientTest, SetProperty) { +TEST_F(ShillManagerClientTest, SetProperty) { // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); // Set expectations. @@ -214,7 +214,7 @@ TEST_F(FlimflamManagerClientTest, SetProperty) { message_loop_.RunAllPending(); } -TEST_F(FlimflamManagerClientTest, RequestScan) { +TEST_F(ShillManagerClientTest, RequestScan) { // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); // Set expectations. @@ -227,7 +227,7 @@ TEST_F(FlimflamManagerClientTest, RequestScan) { message_loop_.RunAllPending(); } -TEST_F(FlimflamManagerClientTest, EnableTechnology) { +TEST_F(ShillManagerClientTest, EnableTechnology) { // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); // Set expectations. @@ -241,7 +241,7 @@ TEST_F(FlimflamManagerClientTest, EnableTechnology) { message_loop_.RunAllPending(); } -TEST_F(FlimflamManagerClientTest, DisableTechnology) { +TEST_F(ShillManagerClientTest, DisableTechnology) { // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); // Set expectations. @@ -255,7 +255,7 @@ TEST_F(FlimflamManagerClientTest, DisableTechnology) { message_loop_.RunAllPending(); } -TEST_F(FlimflamManagerClientTest, ConfigureService) { +TEST_F(ShillManagerClientTest, ConfigureService) { // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); // Create the argument dictionary. @@ -270,7 +270,7 @@ TEST_F(FlimflamManagerClientTest, ConfigureService) { message_loop_.RunAllPending(); } -TEST_F(FlimflamManagerClientTest, GetService) { +TEST_F(ShillManagerClientTest, GetService) { // Create response. const dbus::ObjectPath object_path("/"); scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); diff --git a/chromeos/dbus/flimflam_network_client.cc b/chromeos/dbus/shill_network_client.cc index 2059807..dd70ebb 100644 --- a/chromeos/dbus/flimflam_network_client.cc +++ b/chromeos/dbus/shill_network_client.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chromeos/dbus/flimflam_network_client.h" +#include "chromeos/dbus/shill_network_client.h" #include "base/bind.h" #include "base/message_loop.h" @@ -19,28 +19,28 @@ namespace chromeos { namespace { -// The FlimflamNetworkClient implementation. -class FlimflamNetworkClientImpl : public FlimflamNetworkClient { +// The ShillNetworkClient implementation. +class ShillNetworkClientImpl : public ShillNetworkClient { public: - explicit FlimflamNetworkClientImpl(dbus::Bus* bus) + explicit ShillNetworkClientImpl(dbus::Bus* bus) : bus_(bus), helpers_deleter_(&helpers_) { } - // FlimflamNetworkClient override. + // ShillNetworkClient override. virtual void SetPropertyChangedHandler( const dbus::ObjectPath& network_path, const PropertyChangedHandler& handler) OVERRIDE { GetHelper(network_path)->SetPropertyChangedHandler(handler); } - // FlimflamNetworkClient override. + // ShillNetworkClient override. virtual void ResetPropertyChangedHandler( const dbus::ObjectPath& network_path) OVERRIDE { GetHelper(network_path)->ResetPropertyChangedHandler(); } - // FlimflamNetworkClient override. + // ShillNetworkClient override. virtual void GetProperties(const dbus::ObjectPath& network_path, const DictionaryValueCallback& callback) OVERRIDE { dbus::MethodCall method_call(flimflam::kFlimflamNetworkInterface, @@ -48,7 +48,7 @@ class FlimflamNetworkClientImpl : public FlimflamNetworkClient { GetHelper(network_path)->CallDictionaryValueMethod(&method_call, callback); } - // FlimflamNetworkClient override. + // ShillNetworkClient override. virtual base::DictionaryValue* CallGetPropertiesAndBlock( const dbus::ObjectPath& network_path) OVERRIDE { dbus::MethodCall method_call(flimflam::kFlimflamNetworkInterface, @@ -58,10 +58,10 @@ class FlimflamNetworkClientImpl : public FlimflamNetworkClient { } private: - typedef std::map<std::string, FlimflamClientHelper*> HelperMap; + typedef std::map<std::string, ShillClientHelper*> HelperMap; - // Returns the corresponding FlimflamClientHelper for the profile. - FlimflamClientHelper* GetHelper(const dbus::ObjectPath& network_path) { + // Returns the corresponding ShillClientHelper for the profile. + ShillClientHelper* GetHelper(const dbus::ObjectPath& network_path) { HelperMap::iterator it = helpers_.find(network_path.value()); if (it != helpers_.end()) return it->second; @@ -69,7 +69,7 @@ class FlimflamNetworkClientImpl : public FlimflamNetworkClient { // There is no helper for the profile, create it. dbus::ObjectProxy* object_proxy = bus_->GetObjectProxy(flimflam::kFlimflamServiceName, network_path); - FlimflamClientHelper* helper = new FlimflamClientHelper(bus_, object_proxy); + ShillClientHelper* helper = new ShillClientHelper(bus_, object_proxy); helper->MonitorPropertyChanged(flimflam::kFlimflamNetworkInterface); helpers_.insert(HelperMap::value_type(network_path.value(), helper)); return helper; @@ -79,36 +79,36 @@ class FlimflamNetworkClientImpl : public FlimflamNetworkClient { HelperMap helpers_; STLValueDeleter<HelperMap> helpers_deleter_; - DISALLOW_COPY_AND_ASSIGN(FlimflamNetworkClientImpl); + DISALLOW_COPY_AND_ASSIGN(ShillNetworkClientImpl); }; -// A stub implementation of FlimflamNetworkClient. -class FlimflamNetworkClientStubImpl : public FlimflamNetworkClient { +// A stub implementation of ShillNetworkClient. +class ShillNetworkClientStubImpl : public ShillNetworkClient { public: - FlimflamNetworkClientStubImpl() : weak_ptr_factory_(this) {} + ShillNetworkClientStubImpl() : weak_ptr_factory_(this) {} - virtual ~FlimflamNetworkClientStubImpl() {} + virtual ~ShillNetworkClientStubImpl() {} - // FlimflamNetworkClient override. + // ShillNetworkClient override. virtual void SetPropertyChangedHandler( const dbus::ObjectPath& network_path, const PropertyChangedHandler& handler) OVERRIDE {} - // FlimflamNetworkClient override. + // ShillNetworkClient override. virtual void ResetPropertyChangedHandler( const dbus::ObjectPath& network_path) OVERRIDE {} - // FlimflamNetworkClient override. + // ShillNetworkClient override. virtual void GetProperties(const dbus::ObjectPath& network_path, const DictionaryValueCallback& callback) OVERRIDE { MessageLoop::current()->PostTask( FROM_HERE, - base::Bind(&FlimflamNetworkClientStubImpl::PassEmptyDictionaryValue, + base::Bind(&ShillNetworkClientStubImpl::PassEmptyDictionaryValue, weak_ptr_factory_.GetWeakPtr(), callback)); } - // FlimflamNetworkClient override. + // ShillNetworkClient override. virtual base::DictionaryValue* CallGetPropertiesAndBlock( const dbus::ObjectPath& network_path) OVERRIDE { return new base::DictionaryValue; @@ -122,25 +122,25 @@ class FlimflamNetworkClientStubImpl : public FlimflamNetworkClient { // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<FlimflamNetworkClientStubImpl> weak_ptr_factory_; + base::WeakPtrFactory<ShillNetworkClientStubImpl> weak_ptr_factory_; - DISALLOW_COPY_AND_ASSIGN(FlimflamNetworkClientStubImpl); + DISALLOW_COPY_AND_ASSIGN(ShillNetworkClientStubImpl); }; } // namespace -FlimflamNetworkClient::FlimflamNetworkClient() {} +ShillNetworkClient::ShillNetworkClient() {} -FlimflamNetworkClient::~FlimflamNetworkClient() {} +ShillNetworkClient::~ShillNetworkClient() {} // static -FlimflamNetworkClient* FlimflamNetworkClient::Create( +ShillNetworkClient* ShillNetworkClient::Create( DBusClientImplementationType type, dbus::Bus* bus) { if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) - return new FlimflamNetworkClientImpl(bus); + return new ShillNetworkClientImpl(bus); DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); - return new FlimflamNetworkClientStubImpl(); + return new ShillNetworkClientStubImpl(); } } // namespace chromeos diff --git a/chromeos/dbus/flimflam_network_client.h b/chromeos/dbus/shill_network_client.h index d049d1c..78e1f4c 100644 --- a/chromeos/dbus/flimflam_network_client.h +++ b/chromeos/dbus/shill_network_client.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_DBUS_FLIMFLAM_NETWORK_CLIENT_H_ -#define CHROMEOS_DBUS_FLIMFLAM_NETWORK_CLIENT_H_ +#ifndef CHROMEOS_DBUS_SHILL_NETWORK_CLIENT_H_ +#define CHROMEOS_DBUS_SHILL_NETWORK_CLIENT_H_ #include <string> @@ -11,7 +11,7 @@ #include "base/callback.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client_implementation_type.h" -#include "chromeos/dbus/flimflam_client_helper.h" +#include "chromeos/dbus/shill_client_helper.h" namespace base { @@ -29,19 +29,19 @@ class ObjectPath; namespace chromeos { -// FlimflamNetworkClient is used to communicate with the Flimflam Network +// ShillNetworkClient is used to communicate with the Shill Network // service. All methods should be called from the origin thread which // initializes the DBusThreadManager instance. -class CHROMEOS_EXPORT FlimflamNetworkClient { +class CHROMEOS_EXPORT ShillNetworkClient { public: - typedef FlimflamClientHelper::PropertyChangedHandler PropertyChangedHandler; - typedef FlimflamClientHelper::DictionaryValueCallback DictionaryValueCallback; + typedef ShillClientHelper::PropertyChangedHandler PropertyChangedHandler; + typedef ShillClientHelper::DictionaryValueCallback DictionaryValueCallback; - virtual ~FlimflamNetworkClient(); + virtual ~ShillNetworkClient(); // Factory function, creates a new instance which is owned by the caller. // For normal usage, access the singleton via DBusThreadManager::Get(). - static FlimflamNetworkClient* Create(DBusClientImplementationType type, + static ShillNetworkClient* Create(DBusClientImplementationType type, dbus::Bus* bus); // Sets PropertyChanged signal handler. @@ -69,12 +69,12 @@ class CHROMEOS_EXPORT FlimflamNetworkClient { protected: // Create() should be used instead. - FlimflamNetworkClient(); + ShillNetworkClient(); private: - DISALLOW_COPY_AND_ASSIGN(FlimflamNetworkClient); + DISALLOW_COPY_AND_ASSIGN(ShillNetworkClient); }; } // namespace chromeos -#endif // CHROMEOS_DBUS_FLIMFLAM_NETWORK_CLIENT_H_ +#endif // CHROMEOS_DBUS_SHILL_NETWORK_CLIENT_H_ diff --git a/chromeos/dbus/flimflam_network_client_unittest.cc b/chromeos/dbus/shill_network_client_unittest.cc index 566744a..417d2586 100644 --- a/chromeos/dbus/flimflam_network_client_unittest.cc +++ b/chromeos/dbus/shill_network_client_unittest.cc @@ -4,8 +4,8 @@ #include "base/bind.h" #include "base/values.h" -#include "chromeos/dbus/flimflam_client_unittest_base.h" -#include "chromeos/dbus/flimflam_network_client.h" +#include "chromeos/dbus/shill_client_unittest_base.h" +#include "chromeos/dbus/shill_network_client.h" #include "dbus/message.h" #include "dbus/values_util.h" #include "testing/gtest/include/gtest/gtest.h" @@ -19,32 +19,32 @@ const char kExampleNetworkPath[] = "/foo/bar"; } // namespace -class FlimflamNetworkClientTest : public FlimflamClientUnittestBase { +class ShillNetworkClientTest : public ShillClientUnittestBase { public: - FlimflamNetworkClientTest() - : FlimflamClientUnittestBase( + ShillNetworkClientTest() + : ShillClientUnittestBase( flimflam::kFlimflamNetworkInterface, dbus::ObjectPath(kExampleNetworkPath)) { } virtual void SetUp() { - FlimflamClientUnittestBase::SetUp(); + ShillClientUnittestBase::SetUp(); // Create a client with the mock bus. - client_.reset(FlimflamNetworkClient::Create(REAL_DBUS_CLIENT_IMPLEMENTATION, + client_.reset(ShillNetworkClient::Create(REAL_DBUS_CLIENT_IMPLEMENTATION, mock_bus_)); // Run the message loop to run the signal connection result callback. message_loop_.RunAllPending(); } virtual void TearDown() { - FlimflamClientUnittestBase::TearDown(); + ShillClientUnittestBase::TearDown(); } protected: - scoped_ptr<FlimflamNetworkClient> client_; + scoped_ptr<ShillNetworkClient> client_; }; -TEST_F(FlimflamNetworkClientTest, PropertyChanged) { +TEST_F(ShillNetworkClientTest, PropertyChanged) { // Create a signal. const base::FundamentalValue kConnected(true); dbus::Signal signal(flimflam::kFlimflamNetworkInterface, @@ -65,7 +65,7 @@ TEST_F(FlimflamNetworkClientTest, PropertyChanged) { client_->ResetPropertyChangedHandler(dbus::ObjectPath(kExampleNetworkPath)); } -TEST_F(FlimflamNetworkClientTest, GetProperties) { +TEST_F(ShillNetworkClientTest, GetProperties) { const char kAddress[] = "address"; const char kName[] = "name"; const uint8 kSignalStrength = 1; @@ -131,7 +131,7 @@ TEST_F(FlimflamNetworkClientTest, GetProperties) { message_loop_.RunAllPending(); } -TEST_F(FlimflamNetworkClientTest, CallGetPropertiesAndBlock) { +TEST_F(ShillNetworkClientTest, CallGetPropertiesAndBlock) { const char kName[] = "name"; // Create response. diff --git a/chromeos/dbus/flimflam_profile_client.cc b/chromeos/dbus/shill_profile_client.cc index 6de3ab2..78a62b2 100644 --- a/chromeos/dbus/flimflam_profile_client.cc +++ b/chromeos/dbus/shill_profile_client.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chromeos/dbus/flimflam_profile_client.h" +#include "chromeos/dbus/shill_profile_client.h" #include "base/bind.h" #include "base/message_loop.h" @@ -18,12 +18,12 @@ namespace chromeos { namespace { -// The FlimflamProfileClient implementation. -class FlimflamProfileClientImpl : public FlimflamProfileClient { +// The ShillProfileClient implementation. +class ShillProfileClientImpl : public ShillProfileClient { public: - explicit FlimflamProfileClientImpl(dbus::Bus* bus); + explicit ShillProfileClientImpl(dbus::Bus* bus); - // FlimflamProfileClient overrides: + // ShillProfileClient overrides: virtual void SetPropertyChangedHandler( const dbus::ObjectPath& profile_path, const PropertyChangedHandler& handler) OVERRIDE; @@ -39,24 +39,24 @@ class FlimflamProfileClientImpl : public FlimflamProfileClient { const VoidDBusMethodCallback& callback) OVERRIDE; private: - typedef std::map<std::string, FlimflamClientHelper*> HelperMap; + typedef std::map<std::string, ShillClientHelper*> HelperMap; - // Returns the corresponding FlimflamClientHelper for the profile. - FlimflamClientHelper* GetHelper(const dbus::ObjectPath& profile_path); + // Returns the corresponding ShillClientHelper for the profile. + ShillClientHelper* GetHelper(const dbus::ObjectPath& profile_path); dbus::Bus* bus_; HelperMap helpers_; STLValueDeleter<HelperMap> helpers_deleter_; - DISALLOW_COPY_AND_ASSIGN(FlimflamProfileClientImpl); + DISALLOW_COPY_AND_ASSIGN(ShillProfileClientImpl); }; -FlimflamProfileClientImpl::FlimflamProfileClientImpl(dbus::Bus* bus) +ShillProfileClientImpl::ShillProfileClientImpl(dbus::Bus* bus) : bus_(bus), helpers_deleter_(&helpers_) { } -FlimflamClientHelper* FlimflamProfileClientImpl::GetHelper( +ShillClientHelper* ShillProfileClientImpl::GetHelper( const dbus::ObjectPath& profile_path) { HelperMap::iterator it = helpers_.find(profile_path.value()); if (it != helpers_.end()) @@ -65,24 +65,24 @@ FlimflamClientHelper* FlimflamProfileClientImpl::GetHelper( // There is no helper for the profile, create it. dbus::ObjectProxy* object_proxy = bus_->GetObjectProxy(flimflam::kFlimflamServiceName, profile_path); - FlimflamClientHelper* helper = new FlimflamClientHelper(bus_, object_proxy); + ShillClientHelper* helper = new ShillClientHelper(bus_, object_proxy); helper->MonitorPropertyChanged(flimflam::kFlimflamProfileInterface); helpers_.insert(HelperMap::value_type(profile_path.value(), helper)); return helper; } -void FlimflamProfileClientImpl::SetPropertyChangedHandler( +void ShillProfileClientImpl::SetPropertyChangedHandler( const dbus::ObjectPath& profile_path, const PropertyChangedHandler& handler) { GetHelper(profile_path)->SetPropertyChangedHandler(handler); } -void FlimflamProfileClientImpl::ResetPropertyChangedHandler( +void ShillProfileClientImpl::ResetPropertyChangedHandler( const dbus::ObjectPath& profile_path) { GetHelper(profile_path)->ResetPropertyChangedHandler(); } -void FlimflamProfileClientImpl::GetProperties( +void ShillProfileClientImpl::GetProperties( const dbus::ObjectPath& profile_path, const DictionaryValueCallback& callback) { dbus::MethodCall method_call(flimflam::kFlimflamProfileInterface, @@ -90,7 +90,7 @@ void FlimflamProfileClientImpl::GetProperties( GetHelper(profile_path)->CallDictionaryValueMethod(&method_call, callback); } -void FlimflamProfileClientImpl::GetEntry( +void ShillProfileClientImpl::GetEntry( const dbus::ObjectPath& profile_path, const std::string& entry_path, const DictionaryValueCallback& callback) { @@ -101,7 +101,7 @@ void FlimflamProfileClientImpl::GetEntry( GetHelper(profile_path)->CallDictionaryValueMethod(&method_call, callback); } -void FlimflamProfileClientImpl::DeleteEntry( +void ShillProfileClientImpl::DeleteEntry( const dbus::ObjectPath& profile_path, const std::string& entry_path, const VoidDBusMethodCallback& callback) { @@ -112,44 +112,44 @@ void FlimflamProfileClientImpl::DeleteEntry( GetHelper(profile_path)->CallVoidMethod(&method_call, callback); } -// A stub implementation of FlimflamProfileClient. -class FlimflamProfileClientStubImpl : public FlimflamProfileClient { +// A stub implementation of ShillProfileClient. +class ShillProfileClientStubImpl : public ShillProfileClient { public: - FlimflamProfileClientStubImpl() : weak_ptr_factory_(this) {} + ShillProfileClientStubImpl() : weak_ptr_factory_(this) {} - virtual ~FlimflamProfileClientStubImpl() {} + virtual ~ShillProfileClientStubImpl() {} - // FlimflamProfileClient override. + // ShillProfileClient override. virtual void SetPropertyChangedHandler( const dbus::ObjectPath& profile_path, const PropertyChangedHandler& handler) OVERRIDE {} - // FlimflamProfileClient override. + // ShillProfileClient override. virtual void ResetPropertyChangedHandler( const dbus::ObjectPath& profile_path) OVERRIDE {} - // FlimflamProfileClient override. + // ShillProfileClient override. virtual void GetProperties(const dbus::ObjectPath& profile_path, const DictionaryValueCallback& callback) OVERRIDE { MessageLoop::current()->PostTask( FROM_HERE, - base::Bind(&FlimflamProfileClientStubImpl::PassEmptyDictionaryValue, + base::Bind(&ShillProfileClientStubImpl::PassEmptyDictionaryValue, weak_ptr_factory_.GetWeakPtr(), callback)); } - // FlimflamProfileClient override. + // ShillProfileClient override. virtual void GetEntry(const dbus::ObjectPath& profile_path, const std::string& entry_path, const DictionaryValueCallback& callback) OVERRIDE { MessageLoop::current()->PostTask( FROM_HERE, - base::Bind(&FlimflamProfileClientStubImpl::PassEmptyDictionaryValue, + base::Bind(&ShillProfileClientStubImpl::PassEmptyDictionaryValue, weak_ptr_factory_.GetWeakPtr(), callback)); } - // FlimflamProfileClient override. + // ShillProfileClient override. virtual void DeleteEntry(const dbus::ObjectPath& profile_path, const std::string& entry_path, const VoidDBusMethodCallback& callback) OVERRIDE { @@ -166,25 +166,25 @@ class FlimflamProfileClientStubImpl : public FlimflamProfileClient { // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<FlimflamProfileClientStubImpl> weak_ptr_factory_; + base::WeakPtrFactory<ShillProfileClientStubImpl> weak_ptr_factory_; - DISALLOW_COPY_AND_ASSIGN(FlimflamProfileClientStubImpl); + DISALLOW_COPY_AND_ASSIGN(ShillProfileClientStubImpl); }; } // namespace -FlimflamProfileClient::FlimflamProfileClient() {} +ShillProfileClient::ShillProfileClient() {} -FlimflamProfileClient::~FlimflamProfileClient() {} +ShillProfileClient::~ShillProfileClient() {} // static -FlimflamProfileClient* FlimflamProfileClient::Create( +ShillProfileClient* ShillProfileClient::Create( DBusClientImplementationType type, dbus::Bus* bus) { if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) - return new FlimflamProfileClientImpl(bus); + return new ShillProfileClientImpl(bus); DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); - return new FlimflamProfileClientStubImpl(); + return new ShillProfileClientStubImpl(); } } // namespace chromeos diff --git a/chromeos/dbus/flimflam_profile_client.h b/chromeos/dbus/shill_profile_client.h index 85f74a3..47e786a 100644 --- a/chromeos/dbus/flimflam_profile_client.h +++ b/chromeos/dbus/shill_profile_client.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_DBUS_FLIMFLAM_PROFILE_CLIENT_H_ -#define CHROMEOS_DBUS_FLIMFLAM_PROFILE_CLIENT_H_ +#ifndef CHROMEOS_DBUS_SHILL_PROFILE_CLIENT_H_ +#define CHROMEOS_DBUS_SHILL_PROFILE_CLIENT_H_ #include <string> @@ -11,7 +11,7 @@ #include "base/callback.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client_implementation_type.h" -#include "chromeos/dbus/flimflam_client_helper.h" +#include "chromeos/dbus/shill_client_helper.h" namespace base { @@ -29,19 +29,19 @@ class ObjectPath; namespace chromeos { -// FlimflamProfileClient is used to communicate with the Flimflam Profile +// ShillProfileClient is used to communicate with the Shill Profile // service. All methods should be called from the origin thread which // initializes the DBusThreadManager instance. -class CHROMEOS_EXPORT FlimflamProfileClient { +class CHROMEOS_EXPORT ShillProfileClient { public: - typedef FlimflamClientHelper::PropertyChangedHandler PropertyChangedHandler; - typedef FlimflamClientHelper::DictionaryValueCallback DictionaryValueCallback; + typedef ShillClientHelper::PropertyChangedHandler PropertyChangedHandler; + typedef ShillClientHelper::DictionaryValueCallback DictionaryValueCallback; - virtual ~FlimflamProfileClient(); + virtual ~ShillProfileClient(); // Factory function, creates a new instance which is owned by the caller. // For normal usage, access the singleton via DBusThreadManager::Get(). - static FlimflamProfileClient* Create(DBusClientImplementationType type, + static ShillProfileClient* Create(DBusClientImplementationType type, dbus::Bus* bus); // Sets PropertyChanged signal handler. @@ -72,12 +72,12 @@ class CHROMEOS_EXPORT FlimflamProfileClient { protected: // Create() should be used instead. - FlimflamProfileClient(); + ShillProfileClient(); private: - DISALLOW_COPY_AND_ASSIGN(FlimflamProfileClient); + DISALLOW_COPY_AND_ASSIGN(ShillProfileClient); }; } // namespace chromeos -#endif // CHROMEOS_DBUS_FLIMFLAM_PROFILE_CLIENT_H_ +#endif // CHROMEOS_DBUS_SHILL_PROFILE_CLIENT_H_ diff --git a/chromeos/dbus/flimflam_profile_client_unittest.cc b/chromeos/dbus/shill_profile_client_unittest.cc index e91d7e4..898a961 100644 --- a/chromeos/dbus/flimflam_profile_client_unittest.cc +++ b/chromeos/dbus/shill_profile_client_unittest.cc @@ -4,8 +4,8 @@ #include "base/bind.h" #include "base/values.h" -#include "chromeos/dbus/flimflam_client_unittest_base.h" -#include "chromeos/dbus/flimflam_profile_client.h" +#include "chromeos/dbus/shill_client_unittest_base.h" +#include "chromeos/dbus/shill_profile_client.h" #include "dbus/message.h" #include "dbus/object_path.h" #include "dbus/values_util.h" @@ -29,31 +29,31 @@ void AppendVariantOfArrayOfStrings(dbus::MessageWriter* writer, } // namespace -class FlimflamProfileClientTest : public FlimflamClientUnittestBase { +class ShillProfileClientTest : public ShillClientUnittestBase { public: - FlimflamProfileClientTest() - : FlimflamClientUnittestBase(flimflam::kFlimflamProfileInterface, + ShillProfileClientTest() + : ShillClientUnittestBase(flimflam::kFlimflamProfileInterface, dbus::ObjectPath(kDefaultProfilePath)) { } virtual void SetUp() { - FlimflamClientUnittestBase::SetUp(); + ShillClientUnittestBase::SetUp(); // Create a client with the mock bus. - client_.reset(FlimflamProfileClient::Create(REAL_DBUS_CLIENT_IMPLEMENTATION, + client_.reset(ShillProfileClient::Create(REAL_DBUS_CLIENT_IMPLEMENTATION, mock_bus_)); // Run the message loop to run the signal connection result callback. message_loop_.RunAllPending(); } virtual void TearDown() { - FlimflamClientUnittestBase::TearDown(); + ShillClientUnittestBase::TearDown(); } protected: - scoped_ptr<FlimflamProfileClient> client_; + scoped_ptr<ShillProfileClient> client_; }; -TEST_F(FlimflamProfileClientTest, PropertyChanged) { +TEST_F(ShillProfileClientTest, PropertyChanged) { // Create a signal. dbus::Signal signal(flimflam::kFlimflamProfileInterface, flimflam::kMonitorPropertyChanged); @@ -77,7 +77,7 @@ TEST_F(FlimflamProfileClientTest, PropertyChanged) { client_->ResetPropertyChangedHandler(dbus::ObjectPath(kDefaultProfilePath)); } -TEST_F(FlimflamProfileClientTest, GetProperties) { +TEST_F(ShillProfileClientTest, GetProperties) { // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); dbus::MessageWriter writer(response.get()); @@ -107,7 +107,7 @@ TEST_F(FlimflamProfileClientTest, GetProperties) { message_loop_.RunAllPending(); } -TEST_F(FlimflamProfileClientTest, GetEntry) { +TEST_F(ShillProfileClientTest, GetEntry) { // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); dbus::MessageWriter writer(response.get()); @@ -137,7 +137,7 @@ TEST_F(FlimflamProfileClientTest, GetEntry) { message_loop_.RunAllPending(); } -TEST_F(FlimflamProfileClientTest, DeleteEntry) { +TEST_F(ShillProfileClientTest, DeleteEntry) { // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); diff --git a/chromeos/dbus/flimflam_service_client.cc b/chromeos/dbus/shill_service_client.cc index 15a5b8a..91f2690 100644 --- a/chromeos/dbus/flimflam_service_client.cc +++ b/chromeos/dbus/shill_service_client.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chromeos/dbus/flimflam_service_client.h" +#include "chromeos/dbus/shill_service_client.h" #include "base/bind.h" #include "base/chromeos/chromeos_version.h" @@ -21,11 +21,11 @@ namespace { // Error callback for GetProperties. void OnGetPropertiesError( const dbus::ObjectPath& service_path, - const FlimflamServiceClient::DictionaryValueCallback& callback, + const ShillServiceClient::DictionaryValueCallback& callback, const std::string& error_name, const std::string& error_message) { const std::string log_string = - "Failed to call org.chromium.flimflam.Service.GetProperties for: " + + "Failed to call org.chromium.shill.Service.GetProperties for: " + service_path.value() + ": " + error_name + ": " + error_message; // Suppress ERROR log if error name is @@ -39,28 +39,28 @@ void OnGetPropertiesError( callback.Run(DBUS_METHOD_CALL_FAILURE, empty_dictionary); } -// The FlimflamServiceClient implementation. -class FlimflamServiceClientImpl : public FlimflamServiceClient { +// The ShillServiceClient implementation. +class ShillServiceClientImpl : public ShillServiceClient { public: - explicit FlimflamServiceClientImpl(dbus::Bus* bus) + explicit ShillServiceClientImpl(dbus::Bus* bus) : bus_(bus), helpers_deleter_(&helpers_) { } - // FlimflamServiceClient override. + // ShillServiceClient override. virtual void SetPropertyChangedHandler( const dbus::ObjectPath& service_path, const PropertyChangedHandler& handler) OVERRIDE { GetHelper(service_path)->SetPropertyChangedHandler(handler); } - // FlimflamServiceClient override. + // ShillServiceClient override. virtual void ResetPropertyChangedHandler( const dbus::ObjectPath& service_path) OVERRIDE { GetHelper(service_path)->ResetPropertyChangedHandler(); } - // FlimflamServiceClient override. + // ShillServiceClient override. virtual void GetProperties(const dbus::ObjectPath& service_path, const DictionaryValueCallback& callback) OVERRIDE { dbus::MethodCall method_call(flimflam::kFlimflamServiceInterface, @@ -71,7 +71,7 @@ class FlimflamServiceClientImpl : public FlimflamServiceClient { base::Bind(&OnGetPropertiesError, service_path, callback)); } - // FlimflamServiceClient override. + // ShillServiceClient override. virtual void SetProperty(const dbus::ObjectPath& service_path, const std::string& name, const base::Value& value, @@ -80,11 +80,11 @@ class FlimflamServiceClientImpl : public FlimflamServiceClient { flimflam::kSetPropertyFunction); dbus::MessageWriter writer(&method_call); writer.AppendString(name); - FlimflamClientHelper::AppendValueDataAsVariant(&writer, value); + ShillClientHelper::AppendValueDataAsVariant(&writer, value); GetHelper(service_path)->CallVoidMethod(&method_call, callback); } - // FlimflamServiceClient override. + // ShillServiceClient override. virtual void ClearProperty(const dbus::ObjectPath& service_path, const std::string& name, const VoidDBusMethodCallback& callback) OVERRIDE { @@ -95,7 +95,7 @@ class FlimflamServiceClientImpl : public FlimflamServiceClient { GetHelper(service_path)->CallVoidMethod(&method_call, callback); } - // FlimflamServiceClient override. + // ShillServiceClient override. virtual void Connect(const dbus::ObjectPath& service_path, const base::Closure& callback, const ErrorCallback& error_callback) OVERRIDE { @@ -105,7 +105,7 @@ class FlimflamServiceClientImpl : public FlimflamServiceClient { &method_call, callback, error_callback); } - // FlimflamServiceClient override. + // ShillServiceClient override. virtual void Disconnect(const dbus::ObjectPath& service_path, const VoidDBusMethodCallback& callback) OVERRIDE { dbus::MethodCall method_call(flimflam::kFlimflamServiceInterface, @@ -113,7 +113,7 @@ class FlimflamServiceClientImpl : public FlimflamServiceClient { GetHelper(service_path)->CallVoidMethod(&method_call, callback); } - // FlimflamServiceClient override. + // ShillServiceClient override. virtual void Remove(const dbus::ObjectPath& service_path, const VoidDBusMethodCallback& callback) OVERRIDE { dbus::MethodCall method_call(flimflam::kFlimflamServiceInterface, @@ -121,7 +121,7 @@ class FlimflamServiceClientImpl : public FlimflamServiceClient { GetHelper(service_path)->CallVoidMethod(&method_call, callback); } - // FlimflamServiceClient override. + // ShillServiceClient override. virtual void ActivateCellularModem( const dbus::ObjectPath& service_path, const std::string& carrier, @@ -133,7 +133,7 @@ class FlimflamServiceClientImpl : public FlimflamServiceClient { GetHelper(service_path)->CallVoidMethod(&method_call, callback); } - // FlimflamServiceClient override. + // ShillServiceClient override. virtual bool CallActivateCellularModemAndBlock( const dbus::ObjectPath& service_path, const std::string& carrier) OVERRIDE { @@ -145,10 +145,10 @@ class FlimflamServiceClientImpl : public FlimflamServiceClient { } private: - typedef std::map<std::string, FlimflamClientHelper*> HelperMap; + typedef std::map<std::string, ShillClientHelper*> HelperMap; - // Returns the corresponding FlimflamClientHelper for the profile. - FlimflamClientHelper* GetHelper(const dbus::ObjectPath& service_path) { + // Returns the corresponding ShillClientHelper for the profile. + ShillClientHelper* GetHelper(const dbus::ObjectPath& service_path) { HelperMap::iterator it = helpers_.find(service_path.value()); if (it != helpers_.end()) return it->second; @@ -156,7 +156,7 @@ class FlimflamServiceClientImpl : public FlimflamServiceClient { // There is no helper for the profile, create it. dbus::ObjectProxy* object_proxy = bus_->GetObjectProxy(flimflam::kFlimflamServiceName, service_path); - FlimflamClientHelper* helper = new FlimflamClientHelper(bus_, object_proxy); + ShillClientHelper* helper = new ShillClientHelper(bus_, object_proxy); helper->MonitorPropertyChanged(flimflam::kFlimflamServiceInterface); helpers_.insert(HelperMap::value_type(service_path.value(), helper)); return helper; @@ -166,36 +166,36 @@ class FlimflamServiceClientImpl : public FlimflamServiceClient { HelperMap helpers_; STLValueDeleter<HelperMap> helpers_deleter_; - DISALLOW_COPY_AND_ASSIGN(FlimflamServiceClientImpl); + DISALLOW_COPY_AND_ASSIGN(ShillServiceClientImpl); }; -// A stub implementation of FlimflamServiceClient. -class FlimflamServiceClientStubImpl : public FlimflamServiceClient { +// A stub implementation of ShillServiceClient. +class ShillServiceClientStubImpl : public ShillServiceClient { public: - FlimflamServiceClientStubImpl() : weak_ptr_factory_(this) {} + ShillServiceClientStubImpl() : weak_ptr_factory_(this) {} - virtual ~FlimflamServiceClientStubImpl() {} + virtual ~ShillServiceClientStubImpl() {} - // FlimflamServiceClient override. + // ShillServiceClient override. virtual void SetPropertyChangedHandler( const dbus::ObjectPath& service_path, const PropertyChangedHandler& handler) OVERRIDE {} - // FlimflamServiceClient override. + // ShillServiceClient override. virtual void ResetPropertyChangedHandler( const dbus::ObjectPath& service_path) OVERRIDE {} - // FlimflamServiceClient override. + // ShillServiceClient override. virtual void GetProperties(const dbus::ObjectPath& service_path, const DictionaryValueCallback& callback) OVERRIDE { MessageLoop::current()->PostTask( FROM_HERE, - base::Bind(&FlimflamServiceClientStubImpl::PassEmptyDictionaryValue, + base::Bind(&ShillServiceClientStubImpl::PassEmptyDictionaryValue, weak_ptr_factory_.GetWeakPtr(), callback)); } - // FlimflamServiceClient override. + // ShillServiceClient override. virtual void SetProperty(const dbus::ObjectPath& service_path, const std::string& name, const base::Value& value, @@ -203,33 +203,33 @@ class FlimflamServiceClientStubImpl : public FlimflamServiceClient { PostSuccessVoidCallback(callback); } - // FlimflamServiceClient override. + // ShillServiceClient override. virtual void ClearProperty(const dbus::ObjectPath& service_path, const std::string& name, const VoidDBusMethodCallback& callback) OVERRIDE { PostSuccessVoidCallback(callback); } - // FlimflamServiceClient override. + // ShillServiceClient override. virtual void Connect(const dbus::ObjectPath& service_path, const base::Closure& callback, const ErrorCallback& error_callback) OVERRIDE { MessageLoop::current()->PostTask(FROM_HERE, callback); } - // FlimflamServiceClient override. + // ShillServiceClient override. virtual void Disconnect(const dbus::ObjectPath& service_path, const VoidDBusMethodCallback& callback) OVERRIDE { PostSuccessVoidCallback(callback); } - // FlimflamServiceClient override. + // ShillServiceClient override. virtual void Remove(const dbus::ObjectPath& service_path, const VoidDBusMethodCallback& callback) OVERRIDE { PostSuccessVoidCallback(callback); } - // FlimflamServiceClient override. + // ShillServiceClient override. virtual void ActivateCellularModem( const dbus::ObjectPath& service_path, const std::string& carrier, @@ -237,7 +237,7 @@ class FlimflamServiceClientStubImpl : public FlimflamServiceClient { PostSuccessVoidCallback(callback); } - // FlimflamServiceClient override. + // ShillServiceClient override. virtual bool CallActivateCellularModemAndBlock( const dbus::ObjectPath& service_path, const std::string& carrier) OVERRIDE { @@ -259,25 +259,25 @@ class FlimflamServiceClientStubImpl : public FlimflamServiceClient { // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<FlimflamServiceClientStubImpl> weak_ptr_factory_; + base::WeakPtrFactory<ShillServiceClientStubImpl> weak_ptr_factory_; - DISALLOW_COPY_AND_ASSIGN(FlimflamServiceClientStubImpl); + DISALLOW_COPY_AND_ASSIGN(ShillServiceClientStubImpl); }; } // namespace -FlimflamServiceClient::FlimflamServiceClient() {} +ShillServiceClient::ShillServiceClient() {} -FlimflamServiceClient::~FlimflamServiceClient() {} +ShillServiceClient::~ShillServiceClient() {} // static -FlimflamServiceClient* FlimflamServiceClient::Create( +ShillServiceClient* ShillServiceClient::Create( DBusClientImplementationType type, dbus::Bus* bus) { if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) - return new FlimflamServiceClientImpl(bus); + return new ShillServiceClientImpl(bus); DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); - return new FlimflamServiceClientStubImpl(); + return new ShillServiceClientStubImpl(); } } // namespace chromeos diff --git a/chromeos/dbus/flimflam_service_client.h b/chromeos/dbus/shill_service_client.h index d876b42..11ae609 100644 --- a/chromeos/dbus/flimflam_service_client.h +++ b/chromeos/dbus/shill_service_client.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_DBUS_FLIMFLAM_SERVICE_CLIENT_H_ -#define CHROMEOS_DBUS_FLIMFLAM_SERVICE_CLIENT_H_ +#ifndef CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_H_ +#define CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_H_ #include <string> @@ -11,7 +11,7 @@ #include "base/callback.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client_implementation_type.h" -#include "chromeos/dbus/flimflam_client_helper.h" +#include "chromeos/dbus/shill_client_helper.h" namespace base { @@ -29,21 +29,21 @@ class ObjectPath; namespace chromeos { -// FlimflamServiceClient is used to communicate with the Flimflam Service +// ShillServiceClient is used to communicate with the Shill Service // service. // All methods should be called from the origin thread which initializes the // DBusThreadManager instance. -class CHROMEOS_EXPORT FlimflamServiceClient { +class CHROMEOS_EXPORT ShillServiceClient { public: - typedef FlimflamClientHelper::PropertyChangedHandler PropertyChangedHandler; - typedef FlimflamClientHelper::DictionaryValueCallback DictionaryValueCallback; - typedef FlimflamClientHelper::ErrorCallback ErrorCallback; + typedef ShillClientHelper::PropertyChangedHandler PropertyChangedHandler; + typedef ShillClientHelper::DictionaryValueCallback DictionaryValueCallback; + typedef ShillClientHelper::ErrorCallback ErrorCallback; - virtual ~FlimflamServiceClient(); + virtual ~ShillServiceClient(); // Factory function, creates a new instance which is owned by the caller. // For normal usage, access the singleton via DBusThreadManager::Get(). - static FlimflamServiceClient* Create(DBusClientImplementationType type, + static ShillServiceClient* Create(DBusClientImplementationType type, dbus::Bus* bus); // Sets PropertyChanged signal handler. @@ -107,12 +107,12 @@ class CHROMEOS_EXPORT FlimflamServiceClient { protected: // Create() should be used instead. - FlimflamServiceClient(); + ShillServiceClient(); private: - DISALLOW_COPY_AND_ASSIGN(FlimflamServiceClient); + DISALLOW_COPY_AND_ASSIGN(ShillServiceClient); }; } // namespace chromeos -#endif // CHROMEOS_DBUS_FLIMFLAM_SERVICE_CLIENT_H_ +#endif // CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_H_ diff --git a/chromeos/dbus/flimflam_service_client_unittest.cc b/chromeos/dbus/shill_service_client_unittest.cc index fba750a..20b603c 100644 --- a/chromeos/dbus/flimflam_service_client_unittest.cc +++ b/chromeos/dbus/shill_service_client_unittest.cc @@ -4,8 +4,8 @@ #include "base/bind.h" #include "base/values.h" -#include "chromeos/dbus/flimflam_client_unittest_base.h" -#include "chromeos/dbus/flimflam_service_client.h" +#include "chromeos/dbus/shill_client_unittest_base.h" +#include "chromeos/dbus/shill_service_client.h" #include "dbus/message.h" #include "dbus/object_path.h" #include "dbus/values_util.h" @@ -20,31 +20,31 @@ const char kExampleServicePath[] = "/foo/bar"; } // namespace -class FlimflamServiceClientTest : public FlimflamClientUnittestBase { +class ShillServiceClientTest : public ShillClientUnittestBase { public: - FlimflamServiceClientTest() - : FlimflamClientUnittestBase(flimflam::kFlimflamServiceInterface, + ShillServiceClientTest() + : ShillClientUnittestBase(flimflam::kFlimflamServiceInterface, dbus::ObjectPath(kExampleServicePath)) { } virtual void SetUp() { - FlimflamClientUnittestBase::SetUp(); + ShillClientUnittestBase::SetUp(); // Create a client with the mock bus. - client_.reset(FlimflamServiceClient::Create(REAL_DBUS_CLIENT_IMPLEMENTATION, + client_.reset(ShillServiceClient::Create(REAL_DBUS_CLIENT_IMPLEMENTATION, mock_bus_)); // Run the message loop to run the signal connection result callback. message_loop_.RunAllPending(); } virtual void TearDown() { - FlimflamClientUnittestBase::TearDown(); + ShillClientUnittestBase::TearDown(); } protected: - scoped_ptr<FlimflamServiceClient> client_; + scoped_ptr<ShillServiceClient> client_; }; -TEST_F(FlimflamServiceClientTest, PropertyChanged) { +TEST_F(ShillServiceClientTest, PropertyChanged) { const int kValue = 42; // Create a signal. dbus::Signal signal(flimflam::kFlimflamServiceInterface, @@ -67,7 +67,7 @@ TEST_F(FlimflamServiceClientTest, PropertyChanged) { client_->ResetPropertyChangedHandler(dbus::ObjectPath(kExampleServicePath)); } -TEST_F(FlimflamServiceClientTest, GetProperties) { +TEST_F(ShillServiceClientTest, GetProperties) { const int kValue = 42; // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); @@ -95,7 +95,7 @@ TEST_F(FlimflamServiceClientTest, GetProperties) { message_loop_.RunAllPending(); } -TEST_F(FlimflamServiceClientTest, SetProperty) { +TEST_F(ShillServiceClientTest, SetProperty) { const char kValue[] = "passphrase"; // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); @@ -116,7 +116,7 @@ TEST_F(FlimflamServiceClientTest, SetProperty) { message_loop_.RunAllPending(); } -TEST_F(FlimflamServiceClientTest, ClearProperty) { +TEST_F(ShillServiceClientTest, ClearProperty) { // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); @@ -133,7 +133,7 @@ TEST_F(FlimflamServiceClientTest, ClearProperty) { message_loop_.RunAllPending(); } -TEST_F(FlimflamServiceClientTest, Connect) { +TEST_F(ShillServiceClientTest, Connect) { // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); @@ -153,7 +153,7 @@ TEST_F(FlimflamServiceClientTest, Connect) { message_loop_.RunAllPending(); } -TEST_F(FlimflamServiceClientTest, Disconnect) { +TEST_F(ShillServiceClientTest, Disconnect) { // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); @@ -168,7 +168,7 @@ TEST_F(FlimflamServiceClientTest, Disconnect) { message_loop_.RunAllPending(); } -TEST_F(FlimflamServiceClientTest, Remove) { +TEST_F(ShillServiceClientTest, Remove) { // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); @@ -183,7 +183,7 @@ TEST_F(FlimflamServiceClientTest, Remove) { message_loop_.RunAllPending(); } -TEST_F(FlimflamServiceClientTest, ActivateCellularModem) { +TEST_F(ShillServiceClientTest, ActivateCellularModem) { const char kCarrier[] = "carrier"; // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); @@ -200,7 +200,7 @@ TEST_F(FlimflamServiceClientTest, ActivateCellularModem) { message_loop_.RunAllPending(); } -TEST_F(FlimflamServiceClientTest, CallActivateCellularModemAndBlock) { +TEST_F(ShillServiceClientTest, CallActivateCellularModemAndBlock) { const char kCarrier[] = "carrier"; // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); diff --git a/chromeos/network/network_sms_handler.cc b/chromeos/network/network_sms_handler.cc index 050465d..7734d7e 100644 --- a/chromeos/network/network_sms_handler.cc +++ b/chromeos/network/network_sms_handler.cc @@ -11,8 +11,8 @@ #include "base/bind.h" #include "chromeos/dbus/dbus_thread_manager.h" -#include "chromeos/dbus/flimflam_device_client.h" -#include "chromeos/dbus/flimflam_manager_client.h" +#include "chromeos/dbus/shill_device_client.h" +#include "chromeos/dbus/shill_manager_client.h" #include "chromeos/dbus/gsm_sms_client.h" #include "chromeos/dbus/modem_messaging_client.h" #include "chromeos/dbus/sms_client.h" @@ -339,7 +339,7 @@ void NetworkSmsHandler::Init() { // See: crbug.com/133416. // Request network manager properties so that we can get the list of devices. - DBusThreadManager::Get()->GetFlimflamManagerClient()->GetProperties( + DBusThreadManager::Get()->GetShillManagerClient()->GetProperties( base::Bind(&NetworkSmsHandler::ManagerPropertiesCallback, weak_ptr_factory_.GetWeakPtr())); } @@ -386,7 +386,7 @@ void NetworkSmsHandler::ManagerPropertiesCallback( if (!device_path.empty()) { // Request device properties. VLOG(1) << "GetDeviceProperties: " << device_path; - DBusThreadManager::Get()->GetFlimflamDeviceClient()->GetProperties( + DBusThreadManager::Get()->GetShillDeviceClient()->GetProperties( dbus::ObjectPath(device_path), base::Bind(&NetworkSmsHandler::DevicePropertiesCallback, weak_ptr_factory_.GetWeakPtr(), diff --git a/chromeos/network/network_sms_handler_unittest.cc b/chromeos/network/network_sms_handler_unittest.cc index f3b72ff..a201864 100644 --- a/chromeos/network/network_sms_handler_unittest.cc +++ b/chromeos/network/network_sms_handler_unittest.cc @@ -70,8 +70,8 @@ TEST_F(NetworkSmsHandlerTest, SmsHandlerDbusStub) { CommandLine* command_line = CommandLine::ForCurrentProcess(); command_line->AppendSwitch(chromeos::switches::kSmsTestMessages); - // This relies on the stub dbus implementations for FlimflamManagerClient, - // FlimflamDeviceClient, GsmSMSClient, ModemMessagingClient and SMSClient. + // This relies on the stub dbus implementations for ShillManagerClient, + // ShillDeviceClient, GsmSMSClient, ModemMessagingClient and SMSClient. // Initialize a sms handler. The stub dbus clients will not send the // first test message until RequestUpdate has been called. scoped_ptr<NetworkSmsHandler> sms_handler(new NetworkSmsHandler()); |