// Copyright 2023 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_LENS_LENS_METRICS_H_ #define COMPONENTS_LENS_LENS_METRICS_H_ namespace lens { // Histogram for recording ambient search queries. constexpr char kAmbientSearchQueryHistogramName[] = …; // Histogram for recording camera open events. constexpr char kSearchCameraOpenHistogramName[] = …; // Histogram for recording camera result events. constexpr char kSearchCameraResultHistogramName[] = …; // Histogram for recording the capture result of Lens Region Search. See enum // below for types of results. constexpr char kLensRegionSearchCaptureResultHistogramName[] = …; // Histogram for recording the viewport proportion in relation to region // selected for the Lens Region Search feature. constexpr char kLensRegionSearchRegionViewportProportionHistogramName[] = …; // Histogram for recording the aspect ratio of the captured region. constexpr char kLensRegionSearchRegionAspectRatioHistogramName[] = …; // Needs to be kept in sync with CameraOpenEntryPoint enum in // tools/metrics/histograms/enums.xml. enum class CameraOpenEntryPoint { … }; // Needs to be kept in sync with CameraResult enum in // tools/metrics/histograms/enums.xml. enum class CameraResult { … }; // Needs to be kept in sync with AmbientSearchEntryPoint enum in // tools/metrics/histograms/enums.xml. enum class AmbientSearchEntryPoint { … }; // This should be kept in sync with the LensRegionSearchAspectRatio enum // in tools/metrics/histograms/enums.xml. The aspect ratios are defined as: // SQUARE: [0.8, 1.2] // WIDE: (1.2, 1.7] // VERY_WIDE: (1.7, infinity) // TALL: [0.3, 0.8) // VERY_TALL: [0, 0.3) enum class LensRegionSearchAspectRatio { … }; // This should be kept in sync with the LensRegionSearchCaptureResult enum // in tools/metrics/histograms/enums.xml. enum class LensRegionSearchCaptureResult { … }; // Record an ambient search query along with the entry point that initiated. extern void RecordAmbientSearchQuery(AmbientSearchEntryPoint entry_point); // Record a camera open event with the entry point. extern void RecordCameraOpen(CameraOpenEntryPoint entry_point); // Record a camera result. extern void RecordCameraResult(CameraResult result); } // namespace lens #endif // COMPONENTS_LENS_LENS_METRICS_H_