blob: 69736b6d502ae59d7194a83ed1e2f7a788786213 [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
James Robinson2ed4d692014-09-17 05:20:585# GYP version: components/gcm_driver.gypi:gcm_driver
[email protected]abd4b682014-07-16 20:26:306static_library("gcm_driver") {
7 sources = [
8 "android/component_jni_registrar.cc",
9 "android/component_jni_registrar.h",
10 "default_gcm_app_handler.cc",
11 "default_gcm_app_handler.h",
fgorskid578c18b2014-09-24 23:40:1712 "gcm_account_mapper.cc",
13 "gcm_account_mapper.h",
jitendra.ks70c5b4c2015-08-19 18:53:3414 "gcm_account_tracker.cc",
15 "gcm_account_tracker.h",
satoruxea51ccc2015-02-16 10:14:2416 "gcm_activity.cc",
17 "gcm_activity.h",
[email protected]abd4b682014-07-16 20:26:3018 "gcm_app_handler.cc",
19 "gcm_app_handler.h",
jianli1235e51c2014-09-08 18:56:4120 "gcm_backoff_policy.cc",
21 "gcm_backoff_policy.h",
22 "gcm_channel_status_request.cc",
23 "gcm_channel_status_request.h",
jianli2dc910b02014-09-19 02:42:4624 "gcm_channel_status_syncer.cc",
25 "gcm_channel_status_syncer.h",
[email protected]abd4b682014-07-16 20:26:3026 "gcm_client.cc",
27 "gcm_client.h",
28 "gcm_client_factory.cc",
29 "gcm_client_factory.h",
30 "gcm_client_impl.cc",
31 "gcm_client_impl.h",
Brett Wilson83fd4242014-09-02 19:45:3332 "gcm_connection_observer.cc",
33 "gcm_connection_observer.h",
fgorski05d507c2014-09-10 17:28:1034 "gcm_delayed_task_controller.cc",
35 "gcm_delayed_task_controller.h",
jitendra.ksb1b7fee2015-09-22 17:42:5336 "gcm_desktop_utils.cc",
37 "gcm_desktop_utils.h",
[email protected]abd4b682014-07-16 20:26:3038 "gcm_driver.cc",
39 "gcm_driver.h",
40 "gcm_driver_android.cc",
41 "gcm_driver_android.h",
jitendra.ks75541942015-11-03 20:17:5142 "gcm_driver_constants.cc",
43 "gcm_driver_constants.h",
[email protected]abd4b682014-07-16 20:26:3044 "gcm_driver_desktop.cc",
45 "gcm_driver_desktop.h",
drogere89640c42015-09-15 18:57:4146 "gcm_internals_constants.cc",
47 "gcm_internals_constants.h",
droger08025a22015-11-16 10:58:5148 "gcm_internals_helper.cc",
49 "gcm_internals_helper.h",
jitendra.ks75541942015-11-03 20:17:5150 "gcm_profile_service.cc",
51 "gcm_profile_service.h",
peter1ed82982015-12-21 17:22:4952 "gcm_stats_recorder_android.cc",
53 "gcm_stats_recorder_android.h",
[email protected]abd4b682014-07-16 20:26:3054 "gcm_stats_recorder_impl.cc",
55 "gcm_stats_recorder_impl.h",
jianli7a0c9b62015-05-26 23:24:4756 "registration_info.cc",
57 "registration_info.h",
[email protected]abd4b682014-07-16 20:26:3058 "system_encryptor.cc",
59 "system_encryptor.h",
60 ]
61
brettwafa8f542016-08-24 05:16:2462 public_deps = [
[email protected]abd4b682014-07-16 20:26:3063 "//base",
tfarina1df94042015-07-22 17:28:4664 "//components/gcm_driver/common",
brettw2629c442015-11-26 02:42:1965 "//components/gcm_driver/crypto",
brettwafa8f542016-08-24 05:16:2466 "//components/gcm_driver/instance_id",
67 ]
68 deps = [
69 "//components/crx_file",
brettw2629c442015-11-26 02:42:1970 "//components/keyed_service/core",
[email protected]abd4b682014-07-16 20:26:3071 "//components/os_crypt",
brettw2629c442015-11-26 02:42:1972 "//components/pref_registry",
brettw9f7802a22016-01-30 06:40:1773 "//components/prefs",
brettw2629c442015-11-26 02:42:1974 "//components/signin/core/browser",
maxbogue455a57e32016-08-14 00:08:3275 "//components/sync",
brettw2629c442015-11-26 02:42:1976 "//components/version_info",
77 "//google_apis",
[email protected]abd4b682014-07-16 20:26:3078 "//google_apis/gcm",
79 "//net",
jitendra.ksb1b7fee2015-09-22 17:42:5380 "//url:url",
[email protected]abd4b682014-07-16 20:26:3081 ]
brettwafa8f542016-08-24 05:16:2482
83 # This target goes with these other deps and they can include headers from
84 # each other.
85 allow_circular_includes_from = [
86 "//components/gcm_driver/crypto",
87 "//components/gcm_driver/instance_id",
88 ]
[email protected]abd4b682014-07-16 20:26:3089
vchigrind853bed2015-01-13 08:31:1890 if (is_chromeos) {
91 deps += [ "//components/timers" ]
92 }
93
[email protected]abd4b682014-07-16 20:26:3094 if (is_android) {
95 sources -= [
fgorskid578c18b2014-09-24 23:40:1796 "gcm_account_mapper.cc",
97 "gcm_account_mapper.h",
jianli1235e51c2014-09-08 18:56:4198 "gcm_channel_status_request.cc",
99 "gcm_channel_status_request.h",
jianli2dc910b02014-09-19 02:42:46100 "gcm_channel_status_syncer.cc",
101 "gcm_channel_status_syncer.h",
[email protected]abd4b682014-07-16 20:26:30102 "gcm_client_factory.cc",
103 "gcm_client_factory.h",
104 "gcm_client_impl.cc",
105 "gcm_client_impl.h",
jitendra.ksb1b7fee2015-09-22 17:42:53106 "gcm_desktop_utils.cc",
107 "gcm_desktop_utils.h",
[email protected]abd4b682014-07-16 20:26:30108 "gcm_driver_desktop.cc",
109 "gcm_driver_desktop.h",
110 "gcm_stats_recorder_impl.cc",
111 "gcm_stats_recorder_impl.h",
112 ]
johnme627dc8c72016-08-19 21:49:39113 deps -= [
114 "//components/crx_file",
115 "//google_apis/gcm",
116 ]
cjhopman11a68cb2014-10-13 22:47:54117 deps += [ "android:jni_headers" ]
[email protected]abd4b682014-07-16 20:26:30118 }
119}
120
peter245ad212015-07-09 11:30:59121# GYP version: components/gcm_driver.gypi:gcm_driver_test_support
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}