blob: 2e8524339ff0ec28202fc899ec5ab1d9a71e0181 [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",
jitendra.ks75541942015-11-03 20:17:5148 "gcm_profile_service.cc",
49 "gcm_profile_service.h",
[email protected]abd4b682014-07-16 20:26:3050 "gcm_stats_recorder_impl.cc",
51 "gcm_stats_recorder_impl.h",
jianli7a0c9b62015-05-26 23:24:4752 "registration_info.cc",
53 "registration_info.h",
[email protected]abd4b682014-07-16 20:26:3054 "system_encryptor.cc",
55 "system_encryptor.h",
56 ]
57
58 deps = [
peterbfa736e2015-07-28 16:19:5559 "crypto",
[email protected]abd4b682014-07-16 20:26:3060 "//base",
tfarina1df94042015-07-22 17:28:4661 "//components/gcm_driver/common",
[email protected]abd4b682014-07-16 20:26:3062 "//components/os_crypt",
jitendra.ksb1b7fee2015-09-22 17:42:5363 "//components/sync_driver",
[email protected]abd4b682014-07-16 20:26:3064 "//google_apis/gcm",
65 "//net",
fgorski3689f8d2014-10-09 04:39:3166 "//sync/protocol",
jitendra.ksb1b7fee2015-09-22 17:42:5367 "//url:url",
[email protected]abd4b682014-07-16 20:26:3068 ]
69
vchigrind853bed2015-01-13 08:31:1870 if (is_chromeos) {
71 deps += [ "//components/timers" ]
72 }
73
[email protected]abd4b682014-07-16 20:26:3074 if (is_android) {
75 sources -= [
fgorskid578c18b2014-09-24 23:40:1776 "gcm_account_mapper.cc",
77 "gcm_account_mapper.h",
jianli1235e51c2014-09-08 18:56:4178 "gcm_channel_status_request.cc",
79 "gcm_channel_status_request.h",
jianli2dc910b02014-09-19 02:42:4680 "gcm_channel_status_syncer.cc",
81 "gcm_channel_status_syncer.h",
[email protected]abd4b682014-07-16 20:26:3082 "gcm_client_factory.cc",
83 "gcm_client_factory.h",
84 "gcm_client_impl.cc",
85 "gcm_client_impl.h",
jitendra.ksb1b7fee2015-09-22 17:42:5386 "gcm_desktop_utils.cc",
87 "gcm_desktop_utils.h",
[email protected]abd4b682014-07-16 20:26:3088 "gcm_driver_desktop.cc",
89 "gcm_driver_desktop.h",
90 "gcm_stats_recorder_impl.cc",
91 "gcm_stats_recorder_impl.h",
92 ]
vchigrind853bed2015-01-13 08:31:1893 deps -= [ "//google_apis/gcm" ]
cjhopman11a68cb2014-10-13 22:47:5494 deps += [ "android:jni_headers" ]
[email protected]abd4b682014-07-16 20:26:3095 }
96}
97
peter245ad212015-07-09 11:30:5998# GYP version: components/gcm_driver.gypi:gcm_driver_test_support
brettweab63a52015-10-22 23:47:3699source_set("test_support") {
Brett Wilson0c8745a2014-09-08 22:59:49100 testonly = true
[email protected]abd4b682014-07-16 20:26:30101 sources = [
102 "fake_gcm_app_handler.cc",
103 "fake_gcm_app_handler.h",
104 "fake_gcm_client.cc",
105 "fake_gcm_client.h",
106 "fake_gcm_client_factory.cc",
107 "fake_gcm_client_factory.h",
108 "fake_gcm_driver.cc",
109 "fake_gcm_driver.h",
110 ]
111
brettweab63a52015-10-22 23:47:36112 public_deps = [
[email protected]abd4b682014-07-16 20:26:30113 ":gcm_driver",
brettweab63a52015-10-22 23:47:36114 ]
115 deps = [
[email protected]abd4b682014-07-16 20:26:30116 "//base",
peter245ad212015-07-09 11:30:59117 "//google_apis/gcm:test_support",
[email protected]abd4b682014-07-16 20:26:30118 "//testing/gtest",
119 ]
120
121 if (is_android) {
122 sources -= [
123 "fake_gcm_client.cc",
124 "fake_gcm_client.h",
125 "fake_gcm_client_factory.cc",
126 "fake_gcm_client_factory.h",
127 ]
peter245ad212015-07-09 11:30:59128 deps -= [ "//google_apis/gcm:test_support" ]
[email protected]abd4b682014-07-16 20:26:30129 }
130}
peter245ad212015-07-09 11:30:59131
pkotwicz59272082015-10-29 19:29:14132source_set("unit_tests") {
133 testonly = true
134
135 sources = [
136 "gcm_account_tracker_unittest.cc",
137 ]
138
139 deps = [
140 ":gcm_driver",
141 ":test_support",
142 "//testing/gtest",
143 "//third_party/protobuf:protobuf_lite",
144 ]
145
146 if (!is_android) {
147 sources += [
agrieve2f114fc2015-07-14 22:18:35148 "gcm_account_mapper_unittest.cc",
149 "gcm_channel_status_request_unittest.cc",
150 "gcm_client_impl_unittest.cc",
151 "gcm_delayed_task_controller_unittest.cc",
152 "gcm_driver_desktop_unittest.cc",
153 "gcm_stats_recorder_impl_unittest.cc",
154 ]
agrieve2f114fc2015-07-14 22:18:35155 }
peter245ad212015-07-09 11:30:59156}