blob: 98eed32048cdf26956c719da0d66919a0b5322a5 [file] [log] [blame]
# 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",
]
}
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",
"account_tracker_service.cc",
"account_tracker_service.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",
"gaia_cookie_manager_service.cc",
"gaia_cookie_manager_service.h",
"mirror_account_reconcilor_delegate.cc",
"mirror_account_reconcilor_delegate.h",
"profile_identity_provider.cc",
"profile_identity_provider.h",
"profile_management_switches.cc",
"profile_management_switches.h",
"profile_oauth2_token_service.cc",
"profile_oauth2_token_service.h",
"signin_client.cc",
"signin_client.h",
"signin_cookie_change_subscription.cc",
"signin_cookie_change_subscription.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_investigator.cc",
"signin_investigator.h",
"signin_manager.cc",
"signin_manager.h",
"signin_manager_base.cc",
"signin_manager_base.h",
"signin_pref_names.cc",
"signin_pref_names.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_switches.cc",
"signin_switches.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",
":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",
"//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/pref_registry",
"//components/webdata/common",
"//crypto",
"//skia",
"//sql",
"//third_party/icu",
"//third_party/re2",
]
if (is_chromeos) {
sources -= [
"signin_manager.cc",
"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" ]
}
}
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",
"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",
"scoped_account_consistency.cc",
"scoped_account_consistency.h",
"scoped_unified_consent.cc",
"scoped_unified_consent.h",
"test_signin_client.cc",
"test_signin_client.h",
]
deps = [
"//base/test:test_support",
"//ui/gfx:test_support",
]
public_deps = [
":browser",
"//base",
"//components/image_fetcher/core/",
"//components/prefs:test_support",
"//components/webdata/common",
"//google_apis:test_support",
"//net:test_support",
"//testing/gtest",
]
}
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",
"dice_account_reconcilor_delegate_unittest.cc",
"gaia_cookie_manager_service_unittest.cc",
"profile_management_switches_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",
"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/pref_registry:pref_registry",
"//components/prefs",
"//components/sync_preferences",
"//components/sync_preferences:test_support",
"//testing/gmock",
]
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",
]
}
}