summaryrefslogtreecommitdiffstats
path: root/sync/sync.gyp
blob: ad8fd3489fe0b7b1f15b3aa54e87a1b029a40e5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

{
  'variables': {
    'chromium_code': 1,
  },

  'includes': [
    'sync_android.gypi',
    'sync_tests.gypi',
  ],

  'targets': [
    # This target will add '-lsync_core' and '-lsync_proto' to the link line of
    # targets that depend on it.  Anything that depends on sync code should
    # declare a dependency on this target.
    {
      'target_name': 'sync',
      'type': 'none',
      'dependencies': [
        'sync_core',
        'sync_proto',
      ],
      'export_dependent_settings': [
        'sync_proto',
      ],
    },

    # Contains everything related to sync implementation that does not depend
    # on chrome/ or components/.  Do not depend on this directly.  Depend on
    # the 'sync' target to get the sync protobufs, too.
    {
      'target_name': 'sync_core',
      'type': '<(component)',
      'variables': { 'enable_wexit_time_desctructors': 1, },
      'defines': [
        'SYNC_IMPLEMENTATION',
      ],
      'include_dirs': [
        '..',
      ],
      'dependencies': [
        '../base/base.gyp:base',
        '../base/base.gyp:base_i18n',
        '../crypto/crypto.gyp:crypto',
        '../google_apis/google_apis.gyp:google_apis',
        '../net/net.gyp:net',
        '../sql/sql.gyp:sql',
        '../third_party/protobuf/protobuf.gyp:protobuf_lite',
        '../third_party/zlib/zlib.gyp:zlib',
        '../url/url.gyp:url_lib',
        'sync_proto',
      ],
      'export_dependent_settings': [
        'sync_proto',
      ],
      'sources': [
        'api/attachments/attachment.cc',
        'api/attachments/attachment.h',
        'api/attachments/attachment_id.cc',
        'api/attachments/attachment_id.h',
        'api/attachments/attachment_store.cc',
        'api/attachments/attachment_store.h',
        'api/attachments/fake_attachment_store.cc',
        'api/attachments/fake_attachment_store.h',
        'api/string_ordinal.h',
        'api/sync_change.cc',
        'api/sync_change.h',
        'api/sync_change_processor.cc',
        'api/sync_change_processor.h',
        'api/sync_data.cc',
        'api/sync_data.h',
        'api/sync_error.cc',
        'api/sync_error.h',
        'api/sync_error_factory.cc',
        'api/sync_error_factory.h',
        'api/sync_merge_result.cc',
        'api/sync_merge_result.h',
        'api/syncable_service.cc',
        'api/syncable_service.h',
        'api/time.h',
        'base/sync_export.h',
        'engine/all_status.cc',
        'engine/all_status.h',
        'engine/apply_control_data_updates.cc',
        'engine/apply_control_data_updates.h',
        'engine/backoff_delay_provider.cc',
        'engine/backoff_delay_provider.h',
        'engine/commit.cc',
        'engine/commit.h',
        'engine/commit_contribution.cc',
        'engine/commit_contribution.h',
        'engine/commit_contributor.cc',
        'engine/commit_contributor.h',
        'engine/commit_processor.cc',
        'engine/commit_processor.h',
        'engine/commit_util.cc',
        'engine/commit_util.h',
        'engine/conflict_resolver.cc',
        'engine/conflict_resolver.h',
        'engine/conflict_util.cc',
        'engine/conflict_util.h',
        'engine/cryptographer_provider.cc',
        'engine/cryptographer_provider.h',
        'engine/directory_commit_contribution.cc',
        'engine/directory_commit_contribution.h',
        'engine/directory_commit_contributor.cc',
        'engine/directory_commit_contributor.h',
        'engine/directory_cryptographer_provider.cc',
        'engine/directory_cryptographer_provider.h',
        'engine/directory_update_handler.cc',
        'engine/directory_update_handler.h',
        'engine/entity_tracker.cc',
        'engine/entity_tracker.h',
        'engine/get_commit_ids.cc',
        'engine/get_commit_ids.h',
        'engine/get_updates_delegate.cc',
        'engine/get_updates_delegate.h',
        'engine/get_updates_processor.cc',
        'engine/get_updates_processor.h',
        'engine/model_type_entity.cc',
        'engine/model_type_entity.h',
        'engine/model_type_sync_proxy.cc',
        'engine/model_type_sync_proxy.h',
        'engine/model_type_sync_proxy_impl.cc',
        'engine/model_type_sync_proxy_impl.h',
        'engine/model_type_sync_worker.cc',
        'engine/model_type_sync_worker.h',
        'engine/model_type_sync_worker_impl.cc',
        'engine/model_type_sync_worker_impl.h',
        'engine/net/server_connection_manager.cc',
        'engine/net/server_connection_manager.h',
        'engine/net/url_translator.cc',
        'engine/net/url_translator.h',
        'engine/non_blocking_type_commit_contribution.cc',
        'engine/non_blocking_type_commit_contribution.h',
        'engine/nudge_handler.cc',
        'engine/nudge_handler.h',
        'engine/nudge_source.cc',
        'engine/nudge_source.h',
        'engine/process_updates_util.cc',
        'engine/process_updates_util.h',
        'engine/sync_cycle_event.cc',
        'engine/sync_cycle_event.h',
        'engine/sync_engine_event_listener.cc',
        'engine/sync_engine_event_listener.h',
        'engine/sync_scheduler.cc',
        'engine/sync_scheduler.h',
        'engine/sync_scheduler_impl.cc',
        'engine/sync_scheduler_impl.h',
        'engine/syncer.cc',
        'engine/syncer.h',
        'engine/syncer_proto_util.cc',
        'engine/syncer_proto_util.h',
        'engine/syncer_types.h',
        'engine/syncer_util.cc',
        'engine/syncer_util.h',
        'engine/traffic_logger.cc',
        'engine/traffic_logger.h',
        'engine/update_applicator.cc',
        'engine/update_applicator.h',
        'engine/update_handler.cc',
        'engine/update_handler.h',
        'internal_api/attachments/attachment_downloader.cc',
        'internal_api/attachments/attachment_downloader_impl.cc',
        'internal_api/attachments/attachment_service.cc',
        'internal_api/attachments/attachment_service_impl.cc',
        'internal_api/attachments/attachment_service_proxy.cc',
        'internal_api/attachments/attachment_service_proxy_for_test.cc',
        'internal_api/attachments/attachment_uploader.cc',
        'internal_api/attachments/attachment_uploader_impl.cc',
        'internal_api/attachments/fake_attachment_downloader.cc',
        'internal_api/attachments/fake_attachment_uploader.cc',
        'internal_api/base_node.cc',
        'internal_api/base_transaction.cc',
        'internal_api/change_record.cc',
        'internal_api/change_reorder_buffer.cc',
        'internal_api/change_reorder_buffer.h',
        'internal_api/debug_info_event_listener.cc',
        'internal_api/debug_info_event_listener.h',
        'internal_api/delete_journal.cc',
        'internal_api/events/commit_request_event.cc',
        'internal_api/events/commit_response_event.cc',
        'internal_api/events/configure_get_updates_request_event.cc',
        'internal_api/events/get_updates_response_event.cc',
        'internal_api/events/normal_get_updates_request_event.cc',
        'internal_api/events/poll_get_updates_request_event.cc',
        'internal_api/events/protocol_event.cc',
        'internal_api/http_bridge.cc',
        'internal_api/http_bridge_network_resources.cc',
        'internal_api/internal_components_factory_impl.cc',
        'internal_api/js_mutation_event_observer.cc',
        'internal_api/js_mutation_event_observer.h',
        'internal_api/js_sync_encryption_handler_observer.cc',
        'internal_api/js_sync_encryption_handler_observer.h',
        'internal_api/js_sync_manager_observer.cc',
        'internal_api/js_sync_manager_observer.h',
        'internal_api/protocol_event_buffer.cc',
        'internal_api/protocol_event_buffer.h',
        'internal_api/attachments/public/attachment_downloader.h',
        'internal_api/attachments/public/attachment_service.h',
        'internal_api/attachments/public/attachment_service_impl.h',
        'internal_api/attachments/public/attachment_service_proxy_for_test.h',
        'internal_api/attachments/public/attachment_service_proxy.h',
        'internal_api/attachments/public/attachment_uploader.h',
        'internal_api/public/attachments/attachment_downloader_impl.h',
        'internal_api/public/attachments/attachment_uploader_impl.h',
        'internal_api/public/attachments/fake_attachment_downloader.h',
        'internal_api/public/attachments/fake_attachment_uploader.h',
        'internal_api/public/base/attachment_id_proto.cc',
        'internal_api/public/base/attachment_id_proto.h',
        'internal_api/public/base/cancelation_observer.cc',
        'internal_api/public/base/cancelation_observer.h',
        'internal_api/public/base/cancelation_signal.cc',
        'internal_api/public/base/cancelation_signal.h',
        'internal_api/public/base/enum_set.h',
        'internal_api/public/base/enum_set.h',
        'internal_api/public/base/invalidation_interface.cc',
        'internal_api/public/base/invalidation_interface.h',
        'internal_api/public/base/model_type.h',
        'internal_api/public/base/node_ordinal.cc',
        'internal_api/public/base/node_ordinal.h',
        'internal_api/public/base/ordinal.h',
        'internal_api/public/base/progress_marker_map.cc',
        'internal_api/public/base/progress_marker_map.h',
        'internal_api/public/base/unique_position.cc',
        'internal_api/public/base/unique_position.h',
        'internal_api/public/base_node.h',
        'internal_api/public/base_transaction.h',
        'internal_api/public/change_record.h',
        'internal_api/public/configure_reason.h',
        'internal_api/public/data_type_association_stats.cc',
        'internal_api/public/data_type_association_stats.h',
        'internal_api/public/data_type_debug_info_listener.cc',
        'internal_api/public/data_type_debug_info_listener.h',
        'internal_api/public/delete_journal.h',
        'internal_api/public/engine/model_safe_worker.cc',
        'internal_api/public/engine/model_safe_worker.h',
        'internal_api/public/engine/passive_model_worker.cc',
        'internal_api/public/engine/passive_model_worker.h',
        'internal_api/public/engine/polling_constants.cc',
        'internal_api/public/engine/polling_constants.h',
        'internal_api/public/engine/sync_status.cc',
        'internal_api/public/engine/sync_status.h',
        'internal_api/public/events/commit_request_event.h',
        'internal_api/public/events/commit_response_event.h',
        'internal_api/public/events/configure_get_updates_request_event.h',
        'internal_api/public/events/get_updates_response_event.h',
        'internal_api/public/events/normal_get_updates_request_event.h',
        'internal_api/public/events/poll_get_updates_request_event.h',
        'internal_api/public/events/protocol_event.h',
        'internal_api/public/http_bridge.h',
        'internal_api/public/http_bridge_network_resources.h',
        'internal_api/public/http_post_provider_factory.h',
        'internal_api/public/http_post_provider_interface.h',
        'internal_api/public/internal_components_factory.h',
        'internal_api/public/internal_components_factory_impl.h',
        'internal_api/public/network_resources.h',
        'internal_api/public/non_blocking_sync_common.cc',
        'internal_api/public/non_blocking_sync_common.h',
        'internal_api/public/read_node.h',
        'internal_api/public/read_transaction.h',
        'internal_api/public/shutdown_reason.h',
        'internal_api/public/sessions/commit_counters.cc',
        'internal_api/public/sessions/commit_counters.h',
        'internal_api/public/sessions/model_neutral_state.cc',
        'internal_api/public/sessions/model_neutral_state.h',
        'internal_api/public/sessions/status_counters.cc',
        'internal_api/public/sessions/status_counters.h',
        'internal_api/public/sessions/sync_session_snapshot.cc',
        'internal_api/public/sessions/sync_session_snapshot.h',
        'internal_api/public/sessions/type_debug_info_observer.cc',
        'internal_api/public/sessions/type_debug_info_observer.h',
        'internal_api/public/sessions/update_counters.cc',
        'internal_api/public/sessions/update_counters.h',
        'internal_api/public/sync_auth_provider.h',
        'internal_api/public/sync_context.h',
        'internal_api/public/sync_context_proxy.h',
        'internal_api/public/sync_encryption_handler.cc',
        'internal_api/public/sync_encryption_handler.h',
        'internal_api/public/sync_manager.cc',
        'internal_api/public/sync_manager.h',
        'internal_api/public/sync_manager_factory.h',
        'internal_api/public/user_share.h',
        'internal_api/public/util/experiments.h',
        'internal_api/public/util/immutable.h',
        'internal_api/public/util/report_unrecoverable_error_function.h',
        'internal_api/public/util/sync_db_util.h',
        'internal_api/public/util/sync_string_conversions.cc',
        'internal_api/public/util/sync_string_conversions.h',
        'internal_api/public/util/syncer_error.cc',
        'internal_api/public/util/syncer_error.h',
        'internal_api/public/util/unrecoverable_error_handler.h',
        'internal_api/public/util/unrecoverable_error_info.cc',
        'internal_api/public/util/unrecoverable_error_info.h',
        'internal_api/public/util/weak_handle.cc',
        'internal_api/public/util/weak_handle.h',
        'internal_api/public/write_node.h',
        'internal_api/public/write_transaction.h',
        'internal_api/read_node.cc',
        'internal_api/read_transaction.cc',
        'internal_api/sync_backup_manager.cc',
        'internal_api/sync_backup_manager.h',
        'internal_api/sync_context.cc',
        'internal_api/sync_context_proxy.cc',
        'internal_api/sync_context_proxy_impl.cc',
        'internal_api/sync_context_proxy_impl.h',
        'internal_api/sync_db_util.cc',
        'internal_api/sync_encryption_handler_impl.cc',
        'internal_api/sync_encryption_handler_impl.h',
        'internal_api/sync_manager_factory.cc',
        'internal_api/sync_manager_impl.cc',
        'internal_api/sync_manager_impl.h',
        'internal_api/sync_rollback_manager.cc',
        'internal_api/sync_rollback_manager.h',
        'internal_api/sync_rollback_manager_base.cc',
        'internal_api/sync_rollback_manager_base.h',
        'internal_api/syncapi_internal.cc',
        'internal_api/syncapi_internal.h',
        'internal_api/syncapi_server_connection_manager.cc',
        'internal_api/syncapi_server_connection_manager.h',
        'internal_api/user_share.cc',
        'internal_api/write_node.cc',
        'internal_api/write_transaction.cc',
        'js/js_backend.h',
        'js/js_controller.h',
        'js/js_event_details.cc',
        'js/js_event_details.h',
        'js/js_event_handler.h',
        'js/sync_js_controller.cc',
        'js/sync_js_controller.h',
        'protocol/proto_enum_conversions.cc',
        'protocol/proto_enum_conversions.h',
        'protocol/proto_value_conversions.cc',
        'protocol/proto_value_conversions.h',
        'protocol/sync_protocol_error.cc',
        'protocol/sync_protocol_error.h',
        'sessions/data_type_tracker.cc',
        'sessions/data_type_tracker.h',
        'sessions/debug_info_getter.h',
        'sessions/directory_type_debug_info_emitter.cc',
        'sessions/directory_type_debug_info_emitter.h',
        'sessions/model_type_registry.cc',
        'sessions/model_type_registry.h',
        'sessions/nudge_tracker.cc',
        'sessions/nudge_tracker.h',
        'sessions/status_controller.cc',
        'sessions/status_controller.h',
        'sessions/sync_session.cc',
        'sessions/sync_session.h',
        'sessions/sync_session_context.cc',
        'sessions/sync_session_context.h',
        'syncable/blob.h',
        'syncable/dir_open_result.h',
        'syncable/directory.cc',
        'syncable/directory.h',
        'syncable/directory_backing_store.cc',
        'syncable/directory_backing_store.h',
        'syncable/directory_change_delegate.h',
        'syncable/entry.cc',
        'syncable/entry.h',
        'syncable/entry_kernel.cc',
        'syncable/entry_kernel.h',
        'syncable/in_memory_directory_backing_store.cc',
        'syncable/in_memory_directory_backing_store.h',
        'syncable/invalid_directory_backing_store.cc',
        'syncable/invalid_directory_backing_store.h',
        'syncable/metahandle_set.h',
        'syncable/model_neutral_mutable_entry.cc',
        'syncable/model_neutral_mutable_entry.h',
        'syncable/model_type.cc',
        'syncable/mutable_entry.cc',
        'syncable/mutable_entry.h',
        'syncable/nigori_handler.cc',
        'syncable/nigori_handler.h',
        'syncable/nigori_util.cc',
        'syncable/nigori_util.h',
        'syncable/on_disk_directory_backing_store.cc',
        'syncable/on_disk_directory_backing_store.h',
        'syncable/parent_child_index.cc',
        'syncable/parent_child_index.h',
        'syncable/scoped_kernel_lock.cc',
        'syncable/scoped_kernel_lock.h',
        'syncable/scoped_parent_child_index_updater.cc',
        'syncable/scoped_parent_child_index_updater.h',
        'syncable/syncable-inl.h',
        'syncable/syncable_base_transaction.cc',
        'syncable/syncable_base_transaction.h',
        'syncable/syncable_base_write_transaction.cc',
        'syncable/syncable_base_write_transaction.h',
        'syncable/syncable_changes_version.h',
        'syncable/syncable_columns.h',
        'syncable/syncable_delete_journal.cc',
        'syncable/syncable_delete_journal.h',
        'syncable/syncable_enum_conversions.cc',
        'syncable/syncable_enum_conversions.h',
        'syncable/syncable_id.cc',
        'syncable/syncable_id.h',
        'syncable/syncable_model_neutral_write_transaction.cc',
        'syncable/syncable_model_neutral_write_transaction.h',
        'syncable/syncable_proto_util.cc',
        'syncable/syncable_proto_util.h',
        'syncable/syncable_read_transaction.cc',
        'syncable/syncable_read_transaction.h',
        'syncable/syncable_util.cc',
        'syncable/syncable_util.h',
        'syncable/syncable_write_transaction.cc',
        'syncable/syncable_write_transaction.h',
        'syncable/transaction_observer.h',
        'syncable/write_transaction_info.cc',
        'syncable/write_transaction_info.h',
        'util/cryptographer.cc',
        'util/cryptographer.h',
        'util/data_type_histogram.h',
        'util/encryptor.h',
        'util/extensions_activity.cc',
        'util/extensions_activity.h',
        'util/get_session_name.cc',
        'util/get_session_name.h',
        'util/get_session_name_ios.h',
        'util/get_session_name_ios.mm',
        'util/get_session_name_linux.cc',
        'util/get_session_name_linux.h',
        'util/get_session_name_mac.h',
        'util/get_session_name_mac.mm',
        'util/get_session_name_win.cc',
        'util/get_session_name_win.h',
        'util/logging.cc',
        'util/logging.h',
        'util/nigori.cc',
        'util/nigori.h',
        'util/time.cc',
        'util/time.h',
      ],

      'conditions': [
        ['OS=="linux" and chromeos==1', {
          # Required by get_session_name.cc on Chrome OS.
          'dependencies': [
            '../chromeos/chromeos.gyp:chromeos',
            ],
        }],
      ],
    },
    {
      # Contains sync protobuf definitions.  Do not depend on this directly.
      # Depend on the 'sync' target to get the relevant C++ code, too.
      #
      # GN version: //sync/protocol
      'target_name': 'sync_proto',
      'type': '<(component)',
      'include_dirs': [
        '..',
      ],
      'defines': [
        'SYNC_PROTO_IMPLEMENTATION',
      ],
      'sources': [
        # NOTE: If you add a file to this list, also add it to
        # sync/protocol/BUILD.gn
        'protocol/app_notification_specifics.proto',
        'protocol/app_setting_specifics.proto',
        'protocol/app_specifics.proto',
        'protocol/app_list_specifics.proto',
        'protocol/article_specifics.proto',
        'protocol/attachments.proto',
        'protocol/autofill_specifics.proto',
        'protocol/bookmark_specifics.proto',
        'protocol/client_commands.proto',
        'protocol/client_debug_info.proto',
        'protocol/device_info_specifics.proto',
        'protocol/dictionary_specifics.proto',
        'protocol/encryption.proto',
        'protocol/experiments_specifics.proto',
        'protocol/extension_setting_specifics.proto',
        'protocol/extension_specifics.proto',
        'protocol/favicon_image_specifics.proto',
        'protocol/favicon_tracking_specifics.proto',
        'protocol/get_updates_caller_info.proto',
        'protocol/history_delete_directive_specifics.proto',
        'protocol/nigori_specifics.proto',
        'protocol/managed_user_setting_specifics.proto',
        'protocol/managed_user_shared_setting_specifics.proto',
        'protocol/managed_user_specifics.proto',
        'protocol/password_specifics.proto',
        'protocol/preference_specifics.proto',
        'protocol/priority_preference_specifics.proto',
        'protocol/search_engine_specifics.proto',
        'protocol/session_specifics.proto',
        'protocol/sync.proto',
        'protocol/sync_enums.proto',
        'protocol/synced_notification_app_info_specifics.proto',
        'protocol/synced_notification_data.proto',
        'protocol/synced_notification_render.proto',
        'protocol/synced_notification_specifics.proto',
        'protocol/test.proto',
        'protocol/theme_specifics.proto',
        'protocol/typed_url_specifics.proto',
        'protocol/unique_position.proto',
      ],
      'variables': {
        'enable_wexit_time_desctructors': 1,
        'proto_in_dir': './protocol',
        'proto_out_dir': 'sync/protocol',
        'cc_generator_options': 'dllexport_decl=SYNC_PROTO_EXPORT:',
        'cc_include': 'sync/protocol/sync_proto_export.h',
      },
      'includes': [
        '../build/protoc.gypi'
      ],
    },
  ],
}