shill: cellular: Add LTE drop metrics.
Network.Shill.Cellular.Drop and
Network.Shill.Cellular.SignalStrengthBeforeDrop.
BUG=chromium-os:38165
TEST=Drop cellular signal and check chrome://histograms
Change-Id: Iddf25c903e07d55486c77cadd9b1d5898d40de0a
Reviewed-on: https://gerrit.chromium.org/gerrit/42329
Reviewed-by: Thieu Le <thieule@chromium.org>
Tested-by: Thieu Le <thieule@chromium.org>
Commit-Queue: Thieu Le <thieule@chromium.org>
diff --git a/metrics.h b/metrics.h
index 1136ca1..bd81924 100644
--- a/metrics.h
+++ b/metrics.h
@@ -157,6 +157,20 @@
kTerminationActionReasonTerminate
};
+ enum CellularDropTechnology {
+ kCellularDropTechnology1Xrtt = 0,
+ kCellularDropTechnologyEdge = 1,
+ kCellularDropTechnologyEvdo = 2,
+ kCellularDropTechnologyGprs = 3,
+ kCellularDropTechnologyGsm = 4,
+ kCellularDropTechnologyHspa = 5,
+ kCellularDropTechnologyHspaPlus = 6,
+ kCellularDropTechnologyLte = 7,
+ kCellularDropTechnologyUmts = 8,
+ kCellularDropTechnologyUnknown = 9,
+ kCellularDropTechnologyMax
+ };
+
static const char kMetricDisconnect[];
static const int kMetricDisconnectMax;
static const int kMetricDisconnectMin;
@@ -262,6 +276,13 @@
// WiFiService Entry Fixup.
static const char kMetricServiceFixupEntries[];
+ // Cellular specific statistics.
+ static const char kMetricCellularDrop[];
+ static const char kMetricCellularSignalStrengthBeforeDrop[];
+ static const int kMetricCellularSignalStrengthBeforeDropMax;
+ static const int kMetricCellularSignalStrengthBeforeDropMin;
+ static const int kMetricCellularSignalStrengthBeforeDropNumBuckets;
+
Metrics();
virtual ~Metrics();
@@ -374,6 +395,11 @@
// Notifies this object that a device has completed the connect process.
void NotifyDeviceConnectFinished(int interface_index);
+ // Notifies this object that a cellular device has been dropped by the
+ // network.
+ void NotifyCellularDeviceDrop(const std::string &network_technology,
+ uint16 signal_strength);
+
// Sends linear histogram data to UMA.
virtual bool SendEnumToUMA(const std::string &name, int sample, int max);