BUILD.gn 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. # Copyright (c) 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("//third_party/protobuf/proto_library.gni")
  6. static_library("drive") {
  7. sources = [
  8. "drive_api_util.cc",
  9. "drive_api_util.h",
  10. "drive_notification_manager.cc",
  11. "drive_notification_manager.h",
  12. "drive_notification_observer.h",
  13. "drive_pref_names.cc",
  14. "drive_pref_names.h",
  15. "drive_uploader.cc",
  16. "drive_uploader.h",
  17. "event_logger.cc",
  18. "event_logger.h",
  19. "file_errors.cc",
  20. "file_errors.h",
  21. "file_system_core_util.cc",
  22. "file_system_core_util.h",
  23. "resource_metadata_storage.cc",
  24. "resource_metadata_storage.h",
  25. "service/drive_api_service.cc",
  26. "service/drive_api_service.h",
  27. "service/drive_service_interface.cc",
  28. "service/drive_service_interface.h",
  29. ]
  30. deps = [
  31. "//base",
  32. "//components/invalidation/public",
  33. "//components/keyed_service/core",
  34. "//google_apis/common",
  35. "//google_apis/drive",
  36. "//services/device/public/mojom",
  37. "//services/network/public/cpp:cpp",
  38. "//third_party/leveldatabase",
  39. "//third_party/re2",
  40. ]
  41. public_deps = [ ":proto" ]
  42. }
  43. proto_library("proto") {
  44. sources = [ "drive.proto" ]
  45. }
  46. static_library("test_support") {
  47. testonly = true
  48. sources = [
  49. "service/dummy_drive_service.cc",
  50. "service/dummy_drive_service.h",
  51. "service/fake_drive_service.cc",
  52. "service/fake_drive_service.h",
  53. "service/test_util.cc",
  54. "service/test_util.h",
  55. ]
  56. deps = [
  57. ":drive",
  58. "//base",
  59. "//google_apis/common:test_support",
  60. "//google_apis/drive",
  61. "//net:net",
  62. ]
  63. }
  64. source_set("unit_tests") {
  65. testonly = true
  66. sources = [
  67. "drive_api_util_unittest.cc",
  68. "drive_notification_manager_unittest.cc",
  69. "drive_uploader_unittest.cc",
  70. "event_logger_unittest.cc",
  71. "resource_metadata_storage_unittest.cc",
  72. "service/drive_api_service_unittest.cc",
  73. "service/fake_drive_service_unittest.cc",
  74. ]
  75. deps = [
  76. ":drive",
  77. ":test_support",
  78. "//base",
  79. "//base/test:test_support",
  80. "//components/invalidation/impl:test_support",
  81. "//content/test:test_support",
  82. "//google_apis/common:test_support",
  83. "//google_apis/drive",
  84. "//testing/gtest",
  85. ]
  86. if (is_chromeos_ash) {
  87. sources += [ "search_metadata_unittest.cc" ]
  88. deps += [ ":drive_chromeos" ]
  89. }
  90. }
  91. if (is_chromeos_ash) {
  92. source_set("drive_chromeos") {
  93. sources = [
  94. "chromeos/search_metadata.cc",
  95. "chromeos/search_metadata.h",
  96. ]
  97. deps = [
  98. ":drive",
  99. "//base",
  100. "//base:i18n",
  101. "//net",
  102. ]
  103. }
  104. }