Stack sampling profiler: add fire-and-forget interface
[chromium-blink-merge.git] / components / gcm_driver / BUILD.gn
blobe212080083d7eecd04e518e762ebe48acb4b5e1a
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.
5 # GYP version: components/gcm_driver.gypi:gcm_driver
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",
12     "gcm_account_mapper.cc",
13     "gcm_account_mapper.h",
14     "gcm_activity.cc",
15     "gcm_activity.h",
16     "gcm_app_handler.cc",
17     "gcm_app_handler.h",
18     "gcm_backoff_policy.cc",
19     "gcm_backoff_policy.h",
20     "gcm_channel_status_request.cc",
21     "gcm_channel_status_request.h",
22     "gcm_channel_status_syncer.cc",
23     "gcm_channel_status_syncer.h",
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",
30     "gcm_connection_observer.cc",
31     "gcm_connection_observer.h",
32     "gcm_delayed_task_controller.cc",
33     "gcm_delayed_task_controller.h",
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",
42     "registration_info.cc",
43     "registration_info.h",
44     "system_encryptor.cc",
45     "system_encryptor.h",
46   ]
48   deps = [
49     "crypto",
50     "//base",
51     "//components/gcm_driver/common",
52     "//components/os_crypt",
53     "//google_apis/gcm",
54     "//net",
55     "//sync/protocol",
56   ]
58   if (is_chromeos) {
59     deps += [ "//components/timers" ]
60   }
62   if (is_android) {
63     sources -= [
64       "gcm_account_mapper.cc",
65       "gcm_account_mapper.h",
66       "gcm_channel_status_request.cc",
67       "gcm_channel_status_request.h",
68       "gcm_channel_status_syncer.cc",
69       "gcm_channel_status_syncer.h",
70       "gcm_client_factory.cc",
71       "gcm_client_factory.h",
72       "gcm_client_impl.cc",
73       "gcm_client_impl.h",
74       "gcm_driver_desktop.cc",
75       "gcm_driver_desktop.h",
76       "gcm_stats_recorder_impl.cc",
77       "gcm_stats_recorder_impl.h",
78     ]
79     deps -= [ "//google_apis/gcm" ]
80     deps += [ "android:jni_headers" ]
81   }
84 # GYP version: components/gcm_driver.gypi:gcm_driver_test_support
85 static_library("test_support") {
86   testonly = true
87   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   ]
98   deps = [
99     ":gcm_driver",
100     "//base",
101     "//google_apis/gcm:test_support",
102     "//testing/gtest",
103   ]
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     ]
112     deps -= [ "//google_apis/gcm:test_support" ]
113   }
116 if (!is_android) {
117   source_set("unit_tests") {
118     testonly = true
119     sources = [
120       "gcm_account_mapper_unittest.cc",
121       "gcm_channel_status_request_unittest.cc",
122       "gcm_client_impl_unittest.cc",
123       "gcm_delayed_task_controller_unittest.cc",
124       "gcm_driver_desktop_unittest.cc",
125       "gcm_stats_recorder_impl_unittest.cc",
126     ]
128     deps = [
129       ":gcm_driver",
130       ":test_support",
131       "//testing/gtest",
132       "//third_party/protobuf:protobuf_lite",
133     ]
134   }