Roll src/third_party/WebKit eac3800:0237a66 (svn 202606:202607)
[chromium-blink-merge.git] / components / sync_driver / BUILD.gn
blob6e678bf4def65154fd3fa946e79cb71573f91755
1 # Copyright 2014 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.
5 import("//build/config/features.gni")
7 source_set("sync_driver") {
8   sources = [
9     "about_sync_util.cc",
10     "about_sync_util.h",
11     "backend_data_type_configurer.cc",
12     "backend_data_type_configurer.h",
13     "backend_migrator.cc",
14     "backend_migrator.h",
15     "backup_rollback_controller.cc",
16     "backup_rollback_controller.h",
17     "change_processor.cc",
18     "change_processor.h",
19     "data_type_controller.cc",
20     "data_type_controller.h",
21     "data_type_encryption_handler.cc",
22     "data_type_encryption_handler.h",
23     "data_type_error_handler.h",
24     "data_type_manager.cc",
25     "data_type_manager.h",
26     "data_type_manager_impl.cc",
27     "data_type_manager_impl.h",
28     "data_type_manager_observer.h",
29     "data_type_status_table.cc",
30     "data_type_status_table.h",
31     "device_info.cc",
32     "device_info.h",
33     "device_info_data_type_controller.cc",
34     "device_info_data_type_controller.h",
35     "device_info_sync_service.cc",
36     "device_info_sync_service.h",
37     "device_info_tracker.h",
38     "directory_data_type_controller.cc",
39     "directory_data_type_controller.h",
40     "favicon_cache.cc",
41     "favicon_cache.h",
42     "frontend_data_type_controller.cc",
43     "frontend_data_type_controller.h",
44     "generic_change_processor.cc",
45     "generic_change_processor.h",
46     "generic_change_processor_factory.cc",
47     "generic_change_processor_factory.h",
48     "glue/browser_thread_model_worker.cc",
49     "glue/browser_thread_model_worker.h",
50     "glue/synced_session.cc",
51     "glue/synced_session.h",
52     "glue/synced_window_delegate.h",
53     "glue/typed_url_model_associator.cc",
54     "glue/typed_url_model_associator.h",
55     "glue/ui_model_worker.cc",
56     "glue/ui_model_worker.h",
57     "invalidation_adapter.cc",
58     "invalidation_adapter.h",
59     "invalidation_helper.cc",
60     "invalidation_helper.h",
61     "local_device_info_provider.h",
62     "model_association_manager.cc",
63     "model_association_manager.h",
64     "model_associator.h",
65     "non_blocking_data_type_controller.cc",
66     "non_blocking_data_type_controller.h",
67     "non_ui_data_type_controller.cc",
68     "non_ui_data_type_controller.h",
69     "open_tabs_ui_delegate.cc",
70     "open_tabs_ui_delegate.h",
71     "pref_names.cc",
72     "pref_names.h",
73     "profile_sync_auth_provider.cc",
74     "profile_sync_auth_provider.h",
75     "profile_sync_components_factory.h",
76     "protocol_event_observer.cc",
77     "protocol_event_observer.h",
78     "proxy_data_type_controller.cc",
79     "proxy_data_type_controller.h",
80     "revisit/current_tab_matcher.cc",
81     "revisit/current_tab_matcher.h",
82     "revisit/offset_tab_matcher.cc",
83     "revisit/offset_tab_matcher.h",
84     "revisit/page_equality.h",
85     "revisit/page_visit_observer.h",
86     "revisit/sessions_page_revisit_observer.cc",
87     "revisit/sessions_page_revisit_observer.h",
88     "sessions/synced_window_delegates_getter.cc",
89     "sessions/synced_window_delegates_getter.h",
90     "shared_change_processor.cc",
91     "shared_change_processor.h",
92     "shared_change_processor_ref.cc",
93     "shared_change_processor_ref.h",
94     "signin_manager_wrapper.cc",
95     "signin_manager_wrapper.h",
96     "sync_api_component_factory.h",
97     "sync_client.cc",
98     "sync_client.h",
99     "sync_driver_switches.cc",
100     "sync_driver_switches.h",
101     "sync_error_controller.cc",
102     "sync_error_controller.h",
103     "sync_frontend.cc",
104     "sync_frontend.h",
105     "sync_prefs.cc",
106     "sync_prefs.h",
107     "sync_service.cc",
108     "sync_service.h",
109     "sync_service_observer.cc",
110     "sync_service_observer.h",
111     "sync_service_utils.cc",
112     "sync_service_utils.h",
113     "sync_stopped_reporter.cc",
114     "sync_stopped_reporter.h",
115     "sync_util.cc",
116     "sync_util.h",
117     "system_encryptor.cc",
118     "system_encryptor.h",
119     "tab_node_pool.cc",
120     "tab_node_pool.h",
121     "ui_data_type_controller.cc",
122     "ui_data_type_controller.h",
123     "user_selectable_sync_type.h",
124   ]
126   deps = [
127     "//base",
128     "//components/favicon/core",
129     "//components/history/core/browser",
130     "//components/invalidation/public",
131     "//components/os_crypt",
132     "//components/sessions",
133     "//components/signin/core/browser",
134     "//components/version_info",
135     "//net",
136     "//sync",
137     "//third_party/cacheinvalidation",
138     "//ui/gfx",
139   ]
141   if (enable_configuration_policy) {
142     sources += [
143       "sync_policy_handler.cc",
144       "sync_policy_handler.h",
145     ]
146     deps += [
147       "//components/policy",
148       "//components/policy:policy_component",
149     ]
150   }
153 source_set("test_support") {
154   testonly = true
155   sources = [
156     "change_processor_mock.cc",
157     "change_processor_mock.h",
158     "data_type_controller_mock.cc",
159     "data_type_controller_mock.h",
160     "data_type_error_handler_mock.cc",
161     "data_type_error_handler_mock.h",
162     "data_type_manager_mock.cc",
163     "data_type_manager_mock.h",
164     "fake_data_type_controller.cc",
165     "fake_data_type_controller.h",
166     "fake_generic_change_processor.cc",
167     "fake_generic_change_processor.h",
168     "fake_sync_client.cc",
169     "fake_sync_client.h",
170     "fake_sync_service.cc",
171     "fake_sync_service.h",
172     "frontend_data_type_controller_mock.cc",
173     "frontend_data_type_controller_mock.h",
174     "local_device_info_provider_mock.cc",
175     "local_device_info_provider_mock.h",
176     "model_associator_mock.cc",
177     "model_associator_mock.h",
178     "non_ui_data_type_controller_mock.cc",
179     "non_ui_data_type_controller_mock.h",
180   ]
182   public_deps = [
183     ":sync_driver",
184     "//sync",
185   ]
187   deps = [
188     "//base",
189     "//components/sessions",
190     "//sync:test_support_sync_internal_api",
191     "//testing/gmock",
192     "//testing/gtest",
193   ]
196 source_set("unit_tests") {
197   testonly = true
198   sources = [
199     "about_sync_util_unittest.cc",
200     "backup_rollback_controller_unittest.cc",
201     "data_type_manager_impl_unittest.cc",
202     "device_info_data_type_controller_unittest.cc",
203     "device_info_sync_service_unittest.cc",
204     "favicon_cache_unittest.cc",
205     "generic_change_processor_unittest.cc",
206     "model_association_manager_unittest.cc",
207     "non_blocking_data_type_controller_unittest.cc",
208     "non_ui_data_type_controller_unittest.cc",
209     "revisit/current_tab_matcher_unittest.cc",
210     "revisit/offset_tab_matcher_unittest.cc",
211     "revisit/sessions_page_revisit_observer_unittest.cc",
212     "shared_change_processor_unittest.cc",
213     "sync_policy_handler_unittest.cc",
214     "sync_prefs_unittest.cc",
215     "sync_stopped_reporter_unittest.cc",
216     "sync_util_unittest.cc",
217     "system_encryptor_unittest.cc",
218     "tab_node_pool_unittest.cc",
219     "ui_data_type_controller_unittest.cc",
220   ]
221   deps = [
222     ":test_support",
223     "//testing/gmock",
224     "//testing/gtest",
225   ]