OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
6 | 6 |
7 # GYP version: components/storage_monitor.gypi:storage_monitor | 7 # GYP version: components/storage_monitor.gypi:storage_monitor |
8 static_library("storage_monitor") { | 8 source_set("storage_monitor") { |
9 sources = [ | 9 sources = [ |
10 "image_capture_device.h", | 10 "image_capture_device.h", |
11 "image_capture_device.mm", | 11 "image_capture_device.mm", |
12 "image_capture_device_manager.h", | 12 "image_capture_device_manager.h", |
13 "image_capture_device_manager.mm", | 13 "image_capture_device_manager.mm", |
14 "media_storage_util.cc", | 14 "media_storage_util.cc", |
15 "media_storage_util.h", | 15 "media_storage_util.h", |
16 "media_transfer_protocol_device_observer_linux.cc", | 16 "media_transfer_protocol_device_observer_linux.cc", |
17 "media_transfer_protocol_device_observer_linux.h", | 17 "media_transfer_protocol_device_observer_linux.h", |
18 "mtab_watcher_linux.cc", | 18 "mtab_watcher_linux.cc", |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 sources -= [ | 78 sources -= [ |
79 "mtab_watcher_linux.cc", | 79 "mtab_watcher_linux.cc", |
80 "mtab_watcher_linux.h", | 80 "mtab_watcher_linux.h", |
81 "storage_monitor_linux.cc", | 81 "storage_monitor_linux.cc", |
82 "storage_monitor_linux.h", | 82 "storage_monitor_linux.h", |
83 ] | 83 ] |
84 } | 84 } |
85 } | 85 } |
86 | 86 |
87 # GYP version: components/storage_monitor.gypi:storage_monitor_test_support | 87 # GYP version: components/storage_monitor.gypi:storage_monitor_test_support |
88 static_library("test_support") { | 88 source_set("test_support") { |
89 sources = [ | 89 sources = [ |
90 "mock_removable_storage_observer.cc", | 90 "mock_removable_storage_observer.cc", |
91 "mock_removable_storage_observer.h", | 91 "mock_removable_storage_observer.h", |
92 "test_media_transfer_protocol_manager_linux.cc", | 92 "test_media_transfer_protocol_manager_linux.cc", |
93 "test_media_transfer_protocol_manager_linux.h", | 93 "test_media_transfer_protocol_manager_linux.h", |
94 "test_portable_device_watcher_win.cc", | 94 "test_portable_device_watcher_win.cc", |
95 "test_portable_device_watcher_win.h", | 95 "test_portable_device_watcher_win.h", |
96 "test_storage_monitor.cc", | 96 "test_storage_monitor.cc", |
97 "test_storage_monitor.h", | 97 "test_storage_monitor.h", |
98 "test_storage_monitor_win.cc", | 98 "test_storage_monitor_win.cc", |
99 "test_storage_monitor_win.h", | 99 "test_storage_monitor_win.h", |
100 "test_volume_mount_watcher_win.cc", | 100 "test_volume_mount_watcher_win.cc", |
101 "test_volume_mount_watcher_win.h", | 101 "test_volume_mount_watcher_win.h", |
102 ] | 102 ] |
103 | 103 |
104 deps = [ | 104 public_deps = [ |
| 105 ":storage_monitor", |
105 "//base", | 106 "//base", |
106 ":storage_monitor", | |
107 ] | 107 ] |
108 | 108 |
109 if (is_linux) { | 109 if (is_linux) { |
110 deps += [ | 110 deps = [ |
111 "//device/media_transfer_protocol", | 111 "//device/media_transfer_protocol", |
112 "//device/media_transfer_protocol:mtp_file_entry_proto", | 112 "//device/media_transfer_protocol:mtp_file_entry_proto", |
113 "//device/media_transfer_protocol:mtp_storage_info_proto", | 113 "//device/media_transfer_protocol:mtp_storage_info_proto", |
114 ] | 114 ] |
115 } | 115 } |
116 } | 116 } |
| 117 |
| 118 source_set("unit_tests") { |
| 119 testonly = true |
| 120 sources = [ |
| 121 "image_capture_device_manager_unittest.mm", |
| 122 "media_storage_util_unittest.cc", |
| 123 "media_transfer_protocol_device_observer_linux_unittest.cc", |
| 124 "storage_info_unittest.cc", |
| 125 "storage_monitor_mac_unittest.mm", |
| 126 "storage_monitor_unittest.cc", |
| 127 "storage_monitor_win_unittest.cc", |
| 128 ] |
| 129 deps = [ |
| 130 ":test_support", |
| 131 "//testing/gtest", |
| 132 ] |
| 133 |
| 134 if (is_linux && !is_chromeos) { |
| 135 sources += [ "storage_monitor_linux_unittest.cc" ] |
| 136 } |
| 137 if (is_chromeos) { |
| 138 sources += [ "storage_monitor_chromeos_unittest.cc" ] |
| 139 deps += [ |
| 140 "//chromeos:test_support", |
| 141 "//testing/gmock", |
| 142 ] |
| 143 } |
| 144 } |
OLD | NEW |