shill: Clean up Callback80211

Make Callback80211 objects access Config80211 through the static getter
instead of via a pointer injected at instantiation time.  Stop
duplicating base::Callback objects and use method overriding to
implement the same thing.

BUG=chromium-os:36122
TEST=Unit tests

Change-Id: I73c4eb0f807240b4ea949fa70a9a3dd3954e91a0
Reviewed-on: https://gerrit.chromium.org/gerrit/37861
Reviewed-by: Wade Guthrie <wdg@chromium.org>
Tested-by: Christopher Wiley <wiley@chromium.org>
Commit-Ready: Christopher Wiley <wiley@chromium.org>
diff --git a/callback80211_metrics.cc b/callback80211_metrics.cc
index 9acc501..27b5bc3 100644
--- a/callback80211_metrics.cc
+++ b/callback80211_metrics.cc
@@ -4,27 +4,18 @@
 
 #include "shill/callback80211_metrics.h"
 
-#include <string>
-
-#include <base/memory/weak_ptr.h>
-
 #include "shill/config80211.h"
 #include "shill/ieee80211.h"
 #include "shill/link_monitor.h"
 #include "shill/logging.h"
 #include "shill/metrics.h"
-#include "shill/scope_logger.h"
 #include "shill/user_bound_nlmessage.h"
 
-using base::Bind;
-using std::string;
-
 namespace shill {
 
-Callback80211Metrics::Callback80211Metrics(Config80211 *config80211,
-                                           Metrics *metrics)
-    : Callback80211Object(config80211), metrics_(metrics),
-      weak_ptr_factory_(this) {
+Callback80211Metrics::Callback80211Metrics(Metrics *metrics)
+    : Callback80211Object(),
+      metrics_(metrics) {
 }
 
 void Callback80211Metrics::Config80211MessageCallback(
@@ -52,13 +43,4 @@
   }
 }
 
-bool Callback80211Metrics::InstallAsBroadcastCallback() {
-  if (config80211_) {
-    callback_ = Bind(&Callback80211Metrics::Config80211MessageCallback,
-                     weak_ptr_factory_.GetWeakPtr());
-    return config80211_->AddBroadcastCallback(callback_);
-  }
-  return false;
-}
-
 }  // namespace shill.