summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/chromeos/cros/cros_network_functions.cc43
-rw-r--r--chrome/browser/chromeos/cros/cros_network_functions.h6
-rw-r--r--chrome/browser/chromeos/cros/cros_network_functions_unittest.cc17
-rw-r--r--chromeos/dbus/shill_client_helper.cc15
-rw-r--r--chromeos/dbus/shill_client_helper.h3
-rw-r--r--chromeos/dbus/shill_device_client.cc16
-rw-r--r--chromeos/dbus/shill_device_client.h10
-rw-r--r--chromeos/dbus/shill_device_client_unittest.cc17
-rw-r--r--chromeos/dbus/shill_ipconfig_client.cc14
-rw-r--r--chromeos/dbus/shill_ipconfig_client.h7
-rw-r--r--chromeos/dbus/shill_ipconfig_client_unittest.cc13
11 files changed, 0 insertions, 161 deletions
diff --git a/chrome/browser/chromeos/cros/cros_network_functions.cc b/chrome/browser/chromeos/cros/cros_network_functions.cc
index aff8e27..60d129e 100644
--- a/chrome/browser/chromeos/cros/cros_network_functions.cc
+++ b/chrome/browser/chromeos/cros/cros_network_functions.cc
@@ -692,49 +692,6 @@ bool CrosListIPConfigs(const std::string& device_path,
return true;
}
-bool CrosAddIPConfig(const std::string& device_path, IPConfigType type) {
- std::string type_str;
- switch (type) {
- case IPCONFIG_TYPE_IPV4:
- type_str = flimflam::kTypeIPv4;
- break;
- case IPCONFIG_TYPE_IPV6:
- type_str = flimflam::kTypeIPv6;
- break;
- case IPCONFIG_TYPE_DHCP:
- type_str = flimflam::kTypeDHCP;
- break;
- case IPCONFIG_TYPE_BOOTP:
- type_str = flimflam::kTypeBOOTP;
- break;
- case IPCONFIG_TYPE_ZEROCONF:
- type_str = flimflam::kTypeZeroConf;
- break;
- case IPCONFIG_TYPE_DHCP6:
- type_str = flimflam::kTypeDHCP6;
- break;
- case IPCONFIG_TYPE_PPP:
- type_str = flimflam::kTypePPP;
- break;
- default:
- return false;
- };
- const dbus::ObjectPath result =
- DBusThreadManager::Get()->GetShillDeviceClient()->
- CallAddIPConfigAndBlock(dbus::ObjectPath(device_path), type_str);
- if (result.value().empty()) {
- LOG(ERROR) << "Add IPConfig failed for device path " << device_path
- << " and type " << type_str;
- return false;
- }
- return true;
-}
-
-bool CrosRemoveIPConfig(const std::string& ipconfig_path) {
- return DBusThreadManager::Get()->GetShillIPConfigClient()->
- CallRemoveAndBlock(dbus::ObjectPath(ipconfig_path));
-}
-
void CrosRequestIPConfigRefresh(const std::string& ipconfig_path) {
DBusThreadManager::Get()->GetShillIPConfigClient()->Refresh(
dbus::ObjectPath(ipconfig_path),
diff --git a/chrome/browser/chromeos/cros/cros_network_functions.h b/chrome/browser/chromeos/cros/cros_network_functions.h
index a850d512..7543e9a 100644
--- a/chrome/browser/chromeos/cros/cros_network_functions.h
+++ b/chrome/browser/chromeos/cros/cros_network_functions.h
@@ -272,12 +272,6 @@ bool CrosListIPConfigs(const std::string& device_path,
std::vector<std::string>* ipconfig_paths,
std::string* hardware_address);
-// Adds a IPConfig of the given type to the device
-bool CrosAddIPConfig(const std::string& device_path, IPConfigType type);
-
-// Removes an existing IP Config
-bool CrosRemoveIPConfig(const std::string& ipconfig_path);
-
// Refreshes the IP config |ipconfig_path| to pick up changes in
// configuration, and renew the DHCP lease, if any.
void CrosRequestIPConfigRefresh(const std::string& ipconfig_path);
diff --git a/chrome/browser/chromeos/cros/cros_network_functions_unittest.cc b/chrome/browser/chromeos/cros/cros_network_functions_unittest.cc
index 8ce527c..ea2f1dc 100644
--- a/chrome/browser/chromeos/cros/cros_network_functions_unittest.cc
+++ b/chrome/browser/chromeos/cros/cros_network_functions_unittest.cc
@@ -985,23 +985,6 @@ TEST_F(CrosNetworkFunctionsTest, CrosListIPConfigs) {
EXPECT_EQ(ipconfig_path, result_ipconfig_paths[0]);
}
-TEST_F(CrosNetworkFunctionsTest, CrosAddIPConfig) {
- const std::string device_path = "/device/path";
- const dbus::ObjectPath result_path("/result/path");
- EXPECT_CALL(*mock_device_client_,
- CallAddIPConfigAndBlock(dbus::ObjectPath(device_path),
- flimflam::kTypeDHCP))
- .WillOnce(Return(result_path));
- EXPECT_TRUE(CrosAddIPConfig(device_path, IPCONFIG_TYPE_DHCP));
-}
-
-TEST_F(CrosNetworkFunctionsTest, CrosRemoveIPConfig) {
- const std::string path = "/path";
- EXPECT_CALL(*mock_ipconfig_client_,
- CallRemoveAndBlock(dbus::ObjectPath(path))).Times(1);
- CrosRemoveIPConfig(path);
-}
-
TEST_F(CrosNetworkFunctionsTest, CrosGetWifiAccessPoints) {
const std::string device_path = "/device/path";
base::ListValue* devices = new base::ListValue;
diff --git a/chromeos/dbus/shill_client_helper.cc b/chromeos/dbus/shill_client_helper.cc
index 497e0fd..c2c0935 100644
--- a/chromeos/dbus/shill_client_helper.cc
+++ b/chromeos/dbus/shill_client_helper.cc
@@ -150,21 +150,6 @@ bool ShillClientHelper::CallVoidMethodAndBlock(
return true;
}
-dbus::ObjectPath ShillClientHelper::CallObjectPathMethodAndBlock(
- dbus::MethodCall* method_call) {
- scoped_ptr<dbus::Response> response(
- blocking_method_caller_.CallMethodAndBlock(method_call));
- if (!response.get())
- return dbus::ObjectPath();
-
- dbus::MessageReader reader(response.get());
- dbus::ObjectPath result;
- if (!reader.PopObjectPath(&result))
- return dbus::ObjectPath();
-
- return result;
-}
-
base::DictionaryValue* ShillClientHelper::CallDictionaryValueMethodAndBlock(
dbus::MethodCall* method_call) {
scoped_ptr<dbus::Response> response(
diff --git a/chromeos/dbus/shill_client_helper.h b/chromeos/dbus/shill_client_helper.h
index 1ad3b86..a049b7d 100644
--- a/chromeos/dbus/shill_client_helper.h
+++ b/chromeos/dbus/shill_client_helper.h
@@ -113,9 +113,6 @@ class ShillClientHelper {
// DEPRECATED DO NOT USE: Calls a method without results.
bool CallVoidMethodAndBlock(dbus::MethodCall* method_call);
- // DEPRECATED DO NOT USE: Calls a method with an object path result.
- dbus::ObjectPath CallObjectPathMethodAndBlock(dbus::MethodCall* method_call);
-
// DEPRECATED DO NOT USE: Calls a method with a dictionary value result.
// The caller is responsible to delete the result.
// This method returns NULL when method call fails.
diff --git a/chromeos/dbus/shill_device_client.cc b/chromeos/dbus/shill_device_client.cc
index 077c3fb..2f23db7 100644
--- a/chromeos/dbus/shill_device_client.cc
+++ b/chromeos/dbus/shill_device_client.cc
@@ -100,16 +100,6 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
GetHelper(device_path)->CallObjectPathMethod(&method_call, callback);
}
- virtual dbus::ObjectPath CallAddIPConfigAndBlock(
- const dbus::ObjectPath& device_path,
- const std::string& method) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamDeviceInterface,
- flimflam::kAddIPConfigFunction);
- dbus::MessageWriter writer(&method_call);
- writer.AppendString(method);
- return GetHelper(device_path)->CallObjectPathMethodAndBlock(&method_call);
- }
-
virtual void RequirePin(const dbus::ObjectPath& device_path,
const std::string& pin,
bool require,
@@ -312,12 +302,6 @@ class ShillDeviceClientStubImpl : public ShillDeviceClient,
dbus::ObjectPath()));
}
- virtual dbus::ObjectPath CallAddIPConfigAndBlock(
- const dbus::ObjectPath& device_path,
- const std::string& method) OVERRIDE {
- return dbus::ObjectPath();
- }
-
virtual void RequirePin(const dbus::ObjectPath& device_path,
const std::string& pin,
bool require,
diff --git a/chromeos/dbus/shill_device_client.h b/chromeos/dbus/shill_device_client.h
index f016430..7eb415e 100644
--- a/chromeos/dbus/shill_device_client.h
+++ b/chromeos/dbus/shill_device_client.h
@@ -111,16 +111,6 @@ class CHROMEOS_EXPORT ShillDeviceClient {
const std::string& method,
const ObjectPathDBusMethodCallback& callback) = 0;
- // DEPRECATED DO NOT USE: Calls AddIPConfig method and blocks until the method
- // call finishes.
- // This method returns an empty path when method call fails.
- //
- // TODO(hashimoto): Refactor CrosAddIPConfig and remove this method.
- // crosbug.com/29902
- virtual dbus::ObjectPath CallAddIPConfigAndBlock(
- const dbus::ObjectPath& device_path,
- const std::string& method) = 0;
-
// Calls the RequirePin method.
// |callback| is called after the method call finishes.
virtual void RequirePin(const dbus::ObjectPath& device_path,
diff --git a/chromeos/dbus/shill_device_client_unittest.cc b/chromeos/dbus/shill_device_client_unittest.cc
index 1bd5c52..2a40a1f 100644
--- a/chromeos/dbus/shill_device_client_unittest.cc
+++ b/chromeos/dbus/shill_device_client_unittest.cc
@@ -246,23 +246,6 @@ TEST_F(ShillDeviceClientTest, AddIPConfig) {
message_loop_.RunUntilIdle();
}
-TEST_F(ShillDeviceClientTest, CallAddIPConfigAndBlock) {
- const dbus::ObjectPath expected_result("/result/path");
- // Create response.
- scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
- dbus::MessageWriter writer(response.get());
- writer.AppendObjectPath(expected_result);
-
- // Set expectations.
- PrepareForMethodCall(flimflam::kAddIPConfigFunction,
- base::Bind(&ExpectStringArgument, flimflam::kTypeDHCP),
- response.get());
- // Call method.
- const dbus::ObjectPath result = client_->CallAddIPConfigAndBlock(
- dbus::ObjectPath(kExampleDevicePath), flimflam::kTypeDHCP);
- EXPECT_EQ(expected_result, result);
-}
-
TEST_F(ShillDeviceClientTest, RequirePin) {
const char kPin[] = "123456";
const bool kRequired = true;
diff --git a/chromeos/dbus/shill_ipconfig_client.cc b/chromeos/dbus/shill_ipconfig_client.cc
index 7381a2b7..79e81f5 100644
--- a/chromeos/dbus/shill_ipconfig_client.cc
+++ b/chromeos/dbus/shill_ipconfig_client.cc
@@ -53,8 +53,6 @@ class ShillIPConfigClientImpl : public ShillIPConfigClient {
const VoidDBusMethodCallback& callback) OVERRIDE;
virtual void Remove(const dbus::ObjectPath& ipconfig_path,
const VoidDBusMethodCallback& callback) OVERRIDE;
- virtual bool CallRemoveAndBlock(
- const dbus::ObjectPath& ipconfig_path) OVERRIDE;
private:
typedef std::map<std::string, ShillClientHelper*> HelperMap;
@@ -171,13 +169,6 @@ void ShillIPConfigClientImpl::Remove(
GetHelper(ipconfig_path)->CallVoidMethod(&method_call, callback);
}
-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 ShillIPConfigClient.
class ShillIPConfigClientStubImpl : public ShillIPConfigClient {
public:
@@ -231,11 +222,6 @@ class ShillIPConfigClientStubImpl : public ShillIPConfigClient {
FROM_HERE, base::Bind(callback, DBUS_METHOD_CALL_SUCCESS));
}
- virtual bool CallRemoveAndBlock(
- const dbus::ObjectPath& ipconfig_path) OVERRIDE {
- return true;
- }
-
private:
// Runs callback with |properties_|.
void PassProperties(const DictionaryValueCallback& callback) const {
diff --git a/chromeos/dbus/shill_ipconfig_client.h b/chromeos/dbus/shill_ipconfig_client.h
index b1df316..b311c56 100644
--- a/chromeos/dbus/shill_ipconfig_client.h
+++ b/chromeos/dbus/shill_ipconfig_client.h
@@ -92,13 +92,6 @@ class CHROMEOS_EXPORT ShillIPConfigClient {
virtual void Remove(const dbus::ObjectPath& ipconfig_path,
const VoidDBusMethodCallback& callback) = 0;
- // DEPRECATED DO NOT USE: Calls Remove method and blocks until the method call
- // finishes.
- //
- // TODO(hashimoto): Refactor CrosRemoveIPConfig to remove this method.
- // crosbug.com/29902
- virtual bool CallRemoveAndBlock(const dbus::ObjectPath& ipconfig_path) = 0;
-
protected:
// Create() should be used instead.
ShillIPConfigClient();
diff --git a/chromeos/dbus/shill_ipconfig_client_unittest.cc b/chromeos/dbus/shill_ipconfig_client_unittest.cc
index e2bd7c3..bb734fd 100644
--- a/chromeos/dbus/shill_ipconfig_client_unittest.cc
+++ b/chromeos/dbus/shill_ipconfig_client_unittest.cc
@@ -216,17 +216,4 @@ TEST_F(ShillIPConfigClientTest, Remove) {
message_loop_.RunUntilIdle();
}
-TEST_F(ShillIPConfigClientTest, CallRemoveAndBlock) {
- // Create response.
- scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
-
- // Set expectations.
- PrepareForMethodCall(flimflam::kRemoveConfigFunction,
- base::Bind(&ExpectNoArgument),
- response.get());
- // Call method.
- EXPECT_TRUE(client_->CallRemoveAndBlock(
- dbus::ObjectPath(kExampleIPConfigPath)));
-}
-
} // namespace chromeos