blob: 69661ce8e899b3bce41e54f72ec56e93e9789136 [file] [log] [blame]
# Copyright 2014 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
source_set("tracked") {
sources = [
"device_id.h",
"dictionary_hash_store_contents.cc",
"dictionary_hash_store_contents.h",
"hash_store_contents.h",
"interceptable_pref_filter.cc",
"interceptable_pref_filter.h",
"pref_hash_calculator.cc",
"pref_hash_calculator.h",
"pref_hash_filter.cc",
"pref_hash_filter.h",
"pref_hash_store.cc",
"pref_hash_store.h",
"pref_hash_store_impl.cc",
"pref_hash_store_impl.h",
"pref_hash_store_transaction.h",
"temp_scoped_dir_cleaner.h",
"tracked_atomic_preference.cc",
"tracked_atomic_preference.h",
"tracked_persistent_pref_store_factory.cc",
"tracked_persistent_pref_store_factory.h",
"tracked_preference.h",
"tracked_preference_helper.cc",
"tracked_preference_helper.h",
"tracked_preferences_migration.cc",
"tracked_preferences_migration.h",
"tracked_split_preference.cc",
"tracked_split_preference.h",
]
if (is_win) {
sources += [
"device_id_win.cc",
"registry_hash_store_contents_win.cc",
"registry_hash_store_contents_win.h",
]
} else if (is_mac) {
sources += [ "device_id_mac.cc" ]
} else {
sources += [ "device_id_stub.cc" ]
}
configs += [
"//build/config/compiler:wexit_time_destructors",
"//build/config/compiler:wglobal_constructors",
]
public_deps = [
"//services/preferences/public/cpp/tracked",
"//services/preferences/public/mojom",
]
deps = [
":features",
"//base",
"//build:branding_buildflags",
"//components/os_crypt/async/browser",
"//components/os_crypt/async/common",
"//components/pref_registry",
"//components/prefs",
"//components/safe_browsing/core/common:features",
"//crypto",
]
if (is_mac) {
frameworks = [ "IOKit.framework" ]
}
}
source_set("unit_tests") {
testonly = true
sources = [
"device_id_unittest.cc",
"interceptable_pref_filter_unittest.cc",
"pref_hash_calculator_unittest.cc",
"pref_hash_filter_unittest.cc",
"pref_hash_store_impl_unittest.cc",
"tracked_preferences_migration_unittest.cc",
]
if (is_win) {
sources += [ "registry_hash_store_contents_win_unittest.cc" ]
}
deps = [
":tracked",
"//base",
"//base/test:test_support",
"//components/os_crypt/async/browser:test_support",
"//components/os_crypt/async/common",
"//components/prefs:test_support",
"//components/safe_browsing/core/common:features",
"//components/sync_preferences:test_support",
"//crypto",
"//services/preferences/public/cpp/tracked:test_support",
"//testing/gtest",
]
public_deps = [ ":features" ]
}
source_set("features") {
sources = [
"features.cc",
"features.h",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
deps = [ "//base" ]
}