summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsdefresne <sdefresne@chromium.org>2015-09-08 03:36:46 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-08 10:37:33 +0000
commite538ae62828271a4b61b192c22aed7d3e789bd01 (patch)
tree69b98a58bded9f0b879ed7f18f289aa922bf72c3
parent2fb8ddf35b25a71cdd9924e2c6a8b544643fc094 (diff)
downloadchromium_src-e538ae62828271a4b61b192c22aed7d3e789bd01.zip
chromium_src-e538ae62828271a4b61b192c22aed7d3e789bd01.tar.gz
chromium_src-e538ae62828271a4b61b192c22aed7d3e789bd01.tar.bz2
Stop building components dependending on //content on iOS.
Chrome for iOS should not depends on //content, so stop compiling components/metrics/{gpu,profiler} on iOS as they depends on //content. BUG=None Review URL: https://codereview.chromium.org/1309143005 Cr-Commit-Position: refs/heads/master@{#347686}
-rw-r--r--chrome/chrome_browser.gypi4
-rw-r--r--components/components_tests.gyp6
-rw-r--r--components/metrics.gypi94
-rw-r--r--components/metrics/BUILD.gn91
4 files changed, 106 insertions, 89 deletions
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 5636b33..40b3ea2 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -3136,9 +3136,7 @@
'../components/components.gyp:instance_id',
'../components/components.gyp:invalidation_impl',
'../components/components.gyp:metrics',
- '../components/components.gyp:metrics_gpu',
'../components/components.gyp:metrics_net',
- '../components/components.gyp:metrics_profiler',
'../components/components.gyp:navigation_metrics',
'../components/components.gyp:network_time',
'../components/components.gyp:offline_pages',
@@ -3249,6 +3247,8 @@
'../components/components.gyp:keyed_service_content',
'../components/components.gyp:navigation_interception',
'../components/components.gyp:network_hints_common',
+ '../components/components.gyp:metrics_gpu',
+ '../components/components.gyp:metrics_profiler',
'../components/components.gyp:packed_ct_ev_whitelist',
'../components/components.gyp:password_manager_content_browser',
'../components/components.gyp:password_manager_sync_browser',
diff --git a/components/components_tests.gyp b/components/components_tests.gyp
index 31e376c..dfe3f0b 100644
--- a/components/components_tests.gyp
+++ b/components/components_tests.gyp
@@ -905,9 +905,7 @@
'components.gyp:login',
'components.gyp:memory_pressure',
'components.gyp:metrics',
- 'components.gyp:metrics_gpu',
'components.gyp:metrics_net',
- 'components.gyp:metrics_profiler',
'components.gyp:metrics_test_support',
'components.gyp:network_time',
'components.gyp:offline_pages',
@@ -1041,6 +1039,8 @@
'components.gyp:keyed_service_content',
'components.gyp:navigation_interception',
'components.gyp:network_hints_renderer',
+ 'components.gyp:metrics_gpu',
+ 'components.gyp:metrics_profiler',
'components.gyp:password_manager_content_browser',
'components.gyp:password_manager_content_common',
'components.gyp:power',
@@ -1094,6 +1094,8 @@
],
'sources!': [
'metrics/gpu/gpu_metrics_provider_unittest.cc',
+ 'metrics/profiler/profiler_metrics_provider_unittest.cc',
+ 'metrics/profiler/tracking_synchronizer_unittest.cc',
],
'sources/': [
# Exclude all tests that depends on //content (based on layered-
diff --git a/components/metrics.gypi b/components/metrics.gypi
index 28126bd..6954198 100644
--- a/components/metrics.gypi
+++ b/components/metrics.gypi
@@ -88,25 +88,6 @@
],
},
{
- # GN version: //components/metrics:gpu
- 'target_name': 'metrics_gpu',
- 'type': 'static_library',
- 'include_dirs': [
- '..',
- ],
- 'dependencies': [
- '../base/base.gyp:base',
- '../content/content.gyp:content_browser',
- '../ui/gfx/gfx.gyp:gfx',
- 'component_metrics_proto',
- 'metrics',
- ],
- 'sources': [
- 'metrics/gpu/gpu_metrics_provider.cc',
- 'metrics/gpu/gpu_metrics_provider.h',
- ],
- },
- {
# GN version: //components/metrics:net
'target_name': 'metrics_net',
'type': 'static_library',
@@ -132,32 +113,6 @@
],
},
{
- # GN version: //components/metrics:profiler
- 'target_name': 'metrics_profiler',
- 'type': 'static_library',
- 'include_dirs': [
- '..',
- ],
- 'dependencies': [
- '../content/content.gyp:content_browser',
- '../content/content.gyp:content_common',
- 'component_metrics_proto',
- 'metrics',
- 'variations',
- ],
- 'export_dependent_settings': [
- 'component_metrics_proto',
- ],
- 'sources': [
- 'metrics/profiler/profiler_metrics_provider.cc',
- 'metrics/profiler/profiler_metrics_provider.h',
- 'metrics/profiler/tracking_synchronizer.cc',
- 'metrics/profiler/tracking_synchronizer.h',
- 'metrics/profiler/tracking_synchronizer_observer.cc',
- 'metrics/profiler/tracking_synchronizer_observer.h',
- ],
- },
- {
# Protobuf compiler / generator for UMA (User Metrics Analysis).
#
# GN version: //components/metrics/proto:proto
@@ -225,5 +180,54 @@
},
],
}],
+ ['OS!="ios"', {
+ 'targets': [
+ {
+ # GN version: //components/metrics:gpu
+ 'target_name': 'metrics_gpu',
+ 'type': 'static_library',
+ 'include_dirs': [
+ '..',
+ ],
+ 'dependencies': [
+ '../base/base.gyp:base',
+ '../content/content.gyp:content_browser',
+ '../ui/gfx/gfx.gyp:gfx',
+ 'component_metrics_proto',
+ 'metrics',
+ ],
+ 'sources': [
+ 'metrics/gpu/gpu_metrics_provider.cc',
+ 'metrics/gpu/gpu_metrics_provider.h',
+ ],
+ },
+ {
+ # GN version: //components/metrics:profiler
+ 'target_name': 'metrics_profiler',
+ 'type': 'static_library',
+ 'include_dirs': [
+ '..',
+ ],
+ 'dependencies': [
+ '../content/content.gyp:content_browser',
+ '../content/content.gyp:content_common',
+ 'component_metrics_proto',
+ 'metrics',
+ 'variations',
+ ],
+ 'export_dependent_settings': [
+ 'component_metrics_proto',
+ ],
+ 'sources': [
+ 'metrics/profiler/profiler_metrics_provider.cc',
+ 'metrics/profiler/profiler_metrics_provider.h',
+ 'metrics/profiler/tracking_synchronizer.cc',
+ 'metrics/profiler/tracking_synchronizer.h',
+ 'metrics/profiler/tracking_synchronizer_observer.cc',
+ 'metrics/profiler/tracking_synchronizer_observer.h',
+ ],
+ },
+ ],
+ }]
],
}
diff --git a/components/metrics/BUILD.gn b/components/metrics/BUILD.gn
index 114fc3d..bfae327 100644
--- a/components/metrics/BUILD.gn
+++ b/components/metrics/BUILD.gn
@@ -77,22 +77,24 @@ source_set("metrics") {
}
}
-# GYP version: components/metrics.gypi:metrics_gpu
-source_set("gpu") {
- sources = [
- "gpu/gpu_metrics_provider.cc",
- "gpu/gpu_metrics_provider.h",
- ]
+if (!is_ios) {
+ # GYP version: components/metrics.gypi:metrics_gpu
+ source_set("gpu") {
+ sources = [
+ "gpu/gpu_metrics_provider.cc",
+ "gpu/gpu_metrics_provider.h",
+ ]
- public_deps = [
- ":metrics",
- ]
- deps = [
- "//base",
- "//content/public/browser",
- "//gpu/config",
- "//ui/gfx",
- ]
+ public_deps = [
+ ":metrics",
+ ]
+ deps = [
+ "//base",
+ "//content/public/browser",
+ "//gpu/config",
+ "//ui/gfx",
+ ]
+ }
}
# GYP version: components/metrics.gypi:metrics_net
@@ -118,26 +120,28 @@ static_library("net") {
]
}
-# GYP version: components/metrics.gypi:metrics_profiler
-source_set("profiler") {
- sources = [
- "profiler/profiler_metrics_provider.cc",
- "profiler/profiler_metrics_provider.h",
- "profiler/tracking_synchronizer.cc",
- "profiler/tracking_synchronizer.h",
- "profiler/tracking_synchronizer_observer.cc",
- "profiler/tracking_synchronizer_observer.h",
- ]
+if (!is_ios) {
+ # GYP version: components/metrics.gypi:metrics_profiler
+ source_set("profiler") {
+ sources = [
+ "profiler/profiler_metrics_provider.cc",
+ "profiler/profiler_metrics_provider.h",
+ "profiler/tracking_synchronizer.cc",
+ "profiler/tracking_synchronizer.h",
+ "profiler/tracking_synchronizer_observer.cc",
+ "profiler/tracking_synchronizer_observer.h",
+ ]
- public_deps = [
- ":metrics",
- ]
- deps = [
- "//base",
- "//components/variations",
- "//content/public/browser",
- "//content/public/common",
- ]
+ public_deps = [
+ ":metrics",
+ ]
+ deps = [
+ "//base",
+ "//components/variations",
+ "//content/public/browser",
+ "//content/public/common",
+ ]
+ }
}
# GYP version: components/metrics.gypi:metrics_test_support
@@ -178,7 +182,6 @@ source_set("unit_tests") {
"call_stack_profile_metrics_provider_unittest.cc",
"daily_event_unittest.cc",
"drive_metrics_provider_unittest.cc",
- "gpu/gpu_metrics_provider_unittest.cc",
"histogram_encoder_unittest.cc",
"machine_id_provider_win_unittest.cc",
"metrics_hashes_unittest.cc",
@@ -189,20 +192,15 @@ source_set("unit_tests") {
"metrics_state_manager_unittest.cc",
"net/net_metrics_log_uploader_unittest.cc",
"persisted_logs_unittest.cc",
- "profiler/profiler_metrics_provider_unittest.cc",
- "profiler/tracking_synchronizer_unittest.cc",
]
deps = [
- ":gpu",
":metrics",
":net",
- ":profiler",
":test_support",
"//base:prefs_test_support",
"//base/test:test_support",
"//components/variations",
- "//content/public/common",
"//testing/gtest",
]
@@ -210,5 +208,18 @@ source_set("unit_tests") {
sources += [ "serialization/serialization_utils_unittest.cc" ]
deps += [ ":serialization" ]
}
+
+ if (!is_ios) {
+ sources += [
+ "gpu/gpu_metrics_provider_unittest.cc",
+ "profiler/profiler_metrics_provider_unittest.cc",
+ "profiler/tracking_synchronizer_unittest.cc",
+ ]
+ deps += [
+ ":gpu",
+ ":profiler",
+ "//content/public/common",
+ ]
+ }
}
# TODO(GYP): metrics_chromeos