blob: b8edf26c5d7d0ac398844211a68679c95085da0a [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",
[email protected]abd4b682014-07-16 20:26:3052 "gcm_stats_recorder_impl.cc",
53 "gcm_stats_recorder_impl.h",
jianli7a0c9b62015-05-26 23:24:4754 "registration_info.cc",
55 "registration_info.h",
[email protected]abd4b682014-07-16 20:26:3056 "system_encryptor.cc",
57 "system_encryptor.h",
58 ]
59
60 deps = [
61 "//base",
brettw2629c442015-11-26 02:42:1962 "//base:prefs",
tfarina1df94042015-07-22 17:28:4663 "//components/gcm_driver/common",
brettw2629c442015-11-26 02:42:1964 "//components/gcm_driver/crypto",
65 "//components/keyed_service/core",
[email protected]abd4b682014-07-16 20:26:3066 "//components/os_crypt",
brettw2629c442015-11-26 02:42:1967 "//components/pref_registry",
68 "//components/signin/core/browser",
jitendra.ksb1b7fee2015-09-22 17:42:5369 "//components/sync_driver",
brettw2629c442015-11-26 02:42:1970 "//components/version_info",
71 "//google_apis",
[email protected]abd4b682014-07-16 20:26:3072 "//google_apis/gcm",
73 "//net",
fgorski3689f8d2014-10-09 04:39:3174 "//sync/protocol",
jitendra.ksb1b7fee2015-09-22 17:42:5375 "//url:url",
[email protected]abd4b682014-07-16 20:26:3076 ]
brettw2629c442015-11-26 02:42:1977 allow_circular_includes_from = [ "//components/gcm_driver/crypto" ]
[email protected]abd4b682014-07-16 20:26:3078
vchigrind853bed2015-01-13 08:31:1879 if (is_chromeos) {
80 deps += [ "//components/timers" ]
81 }
82
[email protected]abd4b682014-07-16 20:26:3083 if (is_android) {
84 sources -= [
fgorskid578c18b2014-09-24 23:40:1785 "gcm_account_mapper.cc",
86 "gcm_account_mapper.h",
jianli1235e51c2014-09-08 18:56:4187 "gcm_channel_status_request.cc",
88 "gcm_channel_status_request.h",
jianli2dc910b02014-09-19 02:42:4689 "gcm_channel_status_syncer.cc",
90 "gcm_channel_status_syncer.h",
[email protected]abd4b682014-07-16 20:26:3091 "gcm_client_factory.cc",
92 "gcm_client_factory.h",
93 "gcm_client_impl.cc",
94 "gcm_client_impl.h",
jitendra.ksb1b7fee2015-09-22 17:42:5395 "gcm_desktop_utils.cc",
96 "gcm_desktop_utils.h",
[email protected]abd4b682014-07-16 20:26:3097 "gcm_driver_desktop.cc",
98 "gcm_driver_desktop.h",
99 "gcm_stats_recorder_impl.cc",
100 "gcm_stats_recorder_impl.h",
101 ]
vchigrind853bed2015-01-13 08:31:18102 deps -= [ "//google_apis/gcm" ]
cjhopman11a68cb2014-10-13 22:47:54103 deps += [ "android:jni_headers" ]
[email protected]abd4b682014-07-16 20:26:30104 }
105}
106
peter245ad212015-07-09 11:30:59107# GYP version: components/gcm_driver.gypi:gcm_driver_test_support
brettweab63a52015-10-22 23:47:36108source_set("test_support") {
Brett Wilson0c8745a2014-09-08 22:59:49109 testonly = true
[email protected]abd4b682014-07-16 20:26:30110 sources = [
111 "fake_gcm_app_handler.cc",
112 "fake_gcm_app_handler.h",
113 "fake_gcm_client.cc",
114 "fake_gcm_client.h",
115 "fake_gcm_client_factory.cc",
116 "fake_gcm_client_factory.h",
117 "fake_gcm_driver.cc",
118 "fake_gcm_driver.h",
119 ]
120
brettweab63a52015-10-22 23:47:36121 public_deps = [
[email protected]abd4b682014-07-16 20:26:30122 ":gcm_driver",
brettweab63a52015-10-22 23:47:36123 ]
124 deps = [
[email protected]abd4b682014-07-16 20:26:30125 "//base",
peter245ad212015-07-09 11:30:59126 "//google_apis/gcm:test_support",
brettw2629c442015-11-26 02:42:19127 "//net",
[email protected]abd4b682014-07-16 20:26:30128 "//testing/gtest",
129 ]
130
131 if (is_android) {
132 sources -= [
133 "fake_gcm_client.cc",
134 "fake_gcm_client.h",
135 "fake_gcm_client_factory.cc",
136 "fake_gcm_client_factory.h",
137 ]
peter245ad212015-07-09 11:30:59138 deps -= [ "//google_apis/gcm:test_support" ]
[email protected]abd4b682014-07-16 20:26:30139 }
140}
peter245ad212015-07-09 11:30:59141
pkotwicz59272082015-10-29 19:29:14142source_set("unit_tests") {
143 testonly = true
144
145 sources = [
146 "gcm_account_tracker_unittest.cc",
147 ]
148
149 deps = [
150 ":gcm_driver",
151 ":test_support",
brettw2629c442015-11-26 02:42:19152 "//base",
153 "//base:prefs_test_support",
154 "//base/test:test_support",
155 "//google_apis:test_support",
156 "//google_apis/gcm:test_support",
157 "//net:test_support",
158 "//sync/protocol",
pkotwicz59272082015-10-29 19:29:14159 "//testing/gtest",
160 "//third_party/protobuf:protobuf_lite",
161 ]
162
163 if (!is_android) {
164 sources += [
agrieve2f114fc2015-07-14 22:18:35165 "gcm_account_mapper_unittest.cc",
166 "gcm_channel_status_request_unittest.cc",
167 "gcm_client_impl_unittest.cc",
168 "gcm_delayed_task_controller_unittest.cc",
169 "gcm_driver_desktop_unittest.cc",
170 "gcm_stats_recorder_impl_unittest.cc",
171 ]
agrieve2f114fc2015-07-14 22:18:35172 }
peter245ad212015-07-09 11:30:59173}