chromium/ios/chrome/browser/ui/settings/privacy/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.

source_set("privacy_ui") {
  sources = [
    "handoff_table_view_controller.h",
    "handoff_table_view_controller.mm",
    "privacy_navigation_commands.h",
    "privacy_safe_browsing_consumer.h",
    "privacy_safe_browsing_coordinator.h",
    "privacy_safe_browsing_coordinator.mm",
    "privacy_safe_browsing_mediator+Testing.h",
    "privacy_safe_browsing_mediator.h",
    "privacy_safe_browsing_mediator.mm",
    "privacy_safe_browsing_navigation_commands.h",
    "privacy_safe_browsing_view_controller.h",
    "privacy_safe_browsing_view_controller.mm",
    "privacy_safe_browsing_view_controller_delegate.h",
    "privacy_table_view_controller.h",
    "privacy_table_view_controller.mm",
  ]
  deps = [
    ":privacy_constants",
    "//base",
    "//build:branding_buildflags",
    "//components/feature_engagement/public",
    "//components/handoff",
    "//components/prefs",
    "//components/prefs/ios",
    "//components/safe_browsing/core/common",
    "//components/safe_browsing/core/common:safe_browsing_prefs",
    "//components/safe_browsing/core/common/hashprefix_realtime:hash_realtime_utils",
    "//components/strings",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/browsing_data/model:feature_flags",
    "//ios/chrome/browser/feature_engagement/model",
    "//ios/chrome/browser/incognito_interstitial/ui_bundled:constants",
    "//ios/chrome/browser/net/model:crurl",
    "//ios/chrome/browser/policy/model:policy_util",
    "//ios/chrome/browser/settings/model/sync/utils",
    "//ios/chrome/browser/shared/coordinator/alert",
    "//ios/chrome/browser/shared/coordinator/chrome_coordinator",
    "//ios/chrome/browser/shared/model/application_context",
    "//ios/chrome/browser/shared/model/browser",
    "//ios/chrome/browser/shared/model/browser_state",
    "//ios/chrome/browser/shared/model/prefs",
    "//ios/chrome/browser/shared/model/prefs:pref_names",
    "//ios/chrome/browser/shared/model/profile",
    "//ios/chrome/browser/shared/model/url:constants",
    "//ios/chrome/browser/shared/model/utils",
    "//ios/chrome/browser/shared/model/web_state_list",
    "//ios/chrome/browser/shared/public/commands",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/browser/shared/ui/list_model",
    "//ios/chrome/browser/shared/ui/symbols",
    "//ios/chrome/browser/shared/ui/table_view",
    "//ios/chrome/browser/shared/ui/table_view:styler",
    "//ios/chrome/browser/shared/ui/table_view:utils",
    "//ios/chrome/browser/shared/ui/table_view/cells",
    "//ios/chrome/browser/signin/model",
    "//ios/chrome/browser/supervised_user/model:capabilities",
    "//ios/chrome/browser/sync/model",
    "//ios/chrome/browser/ui/settings:constants",
    "//ios/chrome/browser/ui/settings:settings_root",
    "//ios/chrome/browser/ui/settings/cells",
    "//ios/chrome/browser/ui/settings/clear_browsing_data",
    "//ios/chrome/browser/ui/settings/elements:enterprise_info_popover_view_controller",
    "//ios/chrome/browser/ui/settings/elements:info_popover_view_controller",
    "//ios/chrome/browser/ui/settings/privacy/lockdown_mode",
    "//ios/chrome/browser/ui/settings/privacy/privacy_guide:features",
    "//ios/chrome/browser/ui/settings/privacy/resources",
    "//ios/chrome/browser/ui/settings/privacy/safe_browsing",
    "//ios/chrome/browser/ui/settings/utils",
    "//ios/chrome/browser/web/model:feature_flags",
    "//ios/chrome/common:string_util",
    "//ios/chrome/common/ui/colors",
    "//ios/chrome/common/ui/reauthentication",
    "//ios/chrome/common/ui/table_view:cells_constants",
    "//ios/components/security_interstitials/https_only_mode:feature",
    "//ui/base",
  ]
  frameworks = [ "LocalAuthentication.framework" ]
}

source_set("privacy_constants") {
  sources = [
    "privacy_constants.h",
    "privacy_constants.mm",
  ]
}

