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/device.h b/device.h
index 0c7f22d..76ed0e4 100644
--- a/device.h
+++ b/device.h
@@ -266,6 +266,10 @@
base::Callback<void(const PortalDetector::Result &)>
portal_detector_callback_;
Technology::Identifier technology_;
+ // The number of portal detection attempts from Connected to Online state.
+ // This includes all failure/timeout attempts and the final successful
+ // attempt.
+ int portal_attempts_to_online_;
// Maintain a reference to the connected / connecting service
ServiceRefPtr selected_service_;