[shill] Start replacing bare pointers with scoped_refptrs where appropriate
BUG=chromium-os:16259
TEST=unit tests
Change-Id: I5e1531b726bbb40917d25dc3ae44da9a6a420e00
Reviewed-on: http://gerrit.chromium.org/gerrit/2236
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
diff --git a/ipconfig.h b/ipconfig.h
index bf860d6..78ace70 100644
--- a/ipconfig.h
+++ b/ipconfig.h
@@ -10,9 +10,9 @@
#include <base/memory/ref_counted.h>
-namespace shill {
+#include "shill/device.h"
-class Device;
+namespace shill {
// IPConfig superclass. Individual IP configuration types will inherit from this
// class.
@@ -31,10 +31,10 @@
int mtu;
};
- explicit IPConfig(const Device &device);
+ explicit IPConfig(DeviceConstRefPtr device);
virtual ~IPConfig();
- const Device &device() const { return device_; }
+ DeviceConstRefPtr device() const { return device_; }
const std::string &GetDeviceName() const;
// Updates the IP configuration properties and notifies registered listeners
@@ -50,7 +50,7 @@
virtual bool Renew();
private:
- const Device &device_;
+ DeviceConstRefPtr device_;
Properties properties_;
DISALLOW_COPY_AND_ASSIGN(IPConfig);