# Copyright 2020 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/buildflag_header.gni")
import("//build/config/chromeos/ui_mode.gni")
import("//testing/test.gni")
assert(is_chromeos_ash, "Non ChromeOS builds must not depend on //chromeos/ash")
component("memory") {
defines = [ "IS_ASH_MEMORY_IMPL" ]
deps = [
"//base",
"//chromeos/ash/components/dbus",
"//chromeos/ash/components/dbus/resourced:resourced",
"//chromeos/ash/components/dbus/swap_management",
"//chromeos/dbus/constants",
"//components/memory_pressure",
"//crypto",
"//services/resource_coordinator/public/cpp/memory_instrumentation",
"//third_party/re2",
]
sources = [
"aligned_memory.h",
"elf_sections.cc",
"elf_sections.h",
"memory.cc",
"memory.h",
"mglru.cc",
"mglru.h",
"pagemap.cc",
"pagemap.h",
"pressure/system_memory_pressure_evaluator.cc",
"pressure/system_memory_pressure_evaluator.h",
"swap_configuration.cc",
"swap_configuration.h",
]
}
source_set("unit_tests") {
testonly = true
deps = [
":memory",
"//base/test:test_support",
"//build:chromeos_buildflags",
"//chromeos/ash/components/dbus/resourced",
"//components/memory_pressure",
"//dbus",
"//mojo/core/embedder",
"//services/resource_coordinator/public/cpp/memory_instrumentation",
"//testing/gmock",
"//testing/gtest",
]
sources = [
"pagemap_unittest.cc",
"pressure/system_memory_pressure_evaluator_unittest.cc",
"swap_configuration_unittest.cc",
]
}