blob: 8415d55fe28befb40cdfa139825dc154315f6650 [file] [log] [blame]
# Copyright 2016 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.
if (is_android) {
import("//build/config/android/rules.gni")
}
static_library("background_offliner") {
sources = [
"add_request_task.cc",
"add_request_task.h",
"change_requests_state_task.cc",
"change_requests_state_task.h",
"device_conditions.h",
"get_requests_task.cc",
"get_requests_task.h",
"initialize_store_task.cc",
"initialize_store_task.h",
"mark_attempt_aborted_task.cc",
"mark_attempt_aborted_task.h",
"mark_attempt_completed_task.cc",
"mark_attempt_completed_task.h",
"mark_attempt_started_task.cc",
"mark_attempt_started_task.h",
"offliner.h",
"offliner_factory.h",
"offliner_policy.h",
"pick_request_task.cc",
"pick_request_task.h",
"pick_request_task_factory.cc",
"pick_request_task_factory.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.h",
"request_queue_store_sql.cc",
"request_queue_store_sql.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_pages:offline_pages",
"//components/offline_pages:switches",
"//components/offline_pages/core",
"//net",
"//sql:sql",
"//url",
]
}
static_library("test_support") {
testonly = true
sources = [
"network_quality_provider_stub.cc",
"network_quality_provider_stub.h",
"offliner_factory_stub.cc",
"offliner_factory_stub.h",
"offliner_stub.cc",
"offliner_stub.h",
"request_queue_in_memory_store.cc",
"request_queue_in_memory_store.h",
"scheduler_stub.cc",
"scheduler_stub.h",
]
deps = [
":background_offliner",
"//base",
"//net",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"add_request_task_unittest.cc",
"change_requests_state_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",
"pick_request_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_pages:offline_pages",
"//components/offline_pages:switches",
"//testing/gtest",
"//url",
]
}