commit | 700de6400c18f8cba77821f8cd2a1935b96999a6 | [log] [tgz] |
---|---|---|
author | Peter Qiu <zqiu@chromium.org> | Mon Jul 14 16:31:30 2014 -0700 |
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | Tue Jul 15 21:22:50 2014 +0000 |
tree | b04892bc863d029e5715bf1a59b2b62a62be7449 | |
parent | b9aaa3720b93c394f5962477c6fc88fcea39db12 [diff] |
shill: Reporting of device's connection status Report device's connection status to UMA stats periodically. Possible status are offline (not connected to an AP), connected (connected to an AP), and online (connected to an AP with internet connectivity). When the device is in online state, it will report both connected and online to UMA stats. This data will allow us to determine the percentage of time when the device have internet connectivity, also the percentage of time when the device is connected to an AP but without internet connectivity. While at it, update the old IsOnline function in manager.cc to IsConnected to be more semantically correct, since that function return true if there is a service that's in connected or above state. And Add a new IsOnline function which will return true only if there is a service that's in online state. BUG=chromium:392990 TEST=unit tests, manual Manual Test: 1. Boot up a chrome device without any network connectivity. 2. Wait for 3 minutes, and browse to "chrome://histograms", veriyf there is a histogram for "Network.Shill.DeviceConnectionStatus" with a hit for bucket 0 (offline). 3. Connect the chrome device to an AP without internet connectivity. 4. Wait for 3 minutes, and browse to "chrome://histograms", verify there is a hit for bucket 1 (connected) for histogram "Network.Shill.DeviceConnectionStatus". 5. Connect the chrome device to an AP with internet connectivity. 6. Wait for 3 minutes, and browse to "chrome://histograms", verify there sia hit for bucket 1 (connected) and 2 (online) for histogram "Network.Shill.DeviceConnectionStatus". Change-Id: I1a949b17398214d745ca1d5a37e35202e087181a Reviewed-on: https://chromium-review.googlesource.com/207960 Reviewed-by: Paul Stewart <pstew@chromium.org> Commit-Queue: Peter Qiu <zqiu@chromium.org> Tested-by: Peter Qiu <zqiu@chromium.org>