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

# Copyright 2020 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/buildflag_header.gni")
import("//build/config/ios/ios_sdk.gni")
import("//ios/build/chrome_build.gni")

buildflag_header("buildflags") {
  header = "credential_provider_buildflags.h"
  flags = [
    "IOS_CREDENTIAL_PROVIDER_ENABLED=$ios_enable_credential_provider_extension",
  ]
}

if (ios_enable_credential_provider_extension) {
  source_set("model") {
    sources = [
      "archivable_credential+password_form.h",
      "archivable_credential+password_form.mm",
      "credential_provider_migrator.h",
      "credential_provider_migrator.mm",
      "credential_provider_service.h",
      "credential_provider_service.mm",
      "credential_provider_service_factory.h",
      "credential_provider_service_factory.mm",
      "credential_provider_support.cc",
      "credential_provider_support.h",
      "credential_provider_util.h",
      "credential_provider_util.mm",
    ]
    public_deps = [ "//base" ]
    deps = [
      ":buildflags",
      ":features",
      "//base",
      "//components/affiliations/core/browser:affiliations",
      "//components/autofill/core/common",
      "//components/keyed_service/core",
      "//components/keyed_service/ios",
      "//components/password_manager/core/browser",
      "//components/password_manager/core/browser/affiliation:affiliation_match_helper",
      "//components/password_manager/core/common",
      "//components/password_manager/core/common:features",
      "//components/prefs:prefs",
      "//components/signin/public/identity_manager",
      "//components/webauthn/core/browser:passkey_model",
      "//ios/chrome/browser/affiliations/model",
      "//ios/chrome/browser/favicon/model",
      "//ios/chrome/browser/passwords/model",
      "//ios/chrome/browser/shared/model/browser_state",
      "//ios/chrome/browser/shared/model/profile",
      "//ios/chrome/browser/signin/model",
      "//ios/chrome/browser/signin/model:system_identity",
      "//ios/chrome/browser/sync/model",
      "//ios/chrome/browser/webauthn/model",
      "//ios/chrome/common/app_group",
      "//ios/chrome/common/credential_provider",
      "//ios/chrome/common/credential_provider:ui",
      "//ios/chrome/common/ui/favicon:favicon",
      "//ios/chrome/common/ui/favicon:favicon_constants",
      "//url",
    ]
    frameworks = [
      "AuthenticationServices.framework",
      "Foundation.framework",
    ]
  }

  source_set("unit_tests") {
    testonly = true
    sources = [
      "archivable_credential+password_form_unittest.mm",
      "credential_provider_migrator_unittest.mm",
      "credential_provider_service_unittest.mm",
      "credential_provider_util_unittest.mm",
    ]
    deps = [
      ":features",
      ":model",
      "//base/test:test_support",
      "//components/affiliations/core/browser:test_support",
      "//components/autofill/core/common",
      "//components/favicon/core",
      "//components/password_manager/core/browser:test_support",
      "//components/password_manager/core/common",
      "//components/prefs",
      "//components/prefs:test_support",
      "//components/variations:test_support",
      "//components/webauthn/core/browser:test_support",
      "//ios/chrome/browser/favicon/model",
      "//ios/chrome/browser/history/model",
      "//ios/chrome/browser/shared/model/application_context",
      "//ios/chrome/browser/shared/model/profile/test",
      "//ios/chrome/browser/signin/model",
      "//ios/chrome/browser/signin/model:fake_system_identity",
      "//ios/chrome/browser/signin/model:fake_system_identity_manager",
      "//ios/chrome/browser/signin/model:test_support",
      "//ios/chrome/common/app_group",
      "//ios/chrome/common/credential_provider",
      "//ios/chrome/common/credential_provider:ui",
      "//ios/chrome/test:test_support",
      "//ios/web/public/test",
      "//testing/gtest",
      "//url",
    ]
  }
}

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