shill: Remove IPConfig/DHCPConfig's dependency on Device.
They care about the device name only so use that instead. This eliminates the
need for some circular dependencies.
BUG=chromium-os:16796
TEST=unit tests
Change-Id: Ibfa4eacac2b04b9311abfb76972aaf032c6013aa
Reviewed-on: http://gerrit.chromium.org/gerrit/2943
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Darin Petkov <petkov@chromium.org>
diff --git a/dhcp_provider.cc b/dhcp_provider.cc
index 035484e..f9b3e57 100644
--- a/dhcp_provider.cc
+++ b/dhcp_provider.cc
@@ -8,6 +8,8 @@
#include "shill/dhcpcd_proxy.h"
+using std::string;
+
namespace shill {
DHCPProvider::DHCPProvider() : glib_(NULL) {
@@ -29,13 +31,13 @@
glib_ = glib;
}
-DHCPConfigRefPtr DHCPProvider::CreateConfig(DeviceConstRefPtr device) {
- VLOG(2) << __func__;
- return new DHCPConfig(this, device, glib_);
+DHCPConfigRefPtr DHCPProvider::CreateConfig(const string &device_name) {
+ VLOG(2) << __func__ << " device: " << device_name;
+ return new DHCPConfig(this, device_name, glib_);
}
DHCPConfigRefPtr DHCPProvider::GetConfig(int pid) {
- VLOG(2) << __func__;
+ VLOG(2) << __func__ << " pid: " << pid;
PIDConfigMap::const_iterator it = configs_.find(pid);
if (it == configs_.end()) {
return NULL;