shill: Add portal metrics

Add support for Network.*.PortalAttempts,
Network.*.PortalAttemptsToOnline and Network.*.PortalResult.

BUG=chromium-os:27670
TEST=Unit tests

Change-Id: I0589c0f811a46f249ebb97540fc9d8a6ed7293ad
Reviewed-on: https://gerrit.chromium.org/gerrit/18036
Commit-Ready: Thieu Le <thieule@chromium.org>
Reviewed-by: Thieu Le <thieule@chromium.org>
Tested-by: Thieu Le <thieule@chromium.org>
diff --git a/mock_metrics.h b/mock_metrics.h
index d9c7c0d..64b5132 100644
--- a/mock_metrics.h
+++ b/mock_metrics.h
@@ -17,6 +17,10 @@
   virtual ~MockMetrics();
 
   MOCK_METHOD1(NotifyDefaultServiceChanged, void(const Service *service));
+  MOCK_METHOD3(SendEnumToUMA, bool(const std::string &name, int sample,
+                                   int max));
+  MOCK_METHOD5(SendToUMA, bool(const std::string &name, int sample, int min,
+                               int max, int num_buckets));
 
  private:
   DISALLOW_COPY_AND_ASSIGN(MockMetrics);