chromium/chrome/browser/ash/policy/status_collector/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("status_collector") {
  sources = [
    "activity_storage.cc",
    "activity_storage.h",
    "app_info_generator.cc",
    "app_info_generator.h",
    "child_activity_storage.cc",
    "child_activity_storage.h",
    "child_status_collector.cc",
    "child_status_collector.h",
    "device_status_collector.cc",
    "device_status_collector.h",
    "enterprise_activity_storage.cc",
    "enterprise_activity_storage.h",
    "managed_session_service.cc",
    "managed_session_service.h",
    "status_collector.cc",
    "status_collector.h",
    "status_collector_state.cc",
    "status_collector_state.h",
    "tpm_status_combiner.cc",
    "tpm_status_combiner.h",
  ]

  public_deps = [ "//chrome/browser:browser_public_dependencies" ]

  deps = [
    "//ash/components/arc/mojom",
    "//ash/components/arc/session",
    "//ash/constants",
    "//base",
    "//chrome/browser:browser_process",
    "//chrome/browser/apps/app_service",
    "//chrome/browser/ash/app_mode",
    "//chrome/browser/ash/app_mode/web_app",
    "//chrome/browser/ash/child_accounts",
    "//chrome/browser/ash/child_accounts/time_limits",
    "//chrome/browser/ash/crosapi:browser_util",
    "//chrome/browser/ash/crostini",
    "//chrome/browser/ash/guest_os",
    "//chrome/browser/ash/login",
    "//chrome/browser/ash/login/demo_mode",
    "//chrome/browser/ash/login/session",
    "//chrome/browser/ash/login/ui",
    "//chrome/browser/ash/policy/core",
    "//chrome/browser/ash/policy/uploading",
    "//chrome/browser/ash/profiles",
    "//chrome/browser/crash_upload_list",
    "//chrome/browser/profiles:profile",
    "//chrome/browser/ui/webui/ash/settings/pages/storage",
    "//chrome/common:channel_info",
    "//chrome/common:chrome_features",
    "//chrome/common:constants",
    "//chromeos/ash/components/audio",
    "//chromeos/ash/components/dbus/attestation",
    "//chromeos/ash/components/dbus/attestation:attestation_proto",
    "//chromeos/ash/components/dbus/cryptohome:cryptohome_proto",
    "//chromeos/ash/components/dbus/hermes",
    "//chromeos/ash/components/dbus/spaced",
    "//chromeos/ash/components/dbus/update_engine",
    "//chromeos/ash/components/disks",
    "//chromeos/ash/components/login/auth",
    "//chromeos/ash/components/login/login_state",
    "//chromeos/ash/components/login/session",
    "//chromeos/ash/components/network",
    "//chromeos/ash/components/settings",
    "//chromeos/ash/components/system",
    "//chromeos/ash/services/cros_healthd/public/cpp",
    "//chromeos/ash/services/cros_healthd/public/mojom",
    "//chromeos/dbus/power",
    "//chromeos/dbus/power:power_manager_proto",
    "//chromeos/dbus/tpm_manager",
    "//chromeos/dbus/tpm_manager:tpm_manager_proto",
    "//chromeos/version",
    "//components/account_id",
    "//components/policy/core/browser",
    "//components/policy/core/common",
    "//components/policy/core/common:common_constants",
    "//components/policy/core/common:util",
    "//components/policy/proto",
    "//components/prefs",
    "//components/services/app_service",
    "//components/services/app_service/public/cpp:app_types",
    "//components/services/app_service/public/cpp:instance_update",
    "//components/session_manager/core",
    "//components/user_manager",
    "//components/user_manager:common",
    "//components/version_info",
    "//content/public/browser",
    "//extensions/browser",
    "//extensions/common",
    "//gpu/config",
    "//gpu/ipc/common:memory_stats_sources",
    "//storage/browser",
    "//ui/base/idle",
    "//ui/display",
    "//ui/gfx/geometry",
    "//url",
  ]

  allow_circular_includes_from = [
    "//chrome/browser/ash/child_accounts",
    "//chrome/browser/ash/policy/core",
    "//chrome/browser/ash/policy/uploading",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "activity_storage_unittest.cc",
    "app_info_generator_unittest.cc",
    "enterprise_activity_storage_unittest.cc",
    "managed_session_service_unittest.cc",
  ]

  deps = [
    "//base",
    "//base/test:test_support",
    "//chrome/browser/apps/app_service",
    "//chrome/browser/apps/app_service:test_support",
    "//chrome/browser/ash/login/users:test_support",
    "//chrome/browser/ash/policy/status_collector",
    "//chrome/browser/ash/profiles",
    "//chrome/browser/web_applications",
    "//chrome/browser/web_applications:web_applications_test_support",
    "//chrome/test:test_support",
    "//chromeos/ash/components/dbus/session_manager",
    "//chromeos/ash/components/login/auth/public:authpublic",
    "//chromeos/dbus/power",
    "//components/policy/proto:",
    "//components/prefs",
    "//components/prefs:test_support",
    "//components/services/app_service/public/cpp:app_types",
    "//components/session_manager:base",
    "//components/session_manager/core",
    "//components/sync_preferences:test_support",
    "//components/user_manager",
    "//components/webapps/common",
    "//content/test:test_support",
    "//testing/gmock",
    "//testing/gtest",
  ]
}

