# 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("background_offliner") {
sources = [
"change_requests_state_task.cc",
"change_requests_state_task.h",
"cleanup_task.cc",
"cleanup_task.h",
"cleanup_task_factory.cc",
"cleanup_task_factory.h",
"connection_notifier.cc",
"connection_notifier.h",
"device_conditions.h",
"get_requests_task.cc",
"get_requests_task.h",
"initialize_store_task.cc",
"initialize_store_task.h",
"load_termination_listener.h",
"mark_attempt_aborted_task.cc",
"mark_attempt_aborted_task.h",
"mark_attempt_completed_task.cc",
"mark_attempt_completed_task.h",
"mark_attempt_deferred_task.cc",
"mark_attempt_deferred_task.h",
"mark_attempt_started_task.cc",
"mark_attempt_started_task.h",
"offliner.cc",
"offliner.h",
"offliner_client.cc",
"offliner_client.h",
"offliner_policy.h",
"offliner_policy_utils.cc",
"offliner_policy_utils.h",
"pending_state_updater.cc",
"pending_state_updater.h",
"pick_request_task.cc",
"pick_request_task.h",
"reconcile_task.cc",
"reconcile_task.h",
"remove_requests_task.cc",
"remove_requests_task.h",
"request_coordinator.cc",
"request_coordinator.h",
"request_coordinator_event_logger.cc",
"request_coordinator_event_logger.h",
"request_notifier.h",
"request_queue.cc",
"request_queue.h",
"request_queue_results.h",
"request_queue_store.cc",
"request_queue_store.h",
"save_page_request.cc",
"save_page_request.h",
"scheduler.h",
"update_request_task.cc",
"update_request_task.h",
]
deps = [
"//base",
"//components/keyed_service/core",
"//components/offline_items_collection/core",
"//components/offline_pages/core",
"//components/offline_pages/core:switches",
"//components/offline_pages/task",
"//net",
"//services/network/public/cpp",
"//sql:sql",
"//url",
]
}
static_library("test_support") {
testonly = true
sources = [
"offliner_stub.cc",
"offliner_stub.h",
"request_coordinator_stub_taco.cc",
"request_coordinator_stub_taco.h",
"request_queue_task_test_base.cc",
"request_queue_task_test_base.h",
"scheduler_stub.cc",
"scheduler_stub.h",
"test_request_queue_store.cc",
"test_request_queue_store.h",
"test_util.cc",
]
deps = [
":background_offliner",
"//base",
"//base/test:test_support",
"//components/offline_items_collection/core/test_support",
"//net",
"//services/network:test_support",
"//services/network/public/cpp",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"change_requests_state_task_unittest.cc",
"cleanup_task_unittest.cc",
"get_requests_task_unittest.cc",
"initialize_store_task_unittest.cc",
"mark_attempt_aborted_task_unittest.cc",
"mark_attempt_completed_task_unittest.cc",
"mark_attempt_started_task_unittest.cc",
"offliner_client_unittest.cc",
"pick_request_task_unittest.cc",
"reconcile_task_unittest.cc",
"remove_requests_task_unittest.cc",
"request_coordinator_event_logger_unittest.cc",
"request_coordinator_unittest.cc",
"request_queue_store_unittest.cc",
"request_queue_unittest.cc",
"save_page_request_unittest.cc",
]
deps = [
":background_offliner",
":test_support",
"//base",
"//base/test:test_support",
"//components/offline_items_collection/core",
"//components/offline_pages/core",
"//components/offline_pages/core:switches",
"//services/network:test_support",
"//services/network/public/cpp",
"//sql:sql",
"//testing/gmock",
"//testing/gtest",
"//url",
]
}