chromium/chrome/browser/ash/policy/skyvault/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("skyvault") {
  sources = [
    "drive_skyvault_uploader.cc",
    "drive_skyvault_uploader.h",
    "drive_upload_observer.cc",
    "drive_upload_observer.h",
    "file_location_utils.cc",
    "file_location_utils.h",
    "local_files_cleanup.cc",
    "local_files_cleanup.h",
    "local_files_migration_constants.h",
    "local_files_migration_manager.cc",
    "local_files_migration_manager.h",
    "local_user_files_policy_observer.cc",
    "local_user_files_policy_observer.h",
    "migration_coordinator.cc",
    "migration_coordinator.h",
    "migration_notification_manager.cc",
    "migration_notification_manager.h",
    "odfs_skyvault_uploader.cc",
    "odfs_skyvault_uploader.h",
    "policy_utils.cc",
    "policy_utils.h",
    "signin_notification_helper.cc",
    "signin_notification_helper.h",
    "skyvault_capture_upload_notification.cc",
    "skyvault_capture_upload_notification.h",
    "skyvault_rename_handler.cc",
    "skyvault_rename_handler.h",
  ]

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

  deps = [
    "//ash/constants",
    "//ash/public/cpp",
    "//ash/resources/vector_icons",
    "//ash/strings",
    "//base",
    "//chrome/browser:browser_process",
    "//chrome/browser/ash/drive",
    "//chrome/browser/ash/file_manager",
    "//chrome/browser/ash/guest_os/public",
    "//chrome/browser/ash/policy/core",
    "//chrome/browser/chromeos/extensions/login_screen/login/cleanup",
    "//chrome/browser/profiles:profile",
    "//chrome/browser/ui/webui/ash/skyvault",
    "//chrome/common:chrome_features",
    "//chrome/common:constants",
    "//chromeos/ash/components/browser_context_helper",
    "//chromeos/ash/components/cryptohome",
    "//chromeos/ash/components/dbus/userdataauth:userdataauth_proto",
    "//chromeos/ash/components/drivefs",
    "//chromeos/ash/components/drivefs/mojom",
    "//components/download/public/common:public",
    "//components/drive",
    "//components/keyed_service/content",
    "//components/keyed_service/core",
    "//components/prefs",
    "//components/strings:components_strings",
    "//components/vector_icons",
    "//content/public/browser",
    "//storage/browser",
    "//ui/base",
    "//ui/chromeos/styles:cros_tokens_color_mappings",
    "//ui/message_center/public/cpp",
  ]

  allow_circular_includes_from = [
    "//chrome/browser/ash/file_manager",
    "//chrome/browser/ash/guest_os/public",
    "//chrome/browser/ash/policy/core",
    "//chrome/browser/ui/webui/ash/skyvault",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "signin_notification_helper_unittest.cc",
    "skyvault_capture_upload_notification_unittest.cc",
    "skyvault_rename_handler_unittest.cc",
  ]

  deps = [
    "//base/test:test_support",
    "//chrome/browser/ash/file_manager",
    "//chrome/browser/ash/policy/skyvault",
    "//chrome/browser/profiles:profile",
    "//chrome/test:test_support",
    "//components/download/public/common:test_support",
    "//content/test:test_support",
    "//storage/browser",
    "//testing/gtest",
  ]
}

source_set("browser_tests") {
  testonly = true

  defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]

  sources = [
    "drive_skyvault_uploader_browsertest.cc",
    "drive_upload_observer_browsertest.cc",
    "file_location_utils_browsertest.cc",
    "local_files_cleanup_browsertest.cc",
    "local_files_migration_manager_browsertest.cc",
    "local_user_files_policy_observer_browsertest.cc",
    "migration_coordinator_browsertest.cc",
    "migration_notification_manager_browsertest.cc",
    "odfs_skyvault_uploader_browsertest.cc",
    "policy_utils_browsertest.cc",
    "skyvault_test_base.cc",
    "skyvault_test_base.h",
  ]

  deps = [
    ":skyvault",
    "//base",
    "//base/test:test_support",
    "//chrome/browser",
    "//chrome/browser:browser_process",
    "//chrome/browser/ash/drive",
    "//chrome/browser/ash/file_manager",
    "//chrome/browser/ash/file_manager:test_support",
    "//chrome/browser/ash/file_system_provider",
    "//chrome/browser/ash/file_system_provider:test_support",
    "//chrome/browser/policy:test_support",
    "//chrome/browser/profiles:profile",
    "//chrome/browser/ui",
    "//chrome/browser/ui/webui/ash/cloud_upload",
    "//chrome/browser/ui/webui/ash/skyvault",
    "//chrome/common",
    "//chrome/common:chrome_features",
    "//chrome/common:constants",
    "//chrome/test:test_support",
    "//chrome/test:test_support_ui",
    "//chromeos/ash/components/dbus/userdataauth",
    "//chromeos/ash/components/dbus/userdataauth:test_support",
    "//chromeos/ash/components/drivefs/mojom",
    "//chromeos/constants",
    "//components/drive",
    "//components/policy:generated",
    "//components/policy/core/common",
    "//components/prefs",
    "//content/public/browser",
    "//content/test:test_support",
    "//mojo/public/cpp/bindings",
    "//net",
    "//storage/browser",
    "//testing/gmock",
    "//testing/gtest",
    "//ui/message_center/public/cpp",
  ]
}