blob: b009eac44ee636fec6a9a15df990be3240312197 [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",
42 "gcm_driver_desktop.cc",
43 "gcm_driver_desktop.h",
drogere89640c42015-09-15 18:57:4144 "gcm_internals_constants.cc",
45 "gcm_internals_constants.h",
[email protected]abd4b682014-07-16 20:26:3046 "gcm_stats_recorder_impl.cc",
47 "gcm_stats_recorder_impl.h",
jianli7a0c9b62015-05-26 23:24:4748 "registration_info.cc",
49 "registration_info.h",
[email protected]abd4b682014-07-16 20:26:3050 "system_encryptor.cc",
51 "system_encryptor.h",
52 ]
53
54 deps = [
peterbfa736e2015-07-28 16:19:5555 "crypto",
[email protected]abd4b682014-07-16 20:26:3056 "//base",
tfarina1df94042015-07-22 17:28:4657 "//components/gcm_driver/common",
[email protected]abd4b682014-07-16 20:26:3058 "//components/os_crypt",
jitendra.ksb1b7fee2015-09-22 17:42:5359 "//components/sync_driver",
[email protected]abd4b682014-07-16 20:26:3060 "//google_apis/gcm",
61 "//net",
fgorski3689f8d2014-10-09 04:39:3162 "//sync/protocol",
jitendra.ksb1b7fee2015-09-22 17:42:5363 "//url:url",
[email protected]abd4b682014-07-16 20:26:3064 ]
65
vchigrind853bed2015-01-13 08:31:1866 if (is_chromeos) {
67 deps += [ "//components/timers" ]
68 }
69
[email protected]abd4b682014-07-16 20:26:3070 if (is_android) {
71 sources -= [
fgorskid578c18b2014-09-24 23:40:1772 "gcm_account_mapper.cc",
73 "gcm_account_mapper.h",
jianli1235e51c2014-09-08 18:56:4174 "gcm_channel_status_request.cc",
75 "gcm_channel_status_request.h",
jianli2dc910b02014-09-19 02:42:4676 "gcm_channel_status_syncer.cc",
77 "gcm_channel_status_syncer.h",
[email protected]abd4b682014-07-16 20:26:3078 "gcm_client_factory.cc",
79 "gcm_client_factory.h",
80 "gcm_client_impl.cc",
81 "gcm_client_impl.h",
jitendra.ksb1b7fee2015-09-22 17:42:5382 "gcm_desktop_utils.cc",
83 "gcm_desktop_utils.h",
[email protected]abd4b682014-07-16 20:26:3084 "gcm_driver_desktop.cc",
85 "gcm_driver_desktop.h",
86 "gcm_stats_recorder_impl.cc",
87 "gcm_stats_recorder_impl.h",
88 ]
vchigrind853bed2015-01-13 08:31:1889 deps -= [ "//google_apis/gcm" ]
cjhopman11a68cb2014-10-13 22:47:5490 deps += [ "android:jni_headers" ]
[email protected]abd4b682014-07-16 20:26:3091 }
92}
93
peter245ad212015-07-09 11:30:5994# GYP version: components/gcm_driver.gypi:gcm_driver_test_support
brettweab63a52015-10-22 23:47:3695source_set("test_support") {
Brett Wilson0c8745a2014-09-08 22:59:4996 testonly = true
[email protected]abd4b682014-07-16 20:26:3097 sources = [
98 "fake_gcm_app_handler.cc",
99 "fake_gcm_app_handler.h",
100 "fake_gcm_client.cc",
101 "fake_gcm_client.h",
102 "fake_gcm_client_factory.cc",
103 "fake_gcm_client_factory.h",
104 "fake_gcm_driver.cc",
105 "fake_gcm_driver.h",
106 ]
107
brettweab63a52015-10-22 23:47:36108 public_deps = [
[email protected]abd4b682014-07-16 20:26:30109 ":gcm_driver",
brettweab63a52015-10-22 23:47:36110 ]
111 deps = [
[email protected]abd4b682014-07-16 20:26:30112 "//base",
peter245ad212015-07-09 11:30:59113 "//google_apis/gcm:test_support",
[email protected]abd4b682014-07-16 20:26:30114 "//testing/gtest",
115 ]
116
117 if (is_android) {
118 sources -= [
119 "fake_gcm_client.cc",
120 "fake_gcm_client.h",
121 "fake_gcm_client_factory.cc",
122 "fake_gcm_client_factory.h",
123 ]
peter245ad212015-07-09 11:30:59124 deps -= [ "//google_apis/gcm:test_support" ]
[email protected]abd4b682014-07-16 20:26:30125 }
126}
peter245ad212015-07-09 11:30:59127
pkotwicz59272082015-10-29 19:29:14128source_set("unit_tests") {
129 testonly = true
130
131 sources = [
132 "gcm_account_tracker_unittest.cc",
133 ]
134
135 deps = [
136 ":gcm_driver",
137 ":test_support",
138 "//testing/gtest",
139 "//third_party/protobuf:protobuf_lite",
140 ]
141
142 if (!is_android) {
143 sources += [
agrieve2f114fc2015-07-14 22:18:35144 "gcm_account_mapper_unittest.cc",
145 "gcm_channel_status_request_unittest.cc",
146 "gcm_client_impl_unittest.cc",
147 "gcm_delayed_task_controller_unittest.cc",
148 "gcm_driver_desktop_unittest.cc",
149 "gcm_stats_recorder_impl_unittest.cc",
150 ]
agrieve2f114fc2015-07-14 22:18:35151 }
peter245ad212015-07-09 11:30:59152}