Commit 86556051 authored by Alan Cutter's avatar Alan Cutter Committed by Commit Bot

Extract browser_process.h/cc into own gn target

This CL pulls out browser_process.h and browser_process.cc into their
own gn target so that other gn targets can depend on it without creating
cyclic dependencies with //chrome/browser:browser.

This is required for CL:
https://chromium-review.googlesource.com/c/chromium/src/+/2528519

Bug: 1147410, 883570, 925153
Change-Id: I17ef1f0b1683c4abb7588a6ef24ec89f15647545
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2529309
Commit-Queue: Alan Cutter <alancutter@chromium.org>
Reviewed-by: default avatarFilip Gorski <fgorski@chromium.org>
Reviewed-by: default avatarGlen Robertson <glenrob@chromium.org>
Auto-Submit: Alan Cutter <alancutter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#828077}
parent a43c4ec2
...@@ -98,6 +98,18 @@ proto_library("ntp_background_proto") { ...@@ -98,6 +98,18 @@ proto_library("ntp_background_proto") {
generate_python = false generate_python = false
} }
source_set("browser_process") {
sources = [
"browser_process.cc",
"browser_process.h",
]
deps = [
"//base",
"//chrome/common:buildflags",
"//media:media_buildflags",
]
}
# Use a static library here because many test binaries depend on this but don't # Use a static library here because many test binaries depend on this but don't
# require many files from it.This makes linking more efficient. # require many files from it.This makes linking more efficient.
static_library("browser") { static_library("browser") {
...@@ -206,8 +218,6 @@ static_library("browser") { ...@@ -206,8 +218,6 @@ static_library("browser") {
"browser_about_handler.h", "browser_about_handler.h",
"browser_features.cc", "browser_features.cc",
"browser_features.h", "browser_features.h",
"browser_process.cc",
"browser_process.h",
"browser_process_impl.cc", "browser_process_impl.cc",
"browser_process_impl.h", "browser_process_impl.h",
"browser_process_platform_part.h", "browser_process_platform_part.h",
...@@ -1923,6 +1933,7 @@ static_library("browser") { ...@@ -1923,6 +1933,7 @@ static_library("browser") {
"//chrome/app/resources:platform_locale_settings", "//chrome/app/resources:platform_locale_settings",
"//chrome/app/theme:theme_resources", "//chrome/app/theme:theme_resources",
"//chrome/app/vector_icons", "//chrome/app/vector_icons",
"//chrome/browser:browser_process",
"//chrome/browser/devtools", "//chrome/browser/devtools",
"//chrome/browser/image_decoder", "//chrome/browser/image_decoder",
"//chrome/browser/media:media_engagement_preload_proto", "//chrome/browser/media:media_engagement_preload_proto",
...@@ -6611,6 +6622,7 @@ static_library("test_support") { ...@@ -6611,6 +6622,7 @@ static_library("test_support") {
deps = [ deps = [
"//chrome/app/theme:theme_resources", "//chrome/app/theme:theme_resources",
"//chrome/browser", "//chrome/browser",
"//chrome/browser:browser_process",
"//chrome/common", "//chrome/common",
"//chrome/common/safe_browsing:proto", "//chrome/common/safe_browsing:proto",
"//components/consent_auditor:test_support", "//components/consent_auditor:test_support",
...@@ -6875,6 +6887,7 @@ if (!is_android) { ...@@ -6875,6 +6887,7 @@ if (!is_android) {
deps = [ deps = [
":browser", ":browser",
"//chrome:browser_tests_pak", "//chrome:browser_tests_pak",
"//chrome/browser:browser_process",
"//chrome/common:mojo_bindings", "//chrome/common:mojo_bindings",
"//chrome/test/data:web_ui_test_bindings", "//chrome/test/data:web_ui_test_bindings",
"//components/metrics:test_support", "//components/metrics:test_support",
......
...@@ -70,6 +70,7 @@ static_library("vr_android") { ...@@ -70,6 +70,7 @@ static_library("vr_android") {
"//base", "//base",
"//cc", "//cc",
"//chrome/android/features/vr:jni_headers", "//chrome/android/features/vr:jni_headers",
"//chrome/browser:browser_process",
"//chrome/browser/ui", "//chrome/browser/ui",
"//chrome/browser/vr:vr_common", "//chrome/browser/vr:vr_common",
"//chrome/common", "//chrome/common",
......
...@@ -24,6 +24,7 @@ source_set("app_shim") { ...@@ -24,6 +24,7 @@ source_set("app_shim") {
deps = [ deps = [
"//apps", "//apps",
"//chrome/browser:browser_process",
"//chrome/browser/web_applications:web_applications", "//chrome/browser/web_applications:web_applications",
"//chrome/browser/web_applications/components", "//chrome/browser/web_applications/components",
"//chrome/common", "//chrome/common",
......
...@@ -51,6 +51,7 @@ source_set("platform_apps") { ...@@ -51,6 +51,7 @@ source_set("platform_apps") {
deps = [ deps = [
"//chrome/app:command_ids", "//chrome/app:command_ids",
"//chrome/browser:browser_process",
"//chrome/browser/extensions", "//chrome/browser/extensions",
"//chrome/browser/media/router/discovery", "//chrome/browser/media/router/discovery",
"//chrome/browser/sharing/proto:proto", "//chrome/browser/sharing/proto:proto",
......
...@@ -48,6 +48,7 @@ source_set("api") { ...@@ -48,6 +48,7 @@ source_set("api") {
# TODO(https://crbug.com/883570): It'd be nice to have more APIs here # TODO(https://crbug.com/883570): It'd be nice to have more APIs here
# extracted into their own BUILD files (so they are easy to audit, add, or # extracted into their own BUILD files (so they are easy to audit, add, or
# remove), but any that depend on //chrome/browser:browser can't. # remove), but any that depend on //chrome/browser:browser can't.
"//chrome/browser:browser_process",
"//chrome/browser/apps/platform_apps/api/music_manager_private", "//chrome/browser/apps/platform_apps/api/music_manager_private",
"//chrome/browser/extensions", "//chrome/browser/extensions",
"//chrome/common", "//chrome/common",
......
...@@ -77,6 +77,7 @@ source_set("chromeos") { ...@@ -77,6 +77,7 @@ source_set("chromeos") {
"//build:branding_buildflags", "//build:branding_buildflags",
"//chrome/app:command_ids", "//chrome/app:command_ids",
"//chrome/app/vector_icons", "//chrome/app/vector_icons",
"//chrome/browser:browser_process",
"//chrome/browser:theme_properties", "//chrome/browser:theme_properties",
"//chrome/browser/apps/platform_apps", "//chrome/browser/apps/platform_apps",
"//chrome/browser/apps/platform_apps/api", "//chrome/browser/apps/platform_apps/api",
......
...@@ -771,6 +771,7 @@ static_library("extensions") { ...@@ -771,6 +771,7 @@ static_library("extensions") {
"//chrome/app/theme:chrome_unscaled_resources", "//chrome/app/theme:chrome_unscaled_resources",
"//chrome/app/theme:theme_resources", "//chrome/app/theme:theme_resources",
"//chrome/app/vector_icons", "//chrome/app/vector_icons",
"//chrome/browser:browser_process",
"//chrome/browser:ntp_background_proto", "//chrome/browser:ntp_background_proto",
"//chrome/browser:theme_properties", "//chrome/browser:theme_properties",
"//chrome/browser/devtools", "//chrome/browser/devtools",
......
...@@ -55,8 +55,9 @@ static_library("chrome_cleaner") { ...@@ -55,8 +55,9 @@ static_library("chrome_cleaner") {
] ]
deps = [ deps = [
# TODO(crbug.com/920223): Break dependency cycles with //chrome/browser # TODO(crbug.com/925153): Break dependency cycles with //chrome/browser
":public", ":public",
"//chrome/browser:browser_process",
"//chrome/browser/extensions", "//chrome/browser/extensions",
"//chrome/browser/safe_browsing", "//chrome/browser/safe_browsing",
"//chrome/browser/ui", "//chrome/browser/ui",
......
...@@ -48,7 +48,7 @@ if (is_android) { ...@@ -48,7 +48,7 @@ if (is_android) {
deps = [ deps = [
":jni_headers", ":jni_headers",
"//base", "//base",
"//chrome/browser", "//chrome/browser:browser_process",
"//components/subresource_filter/content/browser", "//components/subresource_filter/content/browser",
"//components/subresource_filter/core/common:test_support", "//components/subresource_filter/core/common:test_support",
] ]
......
...@@ -353,6 +353,7 @@ static_library("ui") { ...@@ -353,6 +353,7 @@ static_library("ui") {
"//chrome/app/theme:chrome_unscaled_resources", "//chrome/app/theme:chrome_unscaled_resources",
"//chrome/app/theme:theme_resources", "//chrome/app/theme:theme_resources",
"//chrome/app/vector_icons", "//chrome/app/vector_icons",
"//chrome/browser:browser_process",
"//chrome/browser:buildflags", "//chrome/browser:buildflags",
"//chrome/browser:dev_ui_browser_resources", "//chrome/browser:dev_ui_browser_resources",
"//chrome/browser:resource_prefetch_predictor_proto", "//chrome/browser:resource_prefetch_predictor_proto",
......
...@@ -73,6 +73,7 @@ source_set("web_applications") { ...@@ -73,6 +73,7 @@ source_set("web_applications") {
deps = [ deps = [
":web_app_group", ":web_app_group",
"//chrome/browser:browser_process",
"//chrome/browser/web_applications/components", "//chrome/browser/web_applications/components",
"//chrome/browser/web_applications/preinstalled_web_apps", "//chrome/browser/web_applications/preinstalled_web_apps",
"//chrome/common", "//chrome/common",
......
...@@ -131,16 +131,7 @@ source_set("components") { ...@@ -131,16 +131,7 @@ source_set("components") {
deps = [ deps = [
"//chrome/app/resources:platform_locale_settings", "//chrome/app/resources:platform_locale_settings",
"//chrome/app/theme:chrome_unscaled_resources", "//chrome/app/theme:chrome_unscaled_resources",
"//chrome/browser:browser_process",
# web_applications:components uses header files from chrome/browser/banners/
# via |allow_circular_includes_from| mechanism enabled for the whole
# chrome/browser/ directory. In turn, chrome/browser/banners/ uses header
# files from chrome/browser/engagement/. This two-way circular dependency
# isn't automatically verified by |gn check| tool and it breaks incremental
# distributed build occasionally. For now, we should explicitly depend on
# chrome/browser/engagement: gn parts (like mojo_bindings) to fix this.
#
# TODO(crbug.com/1039736): Refactor AppBannerManager to remove this dep.
"//chrome/browser/web_applications:web_app_group", "//chrome/browser/web_applications:web_app_group",
"//chrome/common", "//chrome/common",
"//components/crx_file", "//components/crx_file",
......
...@@ -38,6 +38,7 @@ source_set("extensions") { ...@@ -38,6 +38,7 @@ source_set("extensions") {
deps = [ deps = [
"//base", "//base",
"//chrome/browser:browser_process",
"//chrome/browser/web_applications", "//chrome/browser/web_applications",
"//chrome/browser/web_applications:web_app_group", "//chrome/browser/web_applications:web_app_group",
"//chrome/browser/web_applications/components", "//chrome/browser/web_applications/components",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment