From c514c653b1cc9d51b3f541ef07c89e0a06f84557 Mon Sep 17 00:00:00 2001 From: Alessio Placitelli Date: Wed, 14 Sep 2016 02:59:00 +0200 Subject: [PATCH] Bug 1277806 - Add the missing C++ API for boolean scalars. r=gfritzsche --- toolkit/components/telemetry/Telemetry.cpp | 6 ++++++ toolkit/components/telemetry/Telemetry.h | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/toolkit/components/telemetry/Telemetry.cpp b/toolkit/components/telemetry/Telemetry.cpp index f60946c0c8ee..b7325724db05 100644 --- a/toolkit/components/telemetry/Telemetry.cpp +++ b/toolkit/components/telemetry/Telemetry.cpp @@ -3008,6 +3008,12 @@ ScalarSet(mozilla::Telemetry::ScalarID aId, uint32_t aVal) TelemetryScalar::Set(aId, aVal); } +void +ScalarSet(mozilla::Telemetry::ScalarID aId, bool aVal) +{ + TelemetryScalar::Set(aId, aVal); +} + void ScalarSet(mozilla::Telemetry::ScalarID aId, const nsAString& aVal) { diff --git a/toolkit/components/telemetry/Telemetry.h b/toolkit/components/telemetry/Telemetry.h index d599fdec152f..3ba550a37be3 100644 --- a/toolkit/components/telemetry/Telemetry.h +++ b/toolkit/components/telemetry/Telemetry.h @@ -375,6 +375,14 @@ void ScalarAdd(mozilla::Telemetry::ScalarID aId, uint32_t aValue); */ void ScalarSet(mozilla::Telemetry::ScalarID aId, uint32_t aValue); +/** + * Sets the scalar to the given value. + * + * @param aId The scalar enum id. + * @param aValue The value to set the scalar to. + */ +void ScalarSet(mozilla::Telemetry::ScalarID aId, bool aValue); + /** * Sets the scalar to the given value. *