blob: 18420c1e4f63e514e31caf72178ed77b3bad1a54 [file] [log] [blame]
# 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.
import("//ios/build/chrome_build.gni")
source_set("browser_state") {
sources = [
"browser_state_info_cache.cc",
"browser_state_info_cache.h",
"browser_state_info_cache_observer.h",
"browser_state_otr_helper.cc",
"browser_state_otr_helper.h",
"chrome_browser_state.h",
"chrome_browser_state.mm",
"chrome_browser_state_manager.h",
]
public_deps = [
"//ios/web",
"//net",
]
deps = [
"//base",
"//components/autofill/core/browser",
"//components/keyed_service/core",
"//components/keyed_service/ios",
"//components/prefs",
"//components/search_engines",
"//components/sync_preferences",
"//components/variations/net",
"//components/webdata_services",
"//ios/chrome/browser:chrome_url_constants",
"//ios/chrome/browser:pref_names",
"//ios/chrome/browser/net:net_types",
"//ios/components/webui:url_constants",
"//ios/web/public/webui",
]
configs += [ "//build/config/compiler:enable_arc" ]
}
source_set("browser_state_impl") {
sources = [
"bookmark_model_loaded_observer.cc",
"bookmark_model_loaded_observer.h",
"browser_state_keyed_service_factories.h",
"browser_state_keyed_service_factories.mm",
"chrome_browser_state_impl.cc",
"chrome_browser_state_impl.h",
"chrome_browser_state_impl_io_data.h",
"chrome_browser_state_impl_io_data.mm",
"chrome_browser_state_io_data.h",
"chrome_browser_state_io_data.mm",
"chrome_browser_state_manager_impl.cc",
"chrome_browser_state_manager_impl.h",
"chrome_browser_state_removal_controller.h",
"chrome_browser_state_removal_controller.mm",
"off_the_record_chrome_browser_state_impl.cc",
"off_the_record_chrome_browser_state_impl.h",
"off_the_record_chrome_browser_state_io_data.h",
"off_the_record_chrome_browser_state_io_data.mm",
]
configs += [ "//build/config/compiler:enable_arc" ]
deps = [
":browser_state",
"//base",
"//base:i18n",
"//components/bookmarks/browser",
"//components/browser_sync",
"//components/content_settings/core/browser",
"//components/content_settings/core/common",
"//components/cookie_config",
"//components/invalidation/impl",
"//components/keyed_service/ios",
"//components/metrics",
"//components/net_log",
"//components/password_manager/core/browser",
"//components/policy/core/common",
"//components/pref_registry",
"//components/prefs",
"//components/profile_metrics",
"//components/proxy_config",
"//components/proxy_config/ios",
"//components/signin/ios/browser:active_state_manager",
"//components/signin/public/identity_manager",
"//components/sync_preferences",
"//components/user_prefs",
"//google_apis",
"//ios/chrome/browser",
"//ios/chrome/browser/autocomplete",
"//ios/chrome/browser/autofill",
"//ios/chrome/browser/bookmarks",
"//ios/chrome/browser/browser_state_metrics",
"//ios/chrome/browser/browsing_data",
"//ios/chrome/browser/content_settings",
"//ios/chrome/browser/crash_report/breadcrumbs",
"//ios/chrome/browser/credential_provider:buildflags",
"//ios/chrome/browser/device_sharing",
"//ios/chrome/browser/discover_feed",
"//ios/chrome/browser/dom_distiller",
"//ios/chrome/browser/download",
"//ios/chrome/browser/favicon",
"//ios/chrome/browser/feature_engagement",
"//ios/chrome/browser/gcm",
"//ios/chrome/browser/google",
"//ios/chrome/browser/google:google_logo",
"//ios/chrome/browser/history",
"//ios/chrome/browser/invalidation",
"//ios/chrome/browser/language",
"//ios/chrome/browser/metrics",
"//ios/chrome/browser/net",
"//ios/chrome/browser/ntp_snippets",
"//ios/chrome/browser/passwords",
"//ios/chrome/browser/policy",
"//ios/chrome/browser/policy_url_blocking",
"//ios/chrome/browser/prefs",
"//ios/chrome/browser/prefs:browser_prefs",
"//ios/chrome/browser/reading_list",
"//ios/chrome/browser/safe_browsing",
"//ios/chrome/browser/screen_time:buildflags",
"//ios/chrome/browser/search_engines",
"//ios/chrome/browser/send_tab_to_self",
"//ios/chrome/browser/sessions",
"//ios/chrome/browser/signin",
"//ios/chrome/browser/snapshots",
"//ios/chrome/browser/suggestions",
"//ios/chrome/browser/sync",
"//ios/chrome/browser/sync/glue",
"//ios/chrome/browser/translate",
"//ios/chrome/browser/ui/fullscreen",
"//ios/chrome/browser/ui/voice",
"//ios/chrome/browser/undo",
"//ios/chrome/browser/unified_consent",
"//ios/chrome/browser/web_state_list/web_usage_enabler",
"//ios/chrome/browser/webdata_services",
"//ios/net",
"//ios/public/provider/chrome/browser",
"//ios/public/provider/chrome/browser/signin",
"//ios/web/net/cookies",
"//net",
"//net:extras",
]
if (ios_enable_screen_time) {
deps += [
"//ios/chrome/browser/screen_time",
"//ios/chrome/browser/screen_time:feature_flags",
]
}
if (ios_enable_credential_provider_extension) {
deps += [ "//ios/chrome/browser/credential_provider" ]
}
allow_circular_includes_from = [
"//ios/chrome/browser",
"//ios/chrome/browser/browser_state_metrics",
"//ios/chrome/browser/net",
"//ios/chrome/browser/prefs:browser_prefs",
"//ios/chrome/browser/signin",
"//ios/chrome/browser/sync",
"//ios/chrome/browser/sync/glue",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"chrome_browser_state_unittest.cc",
"test_chrome_browser_state_manager_unittest.cc",
]
deps = [
":browser_state",
":test_support",
"//base",
"//components/variations/net",
"//ios/web/public/test",
"//testing/gtest",
]
configs += [ "//build/config/compiler:enable_arc" ]
}
source_set("test_support") {
testonly = true
sources = [
"test_chrome_browser_state.h",
"test_chrome_browser_state.mm",
"test_chrome_browser_state_manager.cc",
"test_chrome_browser_state_manager.h",
]
public_deps = [
":browser_state",
":browser_state_impl",
]
deps = [
":browser_state_impl",
"//base",
"//components/bookmarks/browser",
"//components/bookmarks/common",
"//components/history/core/browser",
"//components/history/ios/browser",
"//components/keyed_service/core",
"//components/keyed_service/ios",
"//components/profile_metrics",
"//components/sync_preferences",
"//components/sync_preferences:test_support",
"//components/undo",
"//components/user_prefs",
"//components/webdata_services",
"//ios/chrome/browser",
"//ios/chrome/browser/autocomplete",
"//ios/chrome/browser/bookmarks",
"//ios/chrome/browser/history",
"//ios/chrome/browser/net",
"//ios/chrome/browser/policy:policy",
"//ios/chrome/browser/prefs",
"//ios/chrome/browser/prefs:browser_prefs",
"//ios/chrome/browser/sync/glue",
"//ios/chrome/browser/undo",
"//ios/chrome/browser/webdata_services",
"//ios/chrome/test:test_support",
"//ios/public/provider/chrome/browser",
"//ios/public/provider/chrome/browser/ui",
"//ios/web",
"//net:test_support",
]
configs += [ "//build/config/compiler:enable_arc" ]
}