# Copyright 2022 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/chromeos/ui_mode.gni")
import("//printing/buildflags/buildflags.gni")
import("//third_party/protobuf/proto_library.gni")
assert(is_chromeos_ash)
static_library("history") {
sources = [
"print_job_database.h",
"print_job_database_impl.cc",
"print_job_database_impl.h",
"print_job_history_cleaner.cc",
"print_job_history_cleaner.h",
"print_job_history_service.cc",
"print_job_history_service.h",
"print_job_history_service_factory.cc",
"print_job_history_service_factory.h",
"print_job_history_service_impl.cc",
"print_job_history_service_impl.h",
"print_job_info_proto_conversions.cc",
"print_job_info_proto_conversions.h",
"print_job_reporting_service.h",
"print_job_reporting_service_factory.cc",
"print_job_reporting_service_factory.h",
"print_job_reporting_service_impl.cc",
]
deps = [
":print_job_info_proto",
"//chrome/browser/profiles",
"//chrome/common:constants",
"//chromeos/ash/components/settings",
"//components/policy/proto",
"//components/pref_registry",
"//components/reporting/client:report_queue",
"//components/reporting/client:report_queue_configuration",
"//components/reporting/client:report_queue_factory",
"//components/reporting/proto:record_constants",
"//components/reporting/proto:record_proto",
"//components/reporting/util:status",
"//components/user_manager",
"//content/public/browser",
"//printing/mojom:mojom",
]
if (use_cups) {
deps += [ "//chrome/browser/chromeos/printing" ]
}
public_deps = [
"//chrome/browser:browser_public_dependencies",
"//printing",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"print_job_database_impl_unittest.cc",
"print_job_history_cleaner_unittest.cc",
"print_job_history_service_impl_unittest.cc",
"print_job_info_proto_conversions_unittest.cc",
"print_job_reporting_service_unittest.cc",
]
deps = [
":history",
":print_job_info_proto",
":test_support",
"//base/test:test_support",
"//chrome/browser/ash/login/users:test_support",
"//chrome/browser/ash/printing",
"//chrome/browser/ash/printing:test_support",
"//chrome/browser/ash/settings:test_support",
"//chrome/test:test_support",
"//chromeos/ash/components/settings",
"//components/prefs:test_support",
"//components/reporting/client:report_queue",
"//components/reporting/client:test_support",
"//components/user_manager",
"//content/test:test_support",
"//testing/gmock",
"//testing/gtest",
]
if (use_cups) {
deps += [ "//chrome/browser/chromeos/printing" ]
}
}
static_library("test_support") {
testonly = true
sources = [
"mock_print_job_history_service.cc",
"mock_print_job_history_service.h",
"test_print_job_database.cc",
"test_print_job_database.h",
"test_print_job_history_service_observer.cc",
"test_print_job_history_service_observer.h",
]
deps = [
":history",
":print_job_info_proto",
"//base",
"//testing/gmock",
]
}
proto_library("print_job_info_proto") {
sources = [ "print_job_info.proto" ]
proto_out_dir = "chrome/browser/ash/printing/history"
}