ipc: Add the class HandleWin.
[chromium-blink-merge.git] / components / metrics / BUILD.gn
blob58e88bff883ce90998ffd90c6d4864a4d232ea1a
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     "compression_utils.cc",
17     "compression_utils.h",
18     "daily_event.cc",
19     "daily_event.h",
20     "drive_metrics_provider.cc",
21     "drive_metrics_provider.h",
22     "drive_metrics_provider_android.cc",
23     "drive_metrics_provider_ios.mm",
24     "drive_metrics_provider_linux.cc",
25     "drive_metrics_provider_mac.mm",
26     "drive_metrics_provider_win.cc",
27     "histogram_encoder.cc",
28     "histogram_encoder.h",
29     "machine_id_provider.h",
30     "machine_id_provider_stub.cc",
31     "machine_id_provider_win.cc",
32     "metrics_hashes.cc",
33     "metrics_hashes.h",
34     "metrics_log.cc",
35     "metrics_log.h",
36     "metrics_log_manager.cc",
37     "metrics_log_manager.h",
38     "metrics_log_uploader.cc",
39     "metrics_log_uploader.h",
40     "metrics_pref_names.cc",
41     "metrics_pref_names.h",
42     "metrics_provider.cc",
43     "metrics_provider.h",
44     "metrics_reporting_scheduler.cc",
45     "metrics_reporting_scheduler.h",
46     "metrics_service.cc",
47     "metrics_service.h",
48     "metrics_service_accessor.cc",
49     "metrics_service_accessor.h",
50     "metrics_service_client.cc",
51     "metrics_service_client.h",
52     "metrics_state_manager.cc",
53     "metrics_state_manager.h",
54     "metrics_switches.cc",
55     "metrics_switches.h",
56     "persisted_logs.cc",
57     "persisted_logs.h",
58     "url_constants.cc",
59     "url_constants.h",
60   ]
62   public_deps = [
63     "//components/metrics/proto",
64   ]
65   deps = [
66     "//base",
67     "//base:i18n",
68     "//base:prefs",
69     "//components/variations",
70     "//third_party/zlib",
71   ]
73   if (is_chromeos) {
74     deps += [ ":serialization" ]
75   }
77   if (is_win) {
78     sources -= [ "machine_id_provider_stub.cc" ]
79   }
82 # GYP version: components/metrics.gypi:metrics_gpu
83 source_set("gpu") {
84   sources = [
85     "gpu/gpu_metrics_provider.cc",
86     "gpu/gpu_metrics_provider.h",
87   ]
89   public_deps = [
90     ":metrics",
91   ]
92   deps = [
93     "//base",
94     "//content/public/browser",
95     "//gpu/config",
96     "//ui/gfx",
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 # GYP version: components/metrics.gypi:metrics_profiler
124 source_set("profiler") {
125   sources = [
126     "profiler/profiler_metrics_provider.cc",
127     "profiler/profiler_metrics_provider.h",
128     "profiler/tracking_synchronizer.cc",
129     "profiler/tracking_synchronizer.h",
130     "profiler/tracking_synchronizer_observer.cc",
131     "profiler/tracking_synchronizer_observer.h",
132   ]
134   public_deps = [
135     ":metrics",
136   ]
137   deps = [
138     "//base",
139     "//components/variations",
140     "//content/public/browser",
141     "//content/public/common",
142   ]
145 # GYP version: components/metrics.gypi:metrics_test_support
146 source_set("test_support") {
147   sources = [
148     "test_metrics_provider.cc",
149     "test_metrics_provider.h",
150     "test_metrics_service_client.cc",
151     "test_metrics_service_client.h",
152   ]
154   public_deps = [
155     ":metrics",
156   ]
157   deps = [
158     "//base",
159   ]
162 if (is_linux) {
163   # GYP version: components/metrics.gypi:metrics_serialization
164   source_set("serialization") {
165     sources = [
166       "serialization/metric_sample.cc",
167       "serialization/metric_sample.h",
168       "serialization/serialization_utils.cc",
169       "serialization/serialization_utils.h",
170     ]
171     deps = [
172       "//base",
173     ]
174   }
177 source_set("unit_tests") {
178   testonly = true
179   sources = [
180     "compression_utils_unittest.cc",
181     "daily_event_unittest.cc",
182     "drive_metrics_provider_unittest.cc",
183     "histogram_encoder_unittest.cc",
184     "machine_id_provider_win_unittest.cc",
185     "metrics_hashes_unittest.cc",
186     "metrics_log_manager_unittest.cc",
187     "metrics_log_unittest.cc",
188     "metrics_reporting_scheduler_unittest.cc",
189     "metrics_service_unittest.cc",
190     "metrics_state_manager_unittest.cc",
191     "persisted_logs_unittest.cc",
192     "profiler/profiler_metrics_provider_unittest.cc",
193     "profiler/tracking_synchronizer_unittest.cc",
194   ]
196   deps = [
197     ":metrics",
198     ":profiler",
199     ":test_support",
200     "//base:prefs_test_support",
201     "//base/test:test_support",
202     "//components/variations",
203     "//content/public/common",
204     "//testing/gtest",
205   ]
207 # TODO(GYP): metrics_chromeos