# Copyright 2019 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/config.gni")
import("//build/config/android/rules.gni")
}
source_set("public") {
sources = [
"empty_task_scheduler.cc",
"empty_task_scheduler.h",
"task_manager.cc",
"task_manager.h",
"task_manager_impl.cc",
"task_manager_impl.h",
"task_scheduler.h",
]
public_deps = [
":task_type",
"//base",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
}
source_set("task_type") {
sources = [ "download_task_types.h" ]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
}
if (is_android) {
android_library("public_java") {
srcjar_deps = [ ":jni_enums" ]
deps = [ "//third_party/androidx:androidx_annotation_annotation_java" ]
}
java_cpp_enum("jni_enums") {
visibility = [ "*" ]
sources = [ "download_task_types.h" ]
}
}
source_set("test_support") {
testonly = true
sources = [
"mock_task_manager.cc",
"mock_task_manager.h",
]
public_deps = [
":public",
"//testing/gmock",
]
}
source_set("unit_tests") {
testonly = true
sources = [ "task_manager_unittest.cc" ]
deps = [
":public",
"//base/test:test_support",
"//testing/gmock",
"//testing/gtest",
]
}