naiveproxy/components/download/internal/common/BUILD.gn
2018-12-09 21:59:24 -05:00

123 lines
3.2 KiB
Plaintext

# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
source_set("internal") {
visibility = [
":for_tests",
"//components/download/public/common:public",
]
configs += [
"//components/download/public/common:components_download_implementation",
]
sources = [
"base_file.cc",
"base_file_win.cc",
"download_create_info.cc",
"download_db_cache.cc",
"download_db_cache.h",
"download_file_factory.cc",
"download_file_impl.cc",
"download_interrupt_reasons_impl.cc",
"download_interrupt_reasons_utils.cc",
"download_item_impl.cc",
"download_item_impl_delegate.cc",
"download_job.cc",
"download_job_factory.cc",
"download_job_impl.cc",
"download_job_impl.h",
"download_response_handler.cc",
"download_stats.cc",
"download_task_runner.cc",
"download_ukm_helper.cc",
"download_url_loader_factory_getter.cc",
"download_url_loader_factory_getter_impl.cc",
"download_utils.cc",
"download_worker.cc",
"download_worker.h",
"in_progress_download_manager.cc",
"parallel_download_job.cc",
"parallel_download_job.h",
"parallel_download_utils.cc",
"parallel_download_utils.h",
"rate_estimator.cc",
"resource_downloader.cc",
"resource_downloader.h",
"save_package_download_job.cc",
"save_package_download_job.h",
"stream_handle_input_stream.cc",
"url_download_handler_factory.cc",
"url_download_request_handle.cc",
]
public_deps = [
"//services/network/public/mojom",
]
deps = [
"//base",
"//components/download/database",
"//components/download/public/common:interfaces",
"//components/download/quarantine",
"//components/leveldb_proto",
"//mojo/public/c/system",
"//net",
"//services/metrics/public/cpp:ukm_builders",
"//services/network/public/cpp",
]
if (is_posix || is_fuchsia) {
sources += [ "base_file_posix.cc" ]
}
}
# tests need to access both public and internal sources. So in the component
# build case, we exclude the internal dependency as it is included in the
# test_support target under public.
group("for_tests") {
visibility = [ ":unit_tests" ]
if (!is_component_build) {
public_deps = [
":internal",
]
}
}
source_set("unit_tests") {
testonly = true
if (is_component_build) {
check_includes = false
}
sources = [
"base_file_unittest.cc",
"base_file_win_unittest.cc",
"download_db_cache_unittest.cc",
"download_file_unittest.cc",
"download_item_impl_unittest.cc",
"download_stats_unittest.cc",
"download_ukm_helper_unittest.cc",
"parallel_download_job_unittest.cc",
"parallel_download_utils_unittest.cc",
"rate_estimator_unittest.cc",
]
deps = [
":for_tests",
"//base/test:test_support",
"//components/download/database",
"//components/download/public/common:test_support",
"//components/leveldb_proto",
"//components/leveldb_proto:test_support",
"//components/ukm:test_support",
"//crypto",
"//net",
"//services/metrics/public/cpp:ukm_builders",
"//testing/gmock",
"//testing/gtest",
]
}