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/ipconfig.h b/ipconfig.h
index b1815ed..c29971a 100644
--- a/ipconfig.h
+++ b/ipconfig.h
@@ -13,8 +13,6 @@
 #include <base/memory/scoped_ptr.h>
 #include <gtest/gtest_prod.h>  // for FRIEND_TEST
 
-#include "shill/device.h"
-
 namespace shill {
 
 class IPConfig;
@@ -38,11 +36,10 @@
     int mtu;
   };
 
-  explicit IPConfig(DeviceConstRefPtr device);
+  explicit IPConfig(const std::string &device_name);
   virtual ~IPConfig();
 
-  DeviceConstRefPtr device() const { return device_; }
-  const std::string &GetDeviceName() const;
+  const std::string &device_name() const { return device_name_; }
 
   // Registers a callback that's executed every time the configuration
   // properties change. Takes ownership of |callback|. Pass NULL to remove a
@@ -70,7 +67,7 @@
   FRIEND_TEST(IPConfigTest, UpdateCallback);
   FRIEND_TEST(IPConfigTest, UpdateProperties);
 
-  DeviceConstRefPtr device_;
+  const std::string device_name_;
   Properties properties_;
   scoped_ptr<Callback2<IPConfigRefPtr, bool>::Type> update_callback_;