chromium/chromeos/ash/services/multidevice_setup/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("//build/config/chromeos/ui_mode.gni")

assert(is_chromeos_ash, "Non-ChromeOS builds cannot depend on //ash")

static_library("multidevice_setup") {
  sources = [
    "account_status_change_delegate_notifier.cc",
    "account_status_change_delegate_notifier.h",
    "account_status_change_delegate_notifier_impl.cc",
    "account_status_change_delegate_notifier_impl.h",
    "android_sms_app_installing_status_observer.cc",
    "android_sms_app_installing_status_observer.h",
    "device_with_connectivity_status.cc",
    "device_with_connectivity_status.h",
    "eligible_host_devices_provider.cc",
    "eligible_host_devices_provider.h",
    "eligible_host_devices_provider_impl.cc",
    "eligible_host_devices_provider_impl.h",
    "feature_state_manager.cc",
    "feature_state_manager.h",
    "feature_state_manager_impl.cc",
    "feature_state_manager_impl.h",
    "global_state_feature_manager.h",
    "global_state_feature_manager_impl.cc",
    "global_state_feature_manager_impl.h",
    "grandfathered_easy_unlock_host_disabler.cc",
    "grandfathered_easy_unlock_host_disabler.h",
    "host_backend_delegate.cc",
    "host_backend_delegate.h",
    "host_backend_delegate_impl.cc",
    "host_backend_delegate_impl.h",
    "host_device_timestamp_manager.h",
    "host_device_timestamp_manager_impl.cc",
    "host_device_timestamp_manager_impl.h",
    "host_status_provider.cc",
    "host_status_provider.h",
    "host_status_provider_impl.cc",
    "host_status_provider_impl.h",
    "host_verifier.cc",
    "host_verifier.h",
    "host_verifier_impl.cc",
    "host_verifier_impl.h",
    "multidevice_setup_base.cc",
    "multidevice_setup_base.h",
    "multidevice_setup_impl.cc",
    "multidevice_setup_impl.h",
    "multidevice_setup_initializer.cc",
    "multidevice_setup_initializer.h",
    "multidevice_setup_service.cc",
    "multidevice_setup_service.h",
    "privileged_host_device_setter_base.cc",
    "privileged_host_device_setter_base.h",
    "privileged_host_device_setter_impl.cc",
    "privileged_host_device_setter_impl.h",
    "wifi_sync_notification_controller.cc",
    "wifi_sync_notification_controller.h",
  ]

  deps = [
    "//ash/constants",
    "//base",
    "//chromeos/ash/components/multidevice",
    "//chromeos/ash/components/multidevice/logging",
    "//chromeos/ash/services/device_sync/proto:util",
    "//chromeos/ash/services/device_sync/public/cpp",
    "//chromeos/ash/services/device_sync/public/mojom",
    "//chromeos/ash/services/multidevice_setup/proto",
    "//chromeos/ash/services/multidevice_setup/public/cpp:android_sms_app_helper_delegate",
    "//chromeos/ash/services/multidevice_setup/public/cpp:android_sms_pairing_state_tracker",
    "//chromeos/ash/services/multidevice_setup/public/cpp:auth_token_validator",
    "//chromeos/ash/services/multidevice_setup/public/cpp:oobe_completion_tracker",
    "//chromeos/ash/services/multidevice_setup/public/cpp:prefs",
    "//chromeos/ash/services/secure_channel/public/cpp/client",
    "//chromeos/ash/services/secure_channel/public/mojom",
    "//components/pref_registry",
    "//components/prefs:prefs",
    "//components/session_manager/core",
    "//url",
  ]

  public_deps = [ "//chromeos/ash/services/multidevice_setup/public/mojom" ]

  visibility = [
    ":*",
    "//chrome/browser",
    "//chrome/browser/ash",
    "//chrome/browser/ash/multidevice_debug",
    "//chrome/browser/ash/multidevice_setup",
    "//chrome/browser/chromeos",
    "//chrome/browser/ui",
    "//chrome/browser/ui/ash",
    "//chrome/browser/ui/ash/shell_delegate",
    "//chrome/browser/ui/webui/ash/login",
    "//chrome/browser/ui/webui/ash/multidevice_setup",
    "//chromeos/ash/services/multidevice_setup/public/cpp:test_support",
    "//chromeos/ash/services/multidevice_setup/public/cpp:unit_tests",
  ]
}

static_library("test_support") {
  testonly = true

  sources = [
    "fake_account_status_change_delegate.cc",
    "fake_account_status_change_delegate.h",
    "fake_account_status_change_delegate_notifier.h",
    "fake_eligible_host_devices_provider.cc",
    "fake_eligible_host_devices_provider.h",
    "fake_feature_state_manager.cc",
    "fake_feature_state_manager.h",
    "fake_feature_state_observer.cc",
    "fake_feature_state_observer.h",
    "fake_global_state_feature_manager.cc",
    "fake_global_state_feature_manager.h",
    "fake_host_backend_delegate.cc",
    "fake_host_backend_delegate.h",
    "fake_host_device_timestamp_manager.cc",
    "fake_host_device_timestamp_manager.h",
    "fake_host_status_observer.cc",
    "fake_host_status_observer.h",
    "fake_host_status_provider.cc",
    "fake_host_status_provider.h",
    "fake_host_verifier.cc",
    "fake_host_verifier.h",
  ]

  deps = [
    ":multidevice_setup",
    "//base",
    "//chromeos/ash/components/multidevice",
    "//chromeos/ash/services/multidevice_setup/public/mojom",
    "//testing/gmock",
    "//testing/gtest",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "account_status_change_delegate_notifier_impl_unittest.cc",
    "android_sms_app_installing_status_observer_unittest.cc",
    "eligible_host_devices_provider_impl_unittest.cc",
    "feature_state_manager_impl_unittest.cc",
    "global_state_feature_manager_impl_unittest.cc",
    "grandfathered_easy_unlock_host_disabler_unittest.cc",
    "host_backend_delegate_impl_unittest.cc",
    "host_device_timestamp_manager_impl_unittest.cc",
    "host_status_provider_impl_unittest.cc",
    "host_verifier_impl_unittest.cc",
    "multidevice_setup_impl_unittest.cc",
    "multidevice_setup_service_unittest.cc",
    "privileged_host_device_setter_impl_unittest.cc",
    "wifi_sync_notification_controller_unittest.cc",
  ]

  deps = [
    ":multidevice_setup",
    ":test_support",
    "//ash/constants",
    "//base",
    "//base/test:test_support",
    "//chromeos/ash/components/multidevice",
    "//chromeos/ash/components/multidevice:test_support",
    "//chromeos/ash/services/device_sync/public/cpp:test_support",
    "//chromeos/ash/services/multidevice_setup/public/cpp:oobe_completion_tracker",
    "//chromeos/ash/services/multidevice_setup/public/cpp:prefs",
    "//chromeos/ash/services/multidevice_setup/public/cpp:test_support",
    "//chromeos/ash/services/multidevice_setup/public/cpp:unit_tests",
    "//chromeos/ash/services/multidevice_setup/public/mojom",
    "//chromeos/ash/services/secure_channel/public/cpp/client:test_support",
    "//components/session_manager/core",
    "//components/sync_preferences:test_support",
    "//testing/gmock",
    "//testing/gtest",
  ]
}