chromium/ios/chrome/browser/promos_manager/model/BUILD.gn

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

source_set("model") {
  sources = [
    "promos_manager.h",
    "promos_manager.mm",
  ]
  frameworks = [ "Foundation.framework" ]
  public_deps = [ "//base" ]
  deps = [
    ":constants",
    ":features",
    ":types",
    "//components/feature_engagement/public",
    "//components/keyed_service/core",
    "//components/prefs",
    "//ios/chrome/browser/shared/model/prefs:pref_names",
  ]
}

source_set("factory") {
  sources = [
    "promos_manager_factory.h",
    "promos_manager_factory.mm",
  ]
  frameworks = [ "Foundation.framework" ]
  deps = [
    ":features",
    ":internal",
    ":model",
    "//components/keyed_service/core",
    "//components/keyed_service/ios",
    "//ios/chrome/browser/feature_engagement/model",
    "//ios/chrome/browser/shared/model/application_context",
    "//ios/chrome/browser/shared/model/browser_state",
    "//ios/chrome/browser/shared/model/profile",
  ]
}

source_set("internal") {
  sources = [
    "promos_manager_impl.h",
    "promos_manager_impl.mm",
  ]
  frameworks = [ "Foundation.framework" ]
  public_deps = [
    ":constants",
    ":model",
    ":types",
    "//base",
    "//components/prefs",
  ]
  deps = [
    ":features",
    "//components/feature_engagement/public",
    "//ios/chrome/browser/shared/model/prefs:pref_names",
  ]
}

source_set("types") {
  sources = [
    "impression_limit.h",
    "impression_limit.mm",
    "promo.h",
    "promo.mm",
    "promo_config.h",
    "promo_config.mm",
  ]
  frameworks = [ "Foundation.framework" ]
  deps = [
    ":constants",
    "//base",
  ]
}

source_set("constants") {
  sources = [
    "constants.cc",
    "constants.h",
  ]
  deps = [ "//base" ]
}

source_set("features") {
  sources = [
    "features.h",
    "features.mm",
  ]
  deps = [ "//base" ]
}

source_set("test_support") {
  testonly = true
  sources = [
    "mock_promos_manager.h",
    "mock_promos_manager.mm",
  ]
  frameworks = [ "Foundation.framework" ]
  public_deps = [
    ":constants",
    ":model",
    ":types",
    "//base",
    "//base/test:test_support",
    "//testing/gmock",
    "//testing/gtest",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "promos_manager_feature_engagement_unittest.mm",
    "promos_manager_impl_unittest.mm",
  ]
  frameworks = [ "Foundation.framework" ]
  deps = [
    ":constants",
    ":features",
    ":internal",
    ":model",
    ":types",
    "//base",
    "//base/test:test_support",
    "//components/feature_engagement/public",
    "//components/feature_engagement/test:test_support",
    "//components/prefs",
    "//components/prefs:test_support",
    "//ios/chrome/browser/shared/model/prefs:pref_names",
    "//testing/gmock",
    "//testing/gtest",
  ]
}