naiveproxy/ios/chrome/browser/metrics/BUILD.gn

254 lines
7.7 KiB
Plaintext
Raw Normal View History

2018-08-11 08:35:24 +03:00
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
source_set("metrics") {
configs += [ "//build/config/compiler:enable_arc" ]
sources = [
"incognito_web_state_observer.h",
"incognito_web_state_observer.mm",
"ios_chrome_metrics_service_accessor.cc",
"ios_chrome_metrics_service_accessor.h",
"ios_chrome_metrics_service_client.h",
"ios_chrome_metrics_service_client.mm",
"ios_chrome_metrics_services_manager_client.h",
"ios_chrome_metrics_services_manager_client.mm",
"ios_chrome_stability_metrics_provider.h",
"ios_chrome_stability_metrics_provider.mm",
"mobile_session_shutdown_metrics_provider.h",
"mobile_session_shutdown_metrics_provider.mm",
"previous_session_info.h",
"previous_session_info.mm",
"previous_session_info_private.h",
"ukm_url_recorder.h",
"ukm_url_recorder.mm",
]
deps = [
"//base",
"//components/browser_sync",
"//components/crash/core/common",
"//components/keyed_service/core",
"//components/keyed_service/ios",
"//components/metrics",
"//components/metrics:net",
"//components/metrics:ui",
"//components/metrics_services_manager",
"//components/navigation_metrics",
"//components/omnibox/browser",
"//components/prefs",
"//components/rappor",
"//components/signin/core/browser",
"//components/sync",
"//components/ukm",
"//components/ukm:observers",
"//components/variations",
"//components/variations/service",
"//components/version_info",
"//ios/chrome/browser",
"//ios/chrome/browser/browser_state",
"//ios/chrome/browser/crash_report",
"//ios/chrome/browser/google",
"//ios/chrome/browser/history:history",
"//ios/chrome/browser/signin",
"//ios/chrome/browser/sync",
"//ios/chrome/browser/tabs",
"//ios/chrome/browser/translate",
"//ios/chrome/browser/variations",
"//ios/chrome/browser/variations:ios_chrome_ui_string_overrider_factory",
"//ios/chrome/browser/web_state_list",
"//ios/chrome/common",
"//ios/web",
]
}
source_set("unit_tests") {
configs += [ "//build/config/compiler:enable_arc" ]
testonly = true
sources = [
"ios_chrome_metrics_service_accessor_unittest.cc",
"ios_chrome_stability_metrics_provider_unittest.mm",
"mobile_session_shutdown_metrics_provider_unittest.mm",
"previous_session_info_unittest.mm",
"ukm_url_recorder_unittest.mm",
]
deps = [
":metrics",
"//base",
"//base/test:test_support",
"//components/metrics",
"//components/metrics:test_support",
"//components/prefs",
"//components/prefs:test_support",
"//components/ukm:test_support",
"//components/version_info",
"//ios/chrome/browser/web:test_support",
"//ios/chrome/test:test_support",
"//ios/testing:ios_test_support",
"//ios/web/public:public",
"//ios/web/public/test/fakes",
"//net:test_support",
"//testing/gtest",
]
}
source_set("metrics_internal") {
configs += [ "//build/config/compiler:enable_arc" ]
sources = [
"drag_and_drop_recorder.h",
"drag_and_drop_recorder.mm",
"first_user_action_recorder.cc",
"first_user_action_recorder.h",
"new_tab_page_uma.h",
"new_tab_page_uma.mm",
"size_class_recorder.h",
"size_class_recorder.mm",
"size_class_recorder_private.h",
"tab_usage_recorder.h",
"tab_usage_recorder.mm",
]
deps = [
":metrics",
"//base",
"//components/google/core/browser",
"//ios/chrome/browser",
"//ios/chrome/browser/browser_state",
"//ios/chrome/browser/prerender",
"//ios/chrome/browser/tabs",
"//ios/chrome/browser/ui",
"//ios/chrome/browser/web_state_list",
"//ios/web",
"//ui/base",
"//url",
]
libs = [ "UIKit.framework" ]
}
source_set("unit_tests_internal") {
configs += [ "//build/config/compiler:enable_arc" ]
testonly = true
sources = [
"first_user_action_recorder_unittest.cc",
"size_class_recorder_unittest.mm",
"tab_usage_recorder_unittest.mm",
]
deps = [
":metrics",
":metrics_internal",
"//base",
"//base/test:test_support",
"//ios/chrome/browser/ui",
"//ios/chrome/browser/web_state_list",
"//ios/chrome/browser/web_state_list:test_support",
"//ios/testing:ocmock_support",
"//ios/web",
"//ios/web/public/test",
"//ios/web/public/test/fakes",
"//testing/gtest",
]
}
source_set("eg_tests") {
configs += [ "//build/config/compiler:enable_arc" ]
testonly = true
sources = [
"tab_usage_recorder_egtest.mm",
"ukm_egtest.mm",
]
deps = [
":metrics_internal",
":test_support",
"//base",
"//base/test:test_support",
"//components/browser_sync",
"//components/metrics",
"//components/metrics_services_manager",
"//components/strings",
"//components/ukm",
"//components/ukm:test_support",
"//ios/chrome/app/strings:ios_strings_grit",
"//ios/chrome/browser",
"//ios/chrome/browser/metrics",
"//ios/chrome/browser/signin",
"//ios/chrome/browser/sync",
"//ios/chrome/browser/ui",
"//ios/chrome/browser/ui/authentication",
"//ios/chrome/browser/ui/authentication:authentication_ui",
"//ios/chrome/browser/ui/authentication:eg_test_support",
"//ios/chrome/browser/ui/settings",
"//ios/chrome/browser/ui/tab_switcher:egtest_support",
"//ios/chrome/browser/ui/tab_switcher:modes",
"//ios/chrome/browser/ui/toolbar/buttons",
"//ios/chrome/browser/ui/toolbar/legacy",
"//ios/chrome/browser/ui/toolbar/public",
"//ios/chrome/browser/ui/tools_menu/public",
"//ios/chrome/test/app:test_support",
"//ios/chrome/test/earl_grey:test_support",
"//ios/public/provider/chrome/browser/signin:test_support",
"//ios/testing:ios_test_support",
"//ios/web:earl_grey_test_support",
"//ios/web/public/test",
"//ios/web/public/test/http_server",
"//ui/base",
"//url",
]
libs = [ "XCTest.framework" ]
}
# TODO(crbug.com/694662): These tests depend on loading errors, which are
# behaving differently when the network is not available. When the underlying
# issue is resolved, these tests can move back to |eg_tests|.
source_set("external_url_eg_tests") {
configs += [ "//build/config/compiler:enable_arc" ]
testonly = true
sources = [
"external_url_tab_usage_recorder_egtest.mm",
]
deps = [
":metrics_internal",
":test_support",
"//ios/chrome/test/app:test_support",
"//ios/chrome/test/earl_grey:test_support",
"//ios/web/public/test/http_server",
]
libs = [ "XCTest.framework" ]
}
source_set("test_support") {
testonly = true
sources = [
"tab_usage_recorder_test_util.h",
"tab_usage_recorder_test_util.mm",
]
deps = [
"//base",
"//ios/chrome/app:app_internal",
"//ios/chrome/app/strings",
"//ios/chrome/browser/tabs",
"//ios/chrome/browser/ui",
"//ios/chrome/browser/ui/main",
"//ios/chrome/browser/ui/tab_grid:egtest_support",
"//ios/chrome/browser/ui/tab_switcher:egtest_support",
"//ios/chrome/browser/ui/tab_switcher:modes",
"//ios/chrome/browser/ui/tools_menu/public",
"//ios/chrome/browser/web_state_list",
"//ios/chrome/test/app:test_support",
"//ios/chrome/test/earl_grey:test_support",
"//ios/testing:ios_test_support",
"//ui/base",
]
configs += [ "//build/config/compiler:enable_arc" ]
}
import("//components/metrics/generate_expired_histograms_array.gni")
generate_expired_histograms_array("expired_histograms_array") {
inputs = [
"//tools/metrics/histograms/histograms.xml",
"//tools/metrics/histograms/enums.xml",
]
namespace = ""
header_filename = "ios_expired_histograms_array.h"
major_branch_date_filepath = "//chrome/MAJOR_BRANCH_DATE"
milestone_filepath = "//chrome/VERSION"
}