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.
16 # This target will add '-lsync_core' and '-lsync_proto' to the link line of
17 # targets that depend on it. Anything that depends on sync code should
18 # declare a dependency on this target.
20 'target_name': 'sync',
26 'export_dependent_settings': [
31 # Contains everything related to sync implementation that does not depend
32 # on chrome/ or components/. Do not depend on this directly. Depend on
33 # the 'sync' target to get the sync protobufs, too.
35 'target_name': 'sync_core',
36 'type': '<(component)',
37 'variables': { 'enable_wexit_time_desctructors': 1, },
39 'SYNC_IMPLEMENTATION',
45 '../base/base.gyp:base',
46 '../base/base.gyp:base_i18n',
47 '../crypto/crypto.gyp:crypto',
48 '../google_apis/google_apis.gyp:google_apis',
51 '../third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
52 '../third_party/protobuf/protobuf.gyp:protobuf_lite',
53 '../third_party/zlib/zlib.gyp:zlib',
54 '../url/url.gyp:url_lib',
57 'export_dependent_settings': [
61 'api/attachments/attachment.cc',
62 'api/attachments/attachment.h',
63 'api/attachments/attachment_id.cc',
64 'api/attachments/attachment_id.h',
65 'api/attachments/attachment_store.cc',
66 'api/attachments/attachment_store.h',
67 'api/string_ordinal.h',
70 'api/sync_change_processor.cc',
71 'api/sync_change_processor.h',
76 'api/sync_error_factory.cc',
77 'api/sync_error_factory.h',
78 'api/sync_merge_result.cc',
79 'api/sync_merge_result.h',
80 'api/syncable_service.cc',
81 'api/syncable_service.h',
84 'engine/all_status.cc',
85 'engine/all_status.h',
86 'engine/apply_control_data_updates.cc',
87 'engine/apply_control_data_updates.h',
88 'engine/backoff_delay_provider.cc',
89 'engine/backoff_delay_provider.h',
92 'engine/commit_contribution.cc',
93 'engine/commit_contribution.h',
94 'engine/commit_contributor.cc',
95 'engine/commit_contributor.h',
96 'engine/commit_processor.cc',
97 'engine/commit_processor.h',
98 'engine/commit_util.cc',
99 'engine/commit_util.h',
100 'engine/conflict_resolver.cc',
101 'engine/conflict_resolver.h',
102 'engine/conflict_util.cc',
103 'engine/conflict_util.h',
104 'engine/directory_commit_contribution.cc',
105 'engine/directory_commit_contribution.h',
106 'engine/directory_commit_contributor.cc',
107 'engine/directory_commit_contributor.h',
108 'engine/directory_update_handler.cc',
109 'engine/directory_update_handler.h',
110 'engine/entity_tracker.cc',
111 'engine/entity_tracker.h',
112 'engine/get_commit_ids.cc',
113 'engine/get_commit_ids.h',
114 'engine/get_updates_delegate.cc',
115 'engine/get_updates_delegate.h',
116 'engine/get_updates_processor.cc',
117 'engine/get_updates_processor.h',
118 'engine/model_type_entity.cc',
119 'engine/model_type_entity.h',
120 'engine/model_type_sync_proxy.cc',
121 'engine/model_type_sync_proxy.h',
122 'engine/model_type_sync_proxy_impl.cc',
123 'engine/model_type_sync_proxy_impl.h',
124 'engine/model_type_sync_worker.cc',
125 'engine/model_type_sync_worker.h',
126 'engine/model_type_sync_worker_impl.cc',
127 'engine/model_type_sync_worker_impl.h',
128 'engine/net/server_connection_manager.cc',
129 'engine/net/server_connection_manager.h',
130 'engine/net/url_translator.cc',
131 'engine/net/url_translator.h',
132 'engine/non_blocking_type_commit_contribution.cc',
133 'engine/non_blocking_type_commit_contribution.h',
134 'engine/nudge_handler.cc',
135 'engine/nudge_handler.h',
136 'engine/nudge_source.cc',
137 'engine/nudge_source.h',
138 'engine/process_updates_util.cc',
139 'engine/process_updates_util.h',
140 'engine/sync_cycle_event.cc',
141 'engine/sync_cycle_event.h',
142 'engine/sync_engine_event_listener.cc',
143 'engine/sync_engine_event_listener.h',
144 'engine/sync_scheduler.cc',
145 'engine/sync_scheduler.h',
146 'engine/sync_scheduler_impl.cc',
147 'engine/sync_scheduler_impl.h',
150 'engine/syncer_proto_util.cc',
151 'engine/syncer_proto_util.h',
152 'engine/syncer_types.h',
153 'engine/syncer_util.cc',
154 'engine/syncer_util.h',
155 'engine/traffic_logger.cc',
156 'engine/traffic_logger.h',
157 'engine/update_applicator.cc',
158 'engine/update_applicator.h',
159 'engine/update_handler.cc',
160 'engine/update_handler.h',
161 'internal_api/attachments/attachment_downloader.cc',
162 'internal_api/attachments/attachment_downloader_impl.cc',
163 'internal_api/attachments/attachment_service.cc',
164 'internal_api/attachments/attachment_service_impl.cc',
165 'internal_api/attachments/attachment_service_proxy.cc',
166 'internal_api/attachments/attachment_service_proxy_for_test.cc',
167 'internal_api/attachments/attachment_store_handle.cc',
168 'internal_api/attachments/attachment_uploader.cc',
169 'internal_api/attachments/attachment_uploader_impl.cc',
170 'internal_api/attachments/fake_attachment_downloader.cc',
171 'internal_api/attachments/fake_attachment_uploader.cc',
172 'internal_api/attachments/in_memory_attachment_store.cc',
173 'internal_api/attachments/on_disk_attachment_store.cc',
174 'internal_api/attachments/task_queue.cc',
175 'internal_api/base_node.cc',
176 'internal_api/base_transaction.cc',
177 'internal_api/change_record.cc',
178 'internal_api/change_reorder_buffer.cc',
179 'internal_api/change_reorder_buffer.h',
180 'internal_api/debug_info_event_listener.cc',
181 'internal_api/debug_info_event_listener.h',
182 'internal_api/delete_journal.cc',
183 'internal_api/events/commit_request_event.cc',
184 'internal_api/events/commit_response_event.cc',
185 'internal_api/events/configure_get_updates_request_event.cc',
186 'internal_api/events/get_updates_response_event.cc',
187 'internal_api/events/normal_get_updates_request_event.cc',
188 'internal_api/events/poll_get_updates_request_event.cc',
189 'internal_api/events/protocol_event.cc',
190 'internal_api/http_bridge.cc',
191 'internal_api/http_bridge_network_resources.cc',
192 'internal_api/internal_components_factory_impl.cc',
193 'internal_api/js_mutation_event_observer.cc',
194 'internal_api/js_mutation_event_observer.h',
195 'internal_api/js_sync_encryption_handler_observer.cc',
196 'internal_api/js_sync_encryption_handler_observer.h',
197 'internal_api/js_sync_manager_observer.cc',
198 'internal_api/js_sync_manager_observer.h',
199 'internal_api/protocol_event_buffer.cc',
200 'internal_api/protocol_event_buffer.h',
201 'internal_api/public/attachments/attachment_downloader.h',
202 'internal_api/public/attachments/attachment_downloader_impl.h',
203 'internal_api/public/attachments/attachment_service.h',
204 'internal_api/public/attachments/attachment_service_impl.h',
205 'internal_api/public/attachments/attachment_service_proxy.h',
206 'internal_api/public/attachments/attachment_service_proxy_for_test.h',
207 'internal_api/public/attachments/attachment_store_handle.h',
208 'internal_api/public/attachments/attachment_uploader.h',
209 'internal_api/public/attachments/attachment_uploader_impl.h',
210 'internal_api/public/attachments/fake_attachment_downloader.h',
211 'internal_api/public/attachments/fake_attachment_uploader.h',
212 'internal_api/public/attachments/in_memory_attachment_store.h',
213 'internal_api/public/attachments/on_disk_attachment_store.h',
214 'internal_api/public/attachments/task_queue.h',
215 'internal_api/public/base/attachment_id_proto.cc',
216 'internal_api/public/base/attachment_id_proto.h',
217 'internal_api/public/base/cancelation_observer.cc',
218 'internal_api/public/base/cancelation_observer.h',
219 'internal_api/public/base/cancelation_signal.cc',
220 'internal_api/public/base/cancelation_signal.h',
221 'internal_api/public/base/enum_set.h',
222 'internal_api/public/base/enum_set.h',
223 'internal_api/public/base/invalidation_interface.cc',
224 'internal_api/public/base/invalidation_interface.h',
225 'internal_api/public/base/model_type.h',
226 'internal_api/public/base/node_ordinal.cc',
227 'internal_api/public/base/node_ordinal.h',
228 'internal_api/public/base/ordinal.h',
229 'internal_api/public/base/progress_marker_map.cc',
230 'internal_api/public/base/progress_marker_map.h',
231 'internal_api/public/base/unique_position.cc',
232 'internal_api/public/base/unique_position.h',
233 'internal_api/public/base_node.h',
234 'internal_api/public/base_transaction.h',
235 'internal_api/public/change_record.h',
236 'internal_api/public/configure_reason.h',
237 'internal_api/public/data_type_association_stats.cc',
238 'internal_api/public/data_type_association_stats.h',
239 'internal_api/public/data_type_debug_info_listener.cc',
240 'internal_api/public/data_type_debug_info_listener.h',
241 'internal_api/public/delete_journal.h',
242 'internal_api/public/engine/model_safe_worker.cc',
243 'internal_api/public/engine/model_safe_worker.h',
244 'internal_api/public/engine/passive_model_worker.cc',
245 'internal_api/public/engine/passive_model_worker.h',
246 'internal_api/public/engine/polling_constants.cc',
247 'internal_api/public/engine/polling_constants.h',
248 'internal_api/public/engine/sync_status.cc',
249 'internal_api/public/engine/sync_status.h',
250 'internal_api/public/events/commit_request_event.h',
251 'internal_api/public/events/commit_response_event.h',
252 'internal_api/public/events/configure_get_updates_request_event.h',
253 'internal_api/public/events/get_updates_response_event.h',
254 'internal_api/public/events/normal_get_updates_request_event.h',
255 'internal_api/public/events/poll_get_updates_request_event.h',
256 'internal_api/public/events/protocol_event.h',
257 'internal_api/public/http_bridge.h',
258 'internal_api/public/http_bridge_network_resources.h',
259 'internal_api/public/http_post_provider_factory.h',
260 'internal_api/public/http_post_provider_interface.h',
261 'internal_api/public/internal_components_factory.h',
262 'internal_api/public/internal_components_factory_impl.h',
263 'internal_api/public/network_resources.h',
264 'internal_api/public/non_blocking_sync_common.cc',
265 'internal_api/public/non_blocking_sync_common.h',
266 'internal_api/public/read_node.h',
267 'internal_api/public/read_transaction.h',
268 'internal_api/public/shutdown_reason.h',
269 'internal_api/public/sessions/commit_counters.cc',
270 'internal_api/public/sessions/commit_counters.h',
271 'internal_api/public/sessions/model_neutral_state.cc',
272 'internal_api/public/sessions/model_neutral_state.h',
273 'internal_api/public/sessions/status_counters.cc',
274 'internal_api/public/sessions/status_counters.h',
275 'internal_api/public/sessions/sync_session_snapshot.cc',
276 'internal_api/public/sessions/sync_session_snapshot.h',
277 'internal_api/public/sessions/type_debug_info_observer.cc',
278 'internal_api/public/sessions/type_debug_info_observer.h',
279 'internal_api/public/sessions/update_counters.cc',
280 'internal_api/public/sessions/update_counters.h',
281 'internal_api/public/sync_auth_provider.h',
282 'internal_api/public/sync_context.h',
283 'internal_api/public/sync_context_proxy.h',
284 'internal_api/public/sync_encryption_handler.cc',
285 'internal_api/public/sync_encryption_handler.h',
286 'internal_api/public/sync_manager.cc',
287 'internal_api/public/sync_manager.h',
288 'internal_api/public/sync_manager_factory.h',
289 'internal_api/public/user_share.h',
290 'internal_api/public/util/experiments.h',
291 'internal_api/public/util/immutable.h',
292 'internal_api/public/util/report_unrecoverable_error_function.h',
293 'internal_api/public/util/sync_db_util.h',
294 'internal_api/public/util/sync_string_conversions.cc',
295 'internal_api/public/util/sync_string_conversions.h',
296 'internal_api/public/util/syncer_error.cc',
297 'internal_api/public/util/syncer_error.h',
298 'internal_api/public/util/unrecoverable_error_handler.h',
299 'internal_api/public/util/unrecoverable_error_info.cc',
300 'internal_api/public/util/unrecoverable_error_info.h',
301 'internal_api/public/util/weak_handle.cc',
302 'internal_api/public/util/weak_handle.h',
303 'internal_api/public/write_node.h',
304 'internal_api/public/write_transaction.h',
305 'internal_api/read_node.cc',
306 'internal_api/read_transaction.cc',
307 'internal_api/sync_backup_manager.cc',
308 'internal_api/sync_backup_manager.h',
309 'internal_api/sync_context.cc',
310 'internal_api/sync_context_proxy.cc',
311 'internal_api/sync_context_proxy_impl.cc',
312 'internal_api/sync_context_proxy_impl.h',
313 'internal_api/sync_db_util.cc',
314 'internal_api/sync_encryption_handler_impl.cc',
315 'internal_api/sync_encryption_handler_impl.h',
316 'internal_api/sync_manager_factory.cc',
317 'internal_api/sync_manager_impl.cc',
318 'internal_api/sync_manager_impl.h',
319 'internal_api/sync_rollback_manager.cc',
320 'internal_api/sync_rollback_manager.h',
321 'internal_api/sync_rollback_manager_base.cc',
322 'internal_api/sync_rollback_manager_base.h',
323 'internal_api/syncapi_internal.cc',
324 'internal_api/syncapi_internal.h',
325 'internal_api/syncapi_server_connection_manager.cc',
326 'internal_api/syncapi_server_connection_manager.h',
327 'internal_api/user_share.cc',
328 'internal_api/write_node.cc',
329 'internal_api/write_transaction.cc',
331 'js/js_controller.h',
332 'js/js_event_details.cc',
333 'js/js_event_details.h',
334 'js/js_event_handler.h',
335 'js/sync_js_controller.cc',
336 'js/sync_js_controller.h',
337 'protocol/proto_enum_conversions.cc',
338 'protocol/proto_enum_conversions.h',
339 'protocol/proto_value_conversions.cc',
340 'protocol/proto_value_conversions.h',
341 'protocol/sync_protocol_error.cc',
342 'protocol/sync_protocol_error.h',
343 'sessions/data_type_tracker.cc',
344 'sessions/data_type_tracker.h',
345 'sessions/debug_info_getter.h',
346 'sessions/directory_type_debug_info_emitter.cc',
347 'sessions/directory_type_debug_info_emitter.h',
348 'sessions/model_type_registry.cc',
349 'sessions/model_type_registry.h',
350 'sessions/nudge_tracker.cc',
351 'sessions/nudge_tracker.h',
352 'sessions/status_controller.cc',
353 'sessions/status_controller.h',
354 'sessions/sync_session.cc',
355 'sessions/sync_session.h',
356 'sessions/sync_session_context.cc',
357 'sessions/sync_session_context.h',
359 'syncable/deferred_on_disk_directory_backing_store.cc',
360 'syncable/deferred_on_disk_directory_backing_store.h',
361 'syncable/dir_open_result.h',
362 'syncable/directory.cc',
363 'syncable/directory.h',
364 'syncable/directory_backing_store.cc',
365 'syncable/directory_backing_store.h',
366 'syncable/directory_change_delegate.h',
369 'syncable/entry_kernel.cc',
370 'syncable/entry_kernel.h',
371 'syncable/in_memory_directory_backing_store.cc',
372 'syncable/in_memory_directory_backing_store.h',
373 'syncable/invalid_directory_backing_store.cc',
374 'syncable/invalid_directory_backing_store.h',
375 'syncable/metahandle_set.h',
376 'syncable/model_neutral_mutable_entry.cc',
377 'syncable/model_neutral_mutable_entry.h',
378 'syncable/model_type.cc',
379 'syncable/mutable_entry.cc',
380 'syncable/mutable_entry.h',
381 'syncable/nigori_handler.cc',
382 'syncable/nigori_handler.h',
383 'syncable/nigori_util.cc',
384 'syncable/nigori_util.h',
385 'syncable/on_disk_directory_backing_store.cc',
386 'syncable/on_disk_directory_backing_store.h',
387 'syncable/parent_child_index.cc',
388 'syncable/parent_child_index.h',
389 'syncable/scoped_kernel_lock.cc',
390 'syncable/scoped_kernel_lock.h',
391 'syncable/scoped_parent_child_index_updater.cc',
392 'syncable/scoped_parent_child_index_updater.h',
393 'syncable/syncable-inl.h',
394 'syncable/syncable_base_transaction.cc',
395 'syncable/syncable_base_transaction.h',
396 'syncable/syncable_base_write_transaction.cc',
397 'syncable/syncable_base_write_transaction.h',
398 'syncable/syncable_changes_version.h',
399 'syncable/syncable_columns.h',
400 'syncable/syncable_delete_journal.cc',
401 'syncable/syncable_delete_journal.h',
402 'syncable/syncable_enum_conversions.cc',
403 'syncable/syncable_enum_conversions.h',
404 'syncable/syncable_id.cc',
405 'syncable/syncable_id.h',
406 'syncable/syncable_model_neutral_write_transaction.cc',
407 'syncable/syncable_model_neutral_write_transaction.h',
408 'syncable/syncable_proto_util.cc',
409 'syncable/syncable_proto_util.h',
410 'syncable/syncable_read_transaction.cc',
411 'syncable/syncable_read_transaction.h',
412 'syncable/syncable_util.cc',
413 'syncable/syncable_util.h',
414 'syncable/syncable_write_transaction.cc',
415 'syncable/syncable_write_transaction.h',
416 'syncable/transaction_observer.h',
417 'syncable/write_transaction_info.cc',
418 'syncable/write_transaction_info.h',
419 'util/cryptographer.cc',
420 'util/cryptographer.h',
421 'util/data_type_histogram.h',
423 'util/extensions_activity.cc',
424 'util/extensions_activity.h',
425 'util/get_session_name.cc',
426 'util/get_session_name.h',
427 'util/get_session_name_ios.h',
428 'util/get_session_name_ios.mm',
429 'util/get_session_name_linux.cc',
430 'util/get_session_name_linux.h',
431 'util/get_session_name_mac.h',
432 'util/get_session_name_mac.mm',
433 'util/get_session_name_win.cc',
434 'util/get_session_name_win.h',
444 ['OS=="linux" and chromeos==1', {
445 # Required by get_session_name.cc on Chrome OS.
447 '../chromeos/chromeos.gyp:chromeos',
453 # Contains sync protobuf definitions. Do not depend on this directly.
454 # Depend on the 'sync' target to get the relevant C++ code, too.
456 # GN version: //sync/protocol
457 'target_name': 'sync_proto',
458 'type': '<(component)',
463 'SYNC_PROTO_IMPLEMENTATION',
466 # NOTE: If you add a file to this list, also add it to
467 # sync/protocol/BUILD.gn
468 'protocol/app_notification_specifics.proto',
469 'protocol/app_setting_specifics.proto',
470 'protocol/app_specifics.proto',
471 'protocol/app_list_specifics.proto',
472 'protocol/article_specifics.proto',
473 'protocol/attachments.proto',
474 'protocol/autofill_specifics.proto',
475 'protocol/bookmark_specifics.proto',
476 'protocol/client_commands.proto',
477 'protocol/client_debug_info.proto',
478 'protocol/device_info_specifics.proto',
479 'protocol/dictionary_specifics.proto',
480 'protocol/encryption.proto',
481 'protocol/enhanced_bookmark_specifics.proto',
482 'protocol/experiment_status.proto',
483 'protocol/experiments_specifics.proto',
484 'protocol/extension_setting_specifics.proto',
485 'protocol/extension_specifics.proto',
486 'protocol/favicon_image_specifics.proto',
487 'protocol/favicon_tracking_specifics.proto',
488 'protocol/get_updates_caller_info.proto',
489 'protocol/history_delete_directive_specifics.proto',
490 'protocol/nigori_specifics.proto',
491 'protocol/managed_user_setting_specifics.proto',
492 'protocol/managed_user_shared_setting_specifics.proto',
493 'protocol/managed_user_specifics.proto',
494 'protocol/password_specifics.proto',
495 'protocol/preference_specifics.proto',
496 'protocol/priority_preference_specifics.proto',
497 'protocol/search_engine_specifics.proto',
498 'protocol/session_specifics.proto',
499 'protocol/sync.proto',
500 'protocol/sync_enums.proto',
501 'protocol/synced_notification_app_info_specifics.proto',
502 'protocol/synced_notification_data.proto',
503 'protocol/synced_notification_render.proto',
504 'protocol/synced_notification_specifics.proto',
505 'protocol/test.proto',
506 'protocol/theme_specifics.proto',
507 'protocol/typed_url_specifics.proto',
508 'protocol/unique_position.proto',
511 'enable_wexit_time_desctructors': 1,
512 'proto_in_dir': './protocol',
513 'proto_out_dir': 'sync/protocol',
514 'cc_generator_options': 'dllexport_decl=SYNC_PROTO_EXPORT:',
515 'cc_include': 'sync/protocol/sync_proto_export.h',
518 '../build/protoc.gypi'