Minor Cleanup for SafeBrowsingResourceThrottleFactory.
[chromium-blink-merge.git] / components / gcm_driver.gypi
blob3efdf2d21bacd3173f1a8eba1a1eea6b1296672e
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.
6   'targets': [
7     {
8       # GN version: //components/gcm_driver/common
9       'target_name': 'gcm_driver_common',
10       'type': '<(component)',
11       'include_dirs': [
12         '..',
13       ],
14       'defines': [
15         'GCM_DRIVER_IMPLEMENTATION',
16       ],
17       'sources': [
18          # Note: file list duplicated in GN build.
19         'gcm_driver/common/gcm_driver_export.h',
20         'gcm_driver/common/gcm_messages.cc',
21         'gcm_driver/common/gcm_messages.h',
22       ],
23     },
24     {
25       # GN version: //components/gcm_driver
26       'target_name': 'gcm_driver',
27       'type': 'static_library',
28       'dependencies': [
29         'gcm_driver_common',
30         'gcm_driver_crypto',
31         'os_crypt',
32         '../base/base.gyp:base',
33         '../google_apis/gcm/gcm.gyp:gcm',
34         '../net/net.gyp:net',
35         '../sync/sync.gyp:sync_proto',
36       ],
37       'include_dirs': [
38         '..',
39       ],
40       'sources': [
41          # Note: file list duplicated in GN build.
42         'gcm_driver/android/component_jni_registrar.cc',
43         'gcm_driver/android/component_jni_registrar.h',
44         'gcm_driver/default_gcm_app_handler.cc',
45         'gcm_driver/default_gcm_app_handler.h',
46         'gcm_driver/gcm_account_mapper.cc',
47         'gcm_driver/gcm_account_mapper.h',
48         'gcm_driver/gcm_activity.cc',
49         'gcm_driver/gcm_activity.h',
50         'gcm_driver/gcm_app_handler.cc',
51         'gcm_driver/gcm_app_handler.h',
52         'gcm_driver/gcm_backoff_policy.cc',
53         'gcm_driver/gcm_backoff_policy.h',
54         'gcm_driver/gcm_channel_status_request.cc',
55         'gcm_driver/gcm_channel_status_request.h',
56         'gcm_driver/gcm_channel_status_syncer.cc',
57         'gcm_driver/gcm_channel_status_syncer.h',
58         'gcm_driver/gcm_client.cc',
59         'gcm_driver/gcm_client.h',
60         'gcm_driver/gcm_client_factory.cc',
61         'gcm_driver/gcm_client_factory.h',
62         'gcm_driver/gcm_client_impl.cc',
63         'gcm_driver/gcm_client_impl.h',
64         'gcm_driver/gcm_connection_observer.cc',
65         'gcm_driver/gcm_connection_observer.h',
66         'gcm_driver/gcm_delayed_task_controller.cc',
67         'gcm_driver/gcm_delayed_task_controller.h',
68         'gcm_driver/gcm_driver.cc',
69         'gcm_driver/gcm_driver.h',
70         'gcm_driver/gcm_driver_android.cc',
71         'gcm_driver/gcm_driver_android.h',
72         'gcm_driver/gcm_driver_desktop.cc',
73         'gcm_driver/gcm_driver_desktop.h',
74         'gcm_driver/gcm_stats_recorder_impl.cc',
75         'gcm_driver/gcm_stats_recorder_impl.h',
76         'gcm_driver/registration_info.cc',
77         'gcm_driver/registration_info.h',
78         'gcm_driver/system_encryptor.cc',
79         'gcm_driver/system_encryptor.h',
80       ],
81       'conditions': [
82         ['OS == "android"', {
83           'dependencies': [
84             'gcm_driver_jni_headers',
85           ],
86           'dependencies!': [
87             '../google_apis/gcm/gcm.gyp:gcm',
88           ],
89           'sources!': [
90             'gcm_driver/gcm_account_mapper.cc',
91             'gcm_driver/gcm_account_mapper.h',
92             'gcm_driver/gcm_channel_status_request.cc',
93             'gcm_driver/gcm_channel_status_request.h',
94             'gcm_driver/gcm_channel_status_syncer.cc',
95             'gcm_driver/gcm_channel_status_syncer.h',
96             'gcm_driver/gcm_client_factory.cc',
97             'gcm_driver/gcm_client_factory.h',
98             'gcm_driver/gcm_client_impl.cc',
99             'gcm_driver/gcm_client_impl.h',
100             'gcm_driver/gcm_driver_desktop.cc',
101             'gcm_driver/gcm_driver_desktop.h',
102             'gcm_driver/gcm_stats_recorder_impl.cc',
103             'gcm_driver/gcm_stats_recorder_impl.h',
104           ],
105         }],
106         ['chromeos == 1', {
107           'dependencies': [
108             'timers',
109           ],
110         }],
111       ],
112     },
113     {
114       # GN version: //components/gcm_driver:test_support
115       'target_name': 'gcm_driver_test_support',
116       'type': 'static_library',
117       'dependencies': [
118         'gcm_driver',
119         '../base/base.gyp:base',
120         '../google_apis/gcm/gcm.gyp:gcm_test_support',
121         '../testing/gtest.gyp:gtest',
122       ],
123       'include_dirs': [
124         '..',
125       ],
126       'sources': [
127         # Note: file list duplicated in GN build.
128         'gcm_driver/fake_gcm_app_handler.cc',
129         'gcm_driver/fake_gcm_app_handler.h',
130         'gcm_driver/fake_gcm_client.cc',
131         'gcm_driver/fake_gcm_client.h',
132         'gcm_driver/fake_gcm_client_factory.cc',
133         'gcm_driver/fake_gcm_client_factory.h',
134         'gcm_driver/fake_gcm_driver.cc',
135         'gcm_driver/fake_gcm_driver.h',
136       ],
137       'conditions': [
138         ['OS == "android"', {
139           'dependencies!': [
140             '../google_apis/gcm/gcm.gyp:gcm_test_support',
141           ],
142           'sources!': [
143             'gcm_driver/fake_gcm_client.cc',
144             'gcm_driver/fake_gcm_client.h',
145             'gcm_driver/fake_gcm_client_factory.cc',
146             'gcm_driver/fake_gcm_client_factory.h',
147           ],
148         }],
149       ],
150     },
151     {
152       # GN version: //components/gcm_driver/instance_id
153       'target_name': 'instance_id',
154       'type': 'static_library',
155       'include_dirs': [
156         '..',
157       ],
158       'sources': [
159         # Note: file list duplicated in GN build.
160         'gcm_driver/instance_id/instance_id.cc',
161         'gcm_driver/instance_id/instance_id.h',
162         'gcm_driver/instance_id/instance_id_android.cc',
163         'gcm_driver/instance_id/instance_id_android.h',
164         'gcm_driver/instance_id/instance_id_driver.cc',
165         'gcm_driver/instance_id/instance_id_driver.h',
166         'gcm_driver/instance_id/instance_id_impl.cc',
167         'gcm_driver/instance_id/instance_id_impl.h',
168       ],
169       'conditions': [
170         ['OS == "android"', {
171           'sources!': [
172             'gcm_driver/instance_id/instance_id_impl.cc',
173             'gcm_driver/instance_id/instance_id_impl.h',
174           ],
175         }],
176       ],
177     },
178     {
179       # GN version: //components/gcm_driver/instance_id:test_support
180       'target_name': 'instance_id_test_support',
181       'type': 'static_library',
182       'dependencies': [
183         'gcm_driver_test_support',
184         'instance_id',
185         '../testing/gtest.gyp:gtest',
186       ],
187       'include_dirs': [
188         '..',
189       ],
190       'sources': [
191         # Note: file list duplicated in GN build.
192         'gcm_driver/instance_id/fake_gcm_driver_for_instance_id.cc',
193         'gcm_driver/instance_id/fake_gcm_driver_for_instance_id.h',
194       ],
195     },
196     {
197       # GN version: //components/gcm_driver/crypto
198       'target_name': 'gcm_driver_crypto',
199       'type': 'static_library',
200       'dependencies': [
201         'gcm_driver_crypto_proto',
202         '../base/base.gyp:base',
203         '../components/components.gyp:leveldb_proto',
204         '../crypto/crypto.gyp:crypto',
205       ],
206       'include_dirs': [
207         '..',
208       ],
209       'sources': [
210         # Note: file list duplicated in GN build.
211         'gcm_driver/crypto/gcm_encryption_provider.cc',
212         'gcm_driver/crypto/gcm_encryption_provider.h',
213         'gcm_driver/crypto/gcm_key_store.cc',
214         'gcm_driver/crypto/gcm_key_store.h',
215         'gcm_driver/crypto/gcm_message_cryptographer.cc',
216         'gcm_driver/crypto/gcm_message_cryptographer.h',
217         'gcm_driver/crypto/gcm_message_cryptographer_nss.cc',
218         'gcm_driver/crypto/gcm_message_cryptographer_openssl.cc',
219       ],
220       'conditions': [
221         ['use_openssl==1', {
222           'sources!': [
223             'gcm_driver/crypto/gcm_message_cryptographer_nss.cc',
224           ],
225           'dependencies': [
226             '../third_party/boringssl/boringssl.gyp:boringssl',
227           ],
228         }, {
229           'sources!': [
230             'gcm_driver/crypto/gcm_message_cryptographer_openssl.cc',
231           ],
232         }],
233       ],
234     },
235     {
236       # GN version: //components/gcm_driver/crypto/proto
237       'target_name': 'gcm_driver_crypto_proto',
238       'type': 'static_library',
239       'sources': [
240         'gcm_driver/crypto/proto/gcm_encryption_data.proto',
241       ],
242       'variables': {
243         'proto_in_dir': 'gcm_driver/crypto/proto',
244         'proto_out_dir': 'components/gcm_driver/crypto/proto',
245       },
246       'includes': [ '../build/protoc.gypi' ],
247     },
248   ],
249   'conditions': [
250     ['OS == "android"', {
251       'targets': [
252         {
253           # GN version: //components/gcm_driver/android:gcm_driver_java
254           'target_name': 'gcm_driver_java',
255           'type': 'none',
256           'dependencies': [
257             '../base/base.gyp:base',
258             # TODO(johnme): Fix the layering violation of depending on content/
259             '../content/content.gyp:content_java',
260             '../sync/sync.gyp:sync_java',
261           ],
262           'variables': {
263             'java_in_dir': 'gcm_driver/android/java',
264           },
265           'includes': [ '../build/java.gypi' ],
266         },
267         {
268           # GN version: //components/gcm_driver/android:jni_headers
269           'target_name': 'gcm_driver_jni_headers',
270           'type': 'none',
271           'sources': [
272             'gcm_driver/android/java/src/org/chromium/components/gcm_driver/GCMDriver.java',
273           ],
274           'variables': {
275             'jni_gen_package': 'components/gcm_driver',
276           },
277           'includes': [ '../build/jni_generator.gypi' ],
278         },
279       ],
280      },
281     ],
282   ],