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

Unified Diff: chrome/browser/chromeos/cros/cros_network_functions.cc

Issue 10915106: Renaming instances of "flimflam" with "shill", now that we're only (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Upload after merge Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/cros/cros_network_functions.cc
diff --git a/chrome/browser/chromeos/cros/cros_network_functions.cc b/chrome/browser/chromeos/cros/cros_network_functions.cc
index 08f6ac05170663895b091b537e5d56f993b2d48b..10139fabe604f1e3a8a7da6f33358479df0a365c 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));
}
« no previous file with comments | « chrome/browser/chromeos/cros/cros_network_functions.h ('k') | chrome/browser/chromeos/cros/cros_network_functions_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698