blob: ce1222e664d7d5534a1ea912f029b81baee56c00 [file] [log] [blame]
# Copyright 2014 The Chromium Authors. All rights reserved.
# 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.h",
"pref_hash_store_impl.cc",
"pref_hash_store_impl.h",
"pref_hash_store_transaction.h",
"segregated_pref_store.cc",
"segregated_pref_store.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" ]
}
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
public_deps = [
"//services/preferences/public/cpp/tracked",
"//services/preferences/public/mojom",
]
deps = [
"//base",
"//components/pref_registry",
"//components/prefs",
"//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",
"segregated_pref_store_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/prefs:test_support",
"//services/preferences/public/cpp/tracked:test_support",
"//testing/gtest",
]
}