chromium/components/offline_pages/core/downloads/BUILD.gn

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

if (is_android) {
  import("//build/config/android/rules.gni")
}

static_library("offline_pages_ui_adapter") {
  sources = [
    "offline_item_conversions.cc",
    "offline_item_conversions.h",
  ]

  deps = [
    "//base",
    "//components/offline_items_collection/core",
    "//components/offline_pages/core",
    "//components/offline_pages/core:switches",
    "//components/offline_pages/core/background:background_offliner",
  ]

  if (is_android) {
    sources += [
      "download_ui_adapter.cc",
      "download_ui_adapter.h",
    ]

    deps += [ "//ui/gfx" ]
  }
}

source_set("unit_tests") {
  testonly = true
  sources = [ "offline_item_conversions_unittest.cc" ]

  deps = [
    ":offline_pages_ui_adapter",
    "//base",
    "//base/test:test_support",
    "//components/offline_items_collection/core",
    "//components/offline_items_collection/core/test_support",
    "//components/offline_pages/core",
    "//components/offline_pages/core:switches",
    "//components/offline_pages/core:test_support",
    "//components/offline_pages/core/background:background_offliner",
    "//components/offline_pages/core/background:test_support",
    "//testing/gmock",
    "//testing/gtest",
    "//ui/gfx:test_support",
  ]

  if (is_android) {
    sources += [ "download_ui_adapter_unittest.cc" ]
  }
}