blob: 287842d345e4232021afb699c72530c1b809caf9 [file]
# Copyright 2024 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
component("persistent_cache") {
sources = [
"backend.cc",
"backend.h",
"backend_params.cc",
"backend_params.h",
"entry.cc",
"entry.h",
"persistent_cache.cc",
"persistent_cache.h",
"sqlite/sqlite_entry_impl.cc",
"sqlite/sqlite_entry_impl.h",
]
# Cross-process file locks are not available on Fuchsia.
if (!is_fuchsia) {
sources += [
"sqlite/vfs/sandboxed_file.cc",
"sqlite/vfs/sandboxed_file.h",
"sqlite/vfs/sqlite_database_vfs_file_set.cc",
"sqlite/vfs/sqlite_database_vfs_file_set.h",
"sqlite/vfs/sqlite_sandboxed_vfs.cc",
"sqlite/vfs/sqlite_sandboxed_vfs.h",
]
}
# See base/component_export.h
defines = [ "IS_PERSISTENT_CACHE_IMPL" ]
deps = [
"//base",
"//sql",
"//third_party/sqlite",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"entry_unittest.cc",
"mock/mock_backend_impl.cc",
"mock/mock_backend_impl.h",
"mock/mock_entry_impl.cc",
"mock/mock_entry_impl.h",
"persistent_cache_unittest.cc",
"sqlite/sqlite_entry_unittest.cc",
]
# Cross-process file locks are not available on Fuchsia.
if (!is_fuchsia) {
sources += [ "sqlite/vfs/sqlite_sandboxed_vfs_unittest.cc" ]
}
deps = [
":persistent_cache",
"//base",
"//sql",
"//testing/gmock",
"//testing/gtest",
"//third_party/sqlite",
]
}