BUILD.gn 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # Copyright 2015 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. import("//build/config/chromeos/ui_mode.gni")
  5. import("//build/config/features.gni")
  6. static_library("sync_preferences") {
  7. sources = [
  8. "pref_model_associator.cc",
  9. "pref_model_associator.h",
  10. "pref_model_associator_client.h",
  11. "pref_service_syncable.cc",
  12. "pref_service_syncable.h",
  13. "pref_service_syncable_factory.cc",
  14. "pref_service_syncable_factory.h",
  15. "pref_service_syncable_observer.h",
  16. "synced_pref_observer.h",
  17. ]
  18. deps = [
  19. "//base",
  20. "//build:chromeos_buildflags",
  21. "//components/policy/core/browser",
  22. "//components/pref_registry",
  23. "//components/prefs",
  24. "//components/sync",
  25. ]
  26. if (is_chromeos_ash) {
  27. deps += [ "//ash/constants" ]
  28. }
  29. }
  30. static_library("test_support") {
  31. testonly = true
  32. sources = [
  33. "pref_service_mock_factory.cc",
  34. "pref_service_mock_factory.h",
  35. "testing_pref_service_syncable.cc",
  36. "testing_pref_service_syncable.h",
  37. ]
  38. deps = [
  39. ":sync_preferences",
  40. "//base",
  41. "//components/pref_registry",
  42. "//components/prefs:test_support",
  43. "//testing/gtest",
  44. ]
  45. }
  46. source_set("unit_tests") {
  47. testonly = true
  48. sources = [
  49. "pref_model_associator_unittest.cc",
  50. "pref_service_syncable_unittest.cc",
  51. ]
  52. deps = [
  53. ":sync_preferences",
  54. ":test_support",
  55. "//base/test:test_support",
  56. "//build:chromeos_buildflags",
  57. "//components/pref_registry",
  58. "//components/prefs",
  59. "//components/prefs:test_support",
  60. "//components/sync",
  61. "//components/sync:test_support",
  62. "//testing/gtest",
  63. ]
  64. if (is_chromeos_ash) {
  65. deps += [ "//ash/constants" ]
  66. }
  67. }