blob: 2b471182fdc50c27d4d05c03f38e298a21319139 [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",
satoruxea51ccc2015-02-16 10:14:2414 "gcm_activity.cc",
15 "gcm_activity.h",
[email protected]abd4b682014-07-16 20:26:3016 "gcm_app_handler.cc",
17 "gcm_app_handler.h",
jianli1235e51c2014-09-08 18:56:4118 "gcm_backoff_policy.cc",
19 "gcm_backoff_policy.h",
20 "gcm_channel_status_request.cc",
21 "gcm_channel_status_request.h",
jianli2dc910b02014-09-19 02:42:4622 "gcm_channel_status_syncer.cc",
23 "gcm_channel_status_syncer.h",
[email protected]abd4b682014-07-16 20:26:3024 "gcm_client.cc",
25 "gcm_client.h",
26 "gcm_client_factory.cc",
27 "gcm_client_factory.h",
28 "gcm_client_impl.cc",
29 "gcm_client_impl.h",
Brett Wilson83fd4242014-09-02 19:45:3330 "gcm_connection_observer.cc",
31 "gcm_connection_observer.h",
fgorski05d507c2014-09-10 17:28:1032 "gcm_delayed_task_controller.cc",
33 "gcm_delayed_task_controller.h",
[email protected]abd4b682014-07-16 20:26:3034 "gcm_driver.cc",
35 "gcm_driver.h",
36 "gcm_driver_android.cc",
37 "gcm_driver_android.h",
38 "gcm_driver_desktop.cc",
39 "gcm_driver_desktop.h",
40 "gcm_stats_recorder_impl.cc",
41 "gcm_stats_recorder_impl.h",
jianli7a0c9b62015-05-26 23:24:4742 "registration_info.cc",
43 "registration_info.h",
[email protected]abd4b682014-07-16 20:26:3044 "system_encryptor.cc",
45 "system_encryptor.h",
46 ]
47
48 deps = [
49 "//base",
50 "//components/os_crypt",
51 "//google_apis/gcm",
52 "//net",
fgorski3689f8d2014-10-09 04:39:3153 "//sync/protocol",
[email protected]abd4b682014-07-16 20:26:3054 ]
55
vchigrind853bed2015-01-13 08:31:1856 if (is_chromeos) {
57 deps += [ "//components/timers" ]
58 }
59
[email protected]abd4b682014-07-16 20:26:3060 if (is_android) {
61 sources -= [
fgorskid578c18b2014-09-24 23:40:1762 "gcm_account_mapper.cc",
63 "gcm_account_mapper.h",
jianli1235e51c2014-09-08 18:56:4164 "gcm_channel_status_request.cc",
65 "gcm_channel_status_request.h",
jianli2dc910b02014-09-19 02:42:4666 "gcm_channel_status_syncer.cc",
67 "gcm_channel_status_syncer.h",
[email protected]abd4b682014-07-16 20:26:3068 "gcm_client_factory.cc",
69 "gcm_client_factory.h",
70 "gcm_client_impl.cc",
71 "gcm_client_impl.h",
fgorski05d507c2014-09-10 17:28:1072 "gcm_delayed_task_controller.cc",
73 "gcm_delayed_task_controller.h",
[email protected]abd4b682014-07-16 20:26:3074 "gcm_driver_desktop.cc",
75 "gcm_driver_desktop.h",
76 "gcm_stats_recorder_impl.cc",
77 "gcm_stats_recorder_impl.h",
78 ]
vchigrind853bed2015-01-13 08:31:1879 deps -= [ "//google_apis/gcm" ]
cjhopman11a68cb2014-10-13 22:47:5480 deps += [ "android:jni_headers" ]
[email protected]abd4b682014-07-16 20:26:3081 }
82}
83
peter245ad212015-07-09 11:30:5984# GYP version: components/gcm_driver.gypi:gcm_driver_test_support
[email protected]abd4b682014-07-16 20:26:3085static_library("test_support") {
Brett Wilson0c8745a2014-09-08 22:59:4986 testonly = true
[email protected]abd4b682014-07-16 20:26:3087 sources = [
88 "fake_gcm_app_handler.cc",
89 "fake_gcm_app_handler.h",
90 "fake_gcm_client.cc",
91 "fake_gcm_client.h",
92 "fake_gcm_client_factory.cc",
93 "fake_gcm_client_factory.h",
94 "fake_gcm_driver.cc",
95 "fake_gcm_driver.h",
96 ]
97
98 deps = [
99 ":gcm_driver",
100 "//base",
peter245ad212015-07-09 11:30:59101 "//google_apis/gcm:test_support",
[email protected]abd4b682014-07-16 20:26:30102 "//testing/gtest",
103 ]
104
105 if (is_android) {
106 sources -= [
107 "fake_gcm_client.cc",
108 "fake_gcm_client.h",
109 "fake_gcm_client_factory.cc",
110 "fake_gcm_client_factory.h",
111 ]
peter245ad212015-07-09 11:30:59112 deps -= [ "//google_apis/gcm:test_support" ]
[email protected]abd4b682014-07-16 20:26:30113 }
114}
peter245ad212015-07-09 11:30:59115
116source_set("unit_tests") {
117 testonly = true
118 sources = [
119 "gcm_account_mapper_unittest.cc",
120 "gcm_channel_status_request_unittest.cc",
121 "gcm_client_impl_unittest.cc",
122 "gcm_delayed_task_controller_unittest.cc",
123 "gcm_driver_desktop_unittest.cc",
124 "gcm_stats_recorder_impl_unittest.cc",
125 ]
126
127 deps = [
128 ":gcm_driver",
129 ":test_support",
130 "//testing/gtest",
131 "//third_party/protobuf:protobuf_lite",
132 ]
133}