source_set("privacy") {
  sources = [
    "privacy_coordinator.h",
    "privacy_coordinator.mm",
  ]
  deps = [
    ":privacy_ui",
    "//components/content_settings/core/browser",
    "//components/content_settings/core/common",
    "//components/prefs",
    "//ios/chrome/browser/content_settings/model",
    "//ios/chrome/browser/shared/coordinator/chrome_coordinator",
    "//ios/chrome/browser/shared/model/browser",
    "//ios/chrome/browser/shared/model/browser_state",
    "//ios/chrome/browser/shared/model/profile",
    "//ios/chrome/browser/shared/public/commands",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/browser/shared/ui/table_view",
    "//ios/chrome/browser/shared/ui/table_view/cells",
    "//ios/chrome/browser/ui/settings:settings_root",
    "//ios/chrome/browser/ui/settings/clear_browsing_data",
    "//ios/chrome/browser/ui/settings/clear_browsing_data:features",
    "//ios/chrome/browser/ui/settings/privacy/lockdown_mode",
    "//ios/chrome/browser/ui/settings/privacy/privacy_guide",
    "//ios/chrome/browser/ui/settings/utils",
    "//ios/chrome/common/ui/reauthentication",
    "//ui/base",
  ]
  frameworks = [ "UIKit.framework" ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "privacy_safe_browsing_mediator_unittest.mm",
    "privacy_safe_browsing_view_controller_unittest.mm",
    "privacy_table_view_controller_unittest.mm",
  ]
  deps = [
    "//base/test:test_support",
    "//build:branding_buildflags",
    "//components/feature_engagement/public",
    "//components/feature_engagement/test:test_support",
    "//components/handoff",
    "//components/policy/core/common:common_constants",
    "//components/prefs",
    "//components/prefs:test_support",
    "//components/prefs/ios",
    "//components/safe_browsing/core/common",
    "//components/safe_browsing/core/common:safe_browsing_prefs",
    "//components/safe_browsing/core/common/hashprefix_realtime:hash_realtime_utils",
    "//components/strings",
    "//components/sync:test_support",
    "//components/sync_preferences",
    "//components/sync_preferences:test_support",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/browsing_data/model:feature_flags",
    "//ios/chrome/browser/feature_engagement/model",
    "//ios/chrome/browser/policy/model:policy_util",
    "//ios/chrome/browser/shared/model/application_context",
    "//ios/chrome/browser/shared/model/browser/test:test_support",
    "//ios/chrome/browser/shared/model/prefs",
    "//ios/chrome/browser/shared/model/prefs:browser_prefs",
    "//ios/chrome/browser/shared/model/prefs:pref_names",
    "//ios/chrome/browser/shared/model/profile/test",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/browser/shared/public/features:system_flags",
    "//ios/chrome/browser/shared/ui/list_model",
    "//ios/chrome/browser/shared/ui/table_view:test_support",
    "//ios/chrome/browser/shared/ui/table_view:utils",
    "//ios/chrome/browser/shared/ui/table_view/cells",
    "//ios/chrome/browser/sync/model",
    "//ios/chrome/browser/sync/model:test_support",
    "//ios/chrome/browser/ui/settings/privacy:privacy_ui",
    "//ios/chrome/browser/ui/settings/privacy/privacy_guide:features",
    "//ios/chrome/browser/ui/settings/utils",
    "//ios/chrome/browser/web/model:feature_flags",
    "//ios/chrome/test:test_support",
    "//ios/components/security_interstitials/https_only_mode:feature",
    "//ios/web/public/test",
    "//testing/gtest",
    "//third_party/ocmock:ocmock",
    "//ui/base",
  ]
}

source_set("eg2_tests") {
  configs += [ "//build/config/ios:xctest_config" ]
  testonly = true
  sources = [ "privacy_safe_browsing_egtest.mm" ]
  deps = [
    "//base",
    "//base/test:test_support",
    "//components/password_manager/core/common",
    "//components/password_manager/core/common:features",
    "//components/safe_browsing/core/common",
    "//components/safe_browsing/core/common:safe_browsing_prefs",
    "//components/strings",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/signin/model:fake_system_identity",
    "//ios/chrome/browser/ui/authentication:eg_test_support+eg2",
    "//ios/chrome/browser/ui/popup_menu/overflow_menu:feature_flags",
    "//ios/chrome/browser/ui/settings/privacy:privacy_constants",
    "//ios/chrome/browser/ui/settings/privacy/safe_browsing:safe_browsing_constants",
    "//ios/chrome/common/ui/table_view:cells_constants",
    "//ios/chrome/test/earl_grey:eg_test_support+eg2",
    "//ios/testing/earl_grey:eg_test_support+eg2",
    "//ui/base",
  ]
  frameworks = [ "UIKit.framework" ]
}