summaryrefslogtreecommitdiff
path: root/chromium/chromeos/components/tether/BUILD.gn
blob: f2fd4585777d6062e578f5b09b76e7be8c2be8a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

assert(is_chromeos, "Non-ChromeOS builds cannot depend on //chromeos")

static_library("tether") {
  sources = [
    "active_host.cc",
    "active_host.h",
    "active_host_network_state_updater.cc",
    "active_host_network_state_updater.h",
    "ad_hoc_ble_advertiser.cc",
    "ad_hoc_ble_advertiser.h",
    "ad_hoc_ble_advertiser_impl.cc",
    "ad_hoc_ble_advertiser_impl.h",
    "asynchronous_shutdown_object_container.h",
    "asynchronous_shutdown_object_container_impl.cc",
    "asynchronous_shutdown_object_container_impl.h",
    "ble_advertisement_device_queue.cc",
    "ble_advertisement_device_queue.h",
    "ble_advertiser.cc",
    "ble_advertiser.h",
    "ble_advertiser_impl.cc",
    "ble_advertiser_impl.h",
    "ble_connection_manager.cc",
    "ble_connection_manager.h",
    "ble_connection_metrics_logger.cc",
    "ble_connection_metrics_logger.h",
    "ble_constants.h",
    "ble_scanner.cc",
    "ble_scanner.h",
    "ble_scanner_impl.cc",
    "ble_scanner_impl.h",
    "ble_synchronizer.cc",
    "ble_synchronizer.h",
    "ble_synchronizer_base.cc",
    "ble_synchronizer_base.h",
    "connect_tethering_operation.cc",
    "connect_tethering_operation.h",
    "connection_preserver.cc",
    "connection_preserver.h",
    "connection_preserver_impl.cc",
    "connection_preserver_impl.h",
    "connection_priority.cc",
    "connection_priority.h",
    "connection_reason.cc",
    "connection_reason.h",
    "crash_recovery_manager.h",
    "crash_recovery_manager_impl.cc",
    "crash_recovery_manager_impl.h",
    "device_id_tether_network_guid_map.cc",
    "device_id_tether_network_guid_map.h",
    "device_status_util.cc",
    "device_status_util.h",
    "disconnect_tethering_operation.cc",
    "disconnect_tethering_operation.h",
    "disconnect_tethering_request_sender.cc",
    "disconnect_tethering_request_sender.h",
    "disconnect_tethering_request_sender_impl.cc",
    "disconnect_tethering_request_sender_impl.h",
    "error_tolerant_ble_advertisement.cc",
    "error_tolerant_ble_advertisement.h",
    "error_tolerant_ble_advertisement_impl.cc",
    "error_tolerant_ble_advertisement_impl.h",
    "gms_core_notifications_state_tracker.cc",
    "gms_core_notifications_state_tracker.h",
    "gms_core_notifications_state_tracker_impl.cc",
    "gms_core_notifications_state_tracker_impl.h",
    "host_connection_metrics_logger.cc",
    "host_connection_metrics_logger.h",
    "host_scan_cache.cc",
    "host_scan_cache.h",
    "host_scan_cache_entry.cc",
    "host_scan_cache_entry.h",
    "host_scan_device_prioritizer.h",
    "host_scan_device_prioritizer_impl.cc",
    "host_scan_device_prioritizer_impl.h",
    "host_scan_scheduler.h",
    "host_scan_scheduler_impl.cc",
    "host_scan_scheduler_impl.h",
    "host_scanner.cc",
    "host_scanner.h",
    "host_scanner_impl.cc",
    "host_scanner_impl.h",
    "host_scanner_operation.cc",
    "host_scanner_operation.h",
    "hotspot_usage_duration_tracker.cc",
    "hotspot_usage_duration_tracker.h",
    "keep_alive_operation.cc",
    "keep_alive_operation.h",
    "keep_alive_scheduler.cc",
    "keep_alive_scheduler.h",
    "master_host_scan_cache.cc",
    "master_host_scan_cache.h",
    "message_transfer_operation.cc",
    "message_transfer_operation.h",
    "message_wrapper.cc",
    "message_wrapper.h",
    "network_configuration_remover.cc",
    "network_configuration_remover.h",
    "network_connection_handler_tether_delegate.cc",
    "network_connection_handler_tether_delegate.h",
    "network_host_scan_cache.cc",
    "network_host_scan_cache.h",
    "network_list_sorter.cc",
    "network_list_sorter.h",
    "notification_presenter.h",
    "notification_remover.cc",
    "notification_remover.h",
    "persistent_host_scan_cache.h",
    "persistent_host_scan_cache_impl.cc",
    "persistent_host_scan_cache_impl.h",
    "pref_names.cc",
    "pref_names.h",
    "synchronous_shutdown_object_container.h",
    "synchronous_shutdown_object_container_impl.cc",
    "synchronous_shutdown_object_container_impl.h",
    "tether_component.cc",
    "tether_component.h",
    "tether_component_impl.cc",
    "tether_component_impl.h",
    "tether_connector.h",
    "tether_connector_impl.cc",
    "tether_connector_impl.h",
    "tether_disconnector.h",
    "tether_disconnector_impl.cc",
    "tether_disconnector_impl.h",
    "tether_host_fetcher.cc",
    "tether_host_fetcher.h",
    "tether_host_fetcher_impl.cc",
    "tether_host_fetcher_impl.h",
    "tether_host_response_recorder.cc",
    "tether_host_response_recorder.h",
    "tether_network_disconnection_handler.cc",
    "tether_network_disconnection_handler.h",
    "tether_session_completion_logger.cc",
    "tether_session_completion_logger.h",
    "timer_factory.cc",
    "timer_factory.h",
    "wifi_hotspot_connector.cc",
    "wifi_hotspot_connector.h",
    "wifi_hotspot_disconnector.h",
    "wifi_hotspot_disconnector_impl.cc",
    "wifi_hotspot_disconnector_impl.h",
  ]

  deps = [
    "//base",
    "//chromeos",
    "//chromeos/components/proximity_auth/logging",
    "//chromeos/components/tether/proto",
    "//components/cryptauth",
    "//components/cryptauth/ble",
    "//components/pref_registry",
    "//components/prefs",
    "//components/session_manager/core",
    "//components/signin/core/browser",
    "//device/bluetooth",
    "//ui/gfx",
    "//ui/message_center",
  ]

  public_deps = [
    "//components/cryptauth/proto",
  ]
}

