Add histogram for printer status reasons
This changes adds metrics to record the printer status reasons returned
by printer status queries. This metric coincides with the addition of
printer availability icons to the Print Preview destination dropdown
(go/printer-status-design-doc).
Bug: 1059607
Change-Id: Ica85163a3dcc0ecdbe34370f14f998512aaa3a4e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2347313
Reviewed-by: Zentaro Kavanagh <[email protected]>
Reviewed-by: Lei Zhang <[email protected]>
Reviewed-by: Bailey Berro <[email protected]>
Reviewed-by: Ilya Sherman <[email protected]>
Commit-Queue: Gavin Williams <[email protected]>
Cr-Commit-Position: refs/heads/master@{#797789}
diff --git a/printing/printer_status.h b/printing/printer_status.h
index bc518d31e..b49282d 100644
--- a/printing/printer_status.h
+++ b/printing/printer_status.h
@@ -18,7 +18,9 @@
// printer-state-reasons, and printer-state-message.
struct PRINTING_EXPORT PrinterStatus {
struct PrinterReason {
- // Standardized reasons from RFC2911.
+ // This enum is used to record UMA histogram values and should not be
+ // reordered. Please keep in sync with PrinterStatusReasons in
+ // src/tools/metrics/histograms/enums.xml.
enum class Reason {
UNKNOWN_REASON = 0,
NONE = 1,
@@ -53,7 +55,8 @@
OPC_LIFE_OVER = 30,
DEVELOPER_LOW = 31,
DEVELOPER_EMPTY = 32,
- INTERPRETER_RESOURCE_UNAVAILABLE = 33
+ INTERPRETER_RESOURCE_UNAVAILABLE = 33,
+ kMaxValue = INTERPRETER_RESOURCE_UNAVAILABLE
};
// Severity of the state-reason.