| # Copyright 2014 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. |
| |
| import("//build/buildflag_header.gni") |
| import("//components/signin/features.gni") |
| |
| if (is_android) { |
| import("//build/config/android/rules.gni") |
| } |
| |
| buildflag_header("signin_buildflags") { |
| header = "signin_buildflags.h" |
| flags = [ |
| "ENABLE_DICE_SUPPORT=$enable_dice_support", |
| "ENABLE_MIRROR=$enable_mirror", |
| ] |
| } |
| |
| # Split into its own target to allow the Identity Service to depend on it in |
| # typemaps without introducing a dependency on all of |
| # //components/signin/core/browser, which is undesirable. In the long term |
| # this file will move to be part of the Identity Service client library. |
| static_library("account_info") { |
| sources = [ |
| "account_info.cc", |
| "account_info.h", |
| ] |
| deps = [ |
| "//components/account_id", |
| ] |
| } |
| |
| # Split into its own target to allow browser clients of the Identity Service to |
| # record browser-specific signin metrics without having to depend on all of |
| # //components/signin/core/browser. |
| static_library("signin_metrics") { |
| sources = [ |
| "signin_metrics.cc", |
| "signin_metrics.h", |
| ] |
| public_deps = [ |
| "//base", |
| "//google_apis", |
| ] |
| } |
| |
| # This target contains what will become the core of the Identity Service |
| # implementation. It currently forms the core of the IdentityManager |
| # implementation (//services/identity/public/cpp/identity_manager.*). We are |
| # actively converting the codebase away from using the code in this target |
| # directly to using IdentityManager (tracked in https://crbug.com/796544). Do |
| # not add code to this target without consulting with blundell@chromium.org. |
| static_library("internals") { |
| sources = [ |
| "account_consistency_method.cc", |
| "account_consistency_method.h", |
| "account_tracker_service.cc", |
| "account_tracker_service.h", |
| "device_id_helper.cc", |
| "device_id_helper.h", |
| "gaia_cookie_manager_service.cc", |
| "gaia_cookie_manager_service.h", |
| "profile_oauth2_token_service.cc", |
| "profile_oauth2_token_service.h", |
| "signin_client.cc", |
| "signin_client.h", |
| "signin_error_controller.cc", |
| "signin_error_controller.h", |
| "signin_internals_util.cc", |
| "signin_internals_util.h", |
| "signin_manager.cc", |
| "signin_manager.h", |
| "signin_manager_base.cc", |
| "signin_manager_base.h", |
| "signin_pref_names.cc", |
| "signin_pref_names.h", |
| "signin_switches.cc", |
| "signin_switches.h", |
| ] |
| |
| if (is_chromeos) { |
| sources -= [ "signin_manager.cc" ] |
| } |
| |
| deps = [ |
| ":account_info", |
| ":signin_buildflags", |
| ":signin_metrics", |
| "//base", |
| "//components/data_use_measurement/core", |
| "//components/keyed_service/core", |
| "//components/prefs", |
| "//google_apis", |
| "//net", |
| "//services/network/public/cpp", |
| "//services/network/public/mojom", |
| "//ui/gfx", |
| ] |
| } |
| |
| static_library("browser") { |
| sources = [ |
| "about_signin_internals.cc", |
| "about_signin_internals.h", |
| "account_fetcher_service.cc", |
| "account_fetcher_service.h", |
| "account_info_fetcher.cc", |
| "account_info_fetcher.h", |
| "account_investigator.cc", |
| "account_investigator.h", |
| "account_reconcilor.cc", |
| "account_reconcilor.h", |
| "account_reconcilor_delegate.cc", |
| "account_reconcilor_delegate.h", |
| "avatar_icon_util.cc", |
| "avatar_icon_util.h", |
| "child_account_info_fetcher.cc", |
| "child_account_info_fetcher.h", |
| "child_account_info_fetcher_android.cc", |
| "child_account_info_fetcher_android.h", |
| "child_account_info_fetcher_impl.cc", |
| "child_account_info_fetcher_impl.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", |
| "mirror_account_reconcilor_delegate.cc", |
| "mirror_account_reconcilor_delegate.h", |
| "signin_header_helper.cc", |
| "signin_header_helper.h", |
| "signin_investigator.cc", |
| "signin_investigator.h", |
| "signin_status_metrics_provider.cc", |
| "signin_status_metrics_provider.h", |
| "signin_status_metrics_provider_base.cc", |
| "signin_status_metrics_provider_base.h", |
| "signin_status_metrics_provider_delegate.cc", |
| "signin_status_metrics_provider_delegate.h", |
| "signin_tracker.cc", |
| "signin_tracker.h", |
| "webdata/token_service_table.cc", |
| "webdata/token_service_table.h", |
| "webdata/token_web_data.cc", |
| "webdata/token_web_data.h", |
| ] |
| |
| configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| |
| public_deps = [ |
| ":account_info", |
| ":internals", |
| ":signin_buildflags", |
| ":signin_metrics", |
| "//base", |
| "//components/account_id", |
| "//components/content_settings/core/browser", |
| "//components/content_settings/core/common", |
| "//components/invalidation/public", |
| "//components/keyed_service/core", |
| "//components/prefs", |
| "//google_apis", |
| "//net", |
| "//services/network/public/cpp", |
| "//ui/gfx", |
| "//url", |
| ] |
| deps = [ |
| "//base:i18n", |
| "//components/data_use_measurement/core", |
| "//components/google/core/browser", |
| "//components/image_fetcher/core", |
| "//components/metrics", |
| "//components/os_crypt", |
| "//components/webdata/common", |
| "//crypto", |
| "//services/network/public/cpp", |
| "//skia", |
| "//sql", |
| "//third_party/icu", |
| "//third_party/re2", |
| ] |
| |
| if (is_chromeos) { |
| sources -= [ |
| "signin_status_metrics_provider.cc", |
| "signin_status_metrics_provider_delegate.cc", |
| ] |
| } |
| |
| if (!enable_dice_support) { |
| sources -= [ |
| "dice_account_reconcilor_delegate.cc", |
| "dice_account_reconcilor_delegate.h", |
| "dice_header_helper.cc", |
| "dice_header_helper.h", |
| ] |
| } |
| |
| if (is_android) { |
| sources -= [ |
| "child_account_info_fetcher_impl.cc", |
| "child_account_info_fetcher_impl.h", |
| ] |
| deps += [ "android:jni_headers" ] |
| } |
| } |
| |
| # This target contains test support that backs the test support for |
| # IdentityManager (and eventually likely for the Identity Service). We are |
| # actively converting the codebase away from using the code in this target |
| # directly to using IdentityManager (tracked in https://crbug.com/796544). Do |
| # not add code to this target without consulting with blundell@chromium.org. |
| static_library("internals_test_support") { |
| testonly = true |
| sources = [ |
| "fake_gaia_cookie_manager_service.cc", |
| "fake_gaia_cookie_manager_service.h", |
| "fake_profile_oauth2_token_service.cc", |
| "fake_profile_oauth2_token_service.h", |
| "fake_signin_manager.cc", |
| "fake_signin_manager.h", |
| "test_signin_client.cc", |
| "test_signin_client.h", |
| ] |
| |
| deps = [ |
| "//base/test:test_support", |
| "//components/prefs", |
| "//google_apis:test_support", |
| ] |
| |
| public_deps = [ |
| ":internals", |
| ":signin_metrics", |
| "//base", |
| "//services/network:test_support", |
| ] |
| } |
| |
| static_library("test_support") { |
| testonly = true |
| sources = [ |
| "fake_account_fetcher_service.cc", |
| "fake_account_fetcher_service.h", |
| "fake_auth_status_provider.cc", |
| "fake_auth_status_provider.h", |
| ] |
| |
| deps = [ |
| "//ui/gfx:test_support", |
| ] |
| |
| public_deps = [ |
| ":browser", |
| |
| # This public_dep is present to avoid requiring all consumers of this |
| # target to also depend on the below target. Once there are no direct |
| # consumers of the internals_test_support target, this dep should be |
| # removed. See https://crbug.com/796544. |
| ":internals_test_support", |
| "//base", |
| "//components/image_fetcher/core/", |
| ] |
| } |
| |
| source_set("unit_tests") { |
| testonly = true |
| sources = [ |
| "account_info_unittest.cc", |
| "account_investigator_unittest.cc", |
| "account_reconcilor_unittest.cc", |
| "account_tracker_service_unittest.cc", |
| "avatar_icon_util_unittest.cc", |
| "device_id_helper_unittest.cc", |
| "dice_account_reconcilor_delegate_unittest.cc", |
| "gaia_cookie_manager_service_unittest.cc", |
| "signin_error_controller_unittest.cc", |
| "signin_header_helper_unittest.cc", |
| "signin_investigator_unittest.cc", |
| "signin_manager_unittest.cc", |
| "signin_metrics_unittest.cc", |
| "signin_status_metrics_provider_unittest.cc", |
| "signin_tracker_unittest.cc", |
| "webdata/token_service_table_unittest.cc", |
| ] |
| |
| deps = [ |
| ":signin_buildflags", |
| ":test_support", |
| "//base/test:test_support", |
| "//components/content_settings/core/browser", |
| "//components/os_crypt:test_support", |
| "//components/prefs", |
| "//components/prefs:test_support", |
| "//components/sync_preferences", |
| "//components/sync_preferences:test_support", |
| "//components/webdata/common", |
| "//google_apis:test_support", |
| "//net:test_support", |
| "//testing/gmock", |
| "//testing/gtest", |
| ] |
| |
| if (is_chromeos) { |
| sources -= [ |
| "account_investigator_unittest.cc", |
| "signin_manager_unittest.cc", |
| "signin_status_metrics_provider_unittest.cc", |
| ] |
| } |
| |
| if (!enable_dice_support) { |
| sources -= [ "dice_account_reconcilor_delegate_unittest.cc" ] |
| } |
| } |
| |
| if (is_android) { |
| java_cpp_enum("investigated_scenario_java") { |
| sources = [ |
| "signin_investigator.h", |
| ] |
| } |
| } |