[email protected] | abd4b68 | 2014-07-16 20:26:30 | [diff] [blame] | 1 | # 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 Robinson | 2ed4d69 | 2014-09-17 05:20:58 | [diff] [blame] | 5 | # GYP version: components/gcm_driver.gypi:gcm_driver |
[email protected] | abd4b68 | 2014-07-16 20:26:30 | [diff] [blame] | 6 | static_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", |
fgorski | d578c18b | 2014-09-24 23:40:17 | [diff] [blame] | 12 | "gcm_account_mapper.cc", |
| 13 | "gcm_account_mapper.h", |
satorux | ea51ccc | 2015-02-16 10:14:24 | [diff] [blame] | 14 | "gcm_activity.cc", |
| 15 | "gcm_activity.h", |
[email protected] | abd4b68 | 2014-07-16 20:26:30 | [diff] [blame] | 16 | "gcm_app_handler.cc", |
| 17 | "gcm_app_handler.h", |
jianli | 1235e51c | 2014-09-08 18:56:41 | [diff] [blame] | 18 | "gcm_backoff_policy.cc", |
| 19 | "gcm_backoff_policy.h", |
| 20 | "gcm_channel_status_request.cc", |
| 21 | "gcm_channel_status_request.h", |
jianli | 2dc910b0 | 2014-09-19 02:42:46 | [diff] [blame] | 22 | "gcm_channel_status_syncer.cc", |
| 23 | "gcm_channel_status_syncer.h", |
[email protected] | abd4b68 | 2014-07-16 20:26:30 | [diff] [blame] | 24 | "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 Wilson | 83fd424 | 2014-09-02 19:45:33 | [diff] [blame] | 30 | "gcm_connection_observer.cc", |
| 31 | "gcm_connection_observer.h", |
fgorski | 05d507c | 2014-09-10 17:28:10 | [diff] [blame] | 32 | "gcm_delayed_task_controller.cc", |
| 33 | "gcm_delayed_task_controller.h", |
[email protected] | abd4b68 | 2014-07-16 20:26:30 | [diff] [blame] | 34 | "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", |
jianli | 7a0c9b6 | 2015-05-26 23:24:47 | [diff] [blame] | 42 | "registration_info.cc", |
| 43 | "registration_info.h", |
[email protected] | abd4b68 | 2014-07-16 20:26:30 | [diff] [blame] | 44 | "system_encryptor.cc", |
| 45 | "system_encryptor.h", |
| 46 | ] |
| 47 | |
| 48 | deps = [ |
| 49 | "//base", |
tfarina | 1df9404 | 2015-07-22 17:28:46 | [diff] [blame^] | 50 | "//components/gcm_driver/common", |
[email protected] | abd4b68 | 2014-07-16 20:26:30 | [diff] [blame] | 51 | "//components/os_crypt", |
| 52 | "//google_apis/gcm", |
| 53 | "//net", |
fgorski | 3689f8d | 2014-10-09 04:39:31 | [diff] [blame] | 54 | "//sync/protocol", |
[email protected] | abd4b68 | 2014-07-16 20:26:30 | [diff] [blame] | 55 | ] |
| 56 | |
vchigrin | d853bed | 2015-01-13 08:31:18 | [diff] [blame] | 57 | if (is_chromeos) { |
| 58 | deps += [ "//components/timers" ] |
| 59 | } |
| 60 | |
[email protected] | abd4b68 | 2014-07-16 20:26:30 | [diff] [blame] | 61 | if (is_android) { |
| 62 | sources -= [ |
fgorski | d578c18b | 2014-09-24 23:40:17 | [diff] [blame] | 63 | "gcm_account_mapper.cc", |
| 64 | "gcm_account_mapper.h", |
jianli | 1235e51c | 2014-09-08 18:56:41 | [diff] [blame] | 65 | "gcm_channel_status_request.cc", |
| 66 | "gcm_channel_status_request.h", |
jianli | 2dc910b0 | 2014-09-19 02:42:46 | [diff] [blame] | 67 | "gcm_channel_status_syncer.cc", |
| 68 | "gcm_channel_status_syncer.h", |
[email protected] | abd4b68 | 2014-07-16 20:26:30 | [diff] [blame] | 69 | "gcm_client_factory.cc", |
| 70 | "gcm_client_factory.h", |
| 71 | "gcm_client_impl.cc", |
| 72 | "gcm_client_impl.h", |
| 73 | "gcm_driver_desktop.cc", |
| 74 | "gcm_driver_desktop.h", |
| 75 | "gcm_stats_recorder_impl.cc", |
| 76 | "gcm_stats_recorder_impl.h", |
| 77 | ] |
vchigrin | d853bed | 2015-01-13 08:31:18 | [diff] [blame] | 78 | deps -= [ "//google_apis/gcm" ] |
cjhopman | 11a68cb | 2014-10-13 22:47:54 | [diff] [blame] | 79 | deps += [ "android:jni_headers" ] |
[email protected] | abd4b68 | 2014-07-16 20:26:30 | [diff] [blame] | 80 | } |
| 81 | } |
| 82 | |
peter | 245ad21 | 2015-07-09 11:30:59 | [diff] [blame] | 83 | # GYP version: components/gcm_driver.gypi:gcm_driver_test_support |
[email protected] | abd4b68 | 2014-07-16 20:26:30 | [diff] [blame] | 84 | static_library("test_support") { |
Brett Wilson | 0c8745a | 2014-09-08 22:59:49 | [diff] [blame] | 85 | testonly = true |
[email protected] | abd4b68 | 2014-07-16 20:26:30 | [diff] [blame] | 86 | sources = [ |
| 87 | "fake_gcm_app_handler.cc", |
| 88 | "fake_gcm_app_handler.h", |
| 89 | "fake_gcm_client.cc", |
| 90 | "fake_gcm_client.h", |
| 91 | "fake_gcm_client_factory.cc", |
| 92 | "fake_gcm_client_factory.h", |
| 93 | "fake_gcm_driver.cc", |
| 94 | "fake_gcm_driver.h", |
| 95 | ] |
| 96 | |
| 97 | deps = [ |
| 98 | ":gcm_driver", |
| 99 | "//base", |
peter | 245ad21 | 2015-07-09 11:30:59 | [diff] [blame] | 100 | "//google_apis/gcm:test_support", |
[email protected] | abd4b68 | 2014-07-16 20:26:30 | [diff] [blame] | 101 | "//testing/gtest", |
| 102 | ] |
| 103 | |
| 104 | if (is_android) { |
| 105 | sources -= [ |
| 106 | "fake_gcm_client.cc", |
| 107 | "fake_gcm_client.h", |
| 108 | "fake_gcm_client_factory.cc", |
| 109 | "fake_gcm_client_factory.h", |
| 110 | ] |
peter | 245ad21 | 2015-07-09 11:30:59 | [diff] [blame] | 111 | deps -= [ "//google_apis/gcm:test_support" ] |
[email protected] | abd4b68 | 2014-07-16 20:26:30 | [diff] [blame] | 112 | } |
| 113 | } |
peter | 245ad21 | 2015-07-09 11:30:59 | [diff] [blame] | 114 | |
agrieve | 2f114fc | 2015-07-14 22:18:35 | [diff] [blame] | 115 | if (!is_android) { |
| 116 | source_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 | ] |
peter | 245ad21 | 2015-07-09 11:30:59 | [diff] [blame] | 126 | |
agrieve | 2f114fc | 2015-07-14 22:18:35 | [diff] [blame] | 127 | deps = [ |
| 128 | ":gcm_driver", |
| 129 | ":test_support", |
| 130 | "//testing/gtest", |
| 131 | "//third_party/protobuf:protobuf_lite", |
| 132 | ] |
| 133 | } |
peter | 245ad21 | 2015-07-09 11:30:59 | [diff] [blame] | 134 | } |