chromium/chrome/browser/history_clusters/history_clusters_metrics_logger.h

// Copyright 2021 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_HISTORY_CLUSTERS_HISTORY_CLUSTERS_METRICS_LOGGER_H_
#define CHROME_BROWSER_HISTORY_CLUSTERS_HISTORY_CLUSTERS_METRICS_LOGGER_H_

#include "components/history_clusters/core/cluster_metrics_utils.h"
#include "content/public/browser/page.h"
#include "content/public/browser/page_user_data.h"
#include "content/public/browser/web_contents_observer.h"

namespace history_clusters {

// The initial state that describes how an interaction with the HistoryClusters
// UI was started.
//
// Keep in sync with HistoryClustersInitialState in
// tools/metrics/histograms/enums.xml.
enum class HistoryClustersInitialState {};

// HistoryClustersMetricsLogger contains all the metrics/events associated with
// interactions and internals of HistoryClusters in Chrome. It has the same
// lifetime as the page's main document and metrics are flushed when `this` is
// destructed.
class HistoryClustersMetricsLogger
    : public content::PageUserData<HistoryClustersMetricsLogger> {};

}  // namespace history_clusters

#endif  // CHROME_BROWSER_HISTORY_CLUSTERS_HISTORY_CLUSTERS_METRICS_LOGGER_H_