blob: 415a0ad362155a960e74b40ce84e6853d9f5c110 [file] [log] [blame]
// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_ASH_GROWTH_METRICS_H_
#define CHROME_BROWSER_ASH_GROWTH_METRICS_H_
// Enumeration of campaign button ID. Entries should not be renumbered and
// numeric values should never be reused. Please keep in sync with
// "CampaignButtonId" in
// src/tools/metrics/histograms/metadata/ash_growth/histograms.xml and
// src/tools/metrics/structured/sync/structured.xml.
enum class CampaignButtonId {
kPrimary = 0,
kSecondary = 1,
// Just in case that the button is neither primary nor secondary. For
// example, potentially notification can have more than 2 buttons although it
// is uncommon.
kOthers = 2,
// Usually the X button.
kClose = 3,
kMaxValue = kClose,
};
// Records how many times a button is pressed in the campaign UI.
void RecordButtonPressed(int campaign_id,
CampaignButtonId button_id,
bool should_log_cros_events);
// Records how many times a campaign UI is dismissed.
void RecordDismissed(int campaign_id, bool should_log_cros_events);
// Records how many times a campaign UI is about to show.
void RecordImpression(int campaign_id, bool should_log_cros_events);
#endif // CHROME_BROWSER_ASH_GROWTH_METRICS_H_