OLD | NEW |
| (Empty) |
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 | |
3 # found in the LICENSE file. | |
4 | |
5 import("//build/config/features.gni") | |
6 import("//sync/protocol/protocol_sources.gni") | |
7 import("//testing/test.gni") | |
8 | |
9 component("sync") { | |
10 public_deps = [ | |
11 ":sync_core", | |
12 "//sync/protocol", | |
13 ] | |
14 } | |
15 | |
16 # GYP version: sync/sync.gyp:sync_core | |
17 source_set("sync_core") { | |
18 sources = [ | |
19 "api/attachments/attachment.cc", | |
20 "api/attachments/attachment.h", | |
21 "api/attachments/attachment_id.cc", | |
22 "api/attachments/attachment_id.h", | |
23 "api/attachments/attachment_metadata.cc", | |
24 "api/attachments/attachment_metadata.h", | |
25 "api/attachments/attachment_store.cc", | |
26 "api/attachments/attachment_store.h", | |
27 "api/attachments/attachment_store_backend.cc", | |
28 "api/attachments/attachment_store_backend.h", | |
29 "api/conflict_resolution.cc", | |
30 "api/conflict_resolution.h", | |
31 "api/data_batch.h", | |
32 "api/entity_change.cc", | |
33 "api/entity_change.h", | |
34 "api/entity_data.cc", | |
35 "api/entity_data.h", | |
36 "api/metadata_batch.cc", | |
37 "api/metadata_batch.h", | |
38 "api/metadata_change_list.h", | |
39 "api/model_type_change_processor.cc", | |
40 "api/model_type_change_processor.h", | |
41 "api/model_type_service.cc", | |
42 "api/model_type_service.h", | |
43 "api/model_type_store.cc", | |
44 "api/model_type_store.h", | |
45 "api/string_ordinal.h", | |
46 "api/sync_change.cc", | |
47 "api/sync_change.h", | |
48 "api/sync_change_processor.cc", | |
49 "api/sync_change_processor.h", | |
50 "api/sync_data.cc", | |
51 "api/sync_data.h", | |
52 "api/sync_error.cc", | |
53 "api/sync_error.h", | |
54 "api/sync_error_factory.cc", | |
55 "api/sync_error_factory.h", | |
56 "api/sync_merge_result.cc", | |
57 "api/sync_merge_result.h", | |
58 "api/syncable_service.cc", | |
59 "api/syncable_service.h", | |
60 "api/time.h", | |
61 "base/sync_export.h", | |
62 "engine/all_status.cc", | |
63 "engine/all_status.h", | |
64 "engine/apply_control_data_updates.cc", | |
65 "engine/apply_control_data_updates.h", | |
66 "engine/backoff_delay_provider.cc", | |
67 "engine/backoff_delay_provider.h", | |
68 "engine/clear_server_data.cc", | |
69 "engine/clear_server_data.h", | |
70 "engine/commit.cc", | |
71 "engine/commit.h", | |
72 "engine/commit_contribution.cc", | |
73 "engine/commit_contribution.h", | |
74 "engine/commit_contributor.cc", | |
75 "engine/commit_contributor.h", | |
76 "engine/commit_processor.cc", | |
77 "engine/commit_processor.h", | |
78 "engine/commit_queue.cc", | |
79 "engine/commit_queue.h", | |
80 "engine/commit_util.cc", | |
81 "engine/commit_util.h", | |
82 "engine/conflict_resolver.cc", | |
83 "engine/conflict_resolver.h", | |
84 "engine/conflict_util.cc", | |
85 "engine/conflict_util.h", | |
86 "engine/directory_commit_contribution.cc", | |
87 "engine/directory_commit_contribution.h", | |
88 "engine/directory_commit_contributor.cc", | |
89 "engine/directory_commit_contributor.h", | |
90 "engine/directory_update_handler.cc", | |
91 "engine/directory_update_handler.h", | |
92 "engine/get_commit_ids.cc", | |
93 "engine/get_commit_ids.h", | |
94 "engine/get_updates_delegate.cc", | |
95 "engine/get_updates_delegate.h", | |
96 "engine/get_updates_processor.cc", | |
97 "engine/get_updates_processor.h", | |
98 "engine/model_type_worker.cc", | |
99 "engine/model_type_worker.h", | |
100 "engine/net/server_connection_manager.cc", | |
101 "engine/net/server_connection_manager.h", | |
102 "engine/net/url_translator.cc", | |
103 "engine/net/url_translator.h", | |
104 "engine/non_blocking_type_commit_contribution.cc", | |
105 "engine/non_blocking_type_commit_contribution.h", | |
106 "engine/nudge_handler.cc", | |
107 "engine/nudge_handler.h", | |
108 "engine/nudge_source.cc", | |
109 "engine/nudge_source.h", | |
110 "engine/process_updates_util.cc", | |
111 "engine/process_updates_util.h", | |
112 "engine/sync_cycle_event.cc", | |
113 "engine/sync_cycle_event.h", | |
114 "engine/sync_engine_event_listener.cc", | |
115 "engine/sync_engine_event_listener.h", | |
116 "engine/sync_scheduler.cc", | |
117 "engine/sync_scheduler.h", | |
118 "engine/sync_scheduler_impl.cc", | |
119 "engine/sync_scheduler_impl.h", | |
120 "engine/syncer.cc", | |
121 "engine/syncer.h", | |
122 "engine/syncer_proto_util.cc", | |
123 "engine/syncer_proto_util.h", | |
124 "engine/syncer_types.h", | |
125 "engine/syncer_util.cc", | |
126 "engine/syncer_util.h", | |
127 "engine/traffic_logger.cc", | |
128 "engine/traffic_logger.h", | |
129 "engine/update_applicator.cc", | |
130 "engine/update_applicator.h", | |
131 "engine/update_handler.cc", | |
132 "engine/update_handler.h", | |
133 "engine/worker_entity_tracker.cc", | |
134 "engine/worker_entity_tracker.h", | |
135 "internal_api/activation_context.cc", | |
136 "internal_api/attachments/attachment_downloader.cc", | |
137 "internal_api/attachments/attachment_downloader_impl.cc", | |
138 "internal_api/attachments/attachment_service.cc", | |
139 "internal_api/attachments/attachment_service_impl.cc", | |
140 "internal_api/attachments/attachment_service_proxy.cc", | |
141 "internal_api/attachments/attachment_service_proxy_for_test.cc", | |
142 "internal_api/attachments/attachment_store_frontend.cc", | |
143 "internal_api/attachments/attachment_uploader.cc", | |
144 "internal_api/attachments/attachment_uploader_impl.cc", | |
145 "internal_api/attachments/attachment_util.cc", | |
146 "internal_api/attachments/fake_attachment_downloader.cc", | |
147 "internal_api/attachments/fake_attachment_uploader.cc", | |
148 "internal_api/attachments/in_memory_attachment_store.cc", | |
149 "internal_api/attachments/on_disk_attachment_store.cc", | |
150 "internal_api/attachments/task_queue.cc", | |
151 "internal_api/base_node.cc", | |
152 "internal_api/base_transaction.cc", | |
153 "internal_api/change_record.cc", | |
154 "internal_api/change_reorder_buffer.cc", | |
155 "internal_api/change_reorder_buffer.h", | |
156 "internal_api/debug_info_event_listener.cc", | |
157 "internal_api/debug_info_event_listener.h", | |
158 "internal_api/delete_journal.cc", | |
159 "internal_api/events/clear_server_data_request_event.cc", | |
160 "internal_api/events/clear_server_data_response_event.cc", | |
161 "internal_api/events/commit_request_event.cc", | |
162 "internal_api/events/commit_response_event.cc", | |
163 "internal_api/events/configure_get_updates_request_event.cc", | |
164 "internal_api/events/get_updates_response_event.cc", | |
165 "internal_api/events/normal_get_updates_request_event.cc", | |
166 "internal_api/events/poll_get_updates_request_event.cc", | |
167 "internal_api/events/protocol_event.cc", | |
168 "internal_api/http_bridge.cc", | |
169 "internal_api/http_bridge_network_resources.cc", | |
170 "internal_api/internal_components_factory_impl.cc", | |
171 "internal_api/js_mutation_event_observer.cc", | |
172 "internal_api/js_mutation_event_observer.h", | |
173 "internal_api/js_sync_encryption_handler_observer.cc", | |
174 "internal_api/js_sync_encryption_handler_observer.h", | |
175 "internal_api/js_sync_manager_observer.cc", | |
176 "internal_api/js_sync_manager_observer.h", | |
177 "internal_api/model_type_connector.cc", | |
178 "internal_api/model_type_connector_proxy.cc", | |
179 "internal_api/model_type_connector_proxy.h", | |
180 "internal_api/model_type_store_backend.cc", | |
181 "internal_api/model_type_store_impl.cc", | |
182 "internal_api/processor_entity_tracker.cc", | |
183 "internal_api/protocol_event_buffer.cc", | |
184 "internal_api/protocol_event_buffer.h", | |
185 "internal_api/public/activation_context.h", | |
186 "internal_api/public/attachments/attachment_downloader.h", | |
187 "internal_api/public/attachments/attachment_downloader_impl.h", | |
188 "internal_api/public/attachments/attachment_service.h", | |
189 "internal_api/public/attachments/attachment_service_impl.h", | |
190 "internal_api/public/attachments/attachment_service_proxy.h", | |
191 "internal_api/public/attachments/attachment_service_proxy_for_test.h", | |
192 "internal_api/public/attachments/attachment_store_frontend.h", | |
193 "internal_api/public/attachments/attachment_uploader.h", | |
194 "internal_api/public/attachments/attachment_uploader_impl.h", | |
195 "internal_api/public/attachments/attachment_util.h", | |
196 "internal_api/public/attachments/fake_attachment_downloader.h", | |
197 "internal_api/public/attachments/fake_attachment_uploader.h", | |
198 "internal_api/public/attachments/in_memory_attachment_store.h", | |
199 "internal_api/public/attachments/on_disk_attachment_store.h", | |
200 "internal_api/public/base/attachment_id_proto.cc", | |
201 "internal_api/public/base/attachment_id_proto.h", | |
202 "internal_api/public/base/cancelation_observer.cc", | |
203 "internal_api/public/base/cancelation_observer.h", | |
204 "internal_api/public/base/cancelation_signal.cc", | |
205 "internal_api/public/base/cancelation_signal.h", | |
206 "internal_api/public/base/enum_set.h", | |
207 "internal_api/public/base/invalidation_interface.cc", | |
208 "internal_api/public/base/invalidation_interface.h", | |
209 "internal_api/public/base/model_type.h", | |
210 "internal_api/public/base/node_ordinal.cc", | |
211 "internal_api/public/base/node_ordinal.h", | |
212 "internal_api/public/base/ordinal.h", | |
213 "internal_api/public/base/progress_marker_map.cc", | |
214 "internal_api/public/base/progress_marker_map.h", | |
215 "internal_api/public/base/stop_source.h", | |
216 "internal_api/public/base/unique_position.cc", | |
217 "internal_api/public/base/unique_position.h", | |
218 "internal_api/public/base_node.h", | |
219 "internal_api/public/base_transaction.h", | |
220 "internal_api/public/change_record.h", | |
221 "internal_api/public/configure_reason.h", | |
222 "internal_api/public/data_batch_impl.cc", | |
223 "internal_api/public/data_batch_impl.h", | |
224 "internal_api/public/data_type_association_stats.cc", | |
225 "internal_api/public/data_type_association_stats.h", | |
226 "internal_api/public/data_type_debug_info_listener.cc", | |
227 "internal_api/public/data_type_debug_info_listener.h", | |
228 "internal_api/public/data_type_error_handler.h", | |
229 "internal_api/public/delete_journal.h", | |
230 "internal_api/public/engine/model_safe_worker.cc", | |
231 "internal_api/public/engine/model_safe_worker.h", | |
232 "internal_api/public/engine/passive_model_worker.cc", | |
233 "internal_api/public/engine/passive_model_worker.h", | |
234 "internal_api/public/engine/polling_constants.cc", | |
235 "internal_api/public/engine/polling_constants.h", | |
236 "internal_api/public/engine/sync_status.cc", | |
237 "internal_api/public/engine/sync_status.h", | |
238 "internal_api/public/events/clear_server_data_request_event.h", | |
239 "internal_api/public/events/clear_server_data_response_event.h", | |
240 "internal_api/public/events/commit_request_event.h", | |
241 "internal_api/public/events/commit_response_event.h", | |
242 "internal_api/public/events/configure_get_updates_request_event.h", | |
243 "internal_api/public/events/get_updates_response_event.h", | |
244 "internal_api/public/events/normal_get_updates_request_event.h", | |
245 "internal_api/public/events/poll_get_updates_request_event.h", | |
246 "internal_api/public/events/protocol_event.h", | |
247 "internal_api/public/http_bridge.h", | |
248 "internal_api/public/http_bridge_network_resources.h", | |
249 "internal_api/public/http_post_provider_factory.h", | |
250 "internal_api/public/http_post_provider_interface.h", | |
251 "internal_api/public/internal_components_factory.h", | |
252 "internal_api/public/internal_components_factory_impl.h", | |
253 "internal_api/public/model_type_connector.h", | |
254 "internal_api/public/model_type_processor.cc", | |
255 "internal_api/public/model_type_processor.h", | |
256 "internal_api/public/model_type_store_backend.h", | |
257 "internal_api/public/model_type_store_impl.h", | |
258 "internal_api/public/network_resources.h", | |
259 "internal_api/public/non_blocking_sync_common.cc", | |
260 "internal_api/public/non_blocking_sync_common.h", | |
261 "internal_api/public/processor_entity_tracker.h", | |
262 "internal_api/public/read_node.h", | |
263 "internal_api/public/read_transaction.h", | |
264 "internal_api/public/sessions/commit_counters.cc", | |
265 "internal_api/public/sessions/commit_counters.h", | |
266 "internal_api/public/sessions/model_neutral_state.cc", | |
267 "internal_api/public/sessions/model_neutral_state.h", | |
268 "internal_api/public/sessions/status_counters.cc", | |
269 "internal_api/public/sessions/status_counters.h", | |
270 "internal_api/public/sessions/sync_session_snapshot.cc", | |
271 "internal_api/public/sessions/sync_session_snapshot.h", | |
272 "internal_api/public/sessions/type_debug_info_observer.cc", | |
273 "internal_api/public/sessions/type_debug_info_observer.h", | |
274 "internal_api/public/sessions/update_counters.cc", | |
275 "internal_api/public/sessions/update_counters.h", | |
276 "internal_api/public/shared_model_type_processor.h", | |
277 "internal_api/public/shutdown_reason.h", | |
278 "internal_api/public/simple_metadata_change_list.cc", | |
279 "internal_api/public/simple_metadata_change_list.h", | |
280 "internal_api/public/sync_auth_provider.h", | |
281 "internal_api/public/sync_encryption_handler.cc", | |
282 "internal_api/public/sync_encryption_handler.h", | |
283 "internal_api/public/sync_manager.cc", | |
284 "internal_api/public/sync_manager.h", | |
285 "internal_api/public/sync_manager_factory.h", | |
286 "internal_api/public/user_share.h", | |
287 "internal_api/public/util/experiments.h", | |
288 "internal_api/public/util/immutable.h", | |
289 "internal_api/public/util/proto_value_ptr.h", | |
290 "internal_api/public/util/sync_db_util.h", | |
291 "internal_api/public/util/sync_string_conversions.cc", | |
292 "internal_api/public/util/sync_string_conversions.h", | |
293 "internal_api/public/util/syncer_error.cc", | |
294 "internal_api/public/util/syncer_error.h", | |
295 "internal_api/public/util/unrecoverable_error_handler.h", | |
296 "internal_api/public/util/unrecoverable_error_info.cc", | |
297 "internal_api/public/util/unrecoverable_error_info.h", | |
298 "internal_api/public/util/weak_handle.cc", | |
299 "internal_api/public/util/weak_handle.h", | |
300 "internal_api/public/write_node.h", | |
301 "internal_api/public/write_transaction.h", | |
302 "internal_api/read_node.cc", | |
303 "internal_api/read_transaction.cc", | |
304 "internal_api/shared_model_type_processor.cc", | |
305 "internal_api/sync_db_util.cc", | |
306 "internal_api/sync_encryption_handler_impl.cc", | |
307 "internal_api/sync_encryption_handler_impl.h", | |
308 "internal_api/sync_manager_factory.cc", | |
309 "internal_api/sync_manager_impl.cc", | |
310 "internal_api/sync_manager_impl.h", | |
311 "internal_api/syncapi_internal.cc", | |
312 "internal_api/syncapi_internal.h", | |
313 "internal_api/syncapi_server_connection_manager.cc", | |
314 "internal_api/syncapi_server_connection_manager.h", | |
315 "internal_api/user_share.cc", | |
316 "internal_api/write_node.cc", | |
317 "internal_api/write_transaction.cc", | |
318 "js/js_backend.h", | |
319 "js/js_controller.h", | |
320 "js/js_event_details.cc", | |
321 "js/js_event_details.h", | |
322 "js/js_event_handler.h", | |
323 "js/sync_js_controller.cc", | |
324 "js/sync_js_controller.h", | |
325 "protocol/proto_enum_conversions.cc", | |
326 "protocol/proto_enum_conversions.h", | |
327 "protocol/proto_value_conversions.cc", | |
328 "protocol/proto_value_conversions.h", | |
329 "protocol/sync_protocol_error.cc", | |
330 "protocol/sync_protocol_error.h", | |
331 "sessions/data_type_tracker.cc", | |
332 "sessions/data_type_tracker.h", | |
333 "sessions/debug_info_getter.h", | |
334 "sessions/directory_type_debug_info_emitter.cc", | |
335 "sessions/directory_type_debug_info_emitter.h", | |
336 "sessions/model_type_registry.cc", | |
337 "sessions/model_type_registry.h", | |
338 "sessions/nudge_tracker.cc", | |
339 "sessions/nudge_tracker.h", | |
340 "sessions/status_controller.cc", | |
341 "sessions/status_controller.h", | |
342 "sessions/sync_session.cc", | |
343 "sessions/sync_session.h", | |
344 "sessions/sync_session_context.cc", | |
345 "sessions/sync_session_context.h", | |
346 "syncable/dir_open_result.h", | |
347 "syncable/directory.cc", | |
348 "syncable/directory.h", | |
349 "syncable/directory_backing_store.cc", | |
350 "syncable/directory_backing_store.h", | |
351 "syncable/directory_change_delegate.h", | |
352 "syncable/entry.cc", | |
353 "syncable/entry.h", | |
354 "syncable/entry_kernel.cc", | |
355 "syncable/entry_kernel.h", | |
356 "syncable/in_memory_directory_backing_store.cc", | |
357 "syncable/in_memory_directory_backing_store.h", | |
358 "syncable/invalid_directory_backing_store.cc", | |
359 "syncable/invalid_directory_backing_store.h", | |
360 "syncable/metahandle_set.h", | |
361 "syncable/model_neutral_mutable_entry.cc", | |
362 "syncable/model_neutral_mutable_entry.h", | |
363 "syncable/model_type.cc", | |
364 "syncable/mutable_entry.cc", | |
365 "syncable/mutable_entry.h", | |
366 "syncable/nigori_handler.cc", | |
367 "syncable/nigori_handler.h", | |
368 "syncable/nigori_util.cc", | |
369 "syncable/nigori_util.h", | |
370 "syncable/on_disk_directory_backing_store.cc", | |
371 "syncable/on_disk_directory_backing_store.h", | |
372 "syncable/parent_child_index.cc", | |
373 "syncable/parent_child_index.h", | |
374 "syncable/scoped_kernel_lock.cc", | |
375 "syncable/scoped_kernel_lock.h", | |
376 "syncable/scoped_parent_child_index_updater.cc", | |
377 "syncable/scoped_parent_child_index_updater.h", | |
378 "syncable/syncable-inl.h", | |
379 "syncable/syncable_base_transaction.cc", | |
380 "syncable/syncable_base_transaction.h", | |
381 "syncable/syncable_base_write_transaction.cc", | |
382 "syncable/syncable_base_write_transaction.h", | |
383 "syncable/syncable_changes_version.h", | |
384 "syncable/syncable_columns.h", | |
385 "syncable/syncable_delete_journal.cc", | |
386 "syncable/syncable_delete_journal.h", | |
387 "syncable/syncable_enum_conversions.cc", | |
388 "syncable/syncable_enum_conversions.h", | |
389 "syncable/syncable_id.cc", | |
390 "syncable/syncable_id.h", | |
391 "syncable/syncable_model_neutral_write_transaction.cc", | |
392 "syncable/syncable_model_neutral_write_transaction.h", | |
393 "syncable/syncable_proto_util.cc", | |
394 "syncable/syncable_proto_util.h", | |
395 "syncable/syncable_read_transaction.cc", | |
396 "syncable/syncable_read_transaction.h", | |
397 "syncable/syncable_util.cc", | |
398 "syncable/syncable_util.h", | |
399 "syncable/syncable_write_transaction.cc", | |
400 "syncable/syncable_write_transaction.h", | |
401 "syncable/transaction_observer.h", | |
402 "syncable/write_transaction_info.cc", | |
403 "syncable/write_transaction_info.h", | |
404 "util/cryptographer.cc", | |
405 "util/cryptographer.h", | |
406 "util/data_type_histogram.cc", | |
407 "util/data_type_histogram.h", | |
408 "util/encryptor.h", | |
409 "util/extensions_activity.cc", | |
410 "util/extensions_activity.h", | |
411 "util/get_session_name.cc", | |
412 "util/get_session_name.h", | |
413 "util/get_session_name_ios.h", | |
414 "util/get_session_name_ios.mm", | |
415 "util/get_session_name_linux.cc", | |
416 "util/get_session_name_linux.h", | |
417 "util/get_session_name_mac.h", | |
418 "util/get_session_name_mac.mm", | |
419 "util/get_session_name_win.cc", | |
420 "util/get_session_name_win.h", | |
421 "util/logging.cc", | |
422 "util/logging.h", | |
423 "util/nigori.cc", | |
424 "util/nigori.h", | |
425 "util/time.cc", | |
426 "util/time.h", | |
427 ] | |
428 | |
429 configs += [ "//build/config:precompiled_headers" ] | |
430 | |
431 public_deps = [ | |
432 "//net", | |
433 "//sync/internal_api/attachments/proto", | |
434 ] | |
435 deps = [ | |
436 "//base", | |
437 "//base:i18n", | |
438 "//base/third_party/dynamic_annotations", | |
439 "//crypto", | |
440 "//google_apis", | |
441 "//sql", | |
442 "//sync/protocol", | |
443 "//third_party/leveldatabase", | |
444 "//third_party/zlib", | |
445 "//url", | |
446 ] | |
447 | |
448 if (is_android) { | |
449 deps += [ "//sync/android:jni_headers" ] | |
450 sources += [ | |
451 "android/model_type_helper.cc", | |
452 "android/model_type_helper.h", | |
453 "android/sync_jni_registrar.cc", | |
454 "android/sync_jni_registrar.h", | |
455 ] | |
456 } | |
457 | |
458 if (is_chromeos) { | |
459 # Required by get_session_name.cc on Chrome OS. | |
460 deps += [ "//chromeos" ] | |
461 } | |
462 | |
463 if (is_mac) { | |
464 libs = [ | |
465 "CoreFoundation.framework", | |
466 "SystemConfiguration.framework", # Required by get_session_name_mac.mm. | |
467 ] | |
468 } | |
469 | |
470 defines = [ "SYNC_IMPLEMENTATION" ] | |
471 configs += [ "//build/config/compiler:wexit_time_destructors" ] | |
472 } | |
473 | |
474 # GYP version: sync/sync_tests.gypi:test_support_sync_core | |
475 static_library("test_support_sync_core") { | |
476 testonly = true | |
477 sources = [ | |
478 "internal_api/public/base/model_type_test_util.cc", | |
479 "internal_api/public/base/model_type_test_util.h", | |
480 "js/js_test_util.cc", | |
481 "js/js_test_util.h", | |
482 "sessions/test_util.cc", | |
483 "sessions/test_util.h", | |
484 "test/callback_counter.h", | |
485 "test/directory_backing_store_corruption_testing.cc", | |
486 "test/directory_backing_store_corruption_testing.h", | |
487 "test/engine/fake_model_worker.cc", | |
488 "test/engine/fake_model_worker.h", | |
489 "test/engine/fake_sync_scheduler.cc", | |
490 "test/engine/fake_sync_scheduler.h", | |
491 "test/engine/mock_connection_manager.cc", | |
492 "test/engine/mock_connection_manager.h", | |
493 "test/engine/mock_model_type_processor.cc", | |
494 "test/engine/mock_model_type_processor.h", | |
495 "test/engine/mock_model_type_worker.cc", | |
496 "test/engine/mock_model_type_worker.h", | |
497 "test/engine/mock_nudge_handler.cc", | |
498 "test/engine/mock_nudge_handler.h", | |
499 "test/engine/mock_update_handler.cc", | |
500 "test/engine/mock_update_handler.h", | |
501 "test/engine/single_type_mock_server.cc", | |
502 "test/engine/single_type_mock_server.h", | |
503 "test/engine/test_directory_setter_upper.cc", | |
504 "test/engine/test_directory_setter_upper.h", | |
505 "test/engine/test_id_factory.h", | |
506 "test/engine/test_syncable_utils.cc", | |
507 "test/engine/test_syncable_utils.h", | |
508 "test/fake_encryptor.cc", | |
509 "test/fake_encryptor.h", | |
510 "test/fake_sync_encryption_handler.cc", | |
511 "test/fake_sync_encryption_handler.h", | |
512 "test/mock_invalidation.cc", | |
513 "test/mock_invalidation.h", | |
514 "test/mock_invalidation_tracker.cc", | |
515 "test/mock_invalidation_tracker.h", | |
516 "test/null_directory_change_delegate.cc", | |
517 "test/null_directory_change_delegate.h", | |
518 "test/null_transaction_observer.cc", | |
519 "test/null_transaction_observer.h", | |
520 "test/sessions/mock_debug_info_getter.cc", | |
521 "test/sessions/mock_debug_info_getter.h", | |
522 "test/sessions/test_scoped_session_event_listener.h", | |
523 "test/test_directory_backing_store.cc", | |
524 "test/test_directory_backing_store.h", | |
525 "test/test_transaction_observer.cc", | |
526 "test/test_transaction_observer.h", | |
527 "test/trackable_mock_invalidation.cc", | |
528 "test/trackable_mock_invalidation.h", | |
529 "util/mock_unrecoverable_error_handler.cc", | |
530 "util/mock_unrecoverable_error_handler.h", | |
531 "util/test_unrecoverable_error_handler.cc", | |
532 "util/test_unrecoverable_error_handler.h", | |
533 ] | |
534 | |
535 public_deps = [ | |
536 "//base", | |
537 "//sync", | |
538 "//testing/gmock", | |
539 "//testing/gtest", | |
540 ] | |
541 | |
542 defines = [ "SYNC_TEST" ] | |
543 configs += [ "//build/config/compiler:wexit_time_destructors" ] | |
544 } | |
545 | |
546 # GYP version: sync/sync_tests.gypi:test_support_sync_internal_api | |
547 static_library("test_support_sync_internal_api") { | |
548 testonly = true | |
549 sources = [ | |
550 "internal_api/public/test/data_type_error_handler_mock.h", | |
551 "internal_api/public/test/fake_model_type_connector.h", | |
552 "internal_api/public/test/fake_model_type_processor.h", | |
553 "internal_api/public/test/fake_sync_manager.h", | |
554 "internal_api/public/test/model_type_store_test_util.h", | |
555 "internal_api/public/test/sync_manager_factory_for_profile_sync_test.h", | |
556 "internal_api/public/test/test_entry_factory.h", | |
557 "internal_api/public/test/test_internal_components_factory.h", | |
558 "internal_api/public/test/test_user_share.h", | |
559 "internal_api/test/data_type_error_handler_mock.cc", | |
560 "internal_api/test/fake_model_type_connector.cc", | |
561 "internal_api/test/fake_model_type_processor.cc", | |
562 "internal_api/test/fake_sync_manager.cc", | |
563 "internal_api/test/model_type_store_test_util.cc", | |
564 "internal_api/test/sync_manager_factory_for_profile_sync_test.cc", | |
565 "internal_api/test/sync_manager_for_profile_sync_test.cc", | |
566 "internal_api/test/sync_manager_for_profile_sync_test.h", | |
567 "internal_api/test/test_entry_factory.cc", | |
568 "internal_api/test/test_internal_components_factory.cc", | |
569 "internal_api/test/test_user_share.cc", | |
570 ] | |
571 | |
572 public_deps = [ | |
573 ":test_support_sync_core", | |
574 "//base", | |
575 "//sync", | |
576 "//testing/gtest", | |
577 ] | |
578 | |
579 defines = [ "SYNC_TEST" ] | |
580 configs += [ "//build/config/compiler:wexit_time_destructors" ] | |
581 } | |
582 | |
583 # GYP version: sync/sync_tests.gypi:test_support_sync_api | |
584 static_library("test_support_sync_api") { | |
585 testonly = true | |
586 sources = [ | |
587 "api/fake_model_type_change_processor.cc", | |
588 "api/fake_model_type_change_processor.h", | |
589 "api/fake_model_type_service.cc", | |
590 "api/fake_model_type_service.h", | |
591 "api/fake_sync_change_processor.cc", | |
592 "api/fake_sync_change_processor.h", | |
593 "api/fake_syncable_service.cc", | |
594 "api/fake_syncable_service.h", | |
595 "api/mock_model_type_store.cc", | |
596 "api/mock_model_type_store.h", | |
597 "api/sync_change_processor_wrapper_for_test.cc", | |
598 "api/sync_change_processor_wrapper_for_test.h", | |
599 "api/sync_error_factory_mock.cc", | |
600 "api/sync_error_factory_mock.h", | |
601 ] | |
602 | |
603 defines = [ "SYNC_TEST" ] | |
604 | |
605 public_deps = [ | |
606 "//base", | |
607 "//sync", | |
608 "//testing/gmock", | |
609 ] | |
610 } | |
611 | |
612 # GYP version: sync/sync_tests.gypi:sync_unit_tests | |
613 test("sync_unit_tests") { | |
614 sources = [ | |
615 "api/attachments/attachment_id_unittest.cc", | |
616 "api/attachments/attachment_metadata_unittest.cc", | |
617 "api/attachments/attachment_unittest.cc", | |
618 "api/entity_data_unittest.cc", | |
619 "api/model_type_service_unittest.cc", | |
620 "api/sync_change_unittest.cc", | |
621 "api/sync_data_unittest.cc", | |
622 "api/sync_error_unittest.cc", | |
623 "api/sync_merge_result_unittest.cc", | |
624 "engine/apply_control_data_updates_unittest.cc", | |
625 "engine/backoff_delay_provider_unittest.cc", | |
626 "engine/directory_commit_contribution_unittest.cc", | |
627 "engine/directory_update_handler_unittest.cc", | |
628 "engine/get_updates_processor_unittest.cc", | |
629 "engine/model_type_worker_unittest.cc", | |
630 "engine/sync_scheduler_unittest.cc", | |
631 "engine/syncer_proto_util_unittest.cc", | |
632 "engine/syncer_unittest.cc", | |
633 "engine/syncer_util_unittest.cc", | |
634 "engine/worker_entity_tracker_unittest.cc", | |
635 "internal_api/attachments/attachment_downloader_impl_unittest.cc", | |
636 "internal_api/attachments/attachment_service_impl_unittest.cc", | |
637 "internal_api/attachments/attachment_service_proxy_unittest.cc", | |
638 "internal_api/attachments/attachment_store_frontend_unittest.cc", | |
639 "internal_api/attachments/attachment_store_test_template.h", | |
640 "internal_api/attachments/attachment_uploader_impl_unittest.cc", | |
641 "internal_api/attachments/fake_attachment_downloader_unittest.cc", | |
642 "internal_api/attachments/fake_attachment_uploader_unittest.cc", | |
643 "internal_api/attachments/in_memory_attachment_store_unittest.cc", | |
644 "internal_api/attachments/on_disk_attachment_store_unittest.cc", | |
645 "internal_api/attachments/task_queue_unittest.cc", | |
646 "internal_api/debug_info_event_listener_unittest.cc", | |
647 "internal_api/http_bridge_unittest.cc", | |
648 "internal_api/js_mutation_event_observer_unittest.cc", | |
649 "internal_api/js_sync_encryption_handler_observer_unittest.cc", | |
650 "internal_api/js_sync_manager_observer_unittest.cc", | |
651 "internal_api/model_type_connector_proxy_unittest.cc", | |
652 "internal_api/model_type_store_backend_unittest.cc", | |
653 "internal_api/model_type_store_impl_unittest.cc", | |
654 "internal_api/processor_entity_tracker_unittest.cc", | |
655 "internal_api/protocol_event_buffer_unittest.cc", | |
656 "internal_api/public/base/attachment_id_proto_unittest.cc", | |
657 "internal_api/public/base/cancelation_signal_unittest.cc", | |
658 "internal_api/public/base/enum_set_unittest.cc", | |
659 "internal_api/public/base/node_ordinal_unittest.cc", | |
660 "internal_api/public/base/ordinal_unittest.cc", | |
661 "internal_api/public/base/unique_position_unittest.cc", | |
662 "internal_api/public/change_record_unittest.cc", | |
663 "internal_api/public/data_batch_impl_unittest.cc", | |
664 "internal_api/public/engine/model_safe_worker_unittest.cc", | |
665 "internal_api/public/sessions/sync_session_snapshot_unittest.cc", | |
666 "internal_api/public/simple_metadata_change_list_unittest.cc", | |
667 "internal_api/public/util/immutable_unittest.cc", | |
668 "internal_api/public/util/proto_value_ptr_unittest.cc", | |
669 "internal_api/public/util/weak_handle_unittest.cc", | |
670 "internal_api/shared_model_type_processor_unittest.cc", | |
671 "internal_api/sync_encryption_handler_impl_unittest.cc", | |
672 "internal_api/sync_manager_impl_unittest.cc", | |
673 "internal_api/syncapi_server_connection_manager_unittest.cc", | |
674 "js/js_event_details_unittest.cc", | |
675 "js/sync_js_controller_unittest.cc", | |
676 "protocol/proto_enum_conversions_unittest.cc", | |
677 "protocol/proto_value_conversions_unittest.cc", | |
678 "sessions/model_type_registry_unittest.cc", | |
679 "sessions/nudge_tracker_unittest.cc", | |
680 "sessions/status_controller_unittest.cc", | |
681 "syncable/directory_backing_store_unittest.cc", | |
682 "syncable/directory_unittest.cc", | |
683 "syncable/directory_unittest.h", | |
684 "syncable/entry_kernel_unittest.cc", | |
685 "syncable/model_type_unittest.cc", | |
686 "syncable/nigori_util_unittest.cc", | |
687 "syncable/parent_child_index_unittest.cc", | |
688 "syncable/syncable_enum_conversions_unittest.cc", | |
689 "syncable/syncable_id_unittest.cc", | |
690 "syncable/syncable_unittest.cc", | |
691 "syncable/syncable_util_unittest.cc", | |
692 "util/cryptographer_unittest.cc", | |
693 "util/data_type_histogram_unittest.cc", | |
694 "util/get_session_name_unittest.cc", | |
695 "util/nigori_unittest.cc", | |
696 "util/protobuf_unittest.cc", | |
697 ] | |
698 | |
699 configs += [ "//build/config:precompiled_headers" ] | |
700 | |
701 data = [ | |
702 "//chrome/test/data/sync/", | |
703 "//net/tools/testserver/", | |
704 "//third_party/pyftpdlib/", | |
705 "//third_party/pywebsocket/", | |
706 "//third_party/tlslite/", | |
707 "$root_out_dir/pyproto/google/", | |
708 ] | |
709 | |
710 deps = [ | |
711 ":test_support_sync_api", | |
712 ":test_support_sync_core", | |
713 ":test_support_sync_internal_api", | |
714 "//base", | |
715 "//base/test:run_all_unittests", | |
716 "//google_apis", | |
717 "//google_apis:test_support", | |
718 "//net", | |
719 "//net:test_support", | |
720 "//sql", | |
721 "//sql:test_support", | |
722 "//sync", | |
723 "//sync/protocol", | |
724 "//testing/gmock", | |
725 "//testing/gtest", | |
726 "//third_party/leveldatabase", | |
727 "//third_party/protobuf:protobuf_lite", | |
728 ] | |
729 | |
730 if (is_chromeos) { | |
731 # Required by get_session_name_unittest.cc on Chrome OS. | |
732 deps += [ "//chromeos" ] | |
733 } | |
734 | |
735 if (is_ios) { | |
736 sources -= [ "internal_api/http_bridge_unittest.cc" ] | |
737 } | |
738 | |
739 defines = [ "SYNC_TEST" ] | |
740 } | |
741 | |
742 # GYP version: sync/sync_tests.gypi:test_support_sync_fake_server | |
743 static_library("test_support_sync_fake_server") { | |
744 testonly = true | |
745 sources = [ | |
746 "test/fake_server/bookmark_entity.cc", | |
747 "test/fake_server/bookmark_entity.h", | |
748 "test/fake_server/bookmark_entity_builder.cc", | |
749 "test/fake_server/bookmark_entity_builder.h", | |
750 "test/fake_server/entity_builder_factory.cc", | |
751 "test/fake_server/entity_builder_factory.h", | |
752 "test/fake_server/fake_server.cc", | |
753 "test/fake_server/fake_server.h", | |
754 "test/fake_server/fake_server_entity.cc", | |
755 "test/fake_server/fake_server_entity.h", | |
756 "test/fake_server/fake_server_http_post_provider.cc", | |
757 "test/fake_server/fake_server_http_post_provider.h", | |
758 "test/fake_server/fake_server_network_resources.cc", | |
759 "test/fake_server/fake_server_network_resources.h", | |
760 "test/fake_server/fake_server_verifier.cc", | |
761 "test/fake_server/fake_server_verifier.h", | |
762 "test/fake_server/permanent_entity.cc", | |
763 "test/fake_server/permanent_entity.h", | |
764 "test/fake_server/sessions_hierarchy.cc", | |
765 "test/fake_server/sessions_hierarchy.h", | |
766 "test/fake_server/tombstone_entity.cc", | |
767 "test/fake_server/tombstone_entity.h", | |
768 "test/fake_server/unique_client_entity.cc", | |
769 "test/fake_server/unique_client_entity.h", | |
770 ] | |
771 | |
772 deps = [ | |
773 "//base", | |
774 "//net", | |
775 "//sync", | |
776 "//testing/gtest", | |
777 "//url", | |
778 ] | |
779 | |
780 public_deps = [ | |
781 "//third_party/protobuf:protobuf_lite", | |
782 ] | |
783 | |
784 configs += [ "//build/config/compiler:wexit_time_destructors" ] | |
785 } | |
786 | |
787 # GYP version: sync/sync_tests.gypi:test_support_sync_testserver | |
788 static_library("test_support_sync_testserver") { | |
789 testonly = true | |
790 sources = [ | |
791 "test/local_sync_test_server.cc", | |
792 "test/local_sync_test_server.h", | |
793 ] | |
794 | |
795 configs += [ "//build/config/compiler:wexit_time_destructors" ] | |
796 | |
797 public_deps = [ | |
798 "//base", | |
799 "//net:test_support", | |
800 ] | |
801 deps = [ | |
802 ":sync", | |
803 | |
804 # The sync test server uses Python modules generated by the sync protos. | |
805 "//third_party/protobuf:py_proto", | |
806 ] | |
807 } | |
808 | |
809 if (!is_ios) { | |
810 # GYP version: sync/sync_tests.gypi:run_sync_testserver | |
811 executable("run_sync_testserver") { | |
812 testonly = true | |
813 sources = [ | |
814 "tools/testserver/run_sync_testserver.cc", | |
815 ] | |
816 | |
817 deps = [ | |
818 ":test_support_sync_testserver", | |
819 "//base", | |
820 "//base/test:test_support", | |
821 "//build/config/sanitizers:deps", | |
822 "//build/win:default_exe_manifest", | |
823 "//net:test_support", | |
824 "//testing/gtest", | |
825 ] | |
826 } | |
827 } | |
828 | |
829 if (is_android) { | |
830 import("//build/config/android/rules.gni") | |
831 | |
832 # GYP: //sync/sync_tests.gypi:fake_server_jni | |
833 generate_jni("fake_server_jni") { | |
834 testonly = true | |
835 jni_package = "sync/test/fake_server" | |
836 sources = [ | |
837 "//chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/syn
c/FakeServerHelper.java", | |
838 ] | |
839 } | |
840 | |
841 _test_support_sync_prepared_protos_dir = | |
842 "$root_gen_dir/test_support_sync_proto_java_prepare/" | |
843 action("test_support_sync_proto_java_prepare") { | |
844 script = "//sync/protocol/prepare_protos_for_java_tests.py" | |
845 inputs = sync_protocol_sources | |
846 outputs = process_file_template( | |
847 sync_protocol_sources, | |
848 [ "$_test_support_sync_prepared_protos_dir/{{source_file_part}}" ]) | |
849 args = [ | |
850 "--output_dir", | |
851 rebase_path(_test_support_sync_prepared_protos_dir, root_build_dir), | |
852 ] | |
853 args += rebase_path(sync_protocol_sources, root_build_dir) | |
854 } | |
855 | |
856 # GYP: //sync/sync_tests.gypi:test_support_sync_proto_java | |
857 proto_java_library("test_support_sync_proto_java") { | |
858 proto_path = _test_support_sync_prepared_protos_dir | |
859 sources = get_target_outputs(":test_support_sync_proto_java_prepare") | |
860 deps = [ | |
861 ":test_support_sync_proto_java_prepare", | |
862 ] | |
863 } | |
864 | |
865 # GYP: //sync/sync_tests.gypi:sync_java_test_support | |
866 android_library("sync_java_test_support") { | |
867 testonly = true | |
868 deps = [ | |
869 "android:sync_java", | |
870 "//base:base_java", | |
871 "//base:base_java_test_support", | |
872 "//third_party/jsr-305:jsr_305_javalib", | |
873 ] | |
874 java_files = [ | |
875 "test/android/javatests/src/org/chromium/sync/test/util/AccountHolder.java
", | |
876 "test/android/javatests/src/org/chromium/sync/test/util/MockAccountManager
.java", | |
877 "test/android/javatests/src/org/chromium/sync/test/util/MockSyncContentRes
olverDelegate.java", | |
878 "test/android/javatests/src/org/chromium/sync/test/util/SimpleFuture.java"
, | |
879 ] | |
880 } | |
881 | |
882 # GYP: //sync/sync_tests.gypi:test_support_sync_fake_server_android | |
883 static_library("test_support_sync_fake_server_android") { | |
884 testonly = true | |
885 sources = [ | |
886 "test/fake_server/android/fake_server_helper_android.cc", | |
887 "test/fake_server/android/fake_server_helper_android.h", | |
888 ] | |
889 deps = [ | |
890 ":fake_server_jni", | |
891 ":sync_core", | |
892 ":test_support_sync_fake_server", | |
893 "//base", | |
894 "//sync/protocol:protocol", | |
895 "//testing/gtest", | |
896 "//url:url", | |
897 ] | |
898 } | |
899 } | |
OLD | NEW |