chromium/chrome/browser/ash/policy/external_data/handlers/BUILD.gn

# Copyright 2024 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)

static_library("handlers") {
  sources = [
    "crostini_ansible_playbook_external_data_handler.cc",
    "crostini_ansible_playbook_external_data_handler.h",
    "device_cloud_external_data_policy_handler.cc",
    "device_cloud_external_data_policy_handler.h",
    "device_print_servers_external_data_handler.cc",
    "device_print_servers_external_data_handler.h",
    "device_printers_external_data_handler.cc",
    "device_printers_external_data_handler.h",
    "device_wallpaper_image_external_data_handler.cc",
    "device_wallpaper_image_external_data_handler.h",
    "preconfigured_desk_templates_external_data_handler.cc",
    "preconfigured_desk_templates_external_data_handler.h",
    "print_servers_external_data_handler.cc",
    "print_servers_external_data_handler.h",
    "printers_external_data_handler.cc",
    "printers_external_data_handler.h",
    "user_avatar_image_external_data_handler.cc",
    "user_avatar_image_external_data_handler.h",
    "wallpaper_image_external_data_handler.cc",
    "wallpaper_image_external_data_handler.h",
  ]

  public_deps = [ "//chrome/browser:browser_public_dependencies" ]

  deps = [
    "//base",
    "//chrome/browser/ash/crostini",
    "//chrome/browser/ash/login/users/avatar",
    "//chrome/browser/ash/policy/core",
    "//chrome/browser/ash/policy/external_data",
    "//chrome/browser/ash/printing/enterprise",
    "//chrome/browser/ash/profiles",
    "//chrome/browser/profiles:profile",
    "//chrome/common:constants",
    "//chromeos/ash/components/settings",
    "//components/policy:generated",
    "//components/prefs",
  ]

  allow_circular_includes_from = [ "//chrome/browser/ash/policy/core" ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "device_print_servers_external_data_handler_unittest.cc",
    "device_printers_external_data_handler_unittest.cc",
  ]

  deps = [
    ":handlers",
    "//base/test:test_support",
    "//chrome/browser/ash/printing",
    "//chrome/browser/ash/printing/enterprise",
    "//chromeos/ash/components/settings",
    "//chromeos/printing",
    "//components/policy:generated",
    "//components/policy/core/common",
    "//components/policy/core/common:test_support",
    "//components/policy/proto:",
    "//components/sync_preferences:test_support",
    "//content/test:test_support",
    "//testing/gmock",
    "//testing/gtest",
  ]
}