chromium/chrome/browser/ui/webui/ash/settings/services/metrics/BUILD.gn

# 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.

import("//build/config/chromeos/ui_mode.gni")

assert(is_chromeos_ash)

static_library("metrics") {
  sources = [
    "os_settings_metrics_provider.cc",
    "os_settings_metrics_provider.h",
    "per_session_settings_user_action_tracker.cc",
    "per_session_settings_user_action_tracker.h",
    "settings_user_action_tracker.cc",
    "settings_user_action_tracker.h",
  ]

  public_deps = [
    "//ash/webui/settings/public/constants:mojom",
    "//base",
    "//chrome/browser:browser_public_dependencies",
    "//chrome/browser/ui/webui/ash/settings/search/mojom",
    "//components/metrics",
    "//components/prefs",
    "//mojo/public/cpp/bindings",
  ]

  deps = [
    "//chrome/browser:browser_process",
    "//chrome/browser/ash/login",
    "//chrome/browser/profiles:profile",
    "//chrome/browser/ui/webui/ash/settings/pages",
    "//chrome/browser/ui/webui/ash/settings/search",
    "//chrome/common:constants",
    "//chromeos/ash/components/settings",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "per_session_settings_user_action_tracker_unittest.cc",
    "settings_user_action_tracker_unittest.cc",
  ]

  deps = [
    ":metrics",
    "//ash/webui/settings/public/constants:mojom",
    "//base",
    "//base/test:test_support",
    "//chrome/browser",
    "//chrome/browser/ash/login",
    "//chrome/browser/ash/login/users:test_support",
    "//chrome/browser/ash/profiles",
    "//chrome/browser/ui/webui/ash/settings/search/mojom",
    "//chrome/browser/ui/webui/ash/settings/test_support",
    "//chrome/common:constants",
    "//chrome/test:test_support",
    "//chromeos/ash/components/login/login_state",
    "//components/account_id",
    "//components/metrics",
    "//components/metrics:metrics_pref_names",
    "//components/metrics:test_support",
    "//components/user_manager",
    "//testing/gtest",
  ]
}