# 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.
if (is_linux) {
executable("chrome_management_service") {
sources = [ "chrome_management_service_main.cc" ]
deps = [
":management_service",
":metrics",
":rotate_util",
"//base",
"//chrome/browser/enterprise/connectors/device_trust/key_management/core:constants",
"//mojo/core/embedder",
]
}
source_set("management_service") {
public = [ "chrome_management_service.h" ]
sources = [ "chrome_management_service.cc" ]
public_deps = [
"//base",
"//chrome/browser/enterprise/connectors/device_trust/key_management/installer:elevated_rotation",
"//components/version_info",
]
deps = [
":metrics",
":rotate_util",
"//chrome/browser/enterprise/connectors/device_trust/key_management/core:constants",
"//chrome/browser/enterprise/connectors/device_trust/key_management/core/network",
"//chrome/browser/enterprise/connectors/device_trust/key_management/installer/management_service/mojo_helper",
"//chrome/common:channel_info",
"//mojo/public/cpp/bindings",
"//services/network/public/cpp",
"//services/network/public/mojom",
"//third_party/abseil-cpp:absl",
"//url",
]
}
}
if (is_linux || is_win) {
source_set("metrics") {
public = [ "metrics_utils.h" ]
sources = [ "metrics_utils.cc" ]
deps = [ "//base" ]
}
source_set("rotate_util") {
public = [ "rotate_util.h" ]
sources = [ "rotate_util.cc" ]
public_deps = [ "//components/version_info:channel" ]
deps = [
":metrics",
"//base",
"//chrome/browser/enterprise/connectors/device_trust/key_management/core:constants",
"//chrome/browser/enterprise/connectors/device_trust/key_management/installer:elevated_rotation",
"//third_party/abseil-cpp:absl",
"//url",
]
}
}
source_set("unit_tests") {
testonly = true
sources = [ "rotate_util_unittest.cc" ]
deps = [
":metrics",
":rotate_util",
"//base",
"//base/test:test_support",
"//chrome/browser/enterprise/connectors/device_trust/key_management/core:constants",
"//chrome/browser/enterprise/connectors/device_trust/key_management/core/network:test_support",
"//chrome/browser/enterprise/connectors/device_trust/key_management/core/persistence:test_support",
"//chrome/browser/enterprise/connectors/device_trust/key_management/installer:elevated_rotation",
"//components/policy/proto",
"//testing/gtest",
]
if (is_linux) {
sources += [ "chrome_management_service_unittest.cc" ]
deps += [
":management_service",
":metrics",
"//chrome/browser/enterprise/connectors/device_trust/key_management/installer/management_service/mojo_helper",
"//chrome/browser/enterprise/connectors/device_trust/key_management/installer/management_service/mojo_helper:test_support",
"//services/network:test_support",
]
}
}