chromium/chromeos/ash/services/multidevice_setup/public/cpp/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")

source_set("cpp") {
  sources = [
    "multidevice_setup_client.cc",
    "multidevice_setup_client.h",
    "multidevice_setup_client_impl.cc",
    "multidevice_setup_client_impl.h",
  ]

  public_deps = [
    "//base",
    "//chromeos/ash/components/multidevice",
    "//chromeos/ash/components/multidevice/logging",
    "//chromeos/ash/services/multidevice_setup/public/mojom",
    "//mojo/public/cpp/bindings",
  ]
}

source_set("auth_token_validator") {
  sources = [ "auth_token_validator.h" ]

  deps = [ "//base" ]
}

source_set("android_sms_app_helper_delegate") {
  sources = [ "android_sms_app_helper_delegate.h" ]

  deps = [ "//base" ]
}

source_set("android_sms_pairing_state_tracker") {
  sources = [
    "android_sms_pairing_state_tracker.cc",
    "android_sms_pairing_state_tracker.h",
  ]

  deps = [ "//base" ]
}

source_set("prefs") {
  sources = [
    "prefs.cc",
    "prefs.h",
  ]

  deps = [
    "//ash/constants",
    "//base",
    "//chromeos/ash/services/multidevice_setup/public/mojom",
    "//components/prefs:prefs",
  ]
}

source_set("first_run_field_trial") {
  sources = [
    "first_run_field_trial.cc",
    "first_run_field_trial.h",
  ]

  deps = [
    "//ash/constants",
    "//base",
    "//chromeos",
    "//components/variations/proto",
  ]
}

source_set("oobe_completion_tracker") {
  sources = [
    "oobe_completion_tracker.cc",
    "oobe_completion_tracker.h",
  ]

  deps = [
    "//base",
    "//components/keyed_service/core",
  ]
}

source_set("url_provider") {
  sources = [
    "url_provider.cc",
    "url_provider.h",
  ]

  deps = [
    "//ash/constants",
    "//base",
  ]
}

static_library("test_support") {
  testonly = true

  sources = [
    "fake_android_sms_app_helper_delegate.cc",
    "fake_android_sms_app_helper_delegate.h",
    "fake_android_sms_pairing_state_tracker.cc",
    "fake_android_sms_pairing_state_tracker.h",
    "fake_auth_token_validator.cc",
    "fake_auth_token_validator.h",
    "fake_multidevice_setup.cc",
    "fake_multidevice_setup.h",
    "fake_multidevice_setup_client.cc",
    "fake_multidevice_setup_client.h",
    "fake_privileged_host_device_setter.cc",
    "fake_privileged_host_device_setter.h",
  ]

  public_deps = [
    ":android_sms_app_helper_delegate",
    ":android_sms_pairing_state_tracker",
    ":auth_token_validator",
    ":cpp",
    "//chromeos/ash/services/multidevice_setup",
    "//chromeos/ash/services/multidevice_setup/public/mojom",
    "//testing/gmock",
    "//url",
  ]

  deps = [ "//base" ]
}

source_set("unit_tests") {
  testonly = true

  sources = [ "multidevice_setup_client_impl_unittest.cc" ]

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