// 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
#ifndef mozilla_GleanCustomizableuiMetrics_h
#define mozilla_GleanCustomizableuiMetrics_h
#include "mozilla/glean/bindings/MetricTypes.h"
namespace mozilla::glean {
namespace customize {
/**
* generated from customize.opened
*/
struct OpenedExtra {
mozilla::Maybe<nsCString> entryPoint;
mozilla::Maybe<nsCString> tabOrientation;
std::tuple<nsTArray<nsCString>, nsTArray<nsCString>> ToFfiExtra() const {
nsTArray<nsCString> extraKeys;
nsTArray<nsCString> extraValues;
if (entryPoint) {
extraKeys.AppendElement()->AssignASCII("entry_point");
extraValues.EmplaceBack(entryPoint.value());
}
if (tabOrientation) {
extraKeys.AppendElement()->AssignASCII("tab_orientation");
extraValues.EmplaceBack(tabOrientation.value());
}
return std::make_tuple(std::move(extraKeys), std::move(extraValues));
}
};
/**
* Recorded when the user enters Customize Toolbar mode.
*/
constexpr impl::EventMetric<OpenedExtra> opened(504);
/**
* generated from customize.restore_defaults
*/
/**
* Recorded when the user clicks the "Restore Defaults" button in Customize Toolbar mode.
*/
constexpr impl::EventMetric<NoExtraKeys> restore_defaults(505);
/**
* generated from customize.undo_restore
*/
/**
* Recorded when the user clicks the "Undo" button in Customize Toolbar mode to revert a previous "Restore Defaults".
*/
constexpr impl::EventMetric<NoExtraKeys> undo_restore(506);
}
namespace fire_button {
/**
* generated from fire_button.activated
*/
struct ActivatedExtra {
mozilla::Maybe<nsCString> flow;
std::tuple<nsTArray<nsCString>, nsTArray<nsCString>> ToFfiExtra() const {
nsTArray<nsCString> extraKeys;
nsTArray<nsCString> extraValues;
if (flow) {
extraKeys.AppendElement()->AssignASCII("flow");
extraValues.EmplaceBack(flow.value());
}
return std::make_tuple(std::move(extraKeys), std::move(extraValues));
}
};
/**
* Recorded when the fire button is activated, before either the confirmation panel or the clear-data dialog is shown. Recorded once per activation, at the same point as the fireButton Nimbus exposure event, so the two agree on who reached the feature. This is the denominator for flow_completed.
*/
constexpr impl::EventMetric<ActivatedExtra> activated(507);
/**
* generated from fire_button.choose_clicked
*/
/**
* Recorded when the user clicks "Choose…" in the confirmation panel to pick what to delete, instead of deleting everything. Only the "panel" flow has this link. Recorded on the click, so it counts users who open the clear-data dialog even if they never close it.
*/
constexpr impl::EventMetric<NoExtraKeys> choose_clicked(508);
/**
* generated from fire_button.flow_completed
*/
struct FlowCompletedExtra {
mozilla::Maybe<nsCString> flow;
mozilla::Maybe<nsCString> outcome;
mozilla::Maybe<nsCString> surface;
std::tuple<nsTArray<nsCString>, nsTArray<nsCString>> ToFfiExtra() const {
nsTArray<nsCString> extraKeys;
nsTArray<nsCString> extraValues;
if (flow) {
extraKeys.AppendElement()->AssignASCII("flow");
extraValues.EmplaceBack(flow.value());
}
if (outcome) {
extraKeys.AppendElement()->AssignASCII("outcome");
extraValues.EmplaceBack(outcome.value());
}
if (surface) {
extraKeys.AppendElement()->AssignASCII("surface");
extraValues.EmplaceBack(surface.value());
}
return std::make_tuple(std::move(extraKeys), std::move(extraValues));
}
};
/**
* Recorded once per activation when the flow reaches a terminal state, whether or not any data was deleted. Pairs with activated: an activated with no matching flow_completed means the user left the flow open until the session ended.
*/
constexpr impl::EventMetric<FlowCompletedExtra> flow_completed(509);
}
} // namespace mozilla::glean
#endif // mozilla_GleanCustomizableuiMetrics_h