BUILD.gn 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # Copyright 2014 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. source_set("tracked") {
  5. sources = [
  6. "device_id.h",
  7. "dictionary_hash_store_contents.cc",
  8. "dictionary_hash_store_contents.h",
  9. "hash_store_contents.h",
  10. "interceptable_pref_filter.cc",
  11. "interceptable_pref_filter.h",
  12. "pref_hash_calculator.cc",
  13. "pref_hash_calculator.h",
  14. "pref_hash_filter.cc",
  15. "pref_hash_filter.h",
  16. "pref_hash_store.h",
  17. "pref_hash_store_impl.cc",
  18. "pref_hash_store_impl.h",
  19. "pref_hash_store_transaction.h",
  20. "temp_scoped_dir_cleaner.h",
  21. "tracked_atomic_preference.cc",
  22. "tracked_atomic_preference.h",
  23. "tracked_persistent_pref_store_factory.cc",
  24. "tracked_persistent_pref_store_factory.h",
  25. "tracked_preference.h",
  26. "tracked_preference_helper.cc",
  27. "tracked_preference_helper.h",
  28. "tracked_preferences_migration.cc",
  29. "tracked_preferences_migration.h",
  30. "tracked_split_preference.cc",
  31. "tracked_split_preference.h",
  32. ]
  33. if (is_win) {
  34. sources += [
  35. "device_id_win.cc",
  36. "registry_hash_store_contents_win.cc",
  37. "registry_hash_store_contents_win.h",
  38. ]
  39. } else if (is_mac) {
  40. sources += [ "device_id_mac.cc" ]
  41. } else {
  42. sources += [ "device_id_stub.cc" ]
  43. }
  44. public_deps = [
  45. "//services/preferences/public/cpp/tracked",
  46. "//services/preferences/public/mojom",
  47. ]
  48. deps = [
  49. "//base",
  50. "//components/pref_registry",
  51. "//components/prefs",
  52. "//crypto",
  53. ]
  54. if (is_mac) {
  55. frameworks = [ "IOKit.framework" ]
  56. }
  57. }
  58. source_set("unit_tests") {
  59. testonly = true
  60. sources = [
  61. "device_id_unittest.cc",
  62. "interceptable_pref_filter_unittest.cc",
  63. "pref_hash_calculator_unittest.cc",
  64. "pref_hash_filter_unittest.cc",
  65. "pref_hash_store_impl_unittest.cc",
  66. "tracked_preferences_migration_unittest.cc",
  67. ]
  68. if (is_win) {
  69. sources += [ "registry_hash_store_contents_win_unittest.cc" ]
  70. }
  71. deps = [
  72. ":tracked",
  73. "//base",
  74. "//base/test:test_support",
  75. "//components/prefs:test_support",
  76. "//services/preferences/public/cpp/tracked:test_support",
  77. "//testing/gtest",
  78. ]
  79. }