// 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 COMPONENTS_SAVED_TAB_GROUPS_TAB_GROUP_SYNC_METRICS_LOGGER_H_ #define COMPONENTS_SAVED_TAB_GROUPS_TAB_GROUP_SYNC_METRICS_LOGGER_H_ #include <optional> #include <string> #include "base/functional/callback.h" #include "base/memory/raw_ptr.h" #include "components/saved_tab_groups/types.h" #include "components/sync_device_info/device_info.h" #include "components/sync_device_info/device_info_tracker.h" namespace tab_groups { class SavedTabGroup; class SavedTabGroupTab; // LINT.IfChange(DeviceType) // Represents device types which can be a local device or a remote device. // If it is a local device, only `kLocal` will be captured. // If it is a remote device, the OS and form factor will be captured. // Used for metrics only. Used in relation to a cache guid attribution which // is mapped to a device type for metrics purposes. These values are persisted // to logs. Entries should not be renumbered and numeric values should never be // reused. enum class DeviceType { … }; // LINT.ThenChange(//tools/metrics/histograms/metadata/tab/enums.xml:DeviceType) // Class to record histograms for events related to tab group sync, // capturing information about the originating device type and form factor. class TabGroupSyncMetricsLogger { … }; } // namespace tab_groups #endif // COMPONENTS_SAVED_TAB_GROUPS_TAB_GROUP_SYNC_METRICS_LOGGER_H_