# Copyright 2021 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")
assert(is_chromeos_ash, "Non-Chrome-OS builds must not depend on //ash")
component("fwupd") {
defines = [ "IS_CHROMEOS_ASH_COMPONENTS_FWUPD_IMPL" ]
deps = [
"//ash/public/cpp",
"//ash/public/mojom",
"//ash/webui/firmware_update_ui/mojom",
"//base:base",
"//chromeos/ash/components/dbus/fwupd",
"//chromeos/ash/components/network",
"//components/device_event_log",
"//crypto",
"//dbus",
"//third_party/zlib/google:compression_utils",
]
sources = [
"firmware_update_manager.cc",
"firmware_update_manager.h",
"histogram_util.cc",
"histogram_util.h",
]
}
source_set("unit_tests") {
testonly = true
deps = [
":fwupd",
":test_support",
"//ash",
"//ash/constants",
"//ash/webui/firmware_update_ui/mojom",
"//base/test:test_support",
"//chromeos/ash/components/dbus/fwupd",
"//chromeos/ash/components/network",
"//chromeos/ash/components/network:test_support",
"//dbus",
"//dbus:test_support",
"//testing/gmock",
"//testing/gtest",
"//ui/message_center",
"//ui/message_center:test_support",
]
sources = [ "firmware_update_manager_unittest.cc" ]
}
source_set("test_support") {
testonly = true
public_deps = [
"//ash/public/cpp",
"//base",
"//services/network:test_support",
]
deps = [
"//mojo/public/cpp/bindings",
"//net/traffic_annotation",
"//services/network/public/cpp",
]
sources = [
"fake_fwupd_download_client.cc",
"fake_fwupd_download_client.h",
]
}