cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / components / metrics / BUILD.gn
blobbfae327cbe49841008ff02bd8746472ef94daeb0
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/metrics.gypi:metrics
6 source_set("metrics") {
7   sources = [
8     "call_stack_profile_metrics_provider.cc",
9     "call_stack_profile_metrics_provider.h",
10     "clean_exit_beacon.cc",
11     "clean_exit_beacon.h",
12     "client_info.cc",
13     "client_info.h",
14     "cloned_install_detector.cc",
15     "cloned_install_detector.h",
16     "daily_event.cc",
17     "daily_event.h",
18     "drive_metrics_provider.cc",
19     "drive_metrics_provider.h",
20     "drive_metrics_provider_android.cc",
21     "drive_metrics_provider_ios.mm",
22     "drive_metrics_provider_linux.cc",
23     "drive_metrics_provider_mac.mm",
24     "drive_metrics_provider_win.cc",
25     "histogram_encoder.cc",
26     "histogram_encoder.h",
27     "machine_id_provider.h",
28     "machine_id_provider_stub.cc",
29     "machine_id_provider_win.cc",
30     "metrics_hashes.cc",
31     "metrics_hashes.h",
32     "metrics_log.cc",
33     "metrics_log.h",
34     "metrics_log_manager.cc",
35     "metrics_log_manager.h",
36     "metrics_log_uploader.cc",
37     "metrics_log_uploader.h",
38     "metrics_pref_names.cc",
39     "metrics_pref_names.h",
40     "metrics_provider.cc",
41     "metrics_provider.h",
42     "metrics_reporting_scheduler.cc",
43     "metrics_reporting_scheduler.h",
44     "metrics_service.cc",
45     "metrics_service.h",
46     "metrics_service_accessor.cc",
47     "metrics_service_accessor.h",
48     "metrics_service_client.cc",
49     "metrics_service_client.h",
50     "metrics_state_manager.cc",
51     "metrics_state_manager.h",
52     "metrics_switches.cc",
53     "metrics_switches.h",
54     "persisted_logs.cc",
55     "persisted_logs.h",
56     "url_constants.cc",
57     "url_constants.h",
58   ]
60   public_deps = [
61     "//components/metrics/proto",
62   ]
63   deps = [
64     "//base",
65     "//base:i18n",
66     "//base:prefs",
67     "//components/compression",
68     "//components/variations",
69   ]
71   if (is_chromeos) {
72     deps += [ ":serialization" ]
73   }
75   if (is_win) {
76     sources -= [ "machine_id_provider_stub.cc" ]
77   }
80 if (!is_ios) {
81   # GYP version: components/metrics.gypi:metrics_gpu
82   source_set("gpu") {
83     sources = [
84       "gpu/gpu_metrics_provider.cc",
85       "gpu/gpu_metrics_provider.h",
86     ]
88     public_deps = [
89       ":metrics",
90     ]
91     deps = [
92       "//base",
93       "//content/public/browser",
94       "//gpu/config",
95       "//ui/gfx",
96     ]
97   }
100 # GYP version: components/metrics.gypi:metrics_net
101 static_library("net") {
102   sources = [
103     "net/net_metrics_log_uploader.cc",
104     "net/net_metrics_log_uploader.h",
105     "net/network_metrics_provider.cc",
106     "net/network_metrics_provider.h",
107     "net/wifi_access_point_info_provider.cc",
108     "net/wifi_access_point_info_provider.h",
109     "net/wifi_access_point_info_provider_chromeos.cc",
110     "net/wifi_access_point_info_provider_chromeos.h",
111   ]
113   public_deps = [
114     ":metrics",
115   ]
116   deps = [
117     "//base",
118     "//net",
119     "//url",
120   ]
123 if (!is_ios) {
124   # GYP version: components/metrics.gypi:metrics_profiler
125   source_set("profiler") {
126     sources = [
127       "profiler/profiler_metrics_provider.cc",
128       "profiler/profiler_metrics_provider.h",
129       "profiler/tracking_synchronizer.cc",
130       "profiler/tracking_synchronizer.h",
131       "profiler/tracking_synchronizer_observer.cc",
132       "profiler/tracking_synchronizer_observer.h",
133     ]
135     public_deps = [
136       ":metrics",
137     ]
138     deps = [
139       "//base",
140       "//components/variations",
141       "//content/public/browser",
142       "//content/public/common",
143     ]
144   }
147 # GYP version: components/metrics.gypi:metrics_test_support
148 source_set("test_support") {
149   sources = [
150     "test_metrics_provider.cc",
151     "test_metrics_provider.h",
152     "test_metrics_service_client.cc",
153     "test_metrics_service_client.h",
154   ]
156   public_deps = [
157     ":metrics",
158   ]
159   deps = [
160     "//base",
161   ]
164 if (is_linux) {
165   # GYP version: components/metrics.gypi:metrics_serialization
166   source_set("serialization") {
167     sources = [
168       "serialization/metric_sample.cc",
169       "serialization/metric_sample.h",
170       "serialization/serialization_utils.cc",
171       "serialization/serialization_utils.h",
172     ]
173     deps = [
174       "//base",
175     ]
176   }
179 source_set("unit_tests") {
180   testonly = true
181   sources = [
182     "call_stack_profile_metrics_provider_unittest.cc",
183     "daily_event_unittest.cc",
184     "drive_metrics_provider_unittest.cc",
185     "histogram_encoder_unittest.cc",
186     "machine_id_provider_win_unittest.cc",
187     "metrics_hashes_unittest.cc",
188     "metrics_log_manager_unittest.cc",
189     "metrics_log_unittest.cc",
190     "metrics_reporting_scheduler_unittest.cc",
191     "metrics_service_unittest.cc",
192     "metrics_state_manager_unittest.cc",
193     "net/net_metrics_log_uploader_unittest.cc",
194     "persisted_logs_unittest.cc",
195   ]
197   deps = [
198     ":metrics",
199     ":net",
200     ":test_support",
201     "//base:prefs_test_support",
202     "//base/test:test_support",
203     "//components/variations",
204     "//testing/gtest",
205   ]
207   if (is_linux) {
208     sources += [ "serialization/serialization_utils_unittest.cc" ]
209     deps += [ ":serialization" ]
210   }
212   if (!is_ios) {
213     sources += [
214       "gpu/gpu_metrics_provider_unittest.cc",
215       "profiler/profiler_metrics_provider_unittest.cc",
216       "profiler/tracking_synchronizer_unittest.cc",
217     ]
218     deps += [
219       ":gpu",
220       ":profiler",
221       "//content/public/common",
222     ]
223   }
225 # TODO(GYP): metrics_chromeos