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.
10 # The core sync library.
12 # TODO(akalin): Rename this to something like 'sync_core' and
13 # reserve the 'sync' name for the overarching library that clients
16 'target_name': 'sync',
17 'type': 'static_library',
18 'variables': { 'enable_wexit_time_destructors': 1, },
23 '../base/base.gyp:base',
24 '../build/temp_gyp/googleurl.gyp:googleurl',
25 '../crypto/crypto.gyp:crypto',
28 'protocol/sync_proto.gyp:sync_proto',
30 'export_dependent_settings': [
31 # Propagate sync_proto since our headers include its generated
33 'protocol/sync_proto.gyp:sync_proto',
36 'engine/apply_updates_command.cc',
37 'engine/apply_updates_command.h',
38 'engine/build_commit_command.cc',
39 'engine/build_commit_command.h',
40 'engine/cleanup_disabled_types_command.cc',
41 'engine/cleanup_disabled_types_command.h',
42 'engine/clear_data_command.cc',
43 'engine/clear_data_command.h',
44 'engine/conflict_resolver.cc',
45 'engine/conflict_resolver.h',
46 'engine/download_updates_command.cc',
47 'engine/download_updates_command.h',
48 'engine/get_commit_ids_command.cc',
49 'engine/get_commit_ids_command.h',
50 'engine/model_changing_syncer_command.cc',
51 'engine/model_changing_syncer_command.h',
52 'engine/model_safe_worker.cc',
53 'engine/model_safe_worker.h',
54 'engine/passive_model_worker.cc',
55 'engine/passive_model_worker.h',
56 'engine/net/server_connection_manager.cc',
57 'engine/net/server_connection_manager.h',
58 'engine/net/url_translator.cc',
59 'engine/net/url_translator.h',
60 'engine/nigori_util.cc',
61 'engine/nigori_util.h',
62 'engine/nudge_source.cc',
63 'engine/nudge_source.h',
64 'engine/polling_constants.cc',
65 'engine/polling_constants.h',
66 'engine/post_commit_message_command.cc',
67 'engine/post_commit_message_command.h',
68 'engine/process_commit_response_command.cc',
69 'engine/process_commit_response_command.h',
70 'engine/process_updates_command.cc',
71 'engine/process_updates_command.h',
72 'engine/resolve_conflicts_command.cc',
73 'engine/resolve_conflicts_command.h',
74 'engine/store_timestamps_command.cc',
75 'engine/store_timestamps_command.h',
78 'engine/syncer_command.cc',
79 'engine/syncer_command.h',
80 'engine/syncer_proto_util.cc',
81 'engine/syncer_proto_util.h',
82 'engine/sync_scheduler.cc',
83 'engine/sync_scheduler.h',
84 'engine/syncer_types.cc',
85 'engine/syncer_types.h',
86 'engine/syncer_util.cc',
87 'engine/syncer_util.h',
89 'engine/traffic_logger.cc',
90 'engine/traffic_logger.h',
91 'engine/traffic_recorder.cc',
92 'engine/traffic_recorder.h',
93 'engine/update_applicator.cc',
94 'engine/update_applicator.h',
95 'engine/verify_updates_command.cc',
96 'engine/verify_updates_command.h',
100 'js/js_controller.h',
101 'js/js_event_details.cc',
102 'js/js_event_details.h',
103 'js/js_event_handler.h',
104 'js/js_reply_handler.h',
105 'js/sync_js_controller.cc',
106 'js/sync_js_controller.h',
107 'protocol/proto_enum_conversions.cc',
108 'protocol/proto_enum_conversions.h',
109 'protocol/proto_value_conversions.cc',
110 'protocol/proto_value_conversions.h',
111 'protocol/service_constants.h',
112 'protocol/sync_protocol_error.cc',
113 'protocol/sync_protocol_error.h',
114 'sessions/debug_info_getter.h',
115 'sessions/ordered_commit_set.cc',
116 'sessions/ordered_commit_set.h',
117 'sessions/session_state.cc',
118 'sessions/session_state.h',
119 'sessions/status_controller.cc',
120 'sessions/status_controller.h',
121 'sessions/sync_session.cc',
122 'sessions/sync_session.h',
123 'sessions/sync_session_context.cc',
124 'sessions/sync_session_context.h',
126 'syncable/directory_backing_store.cc',
127 'syncable/directory_backing_store.h',
128 'syncable/directory_change_delegate.h',
129 'syncable/dir_open_result.h',
130 'syncable/in_memory_directory_backing_store.cc',
131 'syncable/in_memory_directory_backing_store.h',
132 'syncable/model_type.cc',
133 'syncable/model_type.h',
134 'syncable/model_type_payload_map.cc',
135 'syncable/model_type_payload_map.h',
136 'syncable/on_disk_directory_backing_store.cc',
137 'syncable/on_disk_directory_backing_store.h',
138 'syncable/syncable.cc',
139 'syncable/syncable_changes_version.h',
140 'syncable/syncable_columns.h',
141 'syncable/syncable_enum_conversions.cc',
142 'syncable/syncable_enum_conversions.h',
143 'syncable/syncable.h',
144 'syncable/syncable_id.cc',
145 'syncable/syncable_id.h',
146 'syncable/syncable-inl.h',
147 'syncable/transaction_observer.h',
148 'util/cryptographer.cc',
149 'util/cryptographer.h',
151 # TODO(akalin): Figure out a better place to put
152 # data_encryption_win*; it's also used by autofill.
153 'util/data_encryption_win.cc',
154 'util/data_encryption_win.h',
156 'util/data_type_histogram.h',
159 'util/extensions_activity_monitor.cc',
160 'util/extensions_activity_monitor.h',
161 'util/get_session_name.cc',
162 'util/get_session_name.h',
163 'util/get_session_name_mac.mm',
164 'util/get_session_name_mac.h',
165 'util/get_session_name_win.cc',
166 'util/get_session_name_win.h',
172 'util/report_unrecoverable_error_function.h',
173 'util/session_utils_android.cc',
174 'util/session_utils_android.h',
175 'util/syncer_error.cc',
176 'util/syncer_error.h',
179 'util/unrecoverable_error_handler.h',
180 'util/unrecoverable_error_info.h',
181 'util/unrecoverable_error_info.cc',
182 'util/weak_handle.cc',
183 'util/weak_handle.h',
187 # Test support files for the 'sync' target.
189 'target_name': 'test_support_sync',
190 'type': 'static_library',
191 'variables': { 'enable_wexit_time_destructors': 1, },
196 '../base/base.gyp:base',
197 '../testing/gmock.gyp:gmock',
198 '../testing/gtest.gyp:gtest',
199 'protocol/sync_proto.gyp:sync_proto',
202 'export_dependent_settings': [
203 '../testing/gmock.gyp:gmock',
204 '../testing/gtest.gyp:gtest',
205 'protocol/sync_proto.gyp:sync_proto',
209 'js/js_test_util.cc',
211 'sessions/test_util.cc',
212 'sessions/test_util.h',
213 'syncable/model_type_test_util.cc',
214 'syncable/model_type_test_util.h',
215 'syncable/syncable_mock.cc',
216 'syncable/syncable_mock.h',
217 'test/fake_encryptor.cc',
218 'test/fake_encryptor.h',
219 'test/fake_extensions_activity_monitor.cc',
220 'test/fake_extensions_activity_monitor.h',
221 'test/null_directory_change_delegate.cc',
222 'test/null_directory_change_delegate.h',
223 'test/null_transaction_observer.cc',
224 'test/null_transaction_observer.h',
225 'test/engine/test_directory_setter_upper.cc',
226 'test/engine/test_directory_setter_upper.h',
227 'test/engine/fake_model_safe_worker_registrar.cc',
228 'test/engine/fake_model_safe_worker_registrar.h',
229 'test/engine/fake_model_worker.cc',
230 'test/engine/fake_model_worker.h',
231 'test/engine/mock_connection_manager.cc',
232 'test/engine/mock_connection_manager.h',
233 'test/engine/syncer_command_test.cc',
234 'test/engine/syncer_command_test.h',
235 'test/engine/test_id_factory.h',
236 'test/engine/test_syncable_utils.cc',
237 'test/engine/test_syncable_utils.h',
238 'test/sessions/test_scoped_session_event_listener.h',
239 'test/test_directory_backing_store.cc',
240 'test/test_directory_backing_store.h',
241 'util/test_unrecoverable_error_handler.cc',
242 'util/test_unrecoverable_error_handler.h',
246 # Unit tests for the 'sync' target. This cannot be a static
247 # library because the unit test files have to be compiled directly
248 # into the executable, so we push the target files to the
249 # depending executable target via direct_dependent_settings.
251 'target_name': 'sync_tests',
253 # We only want unit test executables to include this target.
254 'suppress_wildcard': 1,
256 '../base/base.gyp:base',
257 '../testing/gmock.gyp:gmock',
258 '../testing/gtest.gyp:gtest',
259 'protocol/sync_proto.gyp:sync_proto',
263 # Propagate all dependencies since the actual compilation
264 # happens in the dependents.
265 'export_dependent_settings': [
266 '../base/base.gyp:base',
267 '../testing/gmock.gyp:gmock',
268 '../testing/gtest.gyp:gtest',
269 'protocol/sync_proto.gyp:sync_proto',
273 'direct_dependent_settings': {
274 'variables': { 'enable_wexit_time_destructors': 1, },
279 'engine/apply_updates_command_unittest.cc',
280 'engine/build_commit_command_unittest.cc',
281 'engine/clear_data_command_unittest.cc',
282 'engine/cleanup_disabled_types_command_unittest.cc',
283 'engine/download_updates_command_unittest.cc',
284 'engine/model_changing_syncer_command_unittest.cc',
285 'engine/model_safe_worker_unittest.cc',
286 'engine/nigori_util_unittest.cc',
287 'engine/process_commit_response_command_unittest.cc',
288 'engine/process_updates_command_unittest.cc',
289 'engine/resolve_conflicts_command_unittest.cc',
290 'engine/syncer_proto_util_unittest.cc',
291 'engine/sync_scheduler_unittest.cc',
292 'engine/sync_scheduler_whitebox_unittest.cc',
293 'engine/syncer_unittest.cc',
294 'engine/syncproto_unittest.cc',
295 'engine/traffic_recorder_unittest.cc',
296 'engine/verify_updates_command_unittest.cc',
297 'js/js_arg_list_unittest.cc',
298 'js/js_event_details_unittest.cc',
299 'js/sync_js_controller_unittest.cc',
300 'protocol/proto_enum_conversions_unittest.cc',
301 'protocol/proto_value_conversions_unittest.cc',
302 'sessions/ordered_commit_set_unittest.cc',
303 'sessions/session_state_unittest.cc',
304 'sessions/status_controller_unittest.cc',
305 'sessions/sync_session_context_unittest.cc',
306 'sessions/sync_session_unittest.cc',
307 'syncable/directory_backing_store_unittest.cc',
308 'syncable/model_type_payload_map_unittest.cc',
309 'syncable/model_type_unittest.cc',
310 'syncable/syncable_enum_conversions_unittest.cc',
311 'syncable/syncable_id_unittest.cc',
312 'syncable/syncable_unittest.cc',
313 'util/cryptographer_unittest.cc',
314 'util/data_encryption_win_unittest.cc',
315 'util/data_type_histogram_unittest.cc',
316 'util/enum_set_unittest.cc',
317 'util/get_session_name_unittest.cc',
318 'util/immutable_unittest.cc',
319 'util/nigori_unittest.cc',
320 'util/protobuf_unittest.cc',
321 'util/weak_handle_unittest.cc',
326 # The unit test executable for sync tests. Currently this isn't
327 # automatically run, as there is already a sync_unit_tests
328 # executable in chrome.gyp; this is just to make sure that all the
329 # link-time dependencies for the files in the targets above
332 # TODO(akalin): Rename this to sync_unit_tests once we've moved
333 # everything from chrome.gyp.
335 'target_name': 'sync_unit_tests_canary',
336 'type': 'executable',
338 '../base/base.gyp:run_all_unittests',
341 # TODO(akalin): This is needed because histogram.cc uses
342 # leak_annotations.h, which pulls this in. Make 'base'
343 # propagate this dependency.
345 ['OS=="linux" and linux_use_tcmalloc==1', {
347 '../base/allocator/allocator.gyp:allocator',