update_engine: Send UMA stats about kernel key versions
Adding the following UMA stats:
- UpdateEngine.KernelKey.MinVersion: Minimum kernel key version
already set in the TPM.
- UpdateEngine.KernelKey.MaxRollforwardVersion: Maximum kernel key
rollforward version set by update_engine.
- UpdateEngine.KernelKey.MaxRollforwardSetSuccess: Whether setting
the maximum kernely key rollforward version succeeded.
Chromium CL of the new histograms: crrev.com/c/1078750
BUG=chromium:843622
TEST='cros_run_unit_tests --board=caroline --packages update_engine'
Change-Id: I14192b5ff9c07f8a003e0589450202f488cccc01
Reviewed-on: https://chromium-review.googlesource.com/1078968
Commit-Ready: Zentaro Kavanagh <zentaro@chromium.org>
Tested-by: Zentaro Kavanagh <zentaro@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Zentaro Kavanagh <zentaro@chromium.org>
diff --git a/metrics_reporter_omaha.h b/metrics_reporter_omaha.h
index 97b283d..d348cdc 100644
--- a/metrics_reporter_omaha.h
+++ b/metrics_reporter_omaha.h
@@ -87,6 +87,11 @@
extern const char kMetricCertificateCheckUpdateCheck[];
extern const char kMetricCertificateCheckDownload[];
+// UpdateEngine.KernelKey.* metrics.
+extern const char kMetricKernelMinVersion[];
+extern const char kMetricKernelMaxRollforwardVersion[];
+extern const char kMetricKernelMaxRollforwardSetSuccess[];
+
// UpdateEngine.* metrics.
extern const char kMetricFailedUpdateCount[];
extern const char kMetricInstallDateProvisioningSource[];
@@ -155,6 +160,10 @@
void ReportInternalErrorCode(ErrorCode error_code) override;
+ void ReportKeyVersionMetrics(int kernel_min_version,
+ int kernel_max_rollforward_version,
+ bool kernel_max_rollforward_success) override;
+
private:
friend class MetricsReporterOmahaTest;