source_set("browser_tests") {
  testonly = true

  defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]

  sources = [
    "child_status_collector_browsertest.cc",
    "device_status_collector_browsertest.cc",
  ]

  deps = [
    ":status_collector",
    "//ash/constants",
    "//base",
    "//base/test:test_support",
    "//chrome/browser",
    "//chrome/browser/apps/app_service",
    "//chrome/browser/apps/app_service:test_support",
    "//chrome/browser/ash/app_mode",
    "//chrome/browser/ash/app_mode/web_app",
    "//chrome/browser/ash/child_accounts",
    "//chrome/browser/ash/child_accounts/time_limits",
    "//chrome/browser/ash/child_accounts/time_limits:test_support",
    "//chrome/browser/ash/crostini",
    "//chrome/browser/ash/crostini:test_support",
    "//chrome/browser/ash/guest_os",
    "//chrome/browser/ash/login/demo_mode:test_support",
    "//chrome/browser/ash/login/users:test_support",
    "//chrome/browser/ash/ownership",
    "//chrome/browser/ash/policy/core",
    "//chrome/browser/ash/profiles",
    "//chrome/browser/ash/settings:test_support",
    "//chrome/browser/profiles:profile",
    "//chrome/common",
    "//chrome/common:chrome_features",
    "//chrome/common:constants",
    "//chrome/test:test_support",
    "//chromeos/ash/components/audio",
    "//chromeos/ash/components/dbus:vm_applications_apps_proto",
    "//chromeos/ash/components/dbus/attestation",
    "//chromeos/ash/components/dbus/cicerone",
    "//chromeos/ash/components/dbus/concierge",
    "//chromeos/ash/components/dbus/cros_disks",
    "//chromeos/ash/components/dbus/seneschal",
    "//chromeos/ash/components/dbus/shill",
    "//chromeos/ash/components/dbus/spaced",
    "//chromeos/ash/components/dbus/update_engine",
    "//chromeos/ash/components/dbus/userdataauth",
    "//chromeos/ash/components/disks",
    "//chromeos/ash/components/disks:test_support",
    "//chromeos/ash/components/install_attributes:test_support",
    "//chromeos/ash/components/login/login_state",
    "//chromeos/ash/components/mojo_service_manager:test_support",
    "//chromeos/ash/components/network",
    "//chromeos/ash/components/network:test_support",
    "//chromeos/ash/components/settings",
    "//chromeos/ash/components/system",
    "//chromeos/ash/services/cros_healthd/public/cpp:fakes",
    "//chromeos/ash/services/cros_healthd/public/mojom",
    "//chromeos/dbus/power",
    "//chromeos/dbus/power:power_manager_proto",
    "//chromeos/dbus/tpm_manager",
    "//components/account_id",
    "//components/ownership",
    "//components/policy/core/common",
    "//components/policy/proto",
    "//components/prefs",
    "//components/prefs:test_support",
    "//components/services/app_service/public/cpp:app_types",
    "//components/session_manager/core",
    "//components/upload_list",
    "//components/user_manager",
    "//components/user_manager:common",
    "//content/public/browser",
    "//content/public/common",
    "//content/test:test_support",
    "//mojo/core/embedder",
    "//storage/browser",
    "//storage/common",
    "//testing/gmock",
    "//testing/gtest",
    "//ui/aura",
    "//ui/aura:test_support",
  ]
}