| # Copyright 2025 The Chromium Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| source_set("background_sync") { |
| sources = [ |
| "background_sync_controller_factory.h", |
| "background_sync_delegate_impl.h", |
| "periodic_background_sync_permission_context.h", |
| ] |
| public_deps = [ |
| "//base", |
| "//chrome/browser/profiles:profile", |
| "//chrome/browser/profiles/keep_alive", |
| "//components/background_sync", |
| "//components/content_settings/core/common", |
| "//components/permissions", |
| "//components/site_engagement/content", |
| "//components/webapps/common", |
| "//content/public/browser", |
| "//url", |
| ] |
| if (!is_android) { |
| public_deps += [ |
| "//chrome/browser/web_applications", |
| "//components/keep_alive_registry", |
| ] |
| } |
| } |
| |
| source_set("impl") { |
| sources = [ |
| "background_sync_controller_factory.cc", |
| "background_sync_delegate_impl.cc", |
| "periodic_background_sync_permission_context.cc", |
| ] |
| deps = [ |
| ":background_sync", |
| "//chrome/browser/content_settings:content_settings_factory", |
| "//chrome/browser/engagement", |
| "//chrome/browser/metrics", |
| "//chrome/browser/search_engines", |
| "//chrome/common:chrome_features", |
| "//components/content_settings/core/browser", |
| "//components/search_engines", |
| "//services/network/public/mojom:mojom_permissions_policy", |
| ] |
| if (!is_android) { |
| deps += [ "//chrome/browser/web_applications/proto" ] |
| } |
| |
| public_deps = [ "//chrome/browser:browser_public_dependencies" ] |
| } |
| |
| source_set("unit_tests") { |
| testonly = true |
| sources = [ |
| "background_sync_controller_impl_unittest.cc", |
| "periodic_background_sync_permission_context_unittest.cc", |
| ] |
| deps = [ |
| ":background_sync", |
| "//base/test:test_support", |
| "//chrome/browser/content_settings:content_settings_factory", |
| "//chrome/browser/history", |
| "//chrome/test:test_support", |
| "//components/content_settings/core/browser", |
| "//components/history/core/browser", |
| "//components/history/core/test", |
| "//components/variations", |
| "//content/test:test_support", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//third_party/blink/public/common", |
| ] |
| if (!is_android) { |
| deps += |
| [ "//chrome/browser/web_applications:web_applications_test_support" ] |
| } |
| } |
| |
| if (!is_android) { |
| source_set("browser_tests") { |
| testonly = true |
| defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ] |
| sources = [ |
| "background_sync_browsertest.cc", |
| "background_sync_content_setting_browsertest.cc", |
| "background_sync_metrics_browsertest.cc", |
| ] |
| deps = [ |
| ":background_sync", |
| "//chrome/browser/content_settings:content_settings_factory", |
| "//chrome/browser/profiles:profile", |
| "//chrome/browser/ui/tabs:tab_strip", |
| "//chrome/test:test_support", |
| "//chrome/test:test_support_ui", |
| "//components/background_sync", |
| "//components/content_settings/core/browser", |
| "//components/ukm:test_support", |
| "//content/test:test_support", |
| "//net:test_support", |
| "//services/metrics/public/cpp:gen_ukm_builders", |
| "//services/metrics/public/cpp:metrics_cpp", |
| "//services/metrics/public/cpp:ukm_builders", |
| ] |
| } |
| } |