static_library("test_support") {
  testonly = true

  sources = [
    "fake_active_host.cc",
    "fake_active_host.h",
    "fake_ad_hoc_ble_advertiser.cc",
    "fake_ad_hoc_ble_advertiser.h",
    "fake_asynchronous_shutdown_object_container.cc",
    "fake_asynchronous_shutdown_object_container.h",
    "fake_ble_advertiser.cc",
    "fake_ble_advertiser.h",
    "fake_ble_connection_manager.cc",
    "fake_ble_connection_manager.h",
    "fake_ble_scanner.cc",
    "fake_ble_scanner.h",
    "fake_ble_synchronizer.cc",
    "fake_ble_synchronizer.h",
    "fake_connection_preserver.cc",
    "fake_connection_preserver.h",
    "fake_crash_recovery_manager.cc",
    "fake_crash_recovery_manager.h",
    "fake_disconnect_tethering_request_sender.cc",
    "fake_disconnect_tethering_request_sender.h",
    "fake_error_tolerant_ble_advertisement.cc",
    "fake_error_tolerant_ble_advertisement.h",
    "fake_gms_core_notifications_state_tracker.cc",
    "fake_gms_core_notifications_state_tracker.h",
    "fake_host_scan_cache.cc",
    "fake_host_scan_cache.h",
    "fake_host_scan_scheduler.cc",
    "fake_host_scan_scheduler.h",
    "fake_host_scanner.cc",
    "fake_host_scanner.h",
    "fake_network_configuration_remover.cc",
    "fake_network_configuration_remover.h",
    "fake_notification_presenter.cc",
    "fake_notification_presenter.h",
    "fake_synchronous_shutdown_object_container.cc",
    "fake_synchronous_shutdown_object_container.h",
    "fake_tether_component.cc",
    "fake_tether_component.h",
    "fake_tether_connector.cc",
    "fake_tether_connector.h",
    "fake_tether_disconnector.cc",
    "fake_tether_disconnector.h",
    "fake_tether_host_fetcher.cc",
    "fake_tether_host_fetcher.h",
    "fake_tether_session_completion_logger.cc",
    "fake_tether_session_completion_logger.h",
    "fake_wifi_hotspot_connector.cc",
    "fake_wifi_hotspot_connector.h",
    "fake_wifi_hotspot_disconnector.cc",
    "fake_wifi_hotspot_disconnector.h",
    "host_scan_test_util.cc",
    "host_scan_test_util.h",
    "mock_host_connection_metrics_logger.cc",
    "mock_host_connection_metrics_logger.h",
    "mock_tether_host_response_recorder.cc",
    "mock_tether_host_response_recorder.h",
    "proto_test_util.cc",
    "proto_test_util.h",
  ]

  public_deps = [
    ":tether",
  ]

  deps = [
    "//base",
    "//chromeos",
    "//chromeos/components/tether/proto",
    "//components/cryptauth",
    "//components/cryptauth:test_support",
    "//components/cryptauth/ble:test_support",
    "//device/bluetooth",
    "//testing/gmock",
    "//testing/gtest",
    "//ui/message_center:test_support",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "active_host_network_state_updater_unittest.cc",
    "active_host_unittest.cc",
    "ad_hoc_ble_advertiser_impl_unittest.cc",
    "asynchronous_shutdown_object_container_impl_unittest.cc",
    "ble_advertisement_device_queue_unittest.cc",
    "ble_advertiser_impl_unittest.cc",
    "ble_connection_manager_unittest.cc",
    "ble_connection_metrics_logger_unittest.cc",
    "ble_scanner_impl_unittest.cc",
    "ble_synchronizer_unittest.cc",
    "connect_tethering_operation_unittest.cc",
    "connection_preserver_impl_unittest.cc",
    "crash_recovery_manager_impl_unittest.cc",
    "device_status_util_unittest.cc",
    "disconnect_tethering_operation_unittest.cc",
    "disconnect_tethering_request_sender_impl_unittest.cc",
    "error_tolerant_ble_advertisement_impl_unittest.cc",
    "gms_core_notifications_state_tracker_impl_unittest.cc",
    "host_connection_metrics_logger_unittest.cc",
    "host_scan_cache_unittest.cc",
    "host_scan_device_prioritizer_impl_unittest.cc",
    "host_scan_scheduler_impl_unittest.cc",
    "host_scanner_impl_unittest.cc",
    "host_scanner_operation_unittest.cc",
    "hotspot_usage_duration_tracker_unittest.cc",
    "keep_alive_operation_unittest.cc",
    "keep_alive_scheduler_unittest.cc",
    "master_host_scan_cache_unittest.cc",
    "message_transfer_operation_unittest.cc",
    "message_wrapper_unittest.cc",
    "network_configuration_remover_unittest.cc",
    "network_connection_handler_tether_delegate_unittest.cc",
    "network_host_scan_cache_unittest.cc",
    "network_list_sorter_unittest.cc",
    "notification_remover_unittest.cc",
    "persistent_host_scan_cache_impl_unittest.cc",
    "tether_component_impl_unittest.cc",
    "tether_connector_impl_unittest.cc",
    "tether_disconnector_impl_unittest.cc",
    "tether_host_fetcher_impl_unittest.cc",
    "tether_host_response_recorder_unittest.cc",
    "tether_network_disconnection_handler_unittest.cc",
    "tether_session_completion_logger_unittest.cc",
    "wifi_hotspot_connector_unittest.cc",
    "wifi_hotspot_disconnector_impl_unittest.cc",
  ]

  deps = [
    ":test_support",
    ":tether",
    "//base/test:test_support",
    "//chromeos",
    "//chromeos:test_support",
    "//chromeos/components/tether/proto",
    "//components/cryptauth",
    "//components/cryptauth:test_support",
    "//components/cryptauth/ble",
    "//components/cryptauth/ble:test_support",
    "//components/prefs:test_support",
    "//components/session_manager/core",
    "//components/signin/core/browser:test_support",
    "//components/sync_preferences:test_support",
    "//device/bluetooth",
    "//device/bluetooth:mocks",
    "//testing/gmock",
    "//testing/gtest",
    "//ui/message_center:test_support",
  ]
}