Update V8 to version 4.7.16.
[chromium-blink-merge.git] / sync / sync.gyp
bloba029b681cd06d0dc64b01a45c443475f3c22be9a
1 # Copyright 2013 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     # Setting these two variables allows other targets to use the
9     # sync_proto_sources variable as the list of sync protocol buffer files.
10     'sync_proto_sources_dir': 'protocol',
11     'sync_proto_sources': [
12       '<@(sync_proto_source_paths)',
13     ],
14   },
16   'includes': [
17     'protocol/protocol.gypi',
18     'sync_android.gypi',
19     'sync_tests.gypi',
20   ],
22   'targets': [
23     # This target will add '-lsync_core' and '-lsync_proto' to the link line of
24     # targets that depend on it.  Anything that depends on sync code should
25     # declare a dependency on this target.
26     {
27       'target_name': 'sync',
28       'type': 'none',
29       'dependencies': [
30         'sync_core',
31         'sync_proto',
32       ],
33       'export_dependent_settings': [
34         'sync_proto',
35       ],
36     },
38     # Contains everything related to sync implementation that does not depend
39     # on chrome/ or components/.  Do not depend on this directly.  Depend on
40     # the 'sync' target to get the sync protobufs, too.
41     {
42       'target_name': 'sync_core',
43       'type': '<(component)',
44       'variables': { 'enable_wexit_time_destructors': 1, },
45       'defines': [
46         'SYNC_IMPLEMENTATION',
47       ],
48       'include_dirs': [
49         '..',
50       ],
51       'dependencies': [
52         '../base/base.gyp:base',
53         '../base/base.gyp:base_i18n',
54         '../crypto/crypto.gyp:crypto',
55         '../google_apis/google_apis.gyp:google_apis',
56         '../net/net.gyp:net',
57         '../sql/sql.gyp:sql',
58         '../third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
59         '../third_party/protobuf/protobuf.gyp:protobuf_lite',
60         '../third_party/zlib/zlib.gyp:zlib',
61         '../url/url.gyp:url_lib',
62         'attachment_store_proto',
63         'sync_proto',
64       ],
65       'export_dependent_settings': [
66         'sync_proto',
67       ],
68       'sources': [
69         'api/attachments/attachment.cc',
70         'api/attachments/attachment.h',
71         'api/attachments/attachment_id.cc',
72         'api/attachments/attachment_id.h',
73         'api/attachments/attachment_metadata.cc',
74         'api/attachments/attachment_metadata.h',
75         'api/attachments/attachment_store.cc',
76         'api/attachments/attachment_store.h',
77         'api/attachments/attachment_store_backend.cc',
78         'api/attachments/attachment_store_backend.h',
79         'api/string_ordinal.h',
80         'api/sync_change.cc',
81         'api/sync_change.h',
82         'api/sync_change_processor.cc',
83         'api/sync_change_processor.h',
84         'api/sync_data.cc',
85         'api/sync_data.h',
86         'api/sync_error.cc',
87         'api/sync_error.h',
88         'api/sync_error_factory.cc',
89         'api/sync_error_factory.h',
90         'api/sync_merge_result.cc',
91         'api/sync_merge_result.h',
92         'api/syncable_service.cc',
93         'api/syncable_service.h',
94         'api/time.h',
95         'base/sync_export.h',
96         'engine/all_status.cc',
97         'engine/all_status.h',
98         'engine/apply_control_data_updates.cc',
99         'engine/apply_control_data_updates.h',
100         'engine/backoff_delay_provider.cc',
101         'engine/backoff_delay_provider.h',
102         'engine/clear_server_data.cc',
103         'engine/clear_server_data.h',
104         'engine/commit.cc',
105         'engine/commit.h',
106         'engine/commit_contribution.cc',
107         'engine/commit_contribution.h',
108         'engine/commit_contributor.cc',
109         'engine/commit_contributor.h',
110         'engine/commit_processor.cc',
111         'engine/commit_processor.h',
112         'engine/commit_util.cc',
113         'engine/commit_util.h',
114         'engine/conflict_resolver.cc',
115         'engine/conflict_resolver.h',
116         'engine/conflict_util.cc',
117         'engine/conflict_util.h',
118         'engine/directory_commit_contribution.cc',
119         'engine/directory_commit_contribution.h',
120         'engine/directory_commit_contributor.cc',
121         'engine/directory_commit_contributor.h',
122         'engine/directory_update_handler.cc',
123         'engine/directory_update_handler.h',
124         'engine/entity_tracker.cc',
125         'engine/entity_tracker.h',
126         'engine/get_commit_ids.cc',
127         'engine/get_commit_ids.h',
128         'engine/get_updates_delegate.cc',
129         'engine/get_updates_delegate.h',
130         'engine/get_updates_processor.cc',
131         'engine/get_updates_processor.h',
132         'engine/model_type_entity.cc',
133         'engine/model_type_entity.h',
134         'engine/model_type_sync_proxy.cc',
135         'engine/model_type_sync_proxy.h',
136         'engine/model_type_sync_proxy_impl.cc',
137         'engine/model_type_sync_proxy_impl.h',
138         'engine/model_type_sync_worker.cc',
139         'engine/model_type_sync_worker.h',
140         'engine/model_type_sync_worker_impl.cc',
141         'engine/model_type_sync_worker_impl.h',
142         'engine/net/server_connection_manager.cc',
143         'engine/net/server_connection_manager.h',
144         'engine/net/url_translator.cc',
145         'engine/net/url_translator.h',
146         'engine/non_blocking_type_commit_contribution.cc',
147         'engine/non_blocking_type_commit_contribution.h',
148         'engine/nudge_handler.cc',
149         'engine/nudge_handler.h',
150         'engine/nudge_source.cc',
151         'engine/nudge_source.h',
152         'engine/process_updates_util.cc',
153         'engine/process_updates_util.h',
154         'engine/sync_cycle_event.cc',
155         'engine/sync_cycle_event.h',
156         'engine/sync_engine_event_listener.cc',
157         'engine/sync_engine_event_listener.h',
158         'engine/sync_scheduler.cc',
159         'engine/sync_scheduler.h',
160         'engine/sync_scheduler_impl.cc',
161         'engine/sync_scheduler_impl.h',
162         'engine/syncer.cc',
163         'engine/syncer.h',
164         'engine/syncer_proto_util.cc',
165         'engine/syncer_proto_util.h',
166         'engine/syncer_types.h',
167         'engine/syncer_util.cc',
168         'engine/syncer_util.h',
169         'engine/traffic_logger.cc',
170         'engine/traffic_logger.h',
171         'engine/update_applicator.cc',
172         'engine/update_applicator.h',
173         'engine/update_handler.cc',
174         'engine/update_handler.h',
175         'internal_api/attachments/attachment_downloader.cc',
176         'internal_api/attachments/attachment_downloader_impl.cc',
177         'internal_api/attachments/attachment_service.cc',
178         'internal_api/attachments/attachment_service_impl.cc',
179         'internal_api/attachments/attachment_service_proxy.cc',
180         'internal_api/attachments/attachment_service_proxy_for_test.cc',
181         'internal_api/attachments/attachment_store_frontend.cc',
182         'internal_api/attachments/attachment_uploader.cc',
183         'internal_api/attachments/attachment_uploader_impl.cc',
184         'internal_api/attachments/attachment_util.cc',
185         'internal_api/attachments/fake_attachment_downloader.cc',
186         'internal_api/attachments/fake_attachment_uploader.cc',
187         'internal_api/attachments/in_memory_attachment_store.cc',
188         'internal_api/attachments/on_disk_attachment_store.cc',
189         'internal_api/attachments/task_queue.cc',
190         'internal_api/base_node.cc',
191         'internal_api/base_transaction.cc',
192         'internal_api/change_record.cc',
193         'internal_api/change_reorder_buffer.cc',
194         'internal_api/change_reorder_buffer.h',
195         'internal_api/debug_info_event_listener.cc',
196         'internal_api/debug_info_event_listener.h',
197         'internal_api/delete_journal.cc',
198         'internal_api/events/clear_server_data_request_event.cc',
199         'internal_api/events/clear_server_data_response_event.cc',
200         'internal_api/events/commit_request_event.cc',
201         'internal_api/events/commit_response_event.cc',
202         'internal_api/events/configure_get_updates_request_event.cc',
203         'internal_api/events/get_updates_response_event.cc',
204         'internal_api/events/normal_get_updates_request_event.cc',
205         'internal_api/events/poll_get_updates_request_event.cc',
206         'internal_api/events/protocol_event.cc',
207         'internal_api/http_bridge.cc',
208         'internal_api/http_bridge_network_resources.cc',
209         'internal_api/internal_components_factory_impl.cc',
210         'internal_api/js_mutation_event_observer.cc',
211         'internal_api/js_mutation_event_observer.h',
212         'internal_api/js_sync_encryption_handler_observer.cc',
213         'internal_api/js_sync_encryption_handler_observer.h',
214         'internal_api/js_sync_manager_observer.cc',
215         'internal_api/js_sync_manager_observer.h',
216         'internal_api/protocol_event_buffer.cc',
217         'internal_api/protocol_event_buffer.h',
218         'internal_api/public/attachments/attachment_downloader.h',
219         'internal_api/public/attachments/attachment_downloader_impl.h',
220         'internal_api/public/attachments/attachment_service.h',
221         'internal_api/public/attachments/attachment_service_impl.h',
222         'internal_api/public/attachments/attachment_service_proxy.h',
223         'internal_api/public/attachments/attachment_service_proxy_for_test.h',
224         'internal_api/public/attachments/attachment_store_frontend.h',
225         'internal_api/public/attachments/attachment_uploader.h',
226         'internal_api/public/attachments/attachment_uploader_impl.h',
227         'internal_api/public/attachments/attachment_util.h',
228         'internal_api/public/attachments/fake_attachment_downloader.h',
229         'internal_api/public/attachments/fake_attachment_uploader.h',
230         'internal_api/public/attachments/in_memory_attachment_store.h',
231         'internal_api/public/attachments/on_disk_attachment_store.h',
232         'internal_api/public/attachments/task_queue.h',
233         'internal_api/public/base/attachment_id_proto.cc',
234         'internal_api/public/base/attachment_id_proto.h',
235         'internal_api/public/base/cancelation_observer.cc',
236         'internal_api/public/base/cancelation_observer.h',
237         'internal_api/public/base/cancelation_signal.cc',
238         'internal_api/public/base/cancelation_signal.h',
239         'internal_api/public/base/enum_set.h',
240         'internal_api/public/base/enum_set.h',
241         'internal_api/public/base/invalidation_interface.cc',
242         'internal_api/public/base/invalidation_interface.h',
243         'internal_api/public/base/model_type.h',
244         'internal_api/public/base/node_ordinal.cc',
245         'internal_api/public/base/node_ordinal.h',
246         'internal_api/public/base/ordinal.h',
247         'internal_api/public/base/progress_marker_map.cc',
248         'internal_api/public/base/progress_marker_map.h',
249         'internal_api/public/base/unique_position.cc',
250         'internal_api/public/base/unique_position.h',
251         'internal_api/public/base_node.h',
252         'internal_api/public/base_transaction.h',
253         'internal_api/public/change_record.h',
254         'internal_api/public/configure_reason.h',
255         'internal_api/public/data_type_association_stats.cc',
256         'internal_api/public/data_type_association_stats.h',
257         'internal_api/public/data_type_debug_info_listener.cc',
258         'internal_api/public/data_type_debug_info_listener.h',
259         'internal_api/public/delete_journal.h',
260         'internal_api/public/engine/model_safe_worker.cc',
261         'internal_api/public/engine/model_safe_worker.h',
262         'internal_api/public/engine/passive_model_worker.cc',
263         'internal_api/public/engine/passive_model_worker.h',
264         'internal_api/public/engine/polling_constants.cc',
265         'internal_api/public/engine/polling_constants.h',
266         'internal_api/public/engine/sync_status.cc',
267         'internal_api/public/engine/sync_status.h',
268         'internal_api/public/events/clear_server_data_request_event.h',
269         'internal_api/public/events/clear_server_data_response_event.h',
270         'internal_api/public/events/commit_request_event.h',
271         'internal_api/public/events/commit_response_event.h',
272         'internal_api/public/events/configure_get_updates_request_event.h',
273         'internal_api/public/events/get_updates_response_event.h',
274         'internal_api/public/events/normal_get_updates_request_event.h',
275         'internal_api/public/events/poll_get_updates_request_event.h',
276         'internal_api/public/events/protocol_event.h',
277         'internal_api/public/http_bridge.h',
278         'internal_api/public/http_bridge_network_resources.h',
279         'internal_api/public/http_post_provider_factory.h',
280         'internal_api/public/http_post_provider_interface.h',
281         'internal_api/public/internal_components_factory.h',
282         'internal_api/public/internal_components_factory_impl.h',
283         'internal_api/public/network_resources.h',
284         'internal_api/public/non_blocking_sync_common.cc',
285         'internal_api/public/non_blocking_sync_common.h',
286         'internal_api/public/read_node.h',
287         'internal_api/public/read_transaction.h',
288         'internal_api/public/sessions/commit_counters.cc',
289         'internal_api/public/sessions/commit_counters.h',
290         'internal_api/public/sessions/model_neutral_state.cc',
291         'internal_api/public/sessions/model_neutral_state.h',
292         'internal_api/public/sessions/status_counters.cc',
293         'internal_api/public/sessions/status_counters.h',
294         'internal_api/public/sessions/sync_session_snapshot.cc',
295         'internal_api/public/sessions/sync_session_snapshot.h',
296         'internal_api/public/sessions/type_debug_info_observer.cc',
297         'internal_api/public/sessions/type_debug_info_observer.h',
298         'internal_api/public/sessions/update_counters.cc',
299         'internal_api/public/sessions/update_counters.h',
300         'internal_api/public/shutdown_reason.h',
301         'internal_api/public/sync_auth_provider.h',
302         'internal_api/public/sync_context.h',
303         'internal_api/public/sync_context_proxy.h',
304         'internal_api/public/sync_encryption_handler.cc',
305         'internal_api/public/sync_encryption_handler.h',
306         'internal_api/public/sync_manager.cc',
307         'internal_api/public/sync_manager.h',
308         'internal_api/public/sync_manager_factory.h',
309         'internal_api/public/user_share.h',
310         'internal_api/public/util/experiments.h',
311         'internal_api/public/util/immutable.h',
312         'internal_api/public/util/sync_db_util.h',
313         'internal_api/public/util/sync_string_conversions.cc',
314         'internal_api/public/util/sync_string_conversions.h',
315         'internal_api/public/util/syncer_error.cc',
316         'internal_api/public/util/syncer_error.h',
317         'internal_api/public/util/unrecoverable_error_handler.h',
318         'internal_api/public/util/unrecoverable_error_info.cc',
319         'internal_api/public/util/unrecoverable_error_info.h',
320         'internal_api/public/util/weak_handle.cc',
321         'internal_api/public/util/weak_handle.h',
322         'internal_api/public/write_node.h',
323         'internal_api/public/write_transaction.h',
324         'internal_api/read_node.cc',
325         'internal_api/read_transaction.cc',
326         'internal_api/sync_backup_manager.cc',
327         'internal_api/sync_backup_manager.h',
328         'internal_api/sync_context.cc',
329         'internal_api/sync_context_proxy.cc',
330         'internal_api/sync_context_proxy_impl.cc',
331         'internal_api/sync_context_proxy_impl.h',
332         'internal_api/sync_db_util.cc',
333         'internal_api/sync_encryption_handler_impl.cc',
334         'internal_api/sync_encryption_handler_impl.h',
335         'internal_api/sync_manager_factory.cc',
336         'internal_api/sync_manager_impl.cc',
337         'internal_api/sync_manager_impl.h',
338         'internal_api/sync_rollback_manager.cc',
339         'internal_api/sync_rollback_manager.h',
340         'internal_api/sync_rollback_manager_base.cc',
341         'internal_api/sync_rollback_manager_base.h',
342         'internal_api/syncapi_internal.cc',
343         'internal_api/syncapi_internal.h',
344         'internal_api/syncapi_server_connection_manager.cc',
345         'internal_api/syncapi_server_connection_manager.h',
346         'internal_api/user_share.cc',
347         'internal_api/write_node.cc',
348         'internal_api/write_transaction.cc',
349         'js/js_backend.h',
350         'js/js_controller.h',
351         'js/js_event_details.cc',
352         'js/js_event_details.h',
353         'js/js_event_handler.h',
354         'js/sync_js_controller.cc',
355         'js/sync_js_controller.h',
356         'protocol/proto_enum_conversions.cc',
357         'protocol/proto_enum_conversions.h',
358         'protocol/proto_value_conversions.cc',
359         'protocol/proto_value_conversions.h',
360         'protocol/sync_protocol_error.cc',
361         'protocol/sync_protocol_error.h',
362         'sessions/data_type_tracker.cc',
363         'sessions/data_type_tracker.h',
364         'sessions/debug_info_getter.h',
365         'sessions/directory_type_debug_info_emitter.cc',
366         'sessions/directory_type_debug_info_emitter.h',
367         'sessions/model_type_registry.cc',
368         'sessions/model_type_registry.h',
369         'sessions/nudge_tracker.cc',
370         'sessions/nudge_tracker.h',
371         'sessions/status_controller.cc',
372         'sessions/status_controller.h',
373         'sessions/sync_session.cc',
374         'sessions/sync_session.h',
375         'sessions/sync_session_context.cc',
376         'sessions/sync_session_context.h',
377         'syncable/deferred_on_disk_directory_backing_store.cc',
378         'syncable/deferred_on_disk_directory_backing_store.h',
379         'syncable/dir_open_result.h',
380         'syncable/directory.cc',
381         'syncable/directory.h',
382         'syncable/directory_backing_store.cc',
383         'syncable/directory_backing_store.h',
384         'syncable/directory_change_delegate.h',
385         'syncable/entry.cc',
386         'syncable/entry.h',
387         'syncable/entry_kernel.cc',
388         'syncable/entry_kernel.h',
389         'syncable/in_memory_directory_backing_store.cc',
390         'syncable/in_memory_directory_backing_store.h',
391         'syncable/invalid_directory_backing_store.cc',
392         'syncable/invalid_directory_backing_store.h',
393         'syncable/metahandle_set.h',
394         'syncable/model_neutral_mutable_entry.cc',
395         'syncable/model_neutral_mutable_entry.h',
396         'syncable/model_type.cc',
397         'syncable/mutable_entry.cc',
398         'syncable/mutable_entry.h',
399         'syncable/nigori_handler.cc',
400         'syncable/nigori_handler.h',
401         'syncable/nigori_util.cc',
402         'syncable/nigori_util.h',
403         'syncable/on_disk_directory_backing_store.cc',
404         'syncable/on_disk_directory_backing_store.h',
405         'syncable/parent_child_index.cc',
406         'syncable/parent_child_index.h',
407         'syncable/proto_value_ptr.h',
408         'syncable/scoped_kernel_lock.cc',
409         'syncable/scoped_kernel_lock.h',
410         'syncable/scoped_parent_child_index_updater.cc',
411         'syncable/scoped_parent_child_index_updater.h',
412         'syncable/syncable-inl.h',
413         'syncable/syncable_base_transaction.cc',
414         'syncable/syncable_base_transaction.h',
415         'syncable/syncable_base_write_transaction.cc',
416         'syncable/syncable_base_write_transaction.h',
417         'syncable/syncable_changes_version.h',
418         'syncable/syncable_columns.h',
419         'syncable/syncable_delete_journal.cc',
420         'syncable/syncable_delete_journal.h',
421         'syncable/syncable_enum_conversions.cc',
422         'syncable/syncable_enum_conversions.h',
423         'syncable/syncable_id.cc',
424         'syncable/syncable_id.h',
425         'syncable/syncable_model_neutral_write_transaction.cc',
426         'syncable/syncable_model_neutral_write_transaction.h',
427         'syncable/syncable_proto_util.cc',
428         'syncable/syncable_proto_util.h',
429         'syncable/syncable_read_transaction.cc',
430         'syncable/syncable_read_transaction.h',
431         'syncable/syncable_util.cc',
432         'syncable/syncable_util.h',
433         'syncable/syncable_write_transaction.cc',
434         'syncable/syncable_write_transaction.h',
435         'syncable/transaction_observer.h',
436         'syncable/write_transaction_info.cc',
437         'syncable/write_transaction_info.h',
438         'util/cryptographer.cc',
439         'util/cryptographer.h',
440         'util/data_type_histogram.cc',
441         'util/data_type_histogram.h',
442         'util/encryptor.h',
443         'util/extensions_activity.cc',
444         'util/extensions_activity.h',
445         'util/get_session_name.cc',
446         'util/get_session_name.h',
447         'util/get_session_name_ios.h',
448         'util/get_session_name_ios.mm',
449         'util/get_session_name_linux.cc',
450         'util/get_session_name_linux.h',
451         'util/get_session_name_mac.h',
452         'util/get_session_name_mac.mm',
453         'util/get_session_name_win.cc',
454         'util/get_session_name_win.h',
455         'util/logging.cc',
456         'util/logging.h',
457         'util/nigori.cc',
458         'util/nigori.h',
459         'util/time.cc',
460         'util/time.h',
461       ],
463       'conditions': [
464         ['OS=="linux" and chromeos==1', {
465           # Required by get_session_name.cc on Chrome OS.
466           'dependencies': [
467             '../chromeos/chromeos.gyp:chromeos',
468             ],
469         }],
470         ['OS=="mac"', {
471           'link_settings': {
472             'libraries': [
473               # Required by get_session_name_mac.mm on Mac.
474               '$(SDKROOT)/System/Library/Frameworks/SystemConfiguration.framework',
475             ]
476           },
477         }],
478         ['OS=="android"', {
479           'dependencies': [
480             'sync_jni_headers',
481           ],
482           'sources': [
483             'android/model_type_helper.cc',
484             'android/model_type_helper.h',
485             'android/sync_jni_registrar.cc',
486             'android/sync_jni_registrar.h',
487           ],
488         }],
489       ],
490     },
491     {
492       # Contains sync protobuf definitions.  Do not depend on this directly.
493       # Depend on the 'sync' target to get the relevant C++ code, too.
494       #
495       # GN version: //sync/protocol
496       'target_name': 'sync_proto',
497       'type': '<(component)',
498       'include_dirs': [
499         '..',
500       ],
501       'defines': [
502         'SYNC_PROTO_IMPLEMENTATION',
503       ],
504       'sources': [
505         # When adding a new proto source file, add its path to the list defined
506         # in sync/protocol/protocol.gypi.
507         '<@(sync_proto_sources)',
508       ],
509       'variables': {
510         'enable_wexit_time_destructors': 1,
511         'proto_in_dir': './protocol',
512         'proto_out_dir': 'sync/protocol',
513         'cc_generator_options': 'dllexport_decl=SYNC_PROTO_EXPORT:',
514         'cc_include': 'sync/protocol/sync_proto_export.h',
515       },
516       'includes': [
517         '../build/protoc.gypi'
518       ],
519     },
520     {
521       # Contains attachment_store protobuf definitions.  Do not depend on this
522       # directly.
523       # Depend on the 'sync' target to get the relevant C++ code, too.
524       #
525       # GN version: //sync/internal_api/attachments/proto
526       'target_name': 'attachment_store_proto',
527       'type': 'static_library',
528       'sources': [
529         # NOTE: If you add a file to this list, also add it to
530         # sync/internal_api/attachments/proto/BUILD.gn
531         'internal_api/attachments/proto/attachment_store.proto',
532       ],
533       'variables': {
534         'enable_wexit_time_destructors': 1,
535         'proto_in_dir': 'internal_api/attachments/proto',
536         'proto_out_dir': 'sync/internal_api/attachments/proto',
537         'cc_generator_options': 'dllexport_decl=SYNC_EXPORT_PRIVATE:',
538         'cc_include': 'sync/base/sync_export.h',
539       },
540       'includes': [
541         '../build/protoc.gypi'
542       ],
543       'defines': [
544         'SYNC_IMPLEMENTATION'
545       ],
546     },
547   ],