chromium/chrome/browser/enterprise/connectors/device_trust/signals/decorators/common/BUILD.gn

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

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

source_set("common") {
  public = [
    "common_signals_decorator.h",
    "metrics_utils.h",
    "signals_decorator.h",
    "signals_utils.h",
  ]

  sources = [
    "common_signals_decorator.cc",
    "metrics_utils.cc",
    "signals_utils.cc",
  ]

  public_deps = [
    "//base",
    "//chrome/browser/enterprise/connectors/device_trust/attestation/common:types",
  ]

  deps = [
    "//chrome/browser/enterprise/signals:utils",
    "//components/device_signals/core/common",
    "//components/policy/core/common",
    "//components/version_info",
    "//third_party/abseil-cpp:absl",
  ]
}

source_set("test_support") {
  testonly = true
  sources = [
    "mock_signals_decorator.cc",
    "mock_signals_decorator.h",
  ]

  public_deps = [
    ":common",
    "//chrome/browser/enterprise/connectors/device_trust/attestation/common:types",
    "//testing/gmock",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [ "common_signals_decorator_unittest.cc" ]

  deps = [
    ":common",
    "//base/test:test_support",
    "//build:branding_buildflags",
    "//build:chromeos_buildflags",
    "//chrome/browser/enterprise/connectors/device_trust/attestation/common:types",
    "//chrome/common:constants",
    "//components/component_updater",
    "//components/device_signals/core/common",
    "//components/policy/content",
    "//components/policy/core/browser",
    "//components/prefs:test_support",
    "//components/safe_browsing/core/common:safe_browsing_prefs",
    "//components/sync_preferences:test_support",
    "//testing/gtest",
    "//third_party/abseil-cpp:absl",
  ]

  if (is_chromeos_ash) {
    deps += [ "//chromeos/ash/components/system" ]
  }
}