Fix broken path in extensions/common/PRESUBMIT.py
[chromium-blink-merge.git] / components / metrics / BUILD.gn
blob90e1c6a7a4cf1ca69ba54c81ba807f0353cbfb29
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     "histogram_encoder.cc",
21     "histogram_encoder.h",
22     "machine_id_provider.h",
23     "machine_id_provider_stub.cc",
24     "machine_id_provider_win.cc",
25     "metrics_hashes.cc",
26     "metrics_hashes.h",
27     "metrics_log.cc",
28     "metrics_log.h",
29     "metrics_log_manager.cc",
30     "metrics_log_manager.h",
31     "metrics_log_uploader.cc",
32     "metrics_log_uploader.h",
33     "metrics_pref_names.cc",
34     "metrics_pref_names.h",
35     "metrics_provider.cc",
36     "metrics_provider.h",
37     "metrics_reporting_scheduler.cc",
38     "metrics_reporting_scheduler.h",
39     "metrics_service.cc",
40     "metrics_service.h",
41     "metrics_service_accessor.cc",
42     "metrics_service_accessor.h",
43     "metrics_service_client.cc",
44     "metrics_service_client.h",
45     "metrics_state_manager.cc",
46     "metrics_state_manager.h",
47     "metrics_switches.cc",
48     "metrics_switches.h",
49     "persisted_logs.cc",
50     "persisted_logs.h",
51     "url_constants.cc",
52     "url_constants.h",
53   ]
55   public_deps = [
56     "//components/metrics/proto",
57   ]
58   deps = [
59     "//base",
60     "//base:i18n",
61     "//base:prefs",
62     "//components/variations",
63     "//third_party/zlib",
64   ]
66   if (is_chromeos) {
67     deps += [ ":serialization" ]
68   }
70   if (is_win) {
71     sources -= [ "machine_id_provider_stub.cc" ]
72   }
75 # GYP version: components/metrics.gypi:metrics_gpu
76 source_set("gpu") {
77   sources = [
78     "gpu/gpu_metrics_provider.cc",
79     "gpu/gpu_metrics_provider.h",
80   ]
82   public_deps = [
83     ":metrics",
84   ]
85   deps = [
86     "//base",
87     "//content/public/browser",
88     "//gpu/config",
89     "//ui/gfx",
90   ]
93 # GYP version: components/metrics.gypi:metrics_net
94 static_library("net") {
95   sources = [
96     "net/net_metrics_log_uploader.cc",
97     "net/net_metrics_log_uploader.h",
98     "net/network_metrics_provider.cc",
99     "net/network_metrics_provider.h",
100     "net/wifi_access_point_info_provider.cc",
101     "net/wifi_access_point_info_provider.h",
102     "net/wifi_access_point_info_provider_chromeos.cc",
103     "net/wifi_access_point_info_provider_chromeos.h",
104   ]
106   public_deps = [
107     ":metrics",
108   ]
109   deps = [
110     "//base",
111     "//net",
112     "//url",
113   ]
116 # GYP version: components/metrics.gypi:metrics_profiler
117 source_set("profiler") {
118   sources = [
119     "profiler/profiler_metrics_provider.cc",
120     "profiler/profiler_metrics_provider.h",
121     "profiler/tracking_synchronizer.cc",
122     "profiler/tracking_synchronizer.h",
123     "profiler/tracking_synchronizer_observer.cc",
124     "profiler/tracking_synchronizer_observer.h",
125   ]
127   public_deps = [
128     ":metrics",
129   ]
130   deps = [
131     "//base",
132     "//components/variations",
133     "//content/public/browser",
134     "//content/public/common",
135   ]
138 # GYP version: components/metrics.gypi:metrics_test_support
139 source_set("test_support") {
140   sources = [
141     "test_metrics_provider.cc",
142     "test_metrics_provider.h",
143     "test_metrics_service_client.cc",
144     "test_metrics_service_client.h",
145   ]
147   public_deps = [
148     ":metrics",
149   ]
150   deps = [
151     "//base",
152   ]
155 if (is_linux) {
156   # GYP version: components/metrics.gypi:metrics_serialization
157   source_set("serialization") {
158     sources = [
159       "serialization/metric_sample.cc",
160       "serialization/metric_sample.h",
161       "serialization/serialization_utils.cc",
162       "serialization/serialization_utils.h",
163     ]
164     deps = [
165       "//base",
166     ]
167   }
170 source_set("unit_tests") {
171   testonly = true
172   sources = [
173     "compression_utils_unittest.cc",
174     "daily_event_unittest.cc",
175     "histogram_encoder_unittest.cc",
176     "machine_id_provider_win_unittest.cc",
177     "metrics_hashes_unittest.cc",
178     "metrics_log_manager_unittest.cc",
179     "metrics_log_unittest.cc",
180     "metrics_reporting_scheduler_unittest.cc",
181     "metrics_service_unittest.cc",
182     "metrics_state_manager_unittest.cc",
183     "persisted_logs_unittest.cc",
184     "profiler/profiler_metrics_provider_unittest.cc",
185     "profiler/tracking_synchronizer_unittest.cc",
186   ]
188   deps = [
189     ":metrics",
190     ":profiler",
191     ":test_support",
192     "//base:prefs_test_support",
193     "//base/test:test_support",
194     "//components/variations",
195     "//content/public/common",
196     "//testing/gtest",
197   ]
199 # TODO(GYP): metrics_chromeos