| # Copyright 2021 The Chromium Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/config/ui.gni") |
| |
| source_set("core") { |
| sources = [ |
| "application_breadcrumbs_logger.cc", |
| "application_breadcrumbs_logger.h", |
| "breadcrumb_manager.cc", |
| "breadcrumb_manager.h", |
| "breadcrumb_manager_browser_agent.cc", |
| "breadcrumb_manager_browser_agent.h", |
| "breadcrumb_manager_keyed_service.cc", |
| "breadcrumb_manager_keyed_service.h", |
| "breadcrumb_manager_observer.cc", |
| "breadcrumb_manager_observer.h", |
| "breadcrumb_manager_tab_helper.cc", |
| "breadcrumb_manager_tab_helper.h", |
| "breadcrumb_persistent_storage_manager.cc", |
| "breadcrumb_persistent_storage_manager.h", |
| "breadcrumb_persistent_storage_util.cc", |
| "breadcrumb_persistent_storage_util.h", |
| "crash_reporter_breadcrumb_constants.h", |
| "crash_reporter_breadcrumb_observer.cc", |
| "crash_reporter_breadcrumb_observer.h", |
| ] |
| |
| deps = [ |
| ":generate_not_user_triggered_actions", |
| ":status", |
| "//base", |
| "//components/crash/core/common:crash_key", |
| "//components/infobars/core", |
| "//components/keyed_service/core", |
| "//net", |
| "//ui/base", |
| ] |
| |
| if (toolkit_views) { |
| deps += [ "//ui/views" ] |
| } |
| } |
| |
| source_set("status") { |
| sources = [ |
| "breadcrumbs_status.cc", |
| "breadcrumbs_status.h", |
| ] |
| deps = [ |
| "//base", |
| "//components/prefs", |
| "//components/variations", |
| "//components/version_info:channel", |
| ] |
| } |
| |
| source_set("unit_tests") { |
| testonly = true |
| deps = [ |
| ":core", |
| ":generate_not_user_triggered_actions_test", |
| ":status", |
| "//base/test:test_support", |
| "//components/prefs:test_support", |
| "//testing/gtest", |
| ] |
| |
| if (toolkit_views) { |
| deps += [ |
| "//ui/views", |
| "//ui/views:test_support", |
| ] |
| } |
| |
| sources = [ |
| "application_breadcrumbs_logger_unittest.cc", |
| "application_breadcrumbs_not_user_action_unittest.cc", |
| "breadcrumb_manager_keyed_service_unittest.cc", |
| "breadcrumb_manager_observer_unittest.cc", |
| "breadcrumb_manager_unittest.cc", |
| "breadcrumb_persistent_storage_manager_unittest.cc", |
| "breadcrumbs_status_unittest.cc", |
| ] |
| } |
| |
| action("generate_not_user_triggered_actions") { |
| script = "generate_not_user_triggered_actions.py" |
| sources = [ "//tools/metrics/actions/actions.xml" ] |
| outputs = [ "$target_gen_dir/application_breadcrumbs_not_user_action.inc" ] |
| args = [ |
| "--actions", |
| rebase_path(sources[0], root_build_dir), |
| "--output", |
| rebase_path(outputs[0], root_build_dir), |
| ] |
| } |
| |
| action("generate_not_user_triggered_actions_test") { |
| testonly = true |
| script = "generate_not_user_triggered_actions.py" |
| sources = [ "generate_not_user_triggered_actions_test_data.xml" ] |
| outputs = |
| [ "$target_gen_dir/application_breadcrumbs_not_user_action_test.inc" ] |
| args = [ |
| "--actions", |
| rebase_path(sources[0], root_build_dir), |
| "--output", |
| rebase_path(outputs[0], root_build_dir), |
| ] |
| } |