More bring up of ui code on iOS.
[chromium-blink-merge.git] / sync / sync.gyp
blob5fa64171a8ec2abb26975c2fe33a560da0b9f24a
1 # Copyright (c) 2012 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.
6   'variables': {
7     'chromium_code': 1,
8   },
9   'targets': [
10     # The core sync library.
11     #
12     # TODO(akalin): Rename this to something like 'sync_core' and
13     # reserve the 'sync' name for the overarching library that clients
14     # should depend on.
15     {
16       'target_name': 'sync',
17       # TODO(akalin): Change this to '<(component)'.  When we rename
18       # this to 'sync_core' and make the overarching 'sync' library,
19       # make that one '<(component)'.
20       'type': 'static_library',
21       'variables': { 'enable_wexit_time_destructors': 1, },
22       'include_dirs': [
23         '..',
24       ],
25       'defines': [
26         'SYNC_IMPLEMENTATION',
27       ],
28       'dependencies': [
29         '../base/base.gyp:base',
30         '../build/temp_gyp/googleurl.gyp:googleurl',
31         '../crypto/crypto.gyp:crypto',
32         '../google_apis/google_apis.gyp:google_apis',
33         '../net/net.gyp:net',
34         '../sql/sql.gyp:sql',
35         'protocol/sync_proto.gyp:sync_proto',
36       ],
37       'export_dependent_settings': [
38         # Propagate sync_proto since our headers include its generated
39         # files.
40         'protocol/sync_proto.gyp:sync_proto',
41       ],
42       'sources': [
43         'base/sync_export.h',
44         'internal_api/public/base/enum_set.h',
45         'internal_api/public/base/invalidation.cc',
46         'internal_api/public/base/invalidation.h',
47         'internal_api/public/base/model_type.h',
48         'internal_api/public/base/model_type_invalidation_map.cc',
49         'internal_api/public/base/model_type_invalidation_map.h',
50         'internal_api/public/base/node_ordinal.cc',
51         'internal_api/public/base/node_ordinal.h',
52         'internal_api/public/base/ordinal.h',
53         'internal_api/public/engine/model_safe_worker.cc',
54         'internal_api/public/engine/model_safe_worker.h',
55         'internal_api/public/engine/passive_model_worker.cc',
56         'internal_api/public/engine/passive_model_worker.h',
57         'internal_api/public/engine/polling_constants.cc',
58         'internal_api/public/engine/polling_constants.h',
59         'internal_api/public/engine/sync_status.cc',
60         'internal_api/public/engine/sync_status.h',
61         'internal_api/public/sessions/model_neutral_state.cc',
62         'internal_api/public/sessions/model_neutral_state.h',
63         'internal_api/public/sessions/sync_session_snapshot.cc',
64         'internal_api/public/sessions/sync_session_snapshot.h',
65         'internal_api/public/sessions/sync_source_info.cc',
66         'internal_api/public/sessions/sync_source_info.h',
67         'internal_api/public/util/experiments.h',
68         'internal_api/public/util/immutable.h',
69         'internal_api/public/util/syncer_error.cc',
70         'internal_api/public/util/syncer_error.h',
71         'internal_api/public/util/sync_string_conversions.cc',
72         'internal_api/public/util/sync_string_conversions.h',
73         'internal_api/public/util/report_unrecoverable_error_function.h',
74         'internal_api/public/util/unrecoverable_error_handler.h',
75         'internal_api/public/util/unrecoverable_error_info.h',
76         'internal_api/public/util/unrecoverable_error_info.cc',
77         'internal_api/public/util/weak_handle.cc',
78         'internal_api/public/util/weak_handle.h',
79         'engine/all_status.cc',
80         'engine/all_status.h',
81         'engine/apply_control_data_updates.cc',
82         'engine/apply_control_data_updates.h',
83         'engine/apply_updates_command.cc',
84         'engine/apply_updates_command.h',
85         'engine/backoff_delay_provider.cc',
86         'engine/backoff_delay_provider.h',
87         'engine/build_commit_command.cc',
88         'engine/build_commit_command.h',
89         'engine/commit.cc',
90         'engine/commit.h',
91         'engine/conflict_resolver.cc',
92         'engine/conflict_resolver.h',
93         'engine/conflict_util.cc',
94         'engine/conflict_util.h',
95         'engine/download_updates_command.cc',
96         'engine/download_updates_command.h',
97         'engine/get_commit_ids_command.cc',
98         'engine/get_commit_ids_command.h',
99         'engine/model_changing_syncer_command.cc',
100         'engine/model_changing_syncer_command.h',
101         'engine/net/server_connection_manager.cc',
102         'engine/net/server_connection_manager.h',
103         'engine/net/url_translator.cc',
104         'engine/net/url_translator.h',
105         'engine/nudge_source.cc',
106         'engine/nudge_source.h',
107         'engine/process_commit_response_command.cc',
108         'engine/process_commit_response_command.h',
109         'engine/process_updates_command.cc',
110         'engine/process_updates_command.h',
111         'engine/resolve_conflicts_command.cc',
112         'engine/resolve_conflicts_command.h',
113         'engine/store_timestamps_command.cc',
114         'engine/store_timestamps_command.h',
115         'engine/sync_engine_event.cc',
116         'engine/sync_engine_event.h',
117         'engine/sync_scheduler.cc',
118         'engine/sync_scheduler.h',
119         'engine/sync_scheduler_impl.cc',
120         'engine/sync_scheduler_impl.h',
121         'engine/syncer.cc',
122         'engine/syncer.h',
123         'engine/syncer_command.cc',
124         'engine/syncer_command.h',
125         'engine/syncer_proto_util.cc',
126         'engine/syncer_proto_util.h',
127         'engine/syncer_types.h',
128         'engine/syncer_util.cc',
129         'engine/syncer_util.h',
130         'engine/throttled_data_type_tracker.cc',
131         'engine/throttled_data_type_tracker.h',
132         'engine/traffic_logger.cc',
133         'engine/traffic_logger.h',
134         'engine/traffic_recorder.cc',
135         'engine/traffic_recorder.h',
136         'engine/update_applicator.cc',
137         'engine/update_applicator.h',
138         'engine/verify_updates_command.cc',
139         'engine/verify_updates_command.h',
140         'js/js_arg_list.cc',
141         'js/js_arg_list.h',
142         'js/js_backend.h',
143         'js/js_controller.h',
144         'js/js_event_details.cc',
145         'js/js_event_details.h',
146         'js/js_event_handler.h',
147         'js/js_reply_handler.h',
148         'js/sync_js_controller.cc',
149         'js/sync_js_controller.h',
150         'protocol/proto_enum_conversions.cc',
151         'protocol/proto_enum_conversions.h',
152         'protocol/proto_value_conversions.cc',
153         'protocol/proto_value_conversions.h',
154         'protocol/sync_protocol_error.cc',
155         'protocol/sync_protocol_error.h',
156         'sessions/debug_info_getter.h',
157         'sessions/ordered_commit_set.cc',
158         'sessions/ordered_commit_set.h',
159         'sessions/session_state.cc',
160         'sessions/session_state.h',
161         'sessions/status_controller.cc',
162         'sessions/status_controller.h',
163         'sessions/sync_session.cc',
164         'sessions/sync_session.h',
165         'sessions/sync_session_context.cc',
166         'sessions/sync_session_context.h',
167         'syncable/base_transaction.cc',
168         'syncable/base_transaction.h',
169         'syncable/blob.h',
170         'syncable/dir_open_result.h',
171         'syncable/directory.cc',
172         'syncable/directory.h',
173         'syncable/directory_backing_store.cc',
174         'syncable/directory_backing_store.h',
175         'syncable/directory_change_delegate.h',
176         'syncable/entry.cc',
177         'syncable/entry.h',
178         'syncable/entry_kernel.cc',
179         'syncable/entry_kernel.h',
180         'syncable/in_memory_directory_backing_store.cc',
181         'syncable/in_memory_directory_backing_store.h',
182         'syncable/invalid_directory_backing_store.cc',
183         'syncable/invalid_directory_backing_store.h',
184         'syncable/metahandle_set.h',
185         'syncable/model_type.cc',
186         'syncable/mutable_entry.cc',
187         'syncable/mutable_entry.h',
188         'syncable/nigori_handler.h',
189         'syncable/nigori_handler.cc',
190         'syncable/nigori_util.cc',
191         'syncable/nigori_util.h',
192         'syncable/on_disk_directory_backing_store.cc',
193         'syncable/on_disk_directory_backing_store.h',
194         'syncable/read_transaction.cc',
195         'syncable/read_transaction.h',
196         'syncable/scoped_kernel_lock.h',
197         'syncable/syncable-inl.h',
198         'syncable/syncable_changes_version.h',
199         'syncable/syncable_columns.h',
200         'syncable/syncable_enum_conversions.cc',
201         'syncable/syncable_enum_conversions.h',
202         'syncable/syncable_id.cc',
203         'syncable/syncable_id.h',
204         'syncable/syncable_proto_util.cc',
205         'syncable/syncable_proto_util.h',
206         'syncable/syncable_util.cc',
207         'syncable/syncable_util.h',
208         'syncable/transaction_observer.h',
209         'syncable/write_transaction.cc',
210         'syncable/write_transaction.h',
211         'syncable/write_transaction_info.cc',
212         'syncable/write_transaction_info.h',
213         'util/cryptographer.cc',
214         'util/cryptographer.h',
216         # TODO(akalin): Figure out a better place to put
217         # data_encryption_win*; it's also used by autofill.
218         'util/data_encryption_win.cc',
219         'util/data_encryption_win.h',
221         'util/data_type_histogram.h',
222         'util/encryptor.h',
223         'util/extensions_activity_monitor.cc',
224         'util/extensions_activity_monitor.h',
225         'util/get_session_name.cc',
226         'util/get_session_name.h',
227         'util/get_session_name_mac.mm',
228         'util/get_session_name_mac.h',
229         'util/get_session_name_win.cc',
230         'util/get_session_name_win.h',
231         'util/logging.cc',
232         'util/logging.h',
233         'util/nigori.cc',
234         'util/nigori.h',
235         'util/session_utils_android.cc',
236         'util/session_utils_android.h',
237         'util/time.cc',
238         'util/time.h',
239       ],
240     },
242     # The sync notifications library.
243     {
244       'target_name': 'sync_notifier',
245       'type': 'static_library',
246       'variables': { 'enable_wexit_time_destructors': 1, },
247       'include_dirs': [
248         '..',
249       ],
250       'dependencies': [
251         '../base/base.gyp:base',
252         '../jingle/jingle.gyp:jingle_glue',
253         '../jingle/jingle.gyp:notifier',
254         '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation',
255         # TODO(akalin): Remove this (http://crbug.com/133352).
256         '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_proto_cpp',
257         '../third_party/libjingle/libjingle.gyp:libjingle',
258         'sync',
259       ],
260       'export_dependent_settings': [
261         '../jingle/jingle.gyp:notifier',
262         '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation',
263       ],
264       'sources': [
265         'notifier/invalidation_handler.h',
266         'notifier/invalidation_util.cc',
267         'notifier/invalidation_util.h',
268         'notifier/invalidator_factory.cc',
269         'notifier/invalidator_factory.h',
270         'notifier/invalidator.h',
271         'notifier/invalidator_registrar.cc',
272         'notifier/invalidator_registrar.h',
273         'notifier/invalidator_state.cc',
274         'notifier/invalidator_state.h',
275         'notifier/object_id_invalidation_map.cc',
276         'notifier/object_id_invalidation_map.h',
277       ],
278       'conditions': [
279         ['OS != "android"', {
280           'sources': [
281             'notifier/invalidation_notifier.cc',
282             'notifier/invalidation_notifier.h',
283             'notifier/invalidation_state_tracker.h',
284             'notifier/non_blocking_invalidator.cc',
285             'notifier/non_blocking_invalidator.h',
286             'notifier/p2p_invalidator.cc',
287             'notifier/p2p_invalidator.h',
288             'notifier/push_client_channel.cc',
289             'notifier/push_client_channel.h',
290             'notifier/registration_manager.cc',
291             'notifier/registration_manager.h',
292             'notifier/state_writer.h',
293             'notifier/sync_invalidation_listener.cc',
294             'notifier/sync_invalidation_listener.h',
295             'notifier/sync_system_resources.cc',
296             'notifier/sync_system_resources.h',
297           ],
298         }],
299       ],
300     },
302     # The sync internal API library.
303     {
304       'target_name': 'syncapi_core',
305       'type': 'static_library',
306       'variables': { 'enable_wexit_time_destructors': 1, },
307       'include_dirs': [
308         '..',
309       ],
310       'dependencies': [
311         '../base/base.gyp:base',
312         '../build/temp_gyp/googleurl.gyp:googleurl',
313         '../net/net.gyp:net',
314         'protocol/sync_proto.gyp:sync_proto',
315         'sync_notifier',
316         'sync',
317       ],
318       'export_dependent_settings': [
319         # Propagate sync_proto since our headers include its generated
320         # files.
321         'protocol/sync_proto.gyp:sync_proto',
322         'sync',
323       ],
324       'sources': [
325         'internal_api/public/base_node.h',
326         'internal_api/public/base_transaction.h',
327         'internal_api/public/change_record.h',
328         'internal_api/public/configure_reason.h',
329         'internal_api/public/http_bridge.h',
330         'internal_api/public/http_post_provider_factory.h',
331         'internal_api/public/http_post_provider_interface.h',
332         'internal_api/public/internal_components_factory.h',
333         'internal_api/public/internal_components_factory_impl.h',
334         'internal_api/public/read_node.h',
335         'internal_api/public/read_transaction.h',
336         'internal_api/public/sync_manager.h',
337         'internal_api/public/sync_encryption_handler.cc',
338         'internal_api/public/sync_encryption_handler.h',
339         'internal_api/public/sync_manager.cc',
340         'internal_api/public/sync_manager_factory.h',
341         'internal_api/public/user_share.h',
342         'internal_api/public/write_node.h',
343         'internal_api/public/write_transaction.h',
344         'internal_api/base_node.cc',
345         'internal_api/base_transaction.cc',
346         'internal_api/change_record.cc',
347         'internal_api/change_reorder_buffer.cc',
348         'internal_api/change_reorder_buffer.h',
349         'internal_api/debug_info_event_listener.cc',
350         'internal_api/debug_info_event_listener.h',
351         'internal_api/http_bridge.cc',
352         'internal_api/internal_components_factory_impl.cc',
353         'internal_api/js_mutation_event_observer.cc',
354         'internal_api/js_mutation_event_observer.h',
355         'internal_api/js_sync_encryption_handler_observer.cc',
356         'internal_api/js_sync_encryption_handler_observer.h',
357         'internal_api/js_sync_manager_observer.cc',
358         'internal_api/js_sync_manager_observer.h',
359         'internal_api/read_node.cc',
360         'internal_api/read_transaction.cc',
361         'internal_api/syncapi_internal.cc',
362         'internal_api/syncapi_internal.h',
363         'internal_api/syncapi_server_connection_manager.cc',
364         'internal_api/syncapi_server_connection_manager.h',
365         'internal_api/sync_encryption_handler_impl.cc',
366         'internal_api/sync_encryption_handler_impl.h',
367         'internal_api/sync_manager_factory.cc',
368         'internal_api/sync_manager_impl.cc',
369         'internal_api/sync_manager_impl.h',
370         'internal_api/user_share.cc',
371         'internal_api/write_node.cc',
372         'internal_api/write_transaction.cc',
373       ],
374     },
376     # The sync external API library.
377     {
378       'target_name': 'syncapi_service',
379       'type': 'static_library',
380       'variables': { 'enable_wexit_time_destructors': 1, },
381       'include_dirs': [
382         '..',
383       ],
384       'dependencies': [
385         '../base/base.gyp:base',
386         'protocol/sync_proto.gyp:sync_proto',
387         'sync',
388       ],
389       # We avoid including header files from sync_proto in our public
390       # header files so we don't need to export its settings.
391       'sources': [
392         'api/string_ordinal.h',
393         'api/syncable_service.cc',
394         'api/syncable_service.h',
395         'api/sync_data.h',
396         'api/sync_data.cc',
397         'api/sync_change.h',
398         'api/sync_change.cc',
399         'api/sync_change_processor.h',
400         'api/sync_change_processor.cc',
401         'api/sync_error.h',
402         'api/sync_error.cc',
403         'api/sync_error_factory.h',
404         'api/sync_error_factory.cc',
405         'api/time.h',
406       ],
407     },
409     # Test support files for the 'sync' target.
410     {
411       'target_name': 'test_support_sync',
412       'type': 'static_library',
413       'variables': { 'enable_wexit_time_destructors': 1, },
414       'include_dirs': [
415         '..',
416       ],
417       'dependencies': [
418         '../base/base.gyp:base',
419         '../testing/gmock.gyp:gmock',
420         '../testing/gtest.gyp:gtest',
421         'protocol/sync_proto.gyp:sync_proto',
422         'sync',
423       ],
424       'export_dependent_settings': [
425         '../testing/gmock.gyp:gmock',
426         '../testing/gtest.gyp:gtest',
427         'protocol/sync_proto.gyp:sync_proto',
428         'sync',
429       ],
430       'sources': [
431         'internal_api/public/base/invalidation_test_util.cc',
432         'internal_api/public/base/invalidation_test_util.h',
433         'internal_api/public/base/model_type_invalidation_map_test_util.cc',
434         'internal_api/public/base/model_type_invalidation_map_test_util.h',
435         'internal_api/public/base/model_type_test_util.cc',
436         'internal_api/public/base/model_type_test_util.h',
437         'js/js_test_util.cc',
438         'js/js_test_util.h',
439         'sessions/test_util.cc',
440         'sessions/test_util.h',
441         'syncable/syncable_mock.cc',
442         'syncable/syncable_mock.h',
443         'test/callback_counter.h',
444         'test/engine/fake_model_worker.cc',
445         'test/engine/fake_model_worker.h',
446         'test/engine/fake_sync_scheduler.cc',
447         'test/engine/fake_sync_scheduler.h',
448         'test/engine/mock_connection_manager.cc',
449         'test/engine/mock_connection_manager.h',
450         'test/engine/syncer_command_test.cc',
451         'test/engine/syncer_command_test.h',
452         'test/engine/test_directory_setter_upper.cc',
453         'test/engine/test_directory_setter_upper.h',
454         'test/engine/test_id_factory.h',
455         'test/engine/test_syncable_utils.cc',
456         'test/engine/test_syncable_utils.h',
457         'test/fake_encryptor.cc',
458         'test/fake_encryptor.h',
459         'test/fake_sync_encryption_handler.h',
460         'test/fake_sync_encryption_handler.cc',
461         'test/fake_extensions_activity_monitor.cc',
462         'test/fake_extensions_activity_monitor.h',
463         'test/null_directory_change_delegate.cc',
464         'test/null_directory_change_delegate.h',
465         'test/null_transaction_observer.cc',
466         'test/null_transaction_observer.h',
467         'test/sessions/test_scoped_session_event_listener.h',
468         'test/test_directory_backing_store.cc',
469         'test/test_directory_backing_store.h',
470         'util/test_unrecoverable_error_handler.cc',
471         'util/test_unrecoverable_error_handler.h',
472       ],
473     },
475     # Test support files for the 'sync_notifier' target.
476     {
477       'target_name': 'test_support_sync_notifier',
478       'type': 'static_library',
479       'include_dirs': [
480         '..',
481       ],
482       'dependencies': [
483         '../testing/gmock.gyp:gmock',
484         '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_proto_cpp',
485         'sync_notifier',
486       ],
487       'export_dependent_settings': [
488         '../testing/gmock.gyp:gmock',
489         '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_proto_cpp',
490         'sync_notifier',
491       ],
492       'sources': [
493         'notifier/fake_invalidation_state_tracker.cc',
494         'notifier/fake_invalidation_state_tracker.h',
495         'notifier/fake_invalidator.cc',
496         'notifier/fake_invalidator.h',
497         'notifier/fake_invalidation_handler.cc',
498         'notifier/fake_invalidation_handler.h',
499         'notifier/invalidator_test_template.cc',
500         'notifier/invalidator_test_template.h',
501         'notifier/object_id_invalidation_map_test_util.cc',
502         'notifier/object_id_invalidation_map_test_util.h',
503       ],
504     },
506     # Test support files for the 'syncapi_core' target.
507     {
508       'target_name': 'test_support_syncapi_core',
509       'type': 'static_library',
510       'variables': { 'enable_wexit_time_destructors': 1, },
511       'include_dirs': [
512         '..',
513       ],
514       'dependencies': [
515         '../base/base.gyp:base',
516         '../testing/gtest.gyp:gtest',
517         'syncapi_core',
518         'sync_notifier',
519         'test_support_sync',
520       ],
521       'export_dependent_settings': [
522         '../testing/gtest.gyp:gtest',
523         'syncapi_core',
524         'sync_notifier',
525         'test_support_sync',
526       ],
527       'sources': [
528         'internal_api/public/test/fake_sync_manager.h',
529         'internal_api/public/test/test_entry_factory.h',
530         'internal_api/public/test/test_internal_components_factory.h',
531         'internal_api/public/test/test_user_share.h',
532         'internal_api/test/fake_sync_manager.cc',
533         'internal_api/test/test_entry_factory.cc',
534         'internal_api/test/test_internal_components_factory.cc',
535         'internal_api/test/test_user_share.cc',
536       ],
537     },
539     # Test support files for the 'syncapi_service' target.
540     {
541       'target_name': 'test_support_syncapi_service',
542       'type': 'static_library',
543       'include_dirs': [
544         '..',
545       ],
546       'dependencies': [
547         '../testing/gmock.gyp:gmock',
548         'syncapi_service',
549       ],
550       'export_dependent_settings': [
551         '../testing/gmock.gyp:gmock',
552         'syncapi_service',
553       ],
554       'sources': [
555         'api/fake_syncable_service.cc',
556         'api/fake_syncable_service.h',
557         'api/sync_error_factory_mock.cc',
558         'api/sync_error_factory_mock.h',
559       ],
560     },
562     # Unit tests for the 'sync' target.  This cannot be a static
563     # library because the unit test files have to be compiled directly
564     # into the executable, so we push the target files to the
565     # depending executable target via direct_dependent_settings.
566     {
567       'target_name': 'sync_tests',
568       'type': 'none',
569       # We only want unit test executables to include this target.
570       'suppress_wildcard': 1,
571       'dependencies': [
572         '../base/base.gyp:base',
573         '../testing/gmock.gyp:gmock',
574         '../testing/gtest.gyp:gtest',
575         'protocol/sync_proto.gyp:sync_proto',
576         'sync',
577         'test_support_sync',
578       ],
579       # Propagate all dependencies since the actual compilation
580       # happens in the dependents.
581       'export_dependent_settings': [
582         '../base/base.gyp:base',
583         '../testing/gmock.gyp:gmock',
584         '../testing/gtest.gyp:gtest',
585         'protocol/sync_proto.gyp:sync_proto',
586         'sync',
587         'test_support_sync',
588       ],
589       'direct_dependent_settings': {
590         'include_dirs': [
591           '..',
592         ],
593         'sources': [
594           'internal_api/public/base/enum_set_unittest.cc',
595           'internal_api/public/base/model_type_invalidation_map_unittest.cc',
596           'internal_api/public/base/node_ordinal_unittest.cc',
597           'internal_api/public/base/ordinal_unittest.cc',
598           'internal_api/public/engine/model_safe_worker_unittest.cc',
599           'internal_api/public/util/immutable_unittest.cc',
600           'engine/apply_control_data_updates_unittest.cc',
601           'engine/apply_updates_command_unittest.cc',
602           'engine/backoff_delay_provider_unittest.cc',
603           'engine/build_commit_command_unittest.cc',
604           'engine/download_updates_command_unittest.cc',
605           'engine/model_changing_syncer_command_unittest.cc',
606           'engine/process_commit_response_command_unittest.cc',
607           'engine/process_updates_command_unittest.cc',
608           'engine/sync_scheduler_unittest.cc',
609           'engine/sync_scheduler_whitebox_unittest.cc',
610           'engine/syncer_proto_util_unittest.cc',
611           'engine/syncer_unittest.cc',
612           'engine/throttled_data_type_tracker_unittest.cc',
613           'engine/traffic_recorder_unittest.cc',
614           'engine/verify_updates_command_unittest.cc',
615           'js/js_arg_list_unittest.cc',
616           'js/js_event_details_unittest.cc',
617           'js/sync_js_controller_unittest.cc',
618           'protocol/proto_enum_conversions_unittest.cc',
619           'protocol/proto_value_conversions_unittest.cc',
620           'sessions/ordered_commit_set_unittest.cc',
621           'sessions/session_state_unittest.cc',
622           'sessions/status_controller_unittest.cc',
623           'sessions/sync_session_unittest.cc',
624           'syncable/directory_backing_store_unittest.cc',
625           'syncable/model_type_unittest.cc',
626           'syncable/nigori_util_unittest.cc',
627           'syncable/syncable_enum_conversions_unittest.cc',
628           'syncable/syncable_id_unittest.cc',
629           'syncable/syncable_unittest.cc',
630           'util/cryptographer_unittest.cc',
631           'util/data_encryption_win_unittest.cc',
632           'util/data_type_histogram_unittest.cc',
633           'util/get_session_name_unittest.cc',
634           'util/nigori_unittest.cc',
635           'util/protobuf_unittest.cc',
636           'internal_api/public/util/weak_handle_unittest.cc',
637         ],
638       },
639     },
641     # Unit tests for the 'sync_notifier' target.  This cannot be a static
642     # library because the unit test files have to be compiled directly
643     # into the executable, so we push the target files to the
644     # depending executable target via direct_dependent_settings.
645     {
646       'target_name': 'sync_notifier_tests',
647       'type': 'none',
648       # We only want unit test executables to include this target.
649       'suppress_wildcard': 1,
650       'dependencies': [
651         '../base/base.gyp:base',
652         '../jingle/jingle.gyp:notifier_test_util',
653         '../net/net.gyp:net_test_support',
654         '../testing/gmock.gyp:gmock',
655         '../testing/gtest.gyp:gtest',
656         '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation',
657         '../third_party/libjingle/libjingle.gyp:libjingle',
658         'sync',
659         'sync_notifier',
660         'test_support_sync_notifier',
661       ],
662       # Propagate all dependencies since the actual compilation
663       # happens in the dependents.
664       'export_dependent_settings': [
665         '../base/base.gyp:base',
666         '../jingle/jingle.gyp:notifier_test_util',
667         '../net/net.gyp:net_test_support',
668         '../testing/gmock.gyp:gmock',
669         '../testing/gtest.gyp:gtest',
670         '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation',
671         '../third_party/libjingle/libjingle.gyp:libjingle',
672         'sync',
673         'sync_notifier',
674         'test_support_sync_notifier',
675       ],
676       'direct_dependent_settings': {
677         'include_dirs': [
678           '..',
679         ],
680         'sources': [
681           'notifier/invalidator_factory_unittest.cc',
682         ],
683         'conditions': [
684           ['OS != "android"', {
685             'sources': [
686               'notifier/fake_invalidator_unittest.cc',
687               'notifier/invalidation_notifier_unittest.cc',
688               'notifier/invalidator_registrar_unittest.cc',
689               'notifier/non_blocking_invalidator_unittest.cc',
690               'notifier/p2p_invalidator_unittest.cc',
691               'notifier/push_client_channel_unittest.cc',
692               'notifier/registration_manager_unittest.cc',
693               'notifier/sync_invalidation_listener_unittest.cc',
694               'notifier/sync_system_resources_unittest.cc',
695             ],
696           }],
697         ],
698       },
699     },
701     # Unit tests for the 'syncapi_core' target.  This cannot be a static
702     # library because the unit test files have to be compiled directly
703     # into the executable, so we push the target files to the
704     # depending executable target via direct_dependent_settings.
705     {
706       'target_name': 'syncapi_core_tests',
707       'type': 'none',
708       # We only want unit test executables to include this target.
709       'suppress_wildcard': 1,
710       'dependencies': [
711         '../base/base.gyp:base',
712         '../net/net.gyp:net',
713         '../net/net.gyp:net_test_support',
714         '../testing/gmock.gyp:gmock',
715         '../testing/gtest.gyp:gtest',
716         'protocol/sync_proto.gyp:sync_proto',
717         'sync',
718         'sync_notifier',
719         'syncapi_core',
720         'test_support_syncapi_core',
721       ],
722       # Propagate all dependencies since the actual compilation
723       # happens in the dependents.
724       'export_dependent_settings': [
725         '../base/base.gyp:base',
726         '../net/net.gyp:net',
727         '../net/net.gyp:net_test_support',
728         '../testing/gmock.gyp:gmock',
729         '../testing/gtest.gyp:gtest',
730         'protocol/sync_proto.gyp:sync_proto',
731         'sync',
732         'sync_notifier',
733         'syncapi_core',
734         'test_support_syncapi_core',
735       ],
736       'direct_dependent_settings': {
737         'include_dirs': [
738           '..',
739         ],
740         'sources': [
741           'internal_api/public/change_record_unittest.cc',
742           'internal_api/debug_info_event_listener_unittest.cc',
743           'internal_api/http_bridge_unittest.cc',
744           'internal_api/js_mutation_event_observer_unittest.cc',
745           'internal_api/js_sync_encryption_handler_observer_unittest.cc',
746           'internal_api/js_sync_manager_observer_unittest.cc',
747           'internal_api/syncapi_server_connection_manager_unittest.cc',
748           'internal_api/sync_encryption_handler_impl_unittest.cc',
749           'internal_api/sync_manager_impl_unittest.cc',
750         ],
751       },
752     },
754     # Unit tests for the 'syncapi_service' target.  This cannot be a static
755     # library because the unit test files have to be compiled directly
756     # into the executable, so we push the target files to the
757     # depending executable target via direct_dependent_settings.
758     {
759       'target_name': 'syncapi_service_tests',
760       'type': 'none',
761       # We only want unit test executables to include this target.
762       'suppress_wildcard': 1,
763       'dependencies': [
764         '../base/base.gyp:base',
765         '../testing/gtest.gyp:gtest',
766         'protocol/sync_proto.gyp:sync_proto',
767         'sync',
768         'syncapi_service',
769         'test_support_syncapi_service',
770       ],
771       # Propagate all dependencies since the actual compilation
772       # happens in the dependents.
773       'export_dependent_settings': [
774         '../base/base.gyp:base',
775         '../testing/gtest.gyp:gtest',
776         'protocol/sync_proto.gyp:sync_proto',
777         'sync',
778         'syncapi_service',
779         'test_support_syncapi_service',
780       ],
781       'direct_dependent_settings': {
782         'include_dirs': [
783           '..',
784         ],
785         'sources': [
786           'api/sync_change_unittest.cc',
787           'api/sync_error_unittest.cc',
788         ],
789       },
790     },
792     # The unit test executable for sync tests.
793     {
794       'target_name': 'sync_unit_tests',
795       'type': '<(gtest_target_type)',
796       # Typed-parametrized tests generate exit-time destructors.
797       'variables': { 'enable_wexit_time_destructors': 0, },
798       'dependencies': [
799         '../base/base.gyp:run_all_unittests',
800         'sync_tests',
801         'sync_notifier_tests',
802         'syncapi_core_tests',
803         'syncapi_service_tests',
804       ],
805       # TODO(akalin): This is needed because histogram.cc uses
806       # leak_annotations.h, which pulls this in.  Make 'base'
807       # propagate this dependency.
808       'conditions': [
809         ['OS=="linux" and linux_use_tcmalloc==1', {
810           'dependencies': [
811             '../base/allocator/allocator.gyp:allocator',
812           ],
813         }],
814         ['OS=="linux" and chromeos==1', {
815             # TODO(kochi): Remove this once we get rid of dependency from
816             # get_session_name.cc.
817             'dependencies': [
818                 '../chrome/chrome.gyp:browser',
819             ],
820         }],
821         ['OS == "android" and gtest_target_type == "shared_library"', {
822           'dependencies': [
823             '../testing/android/native_test.gyp:native_test_native_code',
824           ],
825         }],
826       ],
827     },
828   ],
829   'conditions': [
830     ['OS != "ios"', {
831       'targets': [
832         # A tool to listen to sync notifications and print them out.
833         {
834           'target_name': 'sync_listen_notifications',
835           'type': 'executable',
836           'dependencies': [
837             '../base/base.gyp:base',
838             '../jingle/jingle.gyp:notifier',
839             '../net/net.gyp:net',
840             '../net/net.gyp:net_test_support',
841             'sync',
842             'sync_notifier',
843           ],
844           'sources': [
845             'tools/sync_listen_notifications.cc',
846           ],
847         },
849         # A standalone command-line sync client.
850         {
851           'target_name': 'sync_client',
852           'type': 'executable',
853           'defines': [
854             'SYNC_TEST',
855           ],
856           'dependencies': [
857             '../base/base.gyp:base',
858             '../jingle/jingle.gyp:notifier',
859             '../net/net.gyp:net',
860             '../net/net.gyp:net_test_support',
861             'sync',
862             'sync_notifier',
863             'syncapi_core',
864           ],
865           'sources': [
866             'tools/sync_client.cc',
867           ],
868         },
869       ],
870     }],
871     # Special target to wrap a gtest_target_type==shared_library
872     # sync_unit_tests into an android apk for execution.
873     ['OS == "android" and gtest_target_type == "shared_library"', {
874       'targets': [
875         {
876           'target_name': 'sync_unit_tests_apk',
877           'type': 'none',
878           'dependencies': [
879             'sync_unit_tests',
880           ],
881           'variables': {
882             'test_suite_name': 'sync_unit_tests',
883             'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)sync_unit_tests<(SHARED_LIB_SUFFIX)',
884           },
885           'includes': [ '../build/apk_test.gypi' ],
886         },
887       ],
888     }],
889   ],