Revert "Fix broken channel icon in chrome://help on CrOS" and try again
[chromium-blink-merge.git] / components / metrics / BUILD.gn
blob114fc3dad8732a8b4564d6c1cb4b7db3a65357ea
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 # GYP version: components/metrics.gypi:metrics_gpu
81 source_set("gpu") {
82   sources = [
83     "gpu/gpu_metrics_provider.cc",
84     "gpu/gpu_metrics_provider.h",
85   ]
87   public_deps = [
88     ":metrics",
89   ]
90   deps = [
91     "//base",
92     "//content/public/browser",
93     "//gpu/config",
94     "//ui/gfx",
95   ]
98 # GYP version: components/metrics.gypi:metrics_net
99 static_library("net") {
100   sources = [
101     "net/net_metrics_log_uploader.cc",
102     "net/net_metrics_log_uploader.h",
103     "net/network_metrics_provider.cc",
104     "net/network_metrics_provider.h",
105     "net/wifi_access_point_info_provider.cc",
106     "net/wifi_access_point_info_provider.h",
107     "net/wifi_access_point_info_provider_chromeos.cc",
108     "net/wifi_access_point_info_provider_chromeos.h",
109   ]
111   public_deps = [
112     ":metrics",
113   ]
114   deps = [
115     "//base",
116     "//net",
117     "//url",
118   ]
121 # GYP version: components/metrics.gypi:metrics_profiler
122 source_set("profiler") {
123   sources = [
124     "profiler/profiler_metrics_provider.cc",
125     "profiler/profiler_metrics_provider.h",
126     "profiler/tracking_synchronizer.cc",
127     "profiler/tracking_synchronizer.h",
128     "profiler/tracking_synchronizer_observer.cc",
129     "profiler/tracking_synchronizer_observer.h",
130   ]
132   public_deps = [
133     ":metrics",
134   ]
135   deps = [
136     "//base",
137     "//components/variations",
138     "//content/public/browser",
139     "//content/public/common",
140   ]
143 # GYP version: components/metrics.gypi:metrics_test_support
144 source_set("test_support") {
145   sources = [
146     "test_metrics_provider.cc",
147     "test_metrics_provider.h",
148     "test_metrics_service_client.cc",
149     "test_metrics_service_client.h",
150   ]
152   public_deps = [
153     ":metrics",
154   ]
155   deps = [
156     "//base",
157   ]
160 if (is_linux) {
161   # GYP version: components/metrics.gypi:metrics_serialization
162   source_set("serialization") {
163     sources = [
164       "serialization/metric_sample.cc",
165       "serialization/metric_sample.h",
166       "serialization/serialization_utils.cc",
167       "serialization/serialization_utils.h",
168     ]
169     deps = [
170       "//base",
171     ]
172   }
175 source_set("unit_tests") {
176   testonly = true
177   sources = [
178     "call_stack_profile_metrics_provider_unittest.cc",
179     "daily_event_unittest.cc",
180     "drive_metrics_provider_unittest.cc",
181     "gpu/gpu_metrics_provider_unittest.cc",
182     "histogram_encoder_unittest.cc",
183     "machine_id_provider_win_unittest.cc",
184     "metrics_hashes_unittest.cc",
185     "metrics_log_manager_unittest.cc",
186     "metrics_log_unittest.cc",
187     "metrics_reporting_scheduler_unittest.cc",
188     "metrics_service_unittest.cc",
189     "metrics_state_manager_unittest.cc",
190     "net/net_metrics_log_uploader_unittest.cc",
191     "persisted_logs_unittest.cc",
192     "profiler/profiler_metrics_provider_unittest.cc",
193     "profiler/tracking_synchronizer_unittest.cc",
194   ]
196   deps = [
197     ":gpu",
198     ":metrics",
199     ":net",
200     ":profiler",
201     ":test_support",
202     "//base:prefs_test_support",
203     "//base/test:test_support",
204     "//components/variations",
205     "//content/public/common",
206     "//testing/gtest",
207   ]
209   if (is_linux) {
210     sources += [ "serialization/serialization_utils_unittest.cc" ]
211     deps += [ ":serialization" ]
212   }
214 # TODO(GYP): metrics_chromeos