Roll src/third_party/WebKit 10b2b4a:a6818f9 (svn 202548:202549)
[chromium-blink-merge.git] / components / metrics.gypi
blob34163cd4f45eb5336599849e809c2956fb67f35e
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.
6   'targets': [
7     {
8       # GN version: //components/metrics
9       'target_name': 'metrics',
10       'type': 'static_library',
11       'include_dirs': [
12         '..',
13       ],
14       'dependencies': [
15         '../base/base.gyp:base',
16         '../base/base.gyp:base_i18n',
17         '../base/base.gyp:base_prefs',
18         'component_metrics_proto',
19         'compression',
20         'variations',
21       ],
22       'export_dependent_settings': [
23         'component_metrics_proto',
24       ],
25       'sources': [
26         'metrics/call_stack_profile_metrics_provider.cc',
27         'metrics/call_stack_profile_metrics_provider.h',
28         'metrics/clean_exit_beacon.cc',
29         'metrics/clean_exit_beacon.h',
30         'metrics/client_info.cc',
31         'metrics/client_info.h',
32         'metrics/cloned_install_detector.cc',
33         'metrics/cloned_install_detector.h',
34         'metrics/daily_event.cc',
35         'metrics/daily_event.h',
36         'metrics/drive_metrics_provider.cc',
37         'metrics/drive_metrics_provider.h',
38         'metrics/drive_metrics_provider_android.cc',
39         'metrics/drive_metrics_provider_ios.mm',
40         'metrics/drive_metrics_provider_linux.cc',
41         'metrics/drive_metrics_provider_mac.mm',
42         'metrics/drive_metrics_provider_win.cc',
43         'metrics/histogram_encoder.cc',
44         'metrics/histogram_encoder.h',
45         'metrics/machine_id_provider.h',
46         'metrics/machine_id_provider_stub.cc',
47         'metrics/machine_id_provider_win.cc',
48         'metrics/metrics_hashes.cc',
49         'metrics/metrics_hashes.h',
50         'metrics/metrics_log.cc',
51         'metrics/metrics_log.h',
52         'metrics/metrics_log_manager.cc',
53         'metrics/metrics_log_manager.h',
54         'metrics/metrics_log_uploader.cc',
55         'metrics/metrics_log_uploader.h',
56         'metrics/metrics_pref_names.cc',
57         'metrics/metrics_pref_names.h',
58         'metrics/metrics_provider.cc',
59         'metrics/metrics_provider.h',
60         'metrics/metrics_reporting_scheduler.cc',
61         'metrics/metrics_reporting_scheduler.h',
62         'metrics/metrics_service.cc',
63         'metrics/metrics_service.h',
64         'metrics/metrics_service_accessor.cc',
65         'metrics/metrics_service_accessor.h',
66         'metrics/metrics_service_client.cc',
67         'metrics/metrics_service_client.h',
68         'metrics/metrics_state_manager.cc',
69         'metrics/metrics_state_manager.h',
70         'metrics/metrics_switches.cc',
71         'metrics/metrics_switches.h',
72         'metrics/persisted_logs.cc',
73         'metrics/persisted_logs.h',
74         'metrics/url_constants.cc',
75         'metrics/url_constants.h',
76       ],
77       'conditions': [
78         ['chromeos==1', {
79           'dependencies': [
80             'metrics_serialization',
81           ],
82         }],
83         ['OS=="win"', {
84           'sources!': [
85             'metrics/machine_id_provider_stub.cc',
86           ],
87         }],
88       ],
89     },
90     {
91       # GN version: //components/metrics:net
92       'target_name': 'metrics_net',
93       'type': 'static_library',
94       'include_dirs': [
95         '..',
96       ],
97       'dependencies': [
98         '../base/base.gyp:base',
99         '../net/net.gyp:net',
100         '../url/url.gyp:url_lib',
101         'component_metrics_proto',
102         'data_use_measurement_core',
103         'metrics',
104       ],
105       'sources': [
106         'metrics/net/net_metrics_log_uploader.cc',
107         'metrics/net/net_metrics_log_uploader.h',
108         'metrics/net/network_metrics_provider.cc',
109         'metrics/net/network_metrics_provider.h',
110         'metrics/net/wifi_access_point_info_provider.cc',
111         'metrics/net/wifi_access_point_info_provider.h',
112         'metrics/net/wifi_access_point_info_provider_chromeos.cc',
113         'metrics/net/wifi_access_point_info_provider_chromeos.h',
114       ],
115     },
116     {
117       # Protobuf compiler / generator for UMA (User Metrics Analysis).
118       #
119       # GN version: //components/metrics/proto:proto
120       'target_name': 'component_metrics_proto',
121       'type': 'static_library',
122       'sources': [
123         'metrics/proto/call_stack_profile.proto',
124         'metrics/proto/cast_logs.proto',
125         'metrics/proto/chrome_user_metrics_extension.proto',
126         'metrics/proto/histogram_event.proto',
127         'metrics/proto/omnibox_event.proto',
128         'metrics/proto/omnibox_input_type.proto',
129         'metrics/proto/perf_data.proto',
130         'metrics/proto/perf_stat.proto',
131         'metrics/proto/profiler_event.proto',
132         'metrics/proto/sampled_profile.proto',
133         'metrics/proto/system_profile.proto',
134         'metrics/proto/user_action_event.proto',
135       ],
136       'variables': {
137         'proto_in_dir': 'metrics/proto',
138         'proto_out_dir': 'components/metrics/proto',
139       },
140       'includes': [ '../build/protoc.gypi' ],
141     },
142     {
143       # TODO(isherman): Remove all //chrome dependencies on this target, and
144       # merge the files in this target with components_unittests.
145       # GN version: //components/metrics:test_support
146       'target_name': 'metrics_test_support',
147       'type': 'static_library',
148       'include_dirs': [
149         '..',
150       ],
151       'dependencies': [
152         'component_metrics_proto',
153         'metrics',
154       ],
155       'export_dependent_settings': [
156         'component_metrics_proto',
157       ],
158       'sources': [
159         'metrics/test_metrics_provider.cc',
160         'metrics/test_metrics_provider.h',
161         'metrics/test_metrics_service_client.cc',
162         'metrics/test_metrics_service_client.h',
163       ],
164     },
165   ],
166   'conditions': [
167     ['OS=="linux"', {
168       'targets': [
169         {
170           'target_name': 'metrics_serialization',
171           'type': 'static_library',
172           'sources': [
173             'metrics/serialization/metric_sample.cc',
174             'metrics/serialization/metric_sample.h',
175             'metrics/serialization/serialization_utils.cc',
176             'metrics/serialization/serialization_utils.h',
177           ],
178           'dependencies': [
179             '../base/base.gyp:base',
180           ],
181         },
182       ],
183     }],
184     ['OS!="ios"', {
185       'targets': [
186         {
187           # GN version: //components/metrics:gpu
188           'target_name': 'metrics_gpu',
189           'type': 'static_library',
190           'include_dirs': [
191             '..',
192           ],
193           'dependencies': [
194             '../base/base.gyp:base',
195             '../content/content.gyp:content_browser',
196             '../ui/gfx/gfx.gyp:gfx',
197             'component_metrics_proto',
198             'metrics',
199           ],
200           'sources': [
201             'metrics/gpu/gpu_metrics_provider.cc',
202             'metrics/gpu/gpu_metrics_provider.h',
203           ],
204         },
205         {
206           # GN version: //components/metrics:profiler
207           'target_name': 'metrics_profiler',
208           'type': 'static_library',
209           'include_dirs': [
210             '..',
211           ],
212           'dependencies': [
213             '../content/content.gyp:content_browser',
214             '../content/content.gyp:content_common',
215             'component_metrics_proto',
216             'metrics',
217             'variations',
218           ],
219           'export_dependent_settings': [
220             'component_metrics_proto',
221           ],
222           'sources': [
223             'metrics/profiler/profiler_metrics_provider.cc',
224             'metrics/profiler/profiler_metrics_provider.h',
225             'metrics/profiler/tracking_synchronizer.cc',
226             'metrics/profiler/tracking_synchronizer.h',
227             'metrics/profiler/tracking_synchronizer_observer.cc',
228             'metrics/profiler/tracking_synchronizer_observer.h',
229           ],
230         },
231       ],
232     }]
233   ],