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. 4 5{ 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 '../third_party/zlib/zlib.gyp:zlib', 17 'component_metrics_proto', 18 'variations', 19 ], 20 'sources': [ 21 'metrics/clean_exit_beacon.cc', 22 'metrics/clean_exit_beacon.h', 23 'metrics/client_info.cc', 24 'metrics/client_info.h', 25 'metrics/cloned_install_detector.cc', 26 'metrics/cloned_install_detector.h', 27 'metrics/compression_utils.cc', 28 'metrics/compression_utils.h', 29 'metrics/daily_event.cc', 30 'metrics/daily_event.h', 31 'metrics/machine_id_provider.h', 32 'metrics/machine_id_provider_stub.cc', 33 'metrics/machine_id_provider_win.cc', 34 'metrics/metrics_hashes.cc', 35 'metrics/metrics_hashes.h', 36 'metrics/metrics_log.cc', 37 'metrics/metrics_log.h', 38 'metrics/metrics_log_manager.cc', 39 'metrics/metrics_log_manager.h', 40 'metrics/metrics_log_uploader.cc', 41 'metrics/metrics_log_uploader.h', 42 'metrics/metrics_pref_names.cc', 43 'metrics/metrics_pref_names.h', 44 'metrics/metrics_provider.cc', 45 'metrics/metrics_provider.h', 46 'metrics/metrics_reporting_scheduler.cc', 47 'metrics/metrics_reporting_scheduler.h', 48 'metrics/metrics_service.cc', 49 'metrics/metrics_service.h', 50 'metrics/metrics_service_client.cc', 51 'metrics/metrics_service_client.h', 52 'metrics/metrics_state_manager.cc', 53 'metrics/metrics_state_manager.h', 54 'metrics/metrics_switches.cc', 55 'metrics/metrics_switches.h', 56 'metrics/persisted_logs.cc', 57 'metrics/persisted_logs.h', 58 ], 59 'conditions': [ 60 ['chromeos==1', { 61 'dependencies': [ 62 'metrics_serialization', 63 ], 64 }], 65 ['OS=="win"', { 66 'sources!': [ 67 'metrics/machine_id_provider_stub.cc', 68 ], 69 }], 70 ], 71 }, 72 { 73 # GN version: //components/metrics:gpu 74 'target_name': 'metrics_gpu', 75 'type': 'static_library', 76 'include_dirs': [ 77 '..', 78 ], 79 'dependencies': [ 80 'component_metrics_proto', 81 'metrics', 82 ], 83 'sources': [ 84 'metrics/gpu/gpu_metrics_provider.cc', 85 'metrics/gpu/gpu_metrics_provider.h', 86 ], 87 }, 88 { 89 # GN version: //components/metrics:net 90 'target_name': 'metrics_net', 91 'type': 'static_library', 92 'include_dirs': [ 93 '..', 94 ], 95 'dependencies': [ 96 '../net/net.gyp:net', 97 'component_metrics_proto', 98 'metrics', 99 ], 100 'sources': [ 101 'metrics/net/network_metrics_provider.cc', 102 'metrics/net/network_metrics_provider.h', 103 'metrics/net/net_metrics_log_uploader.cc', 104 'metrics/net/net_metrics_log_uploader.h', 105 'metrics/net/wifi_access_point_info_provider.cc', 106 'metrics/net/wifi_access_point_info_provider.h', 107 'metrics/net/wifi_access_point_info_provider_chromeos.cc', 108 'metrics/net/wifi_access_point_info_provider_chromeos.h', 109 ], 110 }, 111 { 112 # GN version: //components/metrics:profiler 113 'target_name': 'metrics_profiler', 114 'type': 'static_library', 115 'include_dirs': [ 116 '..', 117 ], 118 'dependencies': [ 119 '../content/content.gyp:content_browser', 120 'component_metrics_proto', 121 'metrics', 122 ], 123 'sources': [ 124 'metrics/profiler/profiler_metrics_provider.cc', 125 'metrics/profiler/profiler_metrics_provider.h', 126 'metrics/profiler/tracking_synchronizer.cc', 127 'metrics/profiler/tracking_synchronizer.h', 128 'metrics/profiler/tracking_synchronizer_observer.h', 129 ], 130 }, 131 { 132 # Protobuf compiler / generator for UMA (User Metrics Analysis). 133 # 134 # GN version: //components/metrics/proto:proto 135 'target_name': 'component_metrics_proto', 136 'type': 'static_library', 137 'sources': [ 138 'metrics/proto/chrome_user_metrics_extension.proto', 139 'metrics/proto/histogram_event.proto', 140 'metrics/proto/omnibox_event.proto', 141 'metrics/proto/omnibox_input_type.proto', 142 'metrics/proto/perf_data.proto', 143 'metrics/proto/profiler_event.proto', 144 'metrics/proto/sampled_profile.proto', 145 'metrics/proto/system_profile.proto', 146 'metrics/proto/user_action_event.proto', 147 ], 148 'variables': { 149 'proto_in_dir': 'metrics/proto', 150 'proto_out_dir': 'components/metrics/proto', 151 }, 152 'includes': [ '../build/protoc.gypi' ], 153 }, 154 { 155 # TODO(isherman): Remove all //chrome dependencies on this target, and 156 # merge the files in this target with components_unittests. 157 # GN version: //components/metrics:test_support 158 'target_name': 'metrics_test_support', 159 'type': 'static_library', 160 'include_dirs': [ 161 '..', 162 ], 163 'dependencies': [ 164 'component_metrics_proto', 165 'metrics', 166 ], 167 'export_dependent_settings': [ 168 'component_metrics_proto', 169 ], 170 'sources': [ 171 'metrics/test_metrics_service_client.cc', 172 'metrics/test_metrics_service_client.h', 173 ], 174 }, 175 ], 176 'conditions': [ 177 ['OS=="linux"', { 178 'targets': [ 179 { 180 'target_name': 'metrics_serialization', 181 'type': 'static_library', 182 'sources': [ 183 'metrics/serialization/serialization_utils.cc', 184 'metrics/serialization/serialization_utils.h', 185 'metrics/serialization/metric_sample.cc', 186 'metrics/serialization/metric_sample.h', 187 ], 188 'dependencies': [ 189 '../base/base.gyp:base', 190 ], 191 }, 192 ], 193 }], 194 ], 195} 196