# Copyright 2014 The Chromium Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import("//components/signin/features.gni") if (is_android) { import("//build/config/android/rules.gni") } # This target contains code that is used by clients of //components/signin. static_library("browser") { sources = [ "about_signin_internals.cc", "about_signin_internals.h", "account_investigator.cc", "account_investigator.h", "account_management_type_metrics_recorder.cc", "account_management_type_metrics_recorder.h", "account_metrics_id_allocator.cc", "account_metrics_id_allocator.h", "account_preview_data.cc", "account_preview_data.h", "account_preview_data_fetcher.cc", "account_preview_data_fetcher.h", "account_preview_data_service.cc", "account_preview_data_service.h", "account_preview_data_service_impl.cc", "account_preview_data_service_impl.h", "account_preview_heuristic.cc", "account_preview_heuristic.h", "account_preview_metrics_recorder.cc", "account_preview_metrics_recorder.h", "account_reconcilor.cc", "account_reconcilor.h", "account_reconcilor_delegate.cc", "account_reconcilor_delegate.h", "account_reconcilor_throttler.cc", "account_reconcilor_throttler.h", "active_primary_accounts_metrics_recorder.cc", "active_primary_accounts_metrics_recorder.h", "chrome_connected_header_helper.cc", "chrome_connected_header_helper.h", "cookie_settings_util.cc", "cookie_settings_util.h", "dice_account_reconcilor_delegate.cc", "dice_account_reconcilor_delegate.h", "dice_header_helper.cc", "dice_header_helper.h", "dice_response_params.cc", "dice_response_params.h", "mirror_account_reconcilor_delegate.cc", "mirror_account_reconcilor_delegate.h", "signin_error_controller.cc", "signin_error_controller.h", "signin_header_helper.cc", "signin_header_helper.h", "signin_internals_util.cc", "signin_internals_util.h", "signin_metrics_service.cc", "signin_metrics_service.h", "signin_status_metrics_provider_helpers.cc", "signin_status_metrics_provider_helpers.h", ] public_deps = [ "//base", "//components/content_settings/core/browser", "//components/content_settings/core/browser:cookie_settings", "//components/content_settings/core/common", "//components/keyed_service/core", "//components/prefs", "//components/signin/public/base:signin_buildflags", "//components/sync/base", "//google_apis", "//net", "//services/network/public/cpp", "//ui/gfx", "//url", ] deps = [ "//base:i18n", "//components/google/core/common", "//components/metrics", "//components/signin/internal/identity_manager:capabilities", "//components/signin/public/identity_manager", "//components/supervised_user/core/common:buildflags", "//components/supervised_user/core/common:features", "//components/sync/service", "//components/version_info", "//components/webdata/common", "//crypto", "//services/network/public/cpp", "//skia", "//sql", "//third_party/icu", ] if (!enable_dice_support) { sources -= [ "dice_account_reconcilor_delegate.cc", "dice_account_reconcilor_delegate.h", "dice_header_helper.cc", "dice_header_helper.h", "dice_response_params.cc", "dice_response_params.h", ] } } source_set("unit_tests") { testonly = true sources = [ "about_signin_internals_unittest.cc", "account_investigator_unittest.cc", "account_management_type_metrics_recorder_unittest.cc", "account_metrics_id_allocator_unittest.cc", "account_preview_data_fetcher_unittest.cc", "account_preview_data_service_impl_unittest.cc", "account_preview_data_test_util.cc", "account_preview_data_test_util.h", "account_preview_heuristic_unittest.cc", "account_preview_metrics_recorder_unittest.cc", "account_reconcilor_delegate_unittest.cc", "account_reconcilor_unittest.cc", "active_primary_accounts_metrics_recorder_unittest.cc", "signin_error_controller_unittest.cc", "signin_header_helper_unittest.cc", "signin_metrics_service_unittest.cc", "signin_status_metrics_provider_helpers_unittest.cc", ] deps = [ ":browser", ":test_support", "//base", "//base/test:test_support", "//components/content_settings/core/browser", "//components/metrics", "//components/prefs", "//components/prefs:test_support", "//components/privacy_sandbox:privacy_sandbox_prefs", "//components/signin/internal/identity_manager:capabilities", "//components/signin/public/base:signin_buildflags", "//components/signin/public/base:test_support", "//components/signin/public/identity_manager", "//components/signin/public/identity_manager:test_support", "//components/supervised_user/core/common:buildflags", "//components/supervised_user/core/common:features", "//components/sync:test_support", "//components/sync_preferences:test_support", "//google_apis", "//google_apis:test_support", "//net:test_support", "//net/traffic_annotation:test_support", "//services/network:test_support", "//testing/gmock", "//testing/gtest", "//url", ] if (is_chromeos) { sources -= [ "account_investigator_unittest.cc", "signin_status_metrics_provider_helpers_unittest.cc", ] } if (enable_dice_support) { sources += [ "dice_account_reconcilor_delegate_unittest.cc", "dice_header_helper_unittest.cc", "dice_response_params_unittest.cc", ] } # TODO(crbug.com/40031409): Fix code that adds exit-time destructors and # enable the diagnostic by removing this line. configs += [ "//build/config/compiler:no_exit_time_destructors" ] } source_set("test_support") { testonly = true sources = [ "test_account_preview_data_service.cc", "test_account_preview_data_service.h", "test_account_reconcilor_observer.cc", "test_account_reconcilor_observer.h", ] deps = [ ":browser", "//components/signin/public/base", ] } if (is_android) { android_library("signin_enums_java") { srcjar_deps = [ ":signin_enums_javagen" ] deps = [ "//third_party/androidx:androidx_annotation_annotation_java" ] } java_cpp_enum("signin_enums_javagen") { sources = [ "signin_header_helper.h" ] visibility = [ ":*" ] # Depend on through :signin_enums_java } }