shill: Start a mockable GLib interface.

Use the interface to test DHCPConfig::Start.

BUG=chromium-os:16319,chromium-os:16013
TEST=unit test, tested on device

Change-Id: Ice6c65b0cc2ac2dd738cb6aacb426703cce48a3f
Reviewed-on: http://gerrit.chromium.org/gerrit/2356
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
diff --git a/dhcp_config.h b/dhcp_config.h
index a70d634..0e25873 100644
--- a/dhcp_config.h
+++ b/dhcp_config.h
@@ -17,6 +17,7 @@
 class DHCPConfig;
 class DHCPProvider;
 class DHCPProxyInterface;
+class GLibInterface;
 
 typedef scoped_refptr<DHCPConfig> DHCPConfigRefPtr;
 
@@ -33,7 +34,9 @@
   static const char kConfigurationKeyRouters[];
   static const char kConfigurationKeySubnetCIDR[];
 
-  DHCPConfig(DHCPProvider *provider, DeviceConstRefPtr device);
+  DHCPConfig(DHCPProvider *provider,
+             DeviceConstRefPtr device,
+             GLibInterface *glib);
   virtual ~DHCPConfig();
 
   // Inherited from IPConfig.
@@ -51,6 +54,7 @@
  private:
   FRIEND_TEST(DHCPConfigTest, GetIPv4AddressString);
   FRIEND_TEST(DHCPConfigTest, ParseConfiguration);
+  FRIEND_TEST(DHCPConfigTest, Start);
 
   static const char kDHCPCDPath[];
 
@@ -75,6 +79,8 @@
   // The proxy for communicating with the DHCP client.
   scoped_ptr<DHCPProxyInterface> proxy_;
 
+  GLibInterface *glib_;
+
   DISALLOW_COPY_AND_ASSIGN(DHCPConfig);
 };