chromium/components/unified_consent/BUILD.gn

# Copyright 2018 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//components/compose/features.gni")

static_library("unified_consent") {
  sources = [
    "consent_throttle.cc",
    "consent_throttle.h",
    "msbb_session_durations_metrics_recorder.cc",
    "msbb_session_durations_metrics_recorder.h",
    "pref_names.cc",
    "pref_names.h",
    "unified_consent_metrics.cc",
    "unified_consent_metrics.h",
    "unified_consent_service.cc",
    "unified_consent_service.h",
    "url_keyed_data_collection_consent_helper.cc",
    "url_keyed_data_collection_consent_helper.h",
  ]
  deps = [
    "//base",
    "//components/compose:buildflags",
    "//components/pref_registry",
    "//components/prefs",
    "//components/signin/public/identity_manager",
    "//components/sync",
    "//components/sync_preferences",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "consent_throttle_unittest.cc",
    "unified_consent_service_unittest.cc",
    "url_keyed_data_collection_consent_helper_unittest.cc",
  ]
  deps = [
    ":unified_consent",
    "//base/test:test_support",
    "//build:chromeos_buildflags",
    "//components/signin/public/identity_manager:test_support",
    "//components/sync:test_support",
    "//components/sync_preferences:test_support",
    "//testing/gtest",
  ]
}