chromium/ios/chrome/browser/ui/save_to_drive/BUILD.gn

# Copyright 2023 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

source_set("save_to_drive") {
  sources = [
    "save_to_drive_coordinator.h",
    "save_to_drive_coordinator.mm",
    "save_to_drive_mediator.h",
    "save_to_drive_mediator.mm",
  ]
  deps = [
    ":file_destination_picker",
    ":util",
    "//base",
    "//components/strings:components_strings_grit",
    "//ios/chrome/app/strings:ios_strings_grit",
    "//ios/chrome/browser/account_picker/ui_bundled",
    "//ios/chrome/browser/account_picker/ui_bundled:account_picker_configuration",
    "//ios/chrome/browser/account_picker/ui_bundled:account_picker_consumer",
    "//ios/chrome/browser/account_picker/ui_bundled:account_picker_logger",
    "//ios/chrome/browser/download/model",
    "//ios/chrome/browser/drive/model:drive_file_uploader",
    "//ios/chrome/browser/drive/model:drive_service",
    "//ios/chrome/browser/drive/model:drive_service_factory",
    "//ios/chrome/browser/drive/model:drive_tab_helper",
    "//ios/chrome/browser/drive/model:manage_storage_url_util",
    "//ios/chrome/browser/drive/model:metrics",
    "//ios/chrome/browser/shared/coordinator/chrome_coordinator",
    "//ios/chrome/browser/shared/model/browser",
    "//ios/chrome/browser/shared/model/prefs:pref_names",
    "//ios/chrome/browser/shared/public/commands",
    "//ios/chrome/browser/signin/model",
    "//ios/chrome/browser/signin/model:system_identity",
    "//ios/chrome/browser/ui/authentication/signin:signin_headers",
    "//ios/web/public",
    "//ios/web/public/download",
    "//ui/base",
  ]
  frameworks = [ "UIKit.framework" ]
}

source_set("file_destination_picker_constants") {
  sources = [
    "file_destination_picker_constants.h",
    "file_destination_picker_constants.mm",
  ]
}

source_set("file_destination_picker") {
  sources = [
    "file_destination.h",
    "file_destination_picker_action_delegate.h",
    "file_destination_picker_consumer.h",
    "file_destination_picker_view_controller.h",
    "file_destination_picker_view_controller.mm",
  ]
  deps = [
    ":file_destination_picker_constants",
    "//ios/chrome/app/strings:ios_strings_grit",
    "//ios/chrome/browser/shared/ui/symbols",
    "//ios/chrome/browser/shared/ui/table_view:utils",
    "//ios/chrome/common/ui/colors",
    "//ui/base",
  ]
  public_deps = [ "//ios/chrome/browser/shared/ui/table_view" ]
  frameworks = [ "UIKit.framework" ]
}

source_set("util") {
  sources = [
    "save_to_drive_util.h",
    "save_to_drive_util.mm",
  ]
  deps = [
    "//base",
    "//ios/chrome/app/strings:ios_strings_grit",
    "//ios/chrome/browser/account_picker/ui_bundled:account_picker_configuration",
    "//ios/web/public/download",
    "//ui/base",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "save_to_drive_coordinator_unittest.mm",
    "save_to_drive_mediator_unittest.mm",
  ]
  deps = [
    ":save_to_drive",
    ":util",
    "//base/test:test_support",
    "//components/signin/public/identity_manager:test_support",
    "//ios/chrome/app/strings:ios_strings_grit",
    "//ios/chrome/browser/account_picker/ui_bundled",
    "//ios/chrome/browser/account_picker/ui_bundled:account_picker_configuration",
    "//ios/chrome/browser/download/model",
    "//ios/chrome/browser/drive/model:drive_service_factory",
    "//ios/chrome/browser/drive/model:drive_tab_helper",
    "//ios/chrome/browser/drive/model:metrics",
    "//ios/chrome/browser/drive/model:test_support",
    "//ios/chrome/browser/drive/model:upload_task",
    "//ios/chrome/browser/shared/model/browser/test:test_support",
    "//ios/chrome/browser/shared/model/profile/test",
    "//ios/chrome/browser/shared/model/web_state_list",
    "//ios/chrome/browser/shared/public/commands",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/browser/signin/model",
    "//ios/chrome/browser/signin/model:fake_system_identity",
    "//ios/chrome/browser/ui/authentication/signin:constants",
    "//ios/chrome/browser/ui/authentication/signin:signin_headers",
    "//ios/chrome/test/fakes",
    "//ios/web/public/download",
    "//ios/web/public/test/fakes",
    "//testing/gtest",
    "//third_party/ocmock",
  ]
}

source_set("eg2_tests") {
  configs += [ "//build/config/ios:xctest_config" ]
  testonly = true
  sources = [ "save_to_drive_egtest.mm" ]
  deps = [
    ":file_destination_picker_constants",
    "//components/policy:policy_code_generate",
    "//ios/chrome/browser/account_picker/ui_bundled/account_picker_confirmation:constants",
    "//ios/chrome/browser/account_picker/ui_bundled/account_picker_screen:account_picker_screen",
    "//ios/chrome/browser/download/ui_bundled:constants",
    "//ios/chrome/browser/drive/model:policy",
    "//ios/chrome/browser/drive/model:test_constants",
    "//ios/chrome/browser/policy/model:eg_test_support+eg2",
    "//ios/chrome/browser/shared/model/prefs:pref_names",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/browser/signin/model:fake_system_identity",
    "//ios/chrome/browser/ui/authentication:eg_test_support+eg2",
    "//ios/chrome/browser/ui/authentication/views:views_constants",
    "//ios/chrome/test:eg_test_support+eg2",
    "//ios/chrome/test/earl_grey:eg_test_support+eg2",
    "//ios/testing:embedded_test_server_support",
    "//ios/testing/earl_grey:eg_test_support+eg2",
    "//net:test_support",
  ]
  frameworks = [ "UIKit.framework" ]
}