blob: 125336e71784e1d32c568588a62997d547df67e5 [file] [log] [blame]
[email protected]abd4b682014-07-16 20:26:301# 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.
4
5static_library("gcm_driver") {
6 sources = [
7 "android/component_jni_registrar.cc",
8 "android/component_jni_registrar.h",
9 "default_gcm_app_handler.cc",
10 "default_gcm_app_handler.h",
fgorskid578c18b2014-09-24 23:40:1711 "gcm_account_mapper.cc",
12 "gcm_account_mapper.h",
jitendra.ks70c5b4c2015-08-19 18:53:3413 "gcm_account_tracker.cc",
14 "gcm_account_tracker.h",
satoruxea51ccc2015-02-16 10:14:2415 "gcm_activity.cc",
16 "gcm_activity.h",
[email protected]abd4b682014-07-16 20:26:3017 "gcm_app_handler.cc",
18 "gcm_app_handler.h",
jianli1235e51c2014-09-08 18:56:4119 "gcm_backoff_policy.cc",
20 "gcm_backoff_policy.h",
21 "gcm_channel_status_request.cc",
22 "gcm_channel_status_request.h",
jianli2dc910b02014-09-19 02:42:4623 "gcm_channel_status_syncer.cc",
24 "gcm_channel_status_syncer.h",
[email protected]abd4b682014-07-16 20:26:3025 "gcm_client.cc",
26 "gcm_client.h",
27 "gcm_client_factory.cc",
28 "gcm_client_factory.h",
29 "gcm_client_impl.cc",
30 "gcm_client_impl.h",
Brett Wilson83fd4242014-09-02 19:45:3331 "gcm_connection_observer.cc",
32 "gcm_connection_observer.h",
fgorski05d507c2014-09-10 17:28:1033 "gcm_delayed_task_controller.cc",
34 "gcm_delayed_task_controller.h",
jitendra.ksb1b7fee2015-09-22 17:42:5335 "gcm_desktop_utils.cc",
36 "gcm_desktop_utils.h",
[email protected]abd4b682014-07-16 20:26:3037 "gcm_driver.cc",
38 "gcm_driver.h",
39 "gcm_driver_android.cc",
40 "gcm_driver_android.h",
jitendra.ks75541942015-11-03 20:17:5141 "gcm_driver_constants.cc",
42 "gcm_driver_constants.h",
[email protected]abd4b682014-07-16 20:26:3043 "gcm_driver_desktop.cc",
44 "gcm_driver_desktop.h",
drogere89640c42015-09-15 18:57:4145 "gcm_internals_constants.cc",
46 "gcm_internals_constants.h",
droger08025a22015-11-16 10:58:5147 "gcm_internals_helper.cc",
48 "gcm_internals_helper.h",
jitendra.ks75541942015-11-03 20:17:5149 "gcm_profile_service.cc",
50 "gcm_profile_service.h",
peter1ed82982015-12-21 17:22:4951 "gcm_stats_recorder_android.cc",
52 "gcm_stats_recorder_android.h",
[email protected]abd4b682014-07-16 20:26:3053 "gcm_stats_recorder_impl.cc",
54 "gcm_stats_recorder_impl.h",
jianli7a0c9b62015-05-26 23:24:4755 "registration_info.cc",
56 "registration_info.h",
[email protected]abd4b682014-07-16 20:26:3057 "system_encryptor.cc",
58 "system_encryptor.h",
59 ]
60
brettwafa8f542016-08-24 05:16:2461 public_deps = [
[email protected]abd4b682014-07-16 20:26:3062 "//base",
tfarina1df94042015-07-22 17:28:4663 "//components/gcm_driver/common",
brettw2629c442015-11-26 02:42:1964 "//components/gcm_driver/crypto",
brettwafa8f542016-08-24 05:16:2465 "//components/gcm_driver/instance_id",
66 ]
67 deps = [
zea76342abf2016-11-01 17:26:0468 "//base:i18n",
brettwafa8f542016-08-24 05:16:2469 "//components/crx_file",
rajendrantbfee22e2017-01-20 20:34:1770 "//components/data_use_measurement/core",
brettw2629c442015-11-26 02:42:1971 "//components/keyed_service/core",
[email protected]abd4b682014-07-16 20:26:3072 "//components/os_crypt",
brettw2629c442015-11-26 02:42:1973 "//components/pref_registry",
brettw9f7802a22016-01-30 06:40:1774 "//components/prefs",
brettw2629c442015-11-26 02:42:1975 "//components/signin/core/browser",
maxbogue455a57e32016-08-14 00:08:3276 "//components/sync",
brettw2629c442015-11-26 02:42:1977 "//components/version_info",
78 "//google_apis",
[email protected]abd4b682014-07-16 20:26:3079 "//google_apis/gcm",
80 "//net",
jitendra.ksb1b7fee2015-09-22 17:42:5381 "//url:url",
[email protected]abd4b682014-07-16 20:26:3082 ]
brettwafa8f542016-08-24 05:16:2483
84 # This target goes with these other deps and they can include headers from
85 # each other.
86 allow_circular_includes_from = [
87 "//components/gcm_driver/crypto",
88 "//components/gcm_driver/instance_id",
89 ]
[email protected]abd4b682014-07-16 20:26:3090
vchigrind853bed2015-01-13 08:31:1891 if (is_chromeos) {
92 deps += [ "//components/timers" ]
93 }
94
[email protected]abd4b682014-07-16 20:26:3095 if (is_android) {
96 sources -= [
fgorskid578c18b2014-09-24 23:40:1797 "gcm_account_mapper.cc",
98 "gcm_account_mapper.h",
jianli1235e51c2014-09-08 18:56:4199 "gcm_channel_status_request.cc",
100 "gcm_channel_status_request.h",
jianli2dc910b02014-09-19 02:42:46101 "gcm_channel_status_syncer.cc",
102 "gcm_channel_status_syncer.h",
[email protected]abd4b682014-07-16 20:26:30103 "gcm_client_factory.cc",
104 "gcm_client_factory.h",
105 "gcm_client_impl.cc",
106 "gcm_client_impl.h",
jitendra.ksb1b7fee2015-09-22 17:42:53107 "gcm_desktop_utils.cc",
108 "gcm_desktop_utils.h",
[email protected]abd4b682014-07-16 20:26:30109 "gcm_driver_desktop.cc",
110 "gcm_driver_desktop.h",
111 "gcm_stats_recorder_impl.cc",
112 "gcm_stats_recorder_impl.h",
113 ]
johnme627dc8c72016-08-19 21:49:39114 deps -= [
115 "//components/crx_file",
116 "//google_apis/gcm",
117 ]
cjhopman11a68cb2014-10-13 22:47:54118 deps += [ "android:jni_headers" ]
[email protected]abd4b682014-07-16 20:26:30119 }
120}
121
brettw77617612016-07-13 22:40:06122static_library("test_support") {
Brett Wilson0c8745a2014-09-08 22:59:49123 testonly = true
[email protected]abd4b682014-07-16 20:26:30124 sources = [
125 "fake_gcm_app_handler.cc",
126 "fake_gcm_app_handler.h",
127 "fake_gcm_client.cc",
128 "fake_gcm_client.h",
129 "fake_gcm_client_factory.cc",
130 "fake_gcm_client_factory.h",
131 "fake_gcm_driver.cc",
132 "fake_gcm_driver.h",
133 ]
134
brettweab63a52015-10-22 23:47:36135 public_deps = [
[email protected]abd4b682014-07-16 20:26:30136 ":gcm_driver",
brettweab63a52015-10-22 23:47:36137 ]
138 deps = [
[email protected]abd4b682014-07-16 20:26:30139 "//base",
peter245ad212015-07-09 11:30:59140 "//google_apis/gcm:test_support",
brettw2629c442015-11-26 02:42:19141 "//net",
[email protected]abd4b682014-07-16 20:26:30142 "//testing/gtest",
143 ]
144
145 if (is_android) {
146 sources -= [
147 "fake_gcm_client.cc",
148 "fake_gcm_client.h",
149 "fake_gcm_client_factory.cc",
150 "fake_gcm_client_factory.h",
151 ]
peter245ad212015-07-09 11:30:59152 deps -= [ "//google_apis/gcm:test_support" ]
[email protected]abd4b682014-07-16 20:26:30153 }
154}
peter245ad212015-07-09 11:30:59155
pkotwicz59272082015-10-29 19:29:14156source_set("unit_tests") {
157 testonly = true
158
159 sources = [
peter1ed82982015-12-21 17:22:49160 "gcm_account_mapper_unittest.cc",
pkotwicz59272082015-10-29 19:29:14161 "gcm_account_tracker_unittest.cc",
peter1ed82982015-12-21 17:22:49162 "gcm_channel_status_request_unittest.cc",
163 "gcm_client_impl_unittest.cc",
164 "gcm_delayed_task_controller_unittest.cc",
165 "gcm_driver_desktop_unittest.cc",
166 "gcm_stats_recorder_android_unittest.cc",
167 "gcm_stats_recorder_impl_unittest.cc",
pkotwicz59272082015-10-29 19:29:14168 ]
169
170 deps = [
171 ":gcm_driver",
172 ":test_support",
brettw2629c442015-11-26 02:42:19173 "//base",
brettw2629c442015-11-26 02:42:19174 "//base/test:test_support",
peteree284ba52016-02-01 11:53:28175 "//components/gcm_driver/crypto",
brettw9f7802a22016-01-30 06:40:17176 "//components/prefs:test_support",
Max Boguefef332d2016-07-28 22:09:09177 "//components/sync/protocol",
brettw2629c442015-11-26 02:42:19178 "//google_apis:test_support",
179 "//google_apis/gcm:test_support",
180 "//net:test_support",
pkotwicz59272082015-10-29 19:29:14181 "//testing/gtest",
182 "//third_party/protobuf:protobuf_lite",
183 ]
184
peter1ed82982015-12-21 17:22:49185 if (is_android) {
186 sources -= [
agrieve2f114fc2015-07-14 22:18:35187 "gcm_account_mapper_unittest.cc",
188 "gcm_channel_status_request_unittest.cc",
189 "gcm_client_impl_unittest.cc",
agrieve2f114fc2015-07-14 22:18:35190 "gcm_driver_desktop_unittest.cc",
191 "gcm_stats_recorder_impl_unittest.cc",
192 ]
agrieve2f114fc2015-07-14 22:18:35193 }
peter245ad212015-07-09 11:30:59194}