[shill] Use ref-counted pointers more, break unneeded header deps
1) Replace more bare pointers with ref-counted pointers.
2) Move declarations of *RefPtr into a header file with fwd-declared classes
3) Make class headers include that, move inclusion of real headers to .cc files.
BUG=None
TEST=unit tests
Change-Id: I8208c82377c6dbefe6903561a503b8db63f063d6
Reviewed-on: http://gerrit.chromium.org/gerrit/3177
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
diff --git a/dhcp_provider.cc b/dhcp_provider.cc
index ec72602..ae67ed7 100644
--- a/dhcp_provider.cc
+++ b/dhcp_provider.cc
@@ -6,6 +6,7 @@
#include <base/logging.h>
+#include "shill/dhcp_config.h"
#include "shill/dhcpcd_proxy.h"
using std::string;
@@ -44,7 +45,7 @@
return it->second;
}
-void DHCPProvider::BindPID(int pid, DHCPConfigRefPtr config) {
+void DHCPProvider::BindPID(int pid, const DHCPConfigRefPtr &config) {
VLOG(2) << __func__ << " pid: " << pid;
configs_[pid] = config;
}