| # 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 = [ |
| "field_trial_synchronizer.cc", |
| "field_trial_synchronizer.h", |
| "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", |
| ] |
| deps = [ |
| "//base", |
| "//components/browser_sync", |
| "//components/crash/core/common", |
| "//components/keyed_service/core", |
| "//components/keyed_service/ios", |
| "//components/metrics", |
| "//components/metrics:net", |
| "//components/metrics:profiler", |
| "//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/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.cc", |
| "mobile_session_shutdown_metrics_provider_unittest.mm", |
| "previous_session_info_unittest.mm", |
| ] |
| deps = [ |
| ":metrics", |
| "//base", |
| "//base/test:test_support", |
| "//components/metrics", |
| "//components/metrics:test_support", |
| "//components/prefs", |
| "//components/prefs:test_support", |
| "//components/version_info", |
| "//ios/chrome/test:test_support", |
| "//ios/web/public/test", |
| "//testing/gtest", |
| ] |
| } |
| |
| source_set("metrics_internal") { |
| configs += [ "//build/config/compiler:enable_arc" ] |
| sources = [ |
| "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_delegate.h", |
| ] |
| deps = [ |
| ":metrics", |
| "//base", |
| "//components/google/core/browser", |
| "//ios/chrome/browser", |
| "//ios/chrome/browser/browser_state", |
| "//ios/chrome/browser/tabs", |
| "//ios/chrome/browser/ui", |
| "//ios/web", |
| "//ui/base", |
| "//url", |
| ] |
| public_deps = [ |
| ":metrics_internal_arc", |
| ":metrics_internal_noarc", |
| ] |
| allow_circular_includes_from = [ |
| ":metrics_internal_arc", |
| ":metrics_internal_noarc", |
| ] |
| libs = [ "UIKit.framework" ] |
| } |
| |
| source_set("metrics_internal_noarc") { |
| # TODO(crbug.com/731724) This target shouldn't be compiled with ARC until |
| # after it's converted to use WebStates instead of Tabs. |
| cflags_objc = [ "-fno-objc-arc" ] |
| |
| sources = [ |
| "tab_usage_recorder.h", |
| "tab_usage_recorder.mm", |
| ] |
| |
| deps = [ |
| ":metrics", |
| "//base", |
| "//ios/chrome/browser", |
| "//ios/chrome/browser/tabs", |
| "//ios/web", |
| ] |
| } |
| |
| source_set("metrics_internal_arc") { |
| sources = [ |
| "tab_usage_recorder_web_state_list_observer.h", |
| "tab_usage_recorder_web_state_list_observer.mm", |
| ] |
| deps = [ |
| ":metrics_internal_noarc", |
| "//base", |
| "//ios/chrome/browser/tabs", |
| "//ios/chrome/browser/web_state_list", |
| ] |
| configs += [ "//build/config/compiler:enable_arc" ] |
| } |
| |
| 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/tabs", |
| "//ios/chrome/browser/ui", |
| "//ios/testing:ocmock_support", |
| "//ios/web", |
| "//ios/web/public/test", |
| "//ios/web/public/test/fakes", |
| "//testing/gtest", |
| "//third_party/ocmock", |
| ] |
| } |
| |
| source_set("eg_tests") { |
| configs += [ "//build/config/compiler:enable_arc" ] |
| testonly = true |
| sources = [ |
| "tab_usage_recorder_egtest.mm", |
| ] |
| deps = [ |
| ":metrics_internal", |
| ":test_support", |
| "//base", |
| "//base/test:test_support", |
| "//components/strings", |
| "//ios/chrome/browser/ui", |
| "//ios/chrome/browser/ui/settings", |
| "//ios/chrome/browser/ui/toolbar", |
| "//ios/chrome/browser/ui/tools_menu", |
| "//ios/chrome/test/app:test_support", |
| "//ios/chrome/test/earl_grey: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/strings", |
| "//ios/chrome/browser/ui", |
| "//ios/chrome/browser/ui/tools_menu", |
| "//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" ] |
| } |