Copy as Markdown

Other Tools

// -*- mode: C++ -*-
// AUTOGENERATED BY glean_parser. DO NOT EDIT.
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_GleanIpprotectionMetrics_h
#define mozilla_GleanIpprotectionMetrics_h
#include "mozilla/glean/bindings/MetricTypes.h"
namespace mozilla::glean {
namespace ipprotection {
/**
* generated from ipprotection.enabled
* True if IP Protection is running.
*/
constexpr impl::BooleanMetric enabled(374);
/**
* generated from ipprotection.toggled
*/
struct ToggledExtra {
mozilla::Maybe<bool> enabled;
std::tuple<nsTArray<nsCString>, nsTArray<nsCString>> ToFfiExtra() const {
nsTArray<nsCString> extraKeys;
nsTArray<nsCString> extraValues;
if (enabled) {
extraKeys.AppendElement()->AssignASCII("enabled");
extraValues.AppendElement()->AssignASCII(enabled.value() ? "true" : "false");
}
return std::make_tuple(std::move(extraKeys), std::move(extraValues));
}
};
/**
* Recorded when IP Protection is toggled.
*/
constexpr impl::EventMetric<ToggledExtra> toggled(375);
}
} // namespace mozilla::glean
#endif // mozilla_GleanIpprotectionMetrics_h