shill: Add Network.Shill.Cellular.TimeToDisable.
BUG=chromium-os:38086
TEST=Unit tests, disable modem and check chrome://histograms
Change-Id: I691af3a98eed014f601a140c81f52f0f7bf38a33
Reviewed-on: https://gerrit.chromium.org/gerrit/41894
Reviewed-by: Arman Uguray <armansito@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Thieu Le <thieule@chromium.org>
Tested-by: Thieu Le <thieule@chromium.org>
diff --git a/metrics.h b/metrics.h
index 8ac0bfb..d189df1 100644
--- a/metrics.h
+++ b/metrics.h
@@ -176,6 +176,10 @@
static const char kMetricTimeToDropSeconds[];
static const int kMetricTimeToDropSecondsMax;
static const int kMetricTimeToDropSecondsMin;
+ static const char kMetricTimeToDisableMilliseconds[];
+ static const int kMetricTimeToDisableMillisecondsMax;
+ static const int kMetricTimeToDisableMillisecondsMin;
+ static const int kMetricTimeToDisableMillisecondsNumBuckets;
static const char kMetricTimeToEnableMilliseconds[];
static const int kMetricTimeToEnableMillisecondsMax;
static const int kMetricTimeToEnableMillisecondsMin;
@@ -331,6 +335,12 @@
// Notifies this object that a device has completed the enable process.
void NotifyDeviceEnableFinished(int interface_index);
+ // Notifies this object that a device has started the disable process.
+ void NotifyDeviceDisableStarted(int interface_index);
+
+ // Notifies this object that a device has completed the disable process.
+ void NotifyDeviceDisableFinished(int interface_index);
+
// Sends linear histogram data to UMA.
virtual bool SendEnumToUMA(const std::string &name, int sample, int max);
@@ -373,6 +383,7 @@
DeviceMetrics() {}
scoped_ptr<chromeos_metrics::TimerReporter> initialization_timer;
scoped_ptr<chromeos_metrics::TimerReporter> enable_timer;
+ scoped_ptr<chromeos_metrics::TimerReporter> disable_timer;
};
typedef std::map<const int, std::tr1::shared_ptr<DeviceMetrics> >
DeviceMetricsLookupMap;