blob: b526d4cb61c4adf597bfef1907aa03fc98e9901a [file] [log] [blame]
Steven Luongce5488f32024-09-30 18:11:231// Copyright 2024 The Chromium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROME_BROWSER_UI_TOASTS_TOAST_METRICS_H_
6#define CHROME_BROWSER_UI_TOASTS_TOAST_METRICS_H_
7
8enum class ToastId;
9
10namespace toasts {
11enum class ToastCloseReason;
Alison Gale032ff362024-12-13 20:22:0112
13// These values are persisted to logs. Entries should not be renumbered and
14// numeric values should never be reused.
15enum class ToastAlertLevel {
16 kAll = 0,
17 kActionable = 1,
18 kMaxValue = kActionable
19};
20
21// LINT.IfChange(ToastDismissMenuEntries)
22// These values are persisted to logs. Entries should not be renumbered and
23// numeric values should never be reused.
24enum class ToastDismissMenuEntries {
25 kDismiss = 0,
26 kDontShowAgain = 1,
27 kMaxValue = kDontShowAgain
28};
29// LINT.ThenChange(/tools/metrics/histograms/metadata/toasts/enums.xml:ToastDismissMenuEntries)
30} // namespace toasts
Steven Luongce5488f32024-09-30 18:11:2331
32void RecordToastTriggeredToShow(ToastId toast_id);
33
Alison Gale032ff362024-12-13 20:22:0134void RecordToastFailedToShow(ToastId toast_id);
35
Steven Luongce5488f32024-09-30 18:11:2336void RecordToastActionButtonClicked(ToastId toast_id);
37
38void RecordToastCloseButtonClicked(ToastId toast_id);
39
40void RecordToastDismissReason(ToastId toast_id,
41 toasts::ToastCloseReason close_reason);
42
Steven Luongce5488f32024-09-30 18:11:2343#endif // CHROME_BROWSER_UI_TOASTS_TOAST_METRICS_H_