shill: Move Metrics from singleton to Shill daemon

While implementing chromium-os:24810, it was discovered that Metrics is
cleaner if it is passed around like ControlInterface, Dispatcher,
Manager, etc.  This approach also makes Metrics more testable.

BUG=chromium-os:24810
TEST=Unit tests, network_WiFiManager suite

Change-Id: I556a1bd11f21f0b93ecfeaae8855dfb99ed5e5f9
Reviewed-on: https://gerrit.chromium.org/gerrit/14099
Commit-Ready: Thieu Le <thieule@chromium.org>
Reviewed-by: Thieu Le <thieule@chromium.org>
Tested-by: Thieu Le <thieule@chromium.org>
diff --git a/cellular_capability_gsm_unittest.cc b/cellular_capability_gsm_unittest.cc
index 228c81e..831a1ec 100644
--- a/cellular_capability_gsm_unittest.cc
+++ b/cellular_capability_gsm_unittest.cc
@@ -14,6 +14,7 @@
 #include "shill/error.h"
 #include "shill/event_dispatcher.h"
 #include "shill/mock_adaptors.h"
+#include "shill/mock_metrics.h"
 #include "shill/mock_modem_gsm_card_proxy.h"
 #include "shill/mock_modem_gsm_network_proxy.h"
 #include "shill/nice_mock_control.h"
@@ -29,6 +30,7 @@
   CellularCapabilityGSMTest()
       : cellular_(new Cellular(&control_,
                                &dispatcher_,
+                               &metrics_,
                                NULL,
                                "",
                                "",
@@ -85,7 +87,7 @@
 
   void SetService() {
     cellular_->service_ = new CellularService(
-        &control_, &dispatcher_, NULL, cellular_);
+        &control_, &dispatcher_, &metrics_, NULL, cellular_);
   }
 
   void InitProviderDB() {
@@ -96,6 +98,7 @@
 
   NiceMockControl control_;
   EventDispatcher dispatcher_;
+  MockMetrics metrics_;
   CellularRefPtr cellular_;
   scoped_ptr<MockModemGSMCardProxy> card_proxy_;
   scoped_ptr<MockModemGSMNetworkProxy> network_proxy_;