BUILD.gn 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. # Copyright 2018 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("//chromeos/dbus/config/use_real_dbus_clients.gni")
  6. assert(is_chromeos_ash, "Non-ChromeOS builds cannot depend on //ash")
  7. component("drivefs") {
  8. sources = [
  9. "drivefs_auth.cc",
  10. "drivefs_auth.h",
  11. "drivefs_bootstrap.cc",
  12. "drivefs_bootstrap.h",
  13. "drivefs_host.cc",
  14. "drivefs_host.h",
  15. "drivefs_host_observer.h",
  16. "drivefs_http_client.cc",
  17. "drivefs_http_client.h",
  18. "drivefs_search.cc",
  19. "drivefs_search.h",
  20. "drivefs_session.cc",
  21. "drivefs_session.h",
  22. "drivefs_util.h",
  23. ]
  24. if (!use_real_dbus_clients) {
  25. sources += [
  26. "fake_drivefs_launcher_client.cc",
  27. "fake_drivefs_launcher_client.h",
  28. ]
  29. }
  30. deps = [
  31. "//ash/components/disks",
  32. "//ash/components/drivefs/mojom",
  33. "//ash/constants",
  34. "//base",
  35. "//chromeos/ash/components/dbus",
  36. "//chromeos/ash/components/dbus/cros_disks",
  37. "//chromeos/components/mojo_bootstrap",
  38. "//components/account_id",
  39. "//components/drive",
  40. "//components/signin/public/identity_manager",
  41. "//dbus",
  42. "//google_apis",
  43. "//mojo/public/cpp/bindings",
  44. "//mojo/public/cpp/platform",
  45. "//net",
  46. "//services/network/public/cpp:cpp",
  47. ]
  48. defines = [ "IS_DRIVEFS_IMPL" ]
  49. }
  50. source_set("test_support") {
  51. testonly = true
  52. sources = [
  53. "fake_drivefs.cc",
  54. "fake_drivefs.h",
  55. ]
  56. deps = [
  57. ":drivefs",
  58. "//ash/components/drivefs/mojom",
  59. "//base",
  60. "//chromeos/ash/components/dbus:test_support",
  61. "//chromeos/ash/components/dbus/cros_disks",
  62. "//net",
  63. "//testing/gmock",
  64. ]
  65. }
  66. source_set("unit_tests") {
  67. testonly = true
  68. sources = [
  69. "drivefs_auth_unittest.cc",
  70. "drivefs_bootstrap_unittest.cc",
  71. "drivefs_host_unittest.cc",
  72. "drivefs_http_client_unittest.cc",
  73. "drivefs_search_unittest.cc",
  74. "drivefs_session_unittest.cc",
  75. ]
  76. deps = [
  77. ":drivefs",
  78. ":test_support",
  79. "//ash/components/disks:test_support",
  80. "//ash/components/drivefs/mojom",
  81. "//base",
  82. "//base/test:test_support",
  83. "//chromeos/components/mojo_bootstrap",
  84. "//components/account_id",
  85. "//components/drive",
  86. "//components/invalidation/impl:test_support",
  87. "//components/signin/public/identity_manager",
  88. "//components/signin/public/identity_manager:test_support",
  89. "//mojo/public/cpp/bindings",
  90. "//net",
  91. "//net:test_support",
  92. "//services/network:test_support",
  93. "//services/network/public/cpp:cpp",
  94. "//testing/gmock",
  95. "//testing/gtest",
  96. ]
  97. }