chromium/chrome/browser/ash/fileapi/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("fileapi") {
  sources = [
    "copy_from_fd.cc",
    "copy_from_fd.h",
    "diversion_backend_delegate.cc",
    "diversion_backend_delegate.h",
    "diversion_file_manager.cc",
    "diversion_file_manager.h",
    "external_file_resolver.cc",
    "external_file_resolver.h",
    "external_file_url_loader_factory.cc",
    "external_file_url_loader_factory.h",
    "external_file_url_util.cc",
    "external_file_url_util.h",
    "fallback_copy_in_foreign_file.cc",
    "fallback_copy_in_foreign_file.h",
    "file_access_permissions.cc",
    "file_access_permissions.h",
    "file_accumulator.cc",
    "file_accumulator.h",
    "file_change_service.cc",
    "file_change_service.h",
    "file_change_service_factory.cc",
    "file_change_service_factory.h",
    "file_change_service_observer.h",
    "file_system_backend.cc",
    "file_system_backend.h",
    "file_system_backend_delegate.h",
    "mtp_file_system_backend_delegate.cc",
    "mtp_file_system_backend_delegate.h",
    "mtp_watcher_manager.cc",
    "mtp_watcher_manager.h",
    "observable_file_system_operation_impl.cc",
    "observable_file_system_operation_impl.h",
    "recent_arc_media_source.cc",
    "recent_arc_media_source.h",
    "recent_disk_source.cc",
    "recent_disk_source.h",
    "recent_drive_source.cc",
    "recent_drive_source.h",
    "recent_file.cc",
    "recent_file.h",
    "recent_model.cc",
    "recent_model.h",
    "recent_model_factory.cc",
    "recent_model_factory.h",
    "recent_source.cc",
    "recent_source.h",
  ]

  public_deps = [
    "//ash/components/arc/mojom",
    "//base",
    "//base:i18n",
    "//chrome/browser:browser_public_dependencies",
    "//chrome/browser/profiles:profile",
    "//chromeos/ash/components/drivefs/mojom",
    "//components/account_id",
    "//components/drive",
    "//components/file_access",
    "//components/keyed_service/core",
    "//mojo/public/cpp/bindings",
    "//net",
    "//services/network/public/cpp",
    "//services/network/public/mojom",
    "//storage/browser",
    "//storage/common",
    "//url",
  ]

  deps = [
    "//ash/constants",
    "//ash/webui/file_manager:constants",
    "//build:buildflag_header_h",
    "//chrome/browser:browser_process",
    "//chrome/browser/ash/drive",
    "//chrome/browser/ash/profiles",
    "//chrome/common:common",
    "//chrome/common/extensions/api",
    "//chromeos/ash/components/dbus/cros_disks",
    "//chromeos/ash/components/drivefs",
    "//components/user_manager",
    "//content/public/browser",
    "//extensions/browser/api/file_handlers",
    "//extensions/common",
    "//mojo/public/c/system:headers",
    "//mojo/public/cpp/system",
    "//services/network/public/cpp:cpp_base",
    "//services/network/public/mojom:url_loader_base",
    "//third_party/blink/public/common:headers",
    "//ui/file_manager/base/gn:file_types_data_cpp",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "copy_from_fd_unittest.cc",
    "diversion_backend_delegate_unittest.cc",
    "diversion_file_manager_unittest.cc",
    "external_file_url_loader_factory_unittest.cc",
    "external_file_url_util_unittest.cc",
    "fallback_copy_in_foreign_file_unittest.cc",
    "file_access_permissions_unittest.cc",
    "file_accumulator_unittest.cc",
    "file_change_service_unittest.cc",
    "file_system_backend_unittest.cc",
    "recent_arc_media_source_unittest.cc",
    "recent_disk_source_unittest.cc",
    "recent_model_unittest.cc",
    "recent_source_unittest.cc",
  ]

  deps = [
    "//ash/components/arc:arc_test_support",
    "//ash/components/arc:notification_test_support",
    "//ash/components/arc/mojom",
    "//ash/components/arc/session",
    "//base",
    "//base/test:test_support",
    "//chrome/browser",
    "//chrome/browser/ash/arc",
    "//chrome/browser/ash/arc/fileapi",
    "//chrome/browser/ash/file_manager",
    "//chrome/browser/ash/file_system_provider",
    "//chrome/browser/ash/file_system_provider:test_support",
    "//chrome/browser/ash/fileapi",
    "//chrome/browser/ash/fileapi/test:test_support",
    "//chrome/browser/ash/login/users:test_support",
    "//chrome/browser/profiles:profile",
    "//chrome/test:test_support",
    "//chromeos/ash/components/dbus/cros_disks",
    "//components/drive",
    "//components/keyed_service/content",
    "//components/user_manager",
    "//content/public/browser",
    "//content/test:test_support",
    "//extensions/common",
    "//mojo/public/cpp/system",
    "//mojo/public/cpp/test_support:test_utils",
    "//net",
    "//net:test_support",
    "//net/traffic_annotation:test_support",
    "//services/network:test_support",
    "//services/network/public/cpp:cpp_base",
    "//storage/browser",
    "//storage/browser:test_support",
    "//storage/common",
    "//testing/gmock",
    "//testing/gtest",
    "//third_party/blink/public/common:headers",
    "//url",
  ]
}