diff --git a/.gitignore b/.gitignore index 53c18ad1fa4c..58720d534c74 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,10 @@ .cache/clangd -/vendor/* +vendor/python-patch +vendor/sparkle +vendor/bat-native-tweetnacl +vendor/gn-project-generators +vendor/web-discovery-project +vendor/depot_tools .DS_Store .brave_gclient_* .gclient_* diff --git a/DEPS b/DEPS index 355eb8d430e3..384cb1cdafdf 100644 --- a/DEPS +++ b/DEPS @@ -179,21 +179,11 @@ hooks = [ ] include_rules = [ - #Everybody can use some things. - "+brave_base", - "+brave_domains", - "+crypto", - "+net", - "+sql", - "+ui/base", - "-chrome", - "-brave/app", - "-brave/browser", - "-brave/common", - "-brave/renderer", - "-brave/services", - "-ios", - "-brave/third_party/bitcoin-core", - "-brave/third_party/argon2", + "-brave", + "-third_party/rust", + + # Everybody can use some things. + "+brave/base", + "+brave/brave_domains", ] diff --git a/app/DEPS b/app/DEPS index c65c2157327b..813b0dfda5b2 100644 --- a/app/DEPS +++ b/app/DEPS @@ -1,17 +1,22 @@ -include_rules = [ - "+android_webview/common", +from brave_chromium_utils import inline_file +inline_file('//chrome/app/DEPS', globals(), locals()) + +include_rules += [ + "+chrome/app", + "+chrome/common", "+brave/browser", "+brave/common", "+brave/renderer/brave_content_renderer_client.h", - "+chrome/app", - "+chrome/browser", - "+chrome/common", - "+chrome/child", - "+chrome/test", - "+content/public/app", - "+content/public/browser", - "+content/public/common", - "+content/public/test", + "+brave/components/brave_component_updater/browser/features.h", + "+brave/components/brave_component_updater/browser/switches.h", + "+brave/components/brave_sync/buildflags.h", + "+brave/components/constants/brave_switches.h", + "+brave/components/variations/buildflags.h", + "+brave/components/commands/common/features.h", + "+brave/components/speedreader/common/buildflags/buildflags.h", + "+brave/components/update_client/buildflags.h", + "+brave/components/variations/command_line_utils.h", + "+brave/utility/brave_content_utility_client.h", "+components/component_updater/component_updater_switches.h", "+components/dom_distiller/core/dom_distiller_switches.h", "+components/embedder_support/switches.h", @@ -56,19 +61,25 @@ include_rules = [ "+components/password_manager/core/common/password_manager_features.h", "+components/device_signals/core/common/signals_features.h", "+components/translate/core/common/translate_util.h", - "+extensions/common", - "+google_apis/gaia", - "+gpu/config", - "+media/base/media_switches.h", - "+services/device/public", - "+services/network", - "+third_party/blink/public/common", - "+ui/accessibility", + "+google_apis/gaia/gaia_switches.h", ] specific_include_rules = { + ".*test\.cc": [ + "+chrome/test/base", + "+content/public/test", + ], "feature_defaults_unittest\.cc": [ + "+gpu/config/gpu_finch_features.h", + "+net/base/features.h", + "+services/network/public/cpp/features.h", + "+third_party/blink/public/common/features.h", + "+ui/accessibility/accessibility_features.h", + "+ui/base/ui_base_features.h", + "+android_webview/common/aw_features.h", + "+extensions/common/extension_features.h", + "+services/device/public/cpp/device_features.h", # code outside of content should not access content/common "!content/common", - ] + ], } diff --git a/browser/DEPS b/browser/DEPS index 9c6ad26bff3b..fb5442d1cf41 100644 --- a/browser/DEPS +++ b/browser/DEPS @@ -1,127 +1,100 @@ -include_rules = [ - "+cc/metrics", - "+cc/paint", - "+cc/test", +from brave_chromium_utils import inline_file +inline_file("//chrome/DEPS", globals(), locals()) +chrome_browser_deps = {} +inline_file("//chrome/browser/DEPS", {}, chrome_browser_deps) +include_rules += chrome_browser_deps["include_rules"] + +include_rules += [ + "+brave/grit", "+brave/app", + "!brave/build/android", "+brave/common", "+brave/services/network/public", - "+chrome/app", + "+brave/test/base", + "+brave/ui", + "!brave/third_party/blink/renderer/brave_farbling_constants.h", + "+brave/net", + "+brave/components/constants", "+chrome/browser", - "+chrome/common", - "+chrome/grit", - "+chrome/installer/util", - "+chrome/install_static", - "+chrome/test", - "+content/public/browser", - "+content/public/common", - "+content/public/test", - "+content/test", - # TODO(bridiver) - narrow this down - "+components", - "+device", - "+extensions/browser", - "+extensions/common", - "+extensions/buildflags", - "+extensions/grit", - "+extensions/test", - "+google_apis", - "+media/media_buildflags.h", - "+media/audio", # For media audio hang monitor. - "+media/base", # For media switches - "+media/capabilities", # For InMemoryVideoDecodeStatsDB - "+media/cdm/cdm_paths.h", - "+media/capture", - "+media/midi", # For midi switches - "+media/mojo", # For mojo media services. - "+media/renderers", - "+media/webrtc", # For webrtc media switches. - "+mojo/public", - "+net", - "+printing/buildflags/buildflags.h", - "+sandbox/mac", - "+sandbox/policy", - "+services/audio/public", - "+services/cert_verifier", - "+services/data_decoder/public", - "+services/device/public", - "+services/image_annotation/public", - "+services/media_session/public", - "+services/metrics/public", - "+services/network/host_resolver.h", - "+services/network/network_context.h", - "+services/network/network_service.h", - "+services/network/public", - "+services/network/test", - "+services/preferences/public/cpp", - "+services/preferences/public/mojom", - "+services/proxy_resolver", - "+services/proxy_resolver/public/mojom", - "+services/resource_coordinator/public/cpp", - "+services/resource_coordinator/public/mojom", - "+services/service_manager/public/cpp", - "+services/strings", - "+third_party/boringssl/src/include", - "+third_party/crashpad", - "+third_party/widevine/cdm/buildflags.h", - "+third_party/widevine/cdm/widevine_cdm_common.h", - "+ui", - - # Code under //ash should be accessed via its public API. See //ash/README.md. - "-ash", - "+ash/public", - "+ash/keyboard/ui/grit", - "+ash/keyboard/ui/resources", - "+ash/components/shortcut_viewer", - - # The message center should only be accessed through - # //chrome/browser/notifications. - "-ui/message_center", - "+ui/message_center/public", - - # chrome only needs switches and features flags from cc. All usage of the - # compositor is from content. Definitely don't include generic stuff from - # cc/base here, if this is needed these files need to move to base/ - "+cc/base/features.h", - "+cc/base/switches.h", - - # Unsafe to use from //chrome, see http://goo.gl/QQG5wo - "-content/public/test/test_browser_context.h", - - "+storage/browser", - "+storage/common", - - # Explicitly disallow using SyncMessageFilter to prevent browser from - # sending synchronous IPC messages on non-UI threads. - "-ipc/ipc_sync_message_filter.h", - - # Allows in-process use of NetworkService for URLRequestContext configuration. - # Should be removed once the actual network service ships. - "+content/public/network", - # Other libraries. - "+third_party/google_toolbox_for_mac/src", - "+third_party/icu/source/common/unicode", - "+third_party/icu/source/i18n/unicode", - "+third_party/leveldatabase", - "+third_party/libxml/chromium/xml_writer.h", - "+third_party/mozilla", # Mozilla interface headers. - "+third_party/ocmock/gtest_support.h", - "+third_party/protobuf/src/google/protobuf", - "+third_party/re2", - "+third_party/skia", - "+third_party/smhasher", - "+third_party/sqlite", - "+third_party/zlib", + # TODO(bridiver) code outside of content should only dependon content/public + "!content/test", - # No inclusion of WebKit from the browser, other than the ones in - # WebKit/public/{mojom,common}. - # TODO(crbug.com/1008303) clarify dependency and remove or move these individual headers - # into public/common. - "-third_party/blink", - "+third_party/blink/public/common", - "+third_party/blink/public/mojom", - "+third_party/blink/public/public_buildflags.h", + "+brave/components/p3a", + "+brave/components/p3a_utils", + "+brave/components/ai_chat/content/browser", + "+brave/components/ai_chat/core/common", + "+brave/components/ai_chat/core/browser", + "+brave/components/ai_rewriter/common", + "+brave/components/brave_ads/browser", + "+brave/components/brave_ads/core/public", + "+brave/components/brave_component_updater/browser", + "+brave/components/brave_news/browser", + "+brave/components/brave_news/common", + "+brave/components/brave_rewards/browser", + "+brave/components/brave_rewards/common", + "+brave/components/brave_shields/content/browser", + "+brave/components/brave_shields/core/common", + "+brave/components/brave_wallet/browser", + "+brave/components/brave_wallet/common", + "+brave/components/de_amp/common", + "+brave/components/de_amp/browser", + "+brave/components/debounce/content/browser", + "+brave/components/debounce/core/browser", + "+brave/components/debounce/core/common", + "+brave/components/google_sign_in_permission", + "+brave/components/ntp_background_images/browser", + "+brave/components/ntp_background_images/buildflags", + "+brave/components/playlist/browser", + "+brave/components/playlist/common", + "+brave/components/psst/browser/content", + "+brave/components/psst/common", + "+brave/components/skus/browser", + "+brave/components/skus/common", + "+brave/components/speedreader", + "-brave/components/speedreader/renderer", + "+brave/components/webcompat/content/browser", + "+brave/components/webcompat/core/common", + "+brave/components/brave_vpn/browser", + "+brave/components/brave_vpn/common", + "+brave/components/request_otr/browser", + "+brave/components/request_otr/common", + "+brave/components/commander/common", + "+brave/components/commands/common", + "+brave/components/brave_sync", + "+brave/components/ipfs", + "+brave/components/tor", + "-brave/components/tor/renderer", + "+brave/components/brave_referrals/browser", + "+brave/components/https_upgrade_exceptions/browser", + "+brave/components/localhost_permission", + "+brave/components/url_sanitizer/browser", + "+brave/components/body_sniffer", + "+brave/components/brave_federated", + "+brave/components/brave_search/browser", + "+brave/components/brave_search/common", + "+brave/components/brave_webtorrent/browser", + "+brave/components/cosmetic_filters/browser", + "+brave/components/cosmetic_filters/common", + "+brave/components/decentralized_dns/content", + "+brave/components/decentralized_dns/core", + "+brave/components/services/bat_ads/public", + "+brave/components/translate/core/common", + "+brave/components/brave_new_tab_ui", + "+brave/components/brave_private_new_tab_ui/common", + "+brave/components/widevine/constants.h", + "+brave/components/brave_drm", + "+brave/components/brave_search_conversion", + "+brave/components/misc_metrics", + "+brave/components/brave_wayback_machine", + "+brave/components/brave_adaptive_captcha", + "+brave/components/brave_perf_predictor/browser", + "+brave/components/omnibox/browser", + "+brave/components/search_engines", + "+brave/components/webcompat_reporter/common", + "+brave/components/sidebar/browser", + "+brave/components/l10n/common", ] specific_include_rules = { diff --git a/browser/ai_chat/DEPS b/browser/ai_chat/DEPS index 38b007fdb856..079d4323f9eb 100644 --- a/browser/ai_chat/DEPS +++ b/browser/ai_chat/DEPS @@ -1,4 +1,9 @@ include_rules = [ - "+printing/buildflags", - "+services/screen_ai", + "+brave/components/text_recognition/common", ] + +specific_include_rules = { + "brave_open_ai_chat_permission_context_unittest\.cc": [ + "+brave/components/permissions/contexts/brave_open_ai_chat_permission_context.h", + ] +} diff --git a/browser/android/DEPS b/browser/android/DEPS new file mode 100644 index 000000000000..aacd23d859cb --- /dev/null +++ b/browser/android/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/sync/service", +] diff --git a/browser/android/preferences/DEPS b/browser/android/preferences/DEPS new file mode 100644 index 000000000000..4538e826b17e --- /dev/null +++ b/browser/android/preferences/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/brave_perf_predictor/common", +] diff --git a/browser/brave_ads/DEPS b/browser/brave_ads/DEPS new file mode 100644 index 000000000000..2f3b90a1de48 --- /dev/null +++ b/browser/brave_ads/DEPS @@ -0,0 +1,5 @@ +include_rules = [ + "+brave/components/brave_ads/content/browser", + "+brave/components/brave_ads/core/browser/service", + "+brave/components/brave_ads/core/mojom", +] diff --git a/browser/brave_ads/services/DEPS b/browser/brave_ads/services/DEPS new file mode 100644 index 000000000000..b19a04a2a015 --- /dev/null +++ b/browser/brave_ads/services/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/services/bat_ads", +] diff --git a/browser/brave_federated/DEPS b/browser/brave_federated/DEPS new file mode 100644 index 000000000000..cf7bdf907dfb --- /dev/null +++ b/browser/brave_federated/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/brave_federated", +] diff --git a/browser/brave_rewards/DEPS b/browser/brave_rewards/DEPS new file mode 100644 index 000000000000..33231787a0e0 --- /dev/null +++ b/browser/brave_rewards/DEPS @@ -0,0 +1,5 @@ +include_rules = [ + "+brave/components/brave_rewards/core", + "+brave/components/brave_rewards/resources", + "+brave/components/script_injector/common", +] diff --git a/browser/brave_rewards/android/DEPS b/browser/brave_rewards/android/DEPS new file mode 100644 index 000000000000..b2c65f32ebf4 --- /dev/null +++ b/browser/brave_rewards/android/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + "+brave/components/brave_ads/core/browser/service", + "+brave/components/brave_ads/core/mojom", +] diff --git a/browser/brave_shields/DEPS b/browser/brave_shields/DEPS index 3f58d7a68d71..1be40b5635a3 100644 --- a/browser/brave_shields/DEPS +++ b/browser/brave_shields/DEPS @@ -1,5 +1,11 @@ +include_rules = [ + "+brave/components/brave_shields/core/browser", + "+brave/components/brave_shields/content/test", + "+services/network/host_resolver.h", +] + specific_include_rules = { "brave_timestamp_rounding_browsertest\.cc": [ - "+content/public/renderer/render_frame.h", + "!content/public/renderer/render_frame.h", ], } diff --git a/browser/brave_stats/DEPS b/browser/brave_stats/DEPS new file mode 100644 index 000000000000..e8060170e966 --- /dev/null +++ b/browser/brave_stats/DEPS @@ -0,0 +1,6 @@ +include_rules = [ + "+brave/components/brave_referrals/common", + "+brave/components/brave_stats/browser", + "+brave/components/rpill/common", + "+brave/components/version_info", +] diff --git a/browser/brave_wallet/DEPS b/browser/brave_wallet/DEPS index e884422b6f27..e0b24fc6296e 100644 --- a/browser/brave_wallet/DEPS +++ b/browser/brave_wallet/DEPS @@ -1,3 +1,19 @@ include_rules = [ - "+brave/third_party/argon2/src/include/argon2.h", + "+brave/components/api_request_helper", + "+brave/components/permissions", + "+brave/components/version_info", ] + +specific_include_rules = { + "external_wallets_importer\.cc": [ + "+third_party/boringssl/src/include/openssl/digest.h", + "+third_party/boringssl/src/include/openssl/hkdf.h", + "+brave/third_party/argon2/src/include/argon2.h", + ], + "solana_provider_browsertest\.cc": [ + "!brave/components/brave_wallet/renderer/resource_helper.h", + ], + "solana_provider_renderer_browsertest\.cc": [ + "!brave/components/brave_wallet/renderer/resource_helper.h", + ], +} diff --git a/browser/browsing_data/DEPS b/browser/browsing_data/DEPS new file mode 100644 index 000000000000..9c7b37aef52e --- /dev/null +++ b/browser/browsing_data/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/content_settings/core/browser", +] diff --git a/browser/debounce/DEPS b/browser/debounce/DEPS new file mode 100644 index 000000000000..e50c49e4b598 --- /dev/null +++ b/browser/debounce/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/brave_shields/content/test", +] diff --git a/browser/ephemeral_storage/DEPS b/browser/ephemeral_storage/DEPS new file mode 100644 index 000000000000..c0bfff81e22b --- /dev/null +++ b/browser/ephemeral_storage/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + "+brave/components/ephemeral_storage", + "+brave/components/brave_shields/content/test", +] diff --git a/browser/extensions/DEPS b/browser/extensions/DEPS new file mode 100644 index 000000000000..869820599924 --- /dev/null +++ b/browser/extensions/DEPS @@ -0,0 +1,5 @@ +include_rules = [ + "+brave/components/brave_extension/grit", + "+brave/components/brave_webtorrent/grit", + "+brave/components/update_client/buildflags.h", +] diff --git a/browser/extensions/api/DEPS b/browser/extensions/api/DEPS new file mode 100644 index 000000000000..aefbfad41f96 --- /dev/null +++ b/browser/extensions/api/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + "+brave/components/brave_ads/core/browser", + "+brave/components/brave_ads/core/mojom", +] diff --git a/browser/extensions/api/settings_private/DEPS b/browser/extensions/api/settings_private/DEPS new file mode 100644 index 000000000000..f3b8e30ed609 --- /dev/null +++ b/browser/extensions/api/settings_private/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/ntp_background_images/common", +] diff --git a/browser/farbling/DEPS b/browser/farbling/DEPS index a96eb84e89a0..f6c093d737b1 100644 --- a/browser/farbling/DEPS +++ b/browser/farbling/DEPS @@ -1,6 +1,11 @@ +include_rules = [ + "+brave/third_party/blink/renderer/brave_font_whitelist.h", +] + specific_include_rules = { - # this test belongs in renderer - "brave_font_whitelist_browsertest.cc": [ + # TODO(bridiver) this test belongs in renderer + "brave_font_whitelist_browsertest\.cc": [ + "!brave/components/content_settings/renderer/brave_content_settings_agent_impl.h", "+content/public/renderer/render_frame.h", "+third_party/blink/public", ], diff --git a/browser/infobars/DEPS b/browser/infobars/DEPS new file mode 100644 index 000000000000..5b8341af79ec --- /dev/null +++ b/browser/infobars/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/infobars/core", +] diff --git a/browser/misc_metrics/DEPS b/browser/misc_metrics/DEPS new file mode 100644 index 000000000000..4140d07236c1 --- /dev/null +++ b/browser/misc_metrics/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/time_period_storage", +] diff --git a/browser/net/DEPS b/browser/net/DEPS index 72382ecf6177..b73d927c2e3a 100644 --- a/browser/net/DEPS +++ b/browser/net/DEPS @@ -1,3 +1,17 @@ include_rules = [ - "+chrome/browser", + "+brave/content/public/browser", + "+brave/components/brave_shields/core/browser", + "+brave/components/brave_shields/content/test", + "+brave/components/update_client/buildflags.h", + "+brave/components/query_filter", + "+brave/components/brave_service_keys", + "+brave/components/speech_to_text/buildflags.h", + "+brave/components/speech_to_text/features.h", + "+services/network/host_resolver.h", ] + +specific_include_rules = { + "brave_ad_block_tp_network_delegate_helper\.cc": [ + "+brave/components/brave_shields/adblock/rs/src/lib.rs.h", + ] +} diff --git a/browser/notifications/DEPS b/browser/notifications/DEPS new file mode 100644 index 000000000000..83a053b626ee --- /dev/null +++ b/browser/notifications/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/brave_ads/core/browser/service", +] diff --git a/browser/ntp_background/DEPS b/browser/ntp_background/DEPS new file mode 100644 index 000000000000..83a053b626ee --- /dev/null +++ b/browser/ntp_background/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/brave_ads/core/browser/service", +] diff --git a/browser/ntp_background/android/DEPS b/browser/ntp_background/android/DEPS new file mode 100644 index 000000000000..54b7a6c4c548 --- /dev/null +++ b/browser/ntp_background/android/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/brave_stats/browser", +] diff --git a/browser/perf/DEPS b/browser/perf/DEPS new file mode 100644 index 000000000000..c72e5d5919ea --- /dev/null +++ b/browser/perf/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/brave_shields/core/browser", +] diff --git a/browser/permissions/DEPS b/browser/permissions/DEPS new file mode 100644 index 000000000000..2ab8e6f6db08 --- /dev/null +++ b/browser/permissions/DEPS @@ -0,0 +1,5 @@ +include_rules = [ + "+brave/components/permissions", + "+brave/components/brave_shields/content/test", + "+brave/components/ephemeral_storage", +] diff --git a/browser/profiles/DEPS b/browser/profiles/DEPS new file mode 100644 index 000000000000..8adc38a44b38 --- /dev/null +++ b/browser/profiles/DEPS @@ -0,0 +1,5 @@ +include_rules = [ + "+brave/components/content_settings/core/browser", + "+brave/components/ntp_background_images/common", + "+brave/components/sync/service", +] diff --git a/browser/psst/DEPS b/browser/psst/DEPS new file mode 100644 index 000000000000..3f38dd116ebe --- /dev/null +++ b/browser/psst/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/psst/browser/core", +] diff --git a/browser/script_injector/DEPS b/browser/script_injector/DEPS new file mode 100644 index 000000000000..935e87af8b11 --- /dev/null +++ b/browser/script_injector/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/script_injector/common", +] diff --git a/browser/search_engines/DEPS b/browser/search_engines/DEPS new file mode 100644 index 000000000000..06224a7d20fb --- /dev/null +++ b/browser/search_engines/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + "+brave/components/time_period_storage", + "+brave/android/java/org/chromium/chrome/browser/search_engines/jni_headers", +] diff --git a/browser/sync/DEPS b/browser/sync/DEPS new file mode 100644 index 000000000000..543f456fbbd9 --- /dev/null +++ b/browser/sync/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + "+brave/components/sync/service", + "+brave/components/sync_device_info", +] diff --git a/browser/ui/DEPS b/browser/ui/DEPS index 1706da863b0a..ebc176698432 100644 --- a/browser/ui/DEPS +++ b/browser/ui/DEPS @@ -1,8 +1,9 @@ -# Copyright (c) 2021 The Brave Authors. All rights reserved. -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this file, -# You can obtain one at https://mozilla.org/MPL/2.0/. +from brave_chromium_utils import inline_file +inline_file('//chrome/browser/ui/DEPS', globals(), locals()) -include_rules = [ +include_rules += [ "+chrome/browser/ui", + "+brave/components/vector_icons", + "+brave/components/query_filter", + "+brave/components/text_recognition/common/buildflags", ] diff --git a/browser/ui/commander/DEPS b/browser/ui/commander/DEPS new file mode 100644 index 000000000000..d816824cd66c --- /dev/null +++ b/browser/ui/commander/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/commander/browser", +] diff --git a/browser/ui/commands/DEPS b/browser/ui/commands/DEPS new file mode 100644 index 000000000000..c86080bbecb6 --- /dev/null +++ b/browser/ui/commands/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/commands/browser", +] diff --git a/browser/ui/geolocation/DEPS b/browser/ui/geolocation/DEPS new file mode 100644 index 000000000000..992f5164a20c --- /dev/null +++ b/browser/ui/geolocation/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/brave_geolocation_permission/common", +] diff --git a/browser/ui/omnibox/DEPS b/browser/ui/omnibox/DEPS new file mode 100644 index 000000000000..4140d07236c1 --- /dev/null +++ b/browser/ui/omnibox/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/time_period_storage", +] diff --git a/browser/ui/sidebar/DEPS b/browser/ui/sidebar/DEPS new file mode 100644 index 000000000000..200463e632ec --- /dev/null +++ b/browser/ui/sidebar/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/sidebar/common", +] diff --git a/browser/ui/startup/DEPS b/browser/ui/startup/DEPS new file mode 100644 index 000000000000..5b8341af79ec --- /dev/null +++ b/browser/ui/startup/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/infobars/core", +] diff --git a/browser/ui/views/DEPS b/browser/ui/views/DEPS index db2e31e013c6..913b98e586de 100644 --- a/browser/ui/views/DEPS +++ b/browser/ui/views/DEPS @@ -5,5 +5,7 @@ include_rules = [ "+brave/browser/ui/views", + "+chrome/app/vector_icons/vector_icons.h", "+chrome/browser/ui/views", + "+brave/components/text_recognition/browser", ] diff --git a/browser/ui/views/brave_ads/DEPS b/browser/ui/views/brave_ads/DEPS new file mode 100644 index 000000000000..0c32517cf300 --- /dev/null +++ b/browser/ui/views/brave_ads/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/test/views/snapshot/widget_snapshot_checker.h", +] diff --git a/browser/ui/views/brave_player/DEPS b/browser/ui/views/brave_player/DEPS new file mode 100644 index 000000000000..87d7dd1fcae7 --- /dev/null +++ b/browser/ui/views/brave_player/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/brave_player/common", +] diff --git a/browser/ui/views/brave_shields/DEPS b/browser/ui/views/brave_shields/DEPS new file mode 100644 index 000000000000..c72e5d5919ea --- /dev/null +++ b/browser/ui/views/brave_shields/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/brave_shields/core/browser", +] diff --git a/browser/ui/views/frame/DEPS b/browser/ui/views/frame/DEPS new file mode 100644 index 000000000000..c86080bbecb6 --- /dev/null +++ b/browser/ui/views/frame/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/commands/browser", +] diff --git a/browser/ui/views/infobars/DEPS b/browser/ui/views/infobars/DEPS new file mode 100644 index 000000000000..5b8341af79ec --- /dev/null +++ b/browser/ui/views/infobars/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/infobars/core", +] diff --git a/browser/ui/views/location_bar/DEPS b/browser/ui/views/location_bar/DEPS new file mode 100644 index 000000000000..d816824cd66c --- /dev/null +++ b/browser/ui/views/location_bar/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/commander/browser", +] diff --git a/browser/ui/webui/DEPS b/browser/ui/webui/DEPS index cfaa0db02881..af0a86d0417d 100644 --- a/browser/ui/webui/DEPS +++ b/browser/ui/webui/DEPS @@ -1,4 +1,21 @@ -include_rules = [ +from brave_chromium_utils import inline_file +inline_file('//chrome/browser/ui/webui/DEPS', globals(), locals()) + +include_rules += [ + "+brave/components/brave_adblock/resources", + "+brave/components/brave_shields/core/browser", + "+brave/components/brave_ads/core/browser/service", + "+brave/components/brave_ads/core/mojom", + "+brave/components/brave_rewards/resources", + "+brave/components/ntp_background_images/common", + "+brave/components/version_info", + "+brave/components/webui", "+chrome/services/qrcode_generator/public/mojom", "+chrome/services/qrcode_generator/public/cpp", ] + +specific_include_rules = { + "brave_adblock_internals_ui\.cc": [ + "+brave/components/brave_adblock/adblock_internals/resources/grit/brave_adblock_internals_generated_map.h", + ], +} diff --git a/browser/ui/webui/ads_internals/DEPS b/browser/ui/webui/ads_internals/DEPS new file mode 100644 index 000000000000..c529a678e67a --- /dev/null +++ b/browser/ui/webui/ads_internals/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/brave_ads/core/browser/internals", +] diff --git a/browser/ui/webui/ai_chat/DEPS b/browser/ui/webui/ai_chat/DEPS new file mode 100644 index 000000000000..5a50571407d1 --- /dev/null +++ b/browser/ui/webui/ai_chat/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/ai_chat/resources", +] diff --git a/browser/ui/webui/ai_rewriter/DEPS b/browser/ui/webui/ai_rewriter/DEPS new file mode 100644 index 000000000000..b0e4a05b6645 --- /dev/null +++ b/browser/ui/webui/ai_rewriter/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/ai_rewriter/resources", +] diff --git a/browser/ui/webui/brave_shields/DEPS b/browser/ui/webui/brave_shields/DEPS new file mode 100644 index 000000000000..326428403b89 --- /dev/null +++ b/browser/ui/webui/brave_shields/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/brave_shields/resources", +] diff --git a/browser/ui/webui/brave_vpn/DEPS b/browser/ui/webui/brave_vpn/DEPS new file mode 100644 index 000000000000..3d827d727fdc --- /dev/null +++ b/browser/ui/webui/brave_vpn/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/brave_vpn/resources", +] diff --git a/browser/ui/webui/brave_wallet/DEPS b/browser/ui/webui/brave_wallet/DEPS new file mode 100644 index 000000000000..734090fd679e --- /dev/null +++ b/browser/ui/webui/brave_wallet/DEPS @@ -0,0 +1,15 @@ +include_rules = [ + "+brave/components/brave_wallet_page/resources", + "+brave/components/brave_wallet_panel/resources", + # TODO(bridiver) move to appropriate DEPS file + # ledger + "+brave/components/ledger_bridge/resources", + # line_chart + "+brave/components/line_chart_display/resources", + # market + "+brave/components/market_display/resources", + # nft + "+brave/components/nft_display/resources", + # trezor + "+brave/components/trezor_bridge/resources", +] diff --git a/browser/ui/webui/brave_wallet/panel_handler/DEPS b/browser/ui/webui/brave_wallet/panel_handler/DEPS new file mode 100644 index 000000000000..b42a9e66d522 --- /dev/null +++ b/browser/ui/webui/brave_wallet/panel_handler/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/permissions/contexts", +] diff --git a/browser/ui/webui/ethereum_remote_client/DEPS b/browser/ui/webui/ethereum_remote_client/DEPS new file mode 100644 index 000000000000..d64af8158345 --- /dev/null +++ b/browser/ui/webui/ethereum_remote_client/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/ethereum_remote_client_page/resources", +] diff --git a/browser/ui/webui/new_tab_page/DEPS b/browser/ui/webui/new_tab_page/DEPS new file mode 100644 index 000000000000..d72c8fe63bfa --- /dev/null +++ b/browser/ui/webui/new_tab_page/DEPS @@ -0,0 +1,7 @@ +include_rules = [ + "+brave/components/brave_ads/core/browser/service", + "+brave/components/brave_new_tab/resources", + "+brave/components/brave_perf_predictor/common", + "+brave/components/ntp_background_images/common", + "+brave/components/time_period_storage", +] diff --git a/browser/ui/webui/private_new_tab_page/DEPS b/browser/ui/webui/private_new_tab_page/DEPS new file mode 100644 index 000000000000..024695f9e7f3 --- /dev/null +++ b/browser/ui/webui/private_new_tab_page/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/brave_private_new_tab/resources", +] diff --git a/browser/ui/webui/settings/DEPS b/browser/ui/webui/settings/DEPS new file mode 100644 index 000000000000..13ebd35e61c6 --- /dev/null +++ b/browser/ui/webui/settings/DEPS @@ -0,0 +1,11 @@ +include_rules = [ + "+brave/components/brave_adblock/resources", + "+brave/components/brave_shields/core/browser", + "+brave/components/ntp_background_images/common", + "+brave/components/brave_ads/core/browser/service", + "+brave/components/brave_webtorrent/grit", + "+brave/components/version_info", + "+brave/components/sync/service", + "+brave/components/sync_device_info", + "+brave/components/webcompat_reporter/browser", +] diff --git a/browser/ui/webui/webcompat_reporter/DEPS b/browser/ui/webui/webcompat_reporter/DEPS new file mode 100644 index 000000000000..7a29f0729c58 --- /dev/null +++ b/browser/ui/webui/webcompat_reporter/DEPS @@ -0,0 +1,5 @@ +include_rules = [ + "+brave/components/webcompat_reporter/browser", + "+brave/components/brave_shields/core/browser", + "+brave/components/webcompat_reporter/resources", +] diff --git a/browser/ui/webui/welcome_page/DEPS b/browser/ui/webui/welcome_page/DEPS new file mode 100644 index 000000000000..ac37733bf807 --- /dev/null +++ b/browser/ui/webui/welcome_page/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + "+brave/components/brave_welcome/common", + "+brave/components/brave_welcome/resources", +] diff --git a/browser/url_sanitizer/DEPS b/browser/url_sanitizer/DEPS new file mode 100644 index 000000000000..cb5f644135b4 --- /dev/null +++ b/browser/url_sanitizer/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/url_sanitizer/common", +] diff --git a/browser/webcompat_reporter/DEPS b/browser/webcompat_reporter/DEPS new file mode 100644 index 000000000000..375a980c3525 --- /dev/null +++ b/browser/webcompat_reporter/DEPS @@ -0,0 +1,5 @@ +include_rules = [ + "+brave/components/brave_shields/core/browser", + "+brave/components/brave_shields/core/browser", + "+brave/components/webcompat_reporter/browser", +] diff --git a/browser/widevine/DEPS b/browser/widevine/DEPS new file mode 100644 index 000000000000..6096b4f8379d --- /dev/null +++ b/browser/widevine/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/permissions/permission_widevine_utils.h", +] diff --git a/chromium_src/chrome/DEPS b/chromium_src/chrome/DEPS new file mode 100644 index 000000000000..1582bdd24661 --- /dev/null +++ b/chromium_src/chrome/DEPS @@ -0,0 +1,2 @@ +from brave_chromium_utils import inline_file +inline_file("//chrome/DEPS", globals(), locals()) diff --git a/chromium_src/chrome/app/DEPS b/chromium_src/chrome/app/DEPS index 341649b6e673..809739759efc 100644 --- a/chromium_src/chrome/app/DEPS +++ b/chromium_src/chrome/app/DEPS @@ -1,7 +1,7 @@ -include_rules = [ +from brave_chromium_utils import inline_file +inline_file("//chrome/app/DEPS", globals(), locals()) + +include_rules += [ "+brave/app", - "+brave/browser", "+brave/common", - "+chrome/browser", - "+chrome/common", ] diff --git a/chromium_src/chrome/browser/DEPS b/chromium_src/chrome/browser/DEPS index b0e763ad1418..a357ab221d5f 100644 --- a/chromium_src/chrome/browser/DEPS +++ b/chromium_src/chrome/browser/DEPS @@ -1,113 +1,20 @@ -include_rules = [ +from brave_chromium_utils import inline_file +inline_file("//chrome/browser/DEPS", globals(), locals()) + +include_rules += [ "+brave/app", "+brave/browser", - "+brave/build/android/jni_headers", "+brave/common", + "+brave/build/android/jni_headers", "+brave/grit", - "+brave/components/ai_rewriter", - "+brave/components/brave_adaptive_captcha", - "+brave/components/brave_ads", - "+brave/components/brave_component_updater/browser", - "+brave/components/brave_news", - "+brave/components/brave_perf_predictor", - "+brave/components/brave_rewards/browser", - "+brave/components/brave_rewards/common", - "+brave/components/brave_rewards/resources/extension/grit", - "+brave/components/brave_search_conversion", - "+brave/components/brave_shields", - "+brave/components/brave_sync", - "+brave/components/brave_vpn", - "+brave/components/brave_wallet", - "+brave/components/brave_webtorrent/browser", - "+brave/components/brave_webtorrent/grit", - "+brave/components/commander", - "+brave/components/ai_chat", "+brave/components/constants", - "+brave/components/content_settings/core", - "+brave/components/debounce", - "+brave/components/decentralized_dns", - "+brave/components/google_sign_in_permission", - "+brave/components/ipfs", "+brave/components/l10n/common", - "+brave/components/ntp_background_images", - "+brave/components/ntp_tiles", - "+brave/components/omnibox", - "+brave/components/p3a", - "+brave/components/permissions", - "+brave/components/playlist", - "+brave/components/privacy_sandbox", - "+brave/components/psst/browser/core", - "+brave/components/request_otr", - "+brave/components/sidebar", - "+brave/components/speedreader", - "+brave/components/sync", - "+brave/components/text_recognition", - "+brave/components/tor", - "+brave/components/translate", - "+brave/components/update_client", - "+brave/components/url_sanitizer", - "+brave/components/vector_icons", + "+brave/components/playlist/common/buildflags", "+brave/components/version_info", - "+brave/components/webcompat", - "+brave/net", - "+brave/services/network/public", - "+chrome/android", - "+chrome/app", - "+chrome/common", - "+chrome/utility", - "+chrome/grit", - "+chrome/installer", - "+chrome/install_static", - "+chrome/test", - "+content/public/browser", - "+content/public/common", - "+content/public/test", - "+components/autofill/core/browser", - "+components/bookmarks/browser", - "+components/component_updater", - "+components/gcm_driver/gcm_buildflags.h", - "+components/grit/brave_components_resources.h", - "+components/grit/brave_components_strings.h", - "+components/infobars/content", - "+components/infobars/core", - "+components/keep_alive_registry", - "+components/keyed_service/content", - "+components/metrics", - "+components/metrics_services_manager", - "+components/nacl/common/buildflags.h", - "+components/omnibox/browser", - "+components/page_info", - "+components/permissions", - "+components/policy/policy_constants.h", - "+components/policy/core/browser", - "+components/policy/core/common", - "+components/prefs", - "+components/safe_browsing/core/common/proto/csd.pb.h", - "+components/search", - "+components/search_engines", - "+components/signin/public/identity_manager", - "+components/spellcheck/browser", - "+components/startup_metric_utils/browser", - "+components/strings", - "+components/translate/core/browser", - "+components/version_info", - "+extensions/browser", - "+extensions/buildflags", - "+extensions/common", - "+google_apis", - "+media/media_buildflags.h", - "+mojo/public/cpp", - "+ppapi/buildflags/buildflags.h", - "+printing/buildflags/buildflags.h", - "+services/network/public", - "+third_party/blink/public/common", - "+third_party/blink/public/platform", - "+third_party/blink/public/public_buildflags.h", - "+third_party/blink/public/web", - "+third_party/mozilla", - "+third_party/skia", - "+third_party/widevine/cdm/buildflags.h", - "+ui", + # Make sure renderer directories are not included for components with + # incorrect directory structures + "-brave/components/tor/renderer", + "-brave/components/speedreader/renderer", ] specific_include_rules = { diff --git a/chromium_src/chrome/browser/autocomplete/DEPS b/chromium_src/chrome/browser/autocomplete/DEPS new file mode 100644 index 000000000000..2dc7131c172f --- /dev/null +++ b/chromium_src/chrome/browser/autocomplete/DEPS @@ -0,0 +1,7 @@ +include_rules = [ + "+brave/components/ai_chat/content/browser", + "+brave/components/ai_chat/core/browser", + "+brave/components/ai_chat/core/common", + "+brave/components/commander/common/buildflags", + "+brave/components/commander/browser", +] diff --git a/chromium_src/chrome/browser/bookmarks/android/DEPS b/chromium_src/chrome/browser/bookmarks/android/DEPS new file mode 100644 index 000000000000..19c58f895c36 --- /dev/null +++ b/chromium_src/chrome/browser/bookmarks/android/DEPS @@ -0,0 +1,5 @@ +specific_include_rules = { + "bookmark_bridge\.cc": [ + "!chrome/utility/importer/bookmark_html_reader.h" + ] +} diff --git a/chromium_src/chrome/browser/component_updater/DEPS b/chromium_src/chrome/browser/component_updater/DEPS new file mode 100644 index 000000000000..8cce79881d8f --- /dev/null +++ b/chromium_src/chrome/browser/component_updater/DEPS @@ -0,0 +1,6 @@ +include_rules = [ + "+brave/components/brave_component_updater/browser", + "+brave/components/ai_chat/core/browser", + "+brave/components/brave_wallet/browser", + "+brave/components/psst/browser/core", +] diff --git a/chromium_src/chrome/browser/content_settings/DEPS b/chromium_src/chrome/browser/content_settings/DEPS new file mode 100644 index 000000000000..9c7b37aef52e --- /dev/null +++ b/chromium_src/chrome/browser/content_settings/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/content_settings/core/browser", +] diff --git a/chromium_src/chrome/browser/download/DEPS b/chromium_src/chrome/browser/download/DEPS index bc79e9db0da2..d4c3be2fbfcd 100644 --- a/chromium_src/chrome/browser/download/DEPS +++ b/chromium_src/chrome/browser/download/DEPS @@ -1,3 +1,4 @@ include_rules = [ "+components/download", + "+brave/components/brave_shields/content/browser", ] diff --git a/chromium_src/chrome/browser/extensions/DEPS b/chromium_src/chrome/browser/extensions/DEPS index df636d4fc662..35d5cdbcf8eb 100644 --- a/chromium_src/chrome/browser/extensions/DEPS +++ b/chromium_src/chrome/browser/extensions/DEPS @@ -1,3 +1,5 @@ include_rules = [ "+brave/components/brave_extension", + "+brave/components/brave_webtorrent/browser/buildflags", + "+brave/components/brave_webtorrent/grit", ] diff --git a/chromium_src/chrome/browser/external_protocol/DEPS b/chromium_src/chrome/browser/external_protocol/DEPS new file mode 100644 index 000000000000..0efe795a5a8e --- /dev/null +++ b/chromium_src/chrome/browser/external_protocol/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/brave_webtorrent/browser", +] diff --git a/chromium_src/chrome/browser/flags/android/DEPS b/chromium_src/chrome/browser/flags/android/DEPS new file mode 100644 index 000000000000..884e0f15c99e --- /dev/null +++ b/chromium_src/chrome/browser/flags/android/DEPS @@ -0,0 +1,15 @@ +include_rules = [ + "+brave/components/ai_chat/core/common/features.h", + "+brave/components/brave_news/common/features.h", + "+brave/components/brave_rewards/common/features.h", + "+brave/components/brave_search_conversion/features.h", + "+brave/components/brave_shields/core/common/features.h", + "+brave/components/brave_vpn/common/features.h", + "+brave/components/brave_wallet/common/features.h", + "+brave/components/debounce/core/common/features.h", + "+brave/components/google_sign_in_permission/features.h", + "+brave/components/playlist/common/features.h", + "+brave/components/request_otr/common/features.h", + "+brave/components/speedreader/common/features.h", + "+brave/components/webcompat/core/common/features.h", +] diff --git a/chromium_src/chrome/browser/history/DEPS b/chromium_src/chrome/browser/history/DEPS new file mode 100644 index 000000000000..716c0d27c1da --- /dev/null +++ b/chromium_src/chrome/browser/history/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + "+brave/components/request_otr/common", + "+brave/components/request_otr/browser", +] diff --git a/chromium_src/chrome/browser/net/DEPS b/chromium_src/chrome/browser/net/DEPS new file mode 100644 index 000000000000..4b23a3e014cb --- /dev/null +++ b/chromium_src/chrome/browser/net/DEPS @@ -0,0 +1,5 @@ +include_rules = [ + "+brave/components/tor", + "+brave/components/brave_vpn/common", + "+brave/services/network/public", +] diff --git a/chromium_src/chrome/browser/ntp_tiles/DEPS b/chromium_src/chrome/browser/ntp_tiles/DEPS new file mode 100644 index 000000000000..9d66377d0864 --- /dev/null +++ b/chromium_src/chrome/browser/ntp_tiles/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/ntp_tiles", +] diff --git a/chromium_src/chrome/browser/page_load_metrics/DEPS b/chromium_src/chrome/browser/page_load_metrics/DEPS new file mode 100644 index 000000000000..e9b762fc6190 --- /dev/null +++ b/chromium_src/chrome/browser/page_load_metrics/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/brave_perf_predictor/browser", +] diff --git a/chromium_src/chrome/browser/permissions/DEPS b/chromium_src/chrome/browser/permissions/DEPS new file mode 100644 index 000000000000..7e4cb7728af3 --- /dev/null +++ b/chromium_src/chrome/browser/permissions/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/permissions", +] diff --git a/chromium_src/chrome/browser/prefs/DEPS b/chromium_src/chrome/browser/prefs/DEPS new file mode 100644 index 000000000000..ef5758a628bb --- /dev/null +++ b/chromium_src/chrome/browser/prefs/DEPS @@ -0,0 +1,28 @@ +include_rules = [ + "+brave/components/ai_chat/core/browser/model_service.h", + "+brave/components/brave_adaptive_captcha/prefs_util.h", + "+brave/components/brave_ads/core/public/prefs/obsolete_pref_util.h", + "+brave/components/brave_news/browser/brave_news_p3a.h", + "+brave/components/brave_news/common/p3a_pref_names.h", + "+brave/components/brave_news/common/pref_names.h", + "+brave/components/brave_search_conversion/p3a.h", + "+brave/components/brave_shields/content/browser/brave_shields_p3a.h", + "+brave/components/brave_sync/brave_sync_prefs.h", + "+brave/components/brave_vpn/common/buildflags/buildflags.h", + "+brave/components/brave_wallet/browser/brave_wallet_prefs.h", + "+brave/components/brave_wallet/browser/keyring_service.h", + "+brave/components/constants/pref_names.h", + "+brave/components/decentralized_dns/core/utils.h", + "+brave/components/ipfs/ipfs_prefs.h", + "+brave/components/ntp_background_images/browser/view_counter_service.h", + "+brave/components/ntp_background_images/buildflags/buildflags.h", + "+brave/components/omnibox/browser/brave_omnibox_prefs.h", + "+brave/components/p3a/star_randomness_meta.h", + "+brave/components/tor/buildflags/buildflags.h", + "+brave/components/brave_vpn/common/brave_vpn_utils.h", + "+brave/components/tor/pref_names.h", + "+brave/components/tor/tor_utils.h", + "+brave/components/sidebar/browser/pref_names.h", + "+brave/components/brave_shields/core/common/pref_names.h", + "+brave/components/constants/pref_names.h", +] diff --git a/chromium_src/chrome/browser/privacy_sandbox/DEPS b/chromium_src/chrome/browser/privacy_sandbox/DEPS new file mode 100644 index 000000000000..edaccdc09a48 --- /dev/null +++ b/chromium_src/chrome/browser/privacy_sandbox/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/privacy_sandbox", +] diff --git a/chromium_src/chrome/browser/profiles/DEPS b/chromium_src/chrome/browser/profiles/DEPS new file mode 100644 index 000000000000..8fea6ce9331c --- /dev/null +++ b/chromium_src/chrome/browser/profiles/DEPS @@ -0,0 +1,7 @@ +include_rules = [ + "+brave/components/sync/service", + "+brave/components/constants", + "+brave/components/tor", + "+brave/components/l10n/common", + "+brave/components/constants", +] diff --git a/chromium_src/chrome/browser/renderer_context_menu/DEPS b/chromium_src/chrome/browser/renderer_context_menu/DEPS new file mode 100644 index 000000000000..5dc06303da04 --- /dev/null +++ b/chromium_src/chrome/browser/renderer_context_menu/DEPS @@ -0,0 +1,11 @@ +include_rules = [ + "+brave/components/ai_rewriter/common", + "+brave/components/tor/buildflags", + "+brave/components/ai_chat/content/browser", + "+brave/components/ai_chat/core/browser", + "+brave/components/ai_chat/core/common", + "+brave/components/brave_shields/core/common", + "+brave/components/ai_rewriter/common/features.h", + "+brave/components/ai_chat/core/browser", + "+brave/components/text_recognition/common", +] diff --git a/chromium_src/chrome/browser/ssl/DEPS b/chromium_src/chrome/browser/ssl/DEPS new file mode 100644 index 000000000000..199196dd0483 --- /dev/null +++ b/chromium_src/chrome/browser/ssl/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/brave_shields/content/browser", +] diff --git a/chromium_src/chrome/browser/sync/DEPS b/chromium_src/chrome/browser/sync/DEPS new file mode 100644 index 000000000000..aacd23d859cb --- /dev/null +++ b/chromium_src/chrome/browser/sync/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/sync/service", +] diff --git a/chromium_src/chrome/browser/ui/DEPS b/chromium_src/chrome/browser/ui/DEPS new file mode 100644 index 000000000000..70fb95cbe8fc --- /dev/null +++ b/chromium_src/chrome/browser/ui/DEPS @@ -0,0 +1,10 @@ +from brave_chromium_utils import inline_file +inline_file("//chrome/browser/ui/DEPS", globals(), locals()) + +include_rules += [ + "+brave/components/vector_icons", + "+brave/components/commander/common", + "+brave/components/constants", + "+brave/components/brave_webtorrent/browser", + "+brave/components/l10n/common", +] diff --git a/chromium_src/chrome/browser/ui/browser_window/DEPS b/chromium_src/chrome/browser/ui/browser_window/DEPS new file mode 100644 index 000000000000..41de0374fadd --- /dev/null +++ b/chromium_src/chrome/browser/ui/browser_window/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/brave_vpn/common/buildflags", +] diff --git a/chromium_src/chrome/browser/ui/page_info/DEPS b/chromium_src/chrome/browser/ui/page_info/DEPS new file mode 100644 index 000000000000..9c7b37aef52e --- /dev/null +++ b/chromium_src/chrome/browser/ui/page_info/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/content_settings/core/browser", +] diff --git a/chromium_src/chrome/browser/ui/startup/DEPS b/chromium_src/chrome/browser/ui/startup/DEPS new file mode 100644 index 000000000000..64c5c3fce6b2 --- /dev/null +++ b/chromium_src/chrome/browser/ui/startup/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/tor/buildflags", +] diff --git a/chromium_src/chrome/browser/ui/views/DEPS b/chromium_src/chrome/browser/ui/views/DEPS deleted file mode 100644 index de69763f3668..000000000000 --- a/chromium_src/chrome/browser/ui/views/DEPS +++ /dev/null @@ -1,3 +0,0 @@ -include_rules = [ - "+components/crash/core/app", -] diff --git a/chromium_src/chrome/browser/ui/views/page_action/DEPS b/chromium_src/chrome/browser/ui/views/page_action/DEPS new file mode 100644 index 000000000000..4fd974dddf65 --- /dev/null +++ b/chromium_src/chrome/browser/ui/views/page_action/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + "+brave/components/playlist/common/buildflags", + "+brave/components/speedreader/common/buildflags", +] diff --git a/chromium_src/chrome/browser/ui/views/page_info/DEPS b/chromium_src/chrome/browser/ui/views/page_info/DEPS new file mode 100644 index 000000000000..0efe795a5a8e --- /dev/null +++ b/chromium_src/chrome/browser/ui/views/page_info/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/brave_webtorrent/browser", +] diff --git a/chromium_src/chrome/browser/ui/views/permissions/DEPS b/chromium_src/chrome/browser/ui/views/permissions/DEPS new file mode 100644 index 000000000000..7e4cb7728af3 --- /dev/null +++ b/chromium_src/chrome/browser/ui/views/permissions/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/permissions", +] diff --git a/chromium_src/chrome/browser/ui/views/side_panel/DEPS b/chromium_src/chrome/browser/ui/views/side_panel/DEPS new file mode 100644 index 000000000000..832e5748e665 --- /dev/null +++ b/chromium_src/chrome/browser/ui/views/side_panel/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/playlist/common", +] diff --git a/chromium_src/chrome/browser/ui/views/translate/DEPS b/chromium_src/chrome/browser/ui/views/translate/DEPS new file mode 100644 index 000000000000..656f58db61be --- /dev/null +++ b/chromium_src/chrome/browser/ui/views/translate/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/translate/core/common", +] diff --git a/chromium_src/chrome/browser/ui/webui/DEPS b/chromium_src/chrome/browser/ui/webui/DEPS index 5e6dbb1486c3..7c86e5041a0f 100644 --- a/chromium_src/chrome/browser/ui/webui/DEPS +++ b/chromium_src/chrome/browser/ui/webui/DEPS @@ -1,4 +1,10 @@ include_rules = [ - "+brave/components/webui/about_ui.h", - "+third_party/re2", + "+brave/components/webui", + "+brave/components/version_info", + "+brave/components/ai_chat/core/common", + "+brave/components/brave_vpn/common", + "+brave/components/playlist/common", + "+brave/components/brave_vpn/common", + "+brave/components/playlist/common", + "+brave/components/ai_chat/core/common", ] diff --git a/chromium_src/chrome/browser/ui/webui/settings/DEPS b/chromium_src/chrome/browser/ui/webui/settings/DEPS new file mode 100644 index 000000000000..34a71ee7f495 --- /dev/null +++ b/chromium_src/chrome/browser/ui/webui/settings/DEPS @@ -0,0 +1,7 @@ +include_rules = [ + "+brave/components/sync/service", + "+brave/components/brave_vpn/common/buildflags", + "+brave/net/dns", + "+brave/components/brave_vpn/common", + "+brave/components/brave_shields/core/common", +] diff --git a/chromium_src/chrome/common/DEPS b/chromium_src/chrome/common/DEPS index 7a61e77e01e8..418976cab491 100644 --- a/chromium_src/chrome/common/DEPS +++ b/chromium_src/chrome/common/DEPS @@ -1,8 +1,9 @@ -include_rules = [ +from brave_chromium_utils import inline_file +inline_file("//chrome/common/DEPS", globals(), locals()) + +include_rules += [ "+brave/common", "+brave/components/constants", "+brave/components/ipfs/buildflags", "+brave/grit", - "+components/version_info", - "+components/component_updater", ] diff --git a/chromium_src/chrome/install_static/DEPS b/chromium_src/chrome/install_static/DEPS index 866c1a4f301d..04de3e9300e8 100644 --- a/chromium_src/chrome/install_static/DEPS +++ b/chromium_src/chrome/install_static/DEPS @@ -1,8 +1,7 @@ +from brave_chromium_utils import inline_file +inline_file("//chrome/install_static/DEPS", globals(), locals()) + + include_rules = [ - "+chrome/app/chrome_dll_resource.h", - "+chrome/chrome_elf/nt_registry/nt_registry.h", - "+chrome/common/chrome_icon_resources_win.h", - "+components/nacl/common/buildflags.h", - "+components/version_info/channel.h", - "+components/version_info/version_info_values.h", + "+components/version_info", ] diff --git a/chromium_src/chrome/installer/DEPS b/chromium_src/chrome/installer/DEPS index 32518a560d3a..cfd118008f78 100644 --- a/chromium_src/chrome/installer/DEPS +++ b/chromium_src/chrome/installer/DEPS @@ -1,12 +1,9 @@ -include_rules = [ - "+brave/browser/brave_vpn/win/brave_vpn_helper", - "+brave/browser/brave_vpn/win/brave_vpn_wireguard_service", - "+brave/browser/brave_vpn/win/service_details.h", - "+brave/browser/brave_vpn/win/wireguard_utils_win.h", +from brave_chromium_utils import inline_file +inline_file("//chrome/installer/DEPS", globals(), locals()) + +include_rules += [ + "+brave/browser/brave_vpn/win", "+brave/components/brave_vpn/browser/connection/ikev2/win", "+brave/components/brave_vpn/common/buildflags", "+brave/installer", - "+chrome/common", - "+chrome/install_static", - "+components/version_info", ] diff --git a/chromium_src/chrome/renderer/DEPS b/chromium_src/chrome/renderer/DEPS index 3bf0f3cd4eeb..d4058040e923 100644 --- a/chromium_src/chrome/renderer/DEPS +++ b/chromium_src/chrome/renderer/DEPS @@ -1,4 +1,7 @@ -include_rules = [ +from brave_chromium_utils import inline_file +inline_file("//chrome/renderer/DEPS", globals(), locals()) + +include_rules += [ "+brave/components/ai_chat/core/common", "+brave/components/ai_chat/renderer", "+brave/components/body_sniffer", @@ -7,8 +10,4 @@ include_rules = [ "+brave/components/tor/buildflags", "+brave/components/tor/renderer", "+brave/renderer", - "+media/base/key_system_info.h", - "+services/network/public/cpp", - "+third_party/blink/public", - "+third_party/widevine/cdm/buildflags.h", ] diff --git a/chromium_src/chrome/services/printing/DEPS b/chromium_src/chrome/services/printing/DEPS index 46cd91c78263..8afcb1887e4d 100644 --- a/chromium_src/chrome/services/printing/DEPS +++ b/chromium_src/chrome/services/printing/DEPS @@ -1,4 +1,6 @@ +from brave_chromium_utils import inline_file +inline_file("//chrome/services/printing/DEPS", globals(), locals()) + include_rules = [ "+brave/services/printing", ] - diff --git a/chromium_src/chrome/test/DEPS b/chromium_src/chrome/test/DEPS index 12cbd324e88f..891dadcc2a76 100644 --- a/chromium_src/chrome/test/DEPS +++ b/chromium_src/chrome/test/DEPS @@ -1,4 +1,2 @@ -include_rules = [ - "+brave", - "+chrome", -] +from brave_chromium_utils import inline_file +inline_file("//chrome/test/DEPS", globals(), locals()) diff --git a/chromium_src/chrome/test/base/DEPS b/chromium_src/chrome/test/base/DEPS new file mode 100644 index 000000000000..e3821beccb71 --- /dev/null +++ b/chromium_src/chrome/test/base/DEPS @@ -0,0 +1,9 @@ +include_rules = [ + "+brave/browser", + "+brave/common", + "+brave/renderer", + "+brave/app", + "+brave/utility", + "+brave/components/brave_shields/content/browser", + "+brave/test/base", +] diff --git a/chromium_src/chrome/test/views/DEPS b/chromium_src/chrome/test/views/DEPS new file mode 100644 index 000000000000..bacd6c7302a1 --- /dev/null +++ b/chromium_src/chrome/test/views/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/browser/ui/views", +] diff --git a/chromium_src/chrome/utility/DEPS b/chromium_src/chrome/utility/DEPS new file mode 100644 index 000000000000..60a8fd3d5048 --- /dev/null +++ b/chromium_src/chrome/utility/DEPS @@ -0,0 +1,2 @@ +from brave_chromium_utils import inline_file +inline_file("//chrome/utility/DEPS", globals(), locals()) diff --git a/common/DEPS b/common/DEPS index 77a82de58501..0c3f48f4579c 100644 --- a/common/DEPS +++ b/common/DEPS @@ -1,18 +1,21 @@ -include_rules = [ +from brave_chromium_utils import inline_file +inline_file("//chrome/DEPS", globals(), locals()) + +chrome_common_deps = {} +inline_file("//chrome/common/DEPS", {}, chrome_common_deps) +include_rules += chrome_common_deps["include_rules"] + +include_rules += [ "+chrome/common", - "+chrome/test", - "+content/public/common", - "+content/public/test", - "+components/gcm_driver/gcm_buildflags.h", - "+components/grit/brave_components_resources.h", - "+components/grit/flags_ui_resources.h", - "+components/version_info", - "+extensions/buildflags", - "+extensions/common/url_pattern.h", - "+third_party/widevine/cdm/buildflags.h", + "+components/grit", + "+brave/components/constants", ] specific_include_rules = { + ".*browsertest\.cc": [ + "+chrome/test", + "+content/public/test", + ], "brave_content_client_unittest\.cc": [ "+content/common/url_schemes.h", ], diff --git a/common/extensions/DEPS b/common/extensions/DEPS index 5b6b028d0d8e..549553dae19f 100644 --- a/common/extensions/DEPS +++ b/common/extensions/DEPS @@ -1,4 +1,4 @@ include_rules = [ - "+components/component_updater", + "+components/component_updater/component_updater_switches.h", "+extensions/common", ] diff --git a/common/importer/DEPS b/common/importer/DEPS index 75af5bf6192b..e185ee1b828c 100644 --- a/common/importer/DEPS +++ b/common/importer/DEPS @@ -1,5 +1,6 @@ -include_rules = [ +from brave_chromium_utils import inline_file +inline_file('//chrome/common/importer/DEPS', globals(), locals()) + +include_rules += [ "+components/webdata/common", - "+extensions/buildflags/buildflags.h", - "+extensions/common", ] diff --git a/components/ai_chat/content/browser/DEPS b/components/ai_chat/content/browser/DEPS index 2a8c66b98131..416379002caa 100644 --- a/components/ai_chat/content/browser/DEPS +++ b/components/ai_chat/content/browser/DEPS @@ -2,6 +2,7 @@ include_rules = [ "+brave/services/printing", "+content/public/browser", "+content/public/common", + "+crypto", "+pdf/buildflags.h", "+services/strings/grit/services_strings.h", "+ui/accessibility", @@ -10,5 +11,6 @@ include_rules = [ "+services/network/public", "+services/service_manager/public", "+third_party/blink/public/common", - "+third_party/blink/public/mojom/permissions" + "+third_party/blink/public/mojom/permissions", + "+ui/base", ] diff --git a/components/ai_chat/core/browser/DEPS b/components/ai_chat/core/browser/DEPS index c80cb5a16d41..39a4b631030f 100644 --- a/components/ai_chat/core/browser/DEPS +++ b/components/ai_chat/core/browser/DEPS @@ -1,7 +1,9 @@ include_rules = [ + "+brave/net/base", "+cc/port", "+cc/task/core", "+cc/task/text", + "+crypto", "+components/os_crypt/async", "+services/data_decoder/public", "+services/network/public", @@ -14,6 +16,7 @@ include_rules = [ "+third_party/re2/src/re2", "+third_party/tflite", "+third_party/tflite_support", + "+ui/base", ] specific_include_rules = { diff --git a/components/ai_chat/renderer/DEPS b/components/ai_chat/renderer/DEPS index 7a8a980baf8a..a0745d005641 100644 --- a/components/ai_chat/renderer/DEPS +++ b/components/ai_chat/renderer/DEPS @@ -12,4 +12,5 @@ include_rules = [ "+services/network/test", "+services/service_manager/public/cpp", "+third_party/abseil-cpp/absl/types", + "+ui/base/resource/resource_bundle.h", ] diff --git a/components/brave_ads/browser/reminder/DEPS b/components/brave_ads/browser/reminder/DEPS new file mode 100644 index 000000000000..4c8d3123a9c9 --- /dev/null +++ b/components/brave_ads/browser/reminder/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/grit/brave_generated_resources.h", +] diff --git a/components/brave_ads/core/internal/common/DEPS b/components/brave_ads/core/internal/common/DEPS new file mode 100644 index 000000000000..6fff87d325a9 --- /dev/null +++ b/components/brave_ads/core/internal/common/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+sql", +] diff --git a/components/brave_ads/core/internal/common/crypto/DEPS b/components/brave_ads/core/internal/common/crypto/DEPS index cea583025fdb..30626cc01920 100644 --- a/components/brave_ads/core/internal/common/crypto/DEPS +++ b/components/brave_ads/core/internal/common/crypto/DEPS @@ -1,5 +1,6 @@ specific_include_rules = { "crypto_util\.cc": [ + "+crypto", "+third_party/boringssl/src/include/openssl/curve25519.h", ], } diff --git a/components/brave_ads/core/internal/database/DEPS b/components/brave_ads/core/internal/database/DEPS new file mode 100644 index 000000000000..6fff87d325a9 --- /dev/null +++ b/components/brave_ads/core/internal/database/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+sql", +] diff --git a/components/brave_ads/core/internal/deprecated/json/DEPS b/components/brave_ads/core/internal/deprecated/json/DEPS new file mode 100644 index 000000000000..c43b8fa3bfcc --- /dev/null +++ b/components/brave_ads/core/internal/deprecated/json/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "!brave/third_party/rapidjson/src/include/rapidjson", +] diff --git a/components/brave_component_updater/browser/DEPS b/components/brave_component_updater/browser/DEPS index 08b52cb8cbf3..8f5805569188 100644 --- a/components/brave_component_updater/browser/DEPS +++ b/components/brave_component_updater/browser/DEPS @@ -1,3 +1,4 @@ include_rules = [ + "+crypto", "+extensions/common", ] diff --git a/components/brave_news/browser/DEPS b/components/brave_news/browser/DEPS index f664f8bddb9c..ac87adf54026 100644 --- a/components/brave_news/browser/DEPS +++ b/components/brave_news/browser/DEPS @@ -6,4 +6,5 @@ include_rules = [ "+services/network/public", "+services/network/test", "+third_party/re2", + "+ui/base", ] diff --git a/components/brave_private_new_tab_ui/common/DEPS b/components/brave_private_new_tab_ui/common/DEPS new file mode 100644 index 000000000000..e7cf2c6ff61a --- /dev/null +++ b/components/brave_private_new_tab_ui/common/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+ui/base", +] diff --git a/components/brave_referrals/browser/DEPS b/components/brave_referrals/browser/DEPS index 42017d170163..15f7d4de77a3 100644 --- a/components/brave_referrals/browser/DEPS +++ b/components/brave_referrals/browser/DEPS @@ -4,3 +4,9 @@ include_rules = [ "+content/public/common", "+services/network/public", ] + +specific_include_rules = { + "brave_referrals_service\.cc": [ + "+brave/vendor/brave_base/random.h", + ] +} diff --git a/components/brave_referrals/browser/brave_referrals_service.cc b/components/brave_referrals/browser/brave_referrals_service.cc index 3dd1ab6e4dc2..d381fd337100 100644 --- a/components/brave_referrals/browser/brave_referrals_service.cc +++ b/components/brave_referrals/browser/brave_referrals_service.cc @@ -23,7 +23,7 @@ #include "brave/components/brave_referrals/common/pref_names.h" #include "brave/components/constants/network_constants.h" #include "brave/components/constants/pref_names.h" -#include "brave_base/random.h" +#include "brave/vendor/brave_base/random.h" #include "build/build_config.h" #include "components/prefs/pref_registry_simple.h" #include "components/prefs/pref_service.h" diff --git a/components/brave_rewards/browser/DEPS b/components/brave_rewards/browser/DEPS index d03156e654c3..fc707195dc13 100644 --- a/components/brave_rewards/browser/DEPS +++ b/components/brave_rewards/browser/DEPS @@ -1,4 +1,5 @@ include_rules = [ + "+brave/grit/brave_generated_resources.h", "+content/public/browser", "+content/public/common", "+content/public/test", diff --git a/components/brave_rewards/browser/test/DEPS b/components/brave_rewards/browser/test/DEPS new file mode 100644 index 000000000000..4ef4138e48f6 --- /dev/null +++ b/components/brave_rewards/browser/test/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+crypto", +] diff --git a/components/brave_rewards/core/DEPS b/components/brave_rewards/core/DEPS index 1cf294cfed34..6aa28986d3b8 100644 --- a/components/brave_rewards/core/DEPS +++ b/components/brave_rewards/core/DEPS @@ -1,4 +1,6 @@ include_rules = [ + "+crypto", "+third_party/brotli", "+third_party/re2", + "+sql", ] diff --git a/components/brave_rewards/core/common/DEPS b/components/brave_rewards/core/common/DEPS new file mode 100644 index 000000000000..23cebc997d0c --- /dev/null +++ b/components/brave_rewards/core/common/DEPS @@ -0,0 +1,5 @@ +specific_include_rules = { + "time_util\.cc": [ + "+brave/vendor/brave_base/random.h", + ] +} diff --git a/components/brave_rewards/core/common/time_util.cc b/components/brave_rewards/core/common/time_util.cc index d4dc45da299b..63714414b7c8 100644 --- a/components/brave_rewards/core/common/time_util.cc +++ b/components/brave_rewards/core/common/time_util.cc @@ -6,7 +6,8 @@ #include "brave/components/brave_rewards/core/common/time_util.h" #include -#include "brave_base/random.h" + +#include "brave/vendor/brave_base/random.h" namespace brave_rewards::internal::util { diff --git a/components/brave_rewards/core/database/DEPS b/components/brave_rewards/core/database/DEPS new file mode 100644 index 000000000000..6fff87d325a9 --- /dev/null +++ b/components/brave_rewards/core/database/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+sql", +] diff --git a/components/brave_rewards/core/publisher/server_publisher_fetcher.cc b/components/brave_rewards/core/publisher/server_publisher_fetcher.cc index 40fb2785644f..2de054f9b706 100644 --- a/components/brave_rewards/core/publisher/server_publisher_fetcher.cc +++ b/components/brave_rewards/core/publisher/server_publisher_fetcher.cc @@ -17,7 +17,6 @@ #include "brave/components/brave_rewards/core/publisher/protos/channel_response.pb.h" #include "brave/components/brave_rewards/core/publisher/publisher_prefix_list_updater.h" #include "brave/components/brave_rewards/core/rewards_engine.h" -#include "brave_base/random.h" namespace brave_rewards::internal::publisher { diff --git a/components/brave_service_keys/DEPS b/components/brave_service_keys/DEPS new file mode 100644 index 000000000000..4ef4138e48f6 --- /dev/null +++ b/components/brave_service_keys/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+crypto", +] diff --git a/components/brave_shields/content/browser/DEPS b/components/brave_shields/content/browser/DEPS index 84b7bed52262..ba9f8e0a1ded 100644 --- a/components/brave_shields/content/browser/DEPS +++ b/components/brave_shields/content/browser/DEPS @@ -1,13 +1,16 @@ include_rules = [ "+brave/components/constants", + "+brave/content/public/browser/devtools", "+components/content_settings/core", "+content/public/browser", "+content/public/common", + "+crypto", "+services/network/public", "+storage/browser/blob", "+third_party/blink/public/mojom", "+third_party/re2", "+third_party/zlib", + "+ui/base", ] specific_include_rules = { diff --git a/components/brave_shields/core/browser/DEPS b/components/brave_shields/core/browser/DEPS new file mode 100644 index 000000000000..4ef4138e48f6 --- /dev/null +++ b/components/brave_shields/core/browser/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+crypto", +] diff --git a/components/brave_shields/core/common/DEPS b/components/brave_shields/core/common/DEPS new file mode 100644 index 000000000000..e7cf2c6ff61a --- /dev/null +++ b/components/brave_shields/core/common/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+ui/base", +] diff --git a/components/brave_sync/DEPS b/components/brave_sync/DEPS index 55518564224f..a26aa8d1f49e 100644 --- a/components/brave_sync/DEPS +++ b/components/brave_sync/DEPS @@ -1,4 +1,5 @@ include_rules = [ + "+brave/third_party/bip39wally-core-native", "+content/public/browser", "+third_party/boringssl", "+ios/web/public", diff --git a/components/brave_sync/crypto/DEPS b/components/brave_sync/crypto/DEPS new file mode 100644 index 000000000000..5102fb890936 --- /dev/null +++ b/components/brave_sync/crypto/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + "+brave/vendor/bat-native-tweetnacl", + "+crypto", +] diff --git a/components/brave_vpn/browser/DEPS b/components/brave_vpn/browser/DEPS index ea9d371405af..0e76700d9f71 100644 --- a/components/brave_vpn/browser/DEPS +++ b/components/brave_vpn/browser/DEPS @@ -4,4 +4,5 @@ include_rules = [ "+services/data_decoder/public", "+services/network/public/cpp", "+services/network/test", + "+ui/base", ] diff --git a/components/brave_wallet/browser/DEPS b/components/brave_wallet/browser/DEPS index a68a60fd97c9..2d56ab7e8a8a 100644 --- a/components/brave_wallet/browser/DEPS +++ b/components/brave_wallet/browser/DEPS @@ -1,7 +1,9 @@ include_rules = [ + "+brave/net/base", "+content/public/browser", "+content/public/common", "+content/public/test", + "+crypto", "+services/data_decoder/public/cpp", "+services/network/public/cpp", "+services/network/public/mojom", @@ -12,4 +14,11 @@ include_rules = [ "+brave/components/constants", "+brave/components/version_info", "+tools/json_schema_compiler", + "+ui/base", ] + +specific_include_rules = { + "brave_wallet_utils\.cc": [ + "+brave/third_party/bip39wally-core-native/include", + ] +} diff --git a/components/brave_wallet/browser/internal/DEPS b/components/brave_wallet/browser/internal/DEPS index 1adb6658adc7..51955be94f62 100644 --- a/components/brave_wallet/browser/internal/DEPS +++ b/components/brave_wallet/browser/internal/DEPS @@ -6,3 +6,9 @@ include_rules = [ "+brave/third_party/bitcoin-core/src/src/secp256k1/include/secp256k1.h", "+brave/third_party/bitcoin-core/src/src/util/strencodings.h", ] + +specific_include_rules = { + "hd_key\.cc": [ + "+brave/vendor/bat-native-tweetnacl/tweetnacl.h", + ] +} diff --git a/components/brave_wallet/browser/internal/orchard_storage/DEPS b/components/brave_wallet/browser/internal/orchard_storage/DEPS new file mode 100644 index 000000000000..6fff87d325a9 --- /dev/null +++ b/components/brave_wallet/browser/internal/orchard_storage/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+sql", +] diff --git a/components/brave_wallet/browser/zcash/DEPS b/components/brave_wallet/browser/zcash/DEPS index 085af6139b4b..693bfa6e5d85 100644 --- a/components/brave_wallet/browser/zcash/DEPS +++ b/components/brave_wallet/browser/zcash/DEPS @@ -1,3 +1,7 @@ +include_rules = [ + "+ui/base", +] + specific_include_rules = { "zcash_serializer\.cc": [ "+brave/third_party/argon2", diff --git a/components/brave_wallet/common/DEPS b/components/brave_wallet/common/DEPS index 9a079c726293..459722a85a3f 100644 --- a/components/brave_wallet/common/DEPS +++ b/components/brave_wallet/common/DEPS @@ -1,5 +1,7 @@ include_rules = [ "+brave/third_party/argon2", + "+crypto", + "+brave/net/base", ] specific_include_rules = { @@ -13,6 +15,7 @@ specific_include_rules = { ], "hash_utils\.cc": [ "+brave/third_party/bitcoin-core/src/src/crypto/ripemd160.h", + "!brave/third_party/ethash/src/include/ethash/keccak.h", ], "zcash_utils\.cc": [ "+brave/third_party/bitcoin-core/src/src/base58.h", diff --git a/components/brave_webtorrent/browser/DEPS b/components/brave_webtorrent/browser/DEPS index d0819debe46a..431186b53c34 100644 --- a/components/brave_webtorrent/browser/DEPS +++ b/components/brave_webtorrent/browser/DEPS @@ -3,4 +3,5 @@ include_rules = [ "+content/public/browser", "+extensions/browser", "+extensions/common", + "+ui/base", ] diff --git a/components/commands/browser/DEPS b/components/commands/browser/DEPS new file mode 100644 index 000000000000..4a2b20490363 --- /dev/null +++ b/components/commands/browser/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+ui/base/accelerators", +] diff --git a/components/commands/common/DEPS b/components/commands/common/DEPS new file mode 100644 index 000000000000..4a2b20490363 --- /dev/null +++ b/components/commands/common/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+ui/base/accelerators", +] diff --git a/components/content_settings/renderer/DEPS b/components/content_settings/renderer/DEPS index 6d6e9e48414b..de817e2d97fe 100644 --- a/components/content_settings/renderer/DEPS +++ b/components/content_settings/renderer/DEPS @@ -4,3 +4,9 @@ include_rules = [ "+third_party/blink/public", "+third_party/blink/renderer", ] + +specific_include_rules = { + "brave_content_settings_agent_impl\.h": [ + "!brave/third_party/blink/renderer/brave_farbling_constants.h", + ] +} diff --git a/components/de_amp/browser/DEPS b/components/de_amp/browser/DEPS index d9354e950b51..d474e4628ffb 100644 --- a/components/de_amp/browser/DEPS +++ b/components/de_amp/browser/DEPS @@ -4,4 +4,5 @@ include_rules = [ "+services/network/public/cpp", "+services/network/public/mojom", "+third_party/re2", + "+ui/base", ] diff --git a/components/debounce/content/browser/DEPS b/components/debounce/content/browser/DEPS index 1c35d9ca694b..c36190b429df 100644 --- a/components/debounce/content/browser/DEPS +++ b/components/debounce/content/browser/DEPS @@ -1,3 +1,4 @@ include_rules = [ "+content/public/browser", + "+ui/base", ] diff --git a/components/decentralized_dns/content/DEPS b/components/decentralized_dns/content/DEPS index 1c35d9ca694b..0eb4ab395c37 100644 --- a/components/decentralized_dns/content/DEPS +++ b/components/decentralized_dns/content/DEPS @@ -1,3 +1,4 @@ include_rules = [ "+content/public/browser", + "+brave/net/decentralized_dns", ] diff --git a/components/decentralized_dns/core/DEPS b/components/decentralized_dns/core/DEPS new file mode 100644 index 000000000000..0ff5d48f2828 --- /dev/null +++ b/components/decentralized_dns/core/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/net/decentralized_dns", +] diff --git a/components/google_sign_in_permission/DEPS b/components/google_sign_in_permission/DEPS index 811d01b54f27..bad58936e45b 100644 --- a/components/google_sign_in_permission/DEPS +++ b/components/google_sign_in_permission/DEPS @@ -5,4 +5,5 @@ include_rules = [ "+third_party/blink/public/common", "+third_party/blink/public/mojom", "+url", + "+ui/base", ] diff --git a/components/l10n/common/DEPS b/components/l10n/common/DEPS index 09bc549a8f18..e7cf2c6ff61a 100644 --- a/components/l10n/common/DEPS +++ b/components/l10n/common/DEPS @@ -1,3 +1,3 @@ include_rules = [ - "+absl/types/optional.h", + "+ui/base", ] diff --git a/components/l10n/common/locale_subtag_parser_util.cc b/components/l10n/common/locale_subtag_parser_util.cc index b94f3ce5666b..a2feded667dc 100644 --- a/components/l10n/common/locale_subtag_parser_util.cc +++ b/components/l10n/common/locale_subtag_parser_util.cc @@ -7,7 +7,6 @@ #include -#include "absl/types/optional.h" #include "base/no_destructor.h" #include "base/strings/strcat.h" #include "base/strings/string_util.h" diff --git a/components/l10n/common/locale_util.h b/components/l10n/common/locale_util.h index dfea9f98117b..d1dc3947d679 100644 --- a/components/l10n/common/locale_util.h +++ b/components/l10n/common/locale_util.h @@ -9,8 +9,6 @@ #include #include -#include "absl/types/optional.h" - namespace brave_l10n { // IMPORTANT: When the locale should match the application locale or an eligible diff --git a/components/ntp_background_images/browser/DEPS b/components/ntp_background_images/browser/DEPS index 8e07e2f0da01..f06e307dd9f5 100644 --- a/components/ntp_background_images/browser/DEPS +++ b/components/ntp_background_images/browser/DEPS @@ -2,6 +2,7 @@ include_rules = [ "+content/public/browser", "+content/public/common", "+content/public/test", + "+crypto", "+ui/base", "+ui/gfx", ] diff --git a/components/ntp_widget_utils/browser/DEPS b/components/ntp_widget_utils/browser/DEPS index 54912fd0a456..59b1bc2f4f12 100644 --- a/components/ntp_widget_utils/browser/DEPS +++ b/components/ntp_widget_utils/browser/DEPS @@ -1,5 +1,6 @@ include_rules = [ "+content/public/test", + "+crypto", ] specific_include_rules = { diff --git a/components/omnibox/browser/DEPS b/components/omnibox/browser/DEPS index d943ceecbde5..4495711a1069 100644 --- a/components/omnibox/browser/DEPS +++ b/components/omnibox/browser/DEPS @@ -11,6 +11,7 @@ include_rules = [ "+third_party/metrics_proto", "+third_party/omnibox_proto", "+ui/gfx", + "+ui/base", ] specific_include_rules = { diff --git a/components/p3a/DEPS b/components/p3a/DEPS index 23bc959727cf..22bf93259fef 100644 --- a/components/p3a/DEPS +++ b/components/p3a/DEPS @@ -2,9 +2,16 @@ include_rules = [ "+brave/components/version_info", "+content/public/browser", "+content/public/test", + "+crypto", "+ios/web/public/thread", "+services/network/public", "+services/network/test", "+third_party/boringssl", "+third_party/metrics_proto", ] + +specific_include_rules = { + "scheduler.cc": [ + "+brave/vendor/brave_base/random.h", + ] +} diff --git a/components/playlist/browser/DEPS b/components/playlist/browser/DEPS index 42ce51a2f2c1..1f4aa5e54d99 100644 --- a/components/playlist/browser/DEPS +++ b/components/playlist/browser/DEPS @@ -7,9 +7,11 @@ include_rules = [ "+components/user_prefs", "+content/public/browser", "+content/public/common", + "+crypto", "+services/network/public/cpp", "+services/preferences/public/cpp", "+third_party/blink/public/common", "+third_party/re2", + "+ui/base", "+ui/gfx", ] diff --git a/components/playlist/renderer/DEPS b/components/playlist/renderer/DEPS index e5f2d59591cf..3b7254e633b6 100644 --- a/components/playlist/renderer/DEPS +++ b/components/playlist/renderer/DEPS @@ -4,6 +4,7 @@ # You can obtain one at https://mozilla.org/MPL/2.0/. include_rules = [ + "+brave/gin", "+content/public/renderer", "+gin", "+third_party/blink/public", diff --git a/components/psst/browser/core/DEPS b/components/psst/browser/core/DEPS index 08b52cb8cbf3..8f5805569188 100644 --- a/components/psst/browser/core/DEPS +++ b/components/psst/browser/core/DEPS @@ -1,3 +1,4 @@ include_rules = [ + "+crypto", "+extensions/common", ] diff --git a/components/request_otr/browser/DEPS b/components/request_otr/browser/DEPS index 1efad3a5ce7b..aaedd4d5634d 100644 --- a/components/request_otr/browser/DEPS +++ b/components/request_otr/browser/DEPS @@ -3,4 +3,5 @@ include_rules = [ "+content/public/common", "+content/public/test", "+extensions/common", + "+ui/base", ] diff --git a/components/services/brave_wallet/content/DEPS b/components/services/brave_wallet/content/DEPS index 435980ed55d6..af47de9dcba1 100644 --- a/components/services/brave_wallet/content/DEPS +++ b/components/services/brave_wallet/content/DEPS @@ -1,4 +1,4 @@ include_rules = [ - "+content/public/browser", + "+brave/grit", + "+content/public/browser", ] - diff --git a/components/tor/DEPS b/components/tor/DEPS index 1629f3f88862..d34061b63854 100644 --- a/components/tor/DEPS +++ b/components/tor/DEPS @@ -1,4 +1,5 @@ include_rules = [ + "+brave/net", "+content/public/browser", "+content/public/common", "+content/public/test", diff --git a/components/webui/DEPS b/components/webui/DEPS index 5314cab856e8..ea7d1dcad938 100644 --- a/components/webui/DEPS +++ b/components/webui/DEPS @@ -1,3 +1,4 @@ include_rules = [ + "+ui/base", "+third_party/re2", -] \ No newline at end of file +] diff --git a/fuzzers/adblock/DEPS b/fuzzers/adblock/DEPS new file mode 100644 index 000000000000..37e3810987c4 --- /dev/null +++ b/fuzzers/adblock/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + "+brave/components/brave_component_updater/browser", + "+brave/components/brave_shields/adblock/rs/src/lib.rs.h", +] diff --git a/fuzzers/brave_news/DEPS b/fuzzers/brave_news/DEPS new file mode 100644 index 000000000000..79f4ee31d6fb --- /dev/null +++ b/fuzzers/brave_news/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/brave_news/rust/lib.rs.h" +] diff --git a/fuzzers/brave_wallet/DEPS b/fuzzers/brave_wallet/DEPS new file mode 100644 index 000000000000..031120ffd392 --- /dev/null +++ b/fuzzers/brave_wallet/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/brave_wallet/browser", +] diff --git a/fuzzers/speedreader/DEPS b/fuzzers/speedreader/DEPS new file mode 100644 index 000000000000..4b37004af3c4 --- /dev/null +++ b/fuzzers/speedreader/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/speedreader", +] diff --git a/ios/DEPS b/ios/DEPS new file mode 100644 index 000000000000..74f0a261c873 --- /dev/null +++ b/ios/DEPS @@ -0,0 +1,2 @@ +from brave_chromium_utils import inline_file +inline_file('//ios/chrome/DEPS', globals(), locals()) diff --git a/ios/app/DEPS b/ios/app/DEPS index 84d5bc5cbf6b..1d72509bef81 100644 --- a/ios/app/DEPS +++ b/ios/app/DEPS @@ -1,26 +1,20 @@ -include_rules = [ + +from brave_chromium_utils import inline_file +inline_file('//ios/chrome/app/DEPS', globals(), locals()) + +include_rules += [ "+ios/chrome/app", - "+ios/chrome/browser", - "+ios/chrome/common", "+brave/ios/app", "+brave/ios/browser", + + "+brave/components/brave_component_updater", + "+brave/components/brave_sync/buildflags.h", + "+brave/components/ntp_background_images/browser", + "+brave/components/p3a", + "+brave/components/update_client/buildflags.h", + "+brave/components/variations", + "+components/browser_sync", - "+components/component_updater/component_updater_paths.h", - "+components/component_updater/component_updater_service.h", - "+components/component_updater/component_updater_switches.h", - "+components/component_updater/installer_policies", - "+components/history/core/browser", - "+components/keyed_service/core", - "+components/prefs", - "+components/password_manager/core", - "+components/safe_browsing/core/common/safe_browsing_prefs.h", - "+components/send_tab_to_self", + "+components/safe_browsing/core/common", "+components/sync/base", - "+components/sync/service", - "+components/variations/variations_switches.h", - "+ios/public/provider/chrome/browser/chrome_browser_provider.h", - "+ios/public/provider/chrome/browser/overrides/overrides_api.h", - "+ios/public/provider/chrome/browser/ui_utils/ui_utils_api.h", - "+ios/web/public/init/web_main.h", - "+services/network/public/cpp/shared_url_loader_factory.h", ] diff --git a/ios/browser/DEPS b/ios/browser/DEPS index 91232cc9a9b0..ec6678a299df 100644 --- a/ios/browser/DEPS +++ b/ios/browser/DEPS @@ -1,14 +1,13 @@ -include_rules = [ +from brave_chromium_utils import inline_file +inline_file('//ios/chrome/browser/DEPS', globals(), locals()) + +include_rules += [ "+brave/ios/browser", - "+components", - "+mojo/public/cpp/bindings", + "+brave/components/constants", + "+brave/components/ai_chat/core/browser", + "+brave/components/brave_component_updater/browser", + "+brave/components/brave_wallet/browser", + "+brave/components/p3a", "+ios/chrome/browser", - "+ios/chrome/browser/web", - "+ios/components", - "+ios/web/public", - "+ios/web/js_messaging", "+ios/web/web_state", - "+ios/web/webui", - "+ios/public/provider/chrome/browser/url_rewriters", - "+services/network/public/cpp", ] diff --git a/ios/browser/api/DEPS b/ios/browser/api/DEPS new file mode 100644 index 000000000000..0fc9f838b622 --- /dev/null +++ b/ios/browser/api/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/build/ios/mojom", +] diff --git a/ios/browser/api/ads/DEPS b/ios/browser/api/ads/DEPS new file mode 100644 index 000000000000..80f22ba3c1da --- /dev/null +++ b/ios/browser/api/ads/DEPS @@ -0,0 +1,8 @@ +include_rules = [ + "+brave/components/brave_ads/core/mojom", + "+brave/components/brave_ads/core/public", + "+brave/components/brave_news/common", + "+brave/components/brave_rewards/common", + "+brave/components/l10n/common", + "+brave/components/ntp_background_images/common", +] diff --git a/ios/browser/api/ai_chat/DEPS b/ios/browser/api/ai_chat/DEPS index a5c28343d4de..c70838b8aee4 100644 --- a/ios/browser/api/ai_chat/DEPS +++ b/ios/browser/api/ai_chat/DEPS @@ -1,4 +1,4 @@ include_rules = [ - "+ios/chrome/common/channel_info.h", - "+services/data_decoder/public/cpp", + "+brave/components/ai_chat/core/browser", + "+brave/components/ai_chat/core/common", ] diff --git a/ios/browser/api/bookmarks/exporter/DEPS b/ios/browser/api/bookmarks/exporter/DEPS new file mode 100644 index 000000000000..d56ed5303c68 --- /dev/null +++ b/ios/browser/api/bookmarks/exporter/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/l10n/common", +] diff --git a/ios/browser/api/brave_rewards/DEPS b/ios/browser/api/brave_rewards/DEPS index 094b26bcf8c3..bf686d946f60 100644 --- a/ios/browser/api/brave_rewards/DEPS +++ b/ios/browser/api/brave_rewards/DEPS @@ -1,3 +1,5 @@ include_rules = [ - "+components/os_crypt/sync", + "+brave/components/brave_rewards/common", + "+brave/components/brave_rewards/core", + "!components/os_crypt/sync", ] diff --git a/ios/browser/api/brave_services_key/DEPS b/ios/browser/api/brave_services_key/DEPS new file mode 100644 index 000000000000..74d5d7ed71f8 --- /dev/null +++ b/ios/browser/api/brave_services_key/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/constants", +] diff --git a/ios/browser/api/brave_shields/DEPS b/ios/browser/api/brave_shields/DEPS new file mode 100644 index 000000000000..780659a4434e --- /dev/null +++ b/ios/browser/api/brave_shields/DEPS @@ -0,0 +1,10 @@ +include_rules = [ + "+brave/components/brave_shields/core/browser", + "+brave/components/brave_component_updater/browser", +] + +specific_include_rules = { + "adblock_engine.mm": [ + "+brave/components/brave_shields/adblock/rs/src/lib.rs.h", + ] +} diff --git a/ios/browser/api/brave_stats/DEPS b/ios/browser/api/brave_stats/DEPS new file mode 100644 index 000000000000..3ca3db8d90c6 --- /dev/null +++ b/ios/browser/api/brave_stats/DEPS @@ -0,0 +1,6 @@ +include_rules = [ + "+brave/components/brave_ads/core/public", + "+brave/components/brave_stats/browser", + "+brave/components/brave_wallet/browser", + "+brave/components/webcompat_reporter/buildflags", +] diff --git a/ios/browser/api/brave_wallet/DEPS b/ios/browser/api/brave_wallet/DEPS new file mode 100644 index 000000000000..2e6de7a0c8a4 --- /dev/null +++ b/ios/browser/api/brave_wallet/DEPS @@ -0,0 +1,5 @@ +include_rules = [ + "+brave/components/brave_wallet/browser", + "+brave/components/brave_wallet/resources", + "+brave/components/brave_wallet/common", +] diff --git a/ios/browser/api/de_amp/DEPS b/ios/browser/api/de_amp/DEPS new file mode 100644 index 000000000000..fbd4c6ddf945 --- /dev/null +++ b/ios/browser/api/de_amp/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/de_amp/common", +] diff --git a/ios/browser/api/debounce/DEPS b/ios/browser/api/debounce/DEPS new file mode 100644 index 000000000000..403b136ae9b4 --- /dev/null +++ b/ios/browser/api/debounce/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/debounce/core/browser", +] diff --git a/ios/browser/api/favicon/DEPS b/ios/browser/api/favicon/DEPS index f18de6597eba..e4042590c676 100644 --- a/ios/browser/api/favicon/DEPS +++ b/ios/browser/api/favicon/DEPS @@ -1,8 +1,5 @@ include_rules = [ - "+components/favicon/ios", - "+ios/chrome/common/ui/favicon/favicon_attributes.h", - "+ios/chrome/common/ui/favicon/favicon_constants.h", - "+ios/chrome/browser/shared/model/application_context/application_context.h", "+ios/web/favicon/favicon_util.h", - "+ios/web/navigation/navigation_context_impl.h", + "+ios/web/js_messaging", + "!ios/web/navigation/navigation_context_impl.h", ] diff --git a/ios/browser/api/features/DEPS b/ios/browser/api/features/DEPS new file mode 100644 index 000000000000..e509aee556ba --- /dev/null +++ b/ios/browser/api/features/DEPS @@ -0,0 +1,17 @@ +include_rules = [ + "+brave/components/ai_chat/core/common/features.h", + "+brave/components/brave_component_updater/browser/features.h", + "+brave/components/brave_news/common/features.h", + "+brave/components/brave_rewards/common/features.h", + "+brave/components/brave_search/common/features.h", + "+brave/components/brave_search_conversion/features.h", + "+brave/components/brave_shields/core/common/features.h", + "+brave/components/brave_sync/features.h", + "+brave/components/brave_wallet/common/buildflags.h", + "+brave/components/brave_wallet/common/features.h", + "+brave/components/de_amp/common/features.h", + "+brave/components/debounce/core/common/features.h", + "+brave/components/ntp_background_images/browser/features.h", + "+brave/components/playlist/common/features.h", + "+brave/components/skus/common/features.h", +] diff --git a/ios/browser/api/https_upgrade_exceptions/DEPS b/ios/browser/api/https_upgrade_exceptions/DEPS new file mode 100644 index 000000000000..3c7dc3238ec0 --- /dev/null +++ b/ios/browser/api/https_upgrade_exceptions/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/https_upgrade_exceptions/browser", +] diff --git a/ios/browser/api/ipfs/DEPS b/ios/browser/api/ipfs/DEPS new file mode 100644 index 000000000000..eec3a16d0bc4 --- /dev/null +++ b/ios/browser/api/ipfs/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/ipfs", +] diff --git a/ios/browser/api/ntp_background_images/DEPS b/ios/browser/api/ntp_background_images/DEPS new file mode 100644 index 000000000000..88c3f1c79560 --- /dev/null +++ b/ios/browser/api/ntp_background_images/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/ntp_background_images/browser", +] diff --git a/ios/browser/api/qr_code/DEPS b/ios/browser/api/qr_code/DEPS index 6f0cc87a102b..684f43d8a30d 100644 --- a/ios/browser/api/qr_code/DEPS +++ b/ios/browser/api/qr_code/DEPS @@ -1,3 +1,4 @@ include_rules = [ + "+components/qr_code_generator", "+ui/gfx" ] diff --git a/ios/browser/api/query_filter/DEPS b/ios/browser/api/query_filter/DEPS new file mode 100644 index 000000000000..a8df3bb57d0c --- /dev/null +++ b/ios/browser/api/query_filter/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/query_filter", +] diff --git a/ios/browser/api/sync/DEPS b/ios/browser/api/sync/DEPS new file mode 100644 index 000000000000..500d4040b6e9 --- /dev/null +++ b/ios/browser/api/sync/DEPS @@ -0,0 +1,5 @@ +include_rules = [ + "+brave/components/brave_sync", + "+brave/components/sync_device_info", + "+brave/components/sync/service", +] diff --git a/ios/browser/api/translate/DEPS b/ios/browser/api/translate/DEPS index 28d8da6e9bac..27762277fba0 100644 --- a/ios/browser/api/translate/DEPS +++ b/ios/browser/api/translate/DEPS @@ -1,4 +1,5 @@ include_rules = [ + "+ios/web/js_messaging", "+ios/web/annotations/annotations_java_script_feature.h", "+ios/web/navigation/navigation_java_script_feature.h", "+ios/web/text_fragments/text_fragments_java_script_feature.h", diff --git a/ios/browser/api/url_sanitizer/DEPS b/ios/browser/api/url_sanitizer/DEPS new file mode 100644 index 000000000000..bc0952e1b5c3 --- /dev/null +++ b/ios/browser/api/url_sanitizer/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/url_sanitizer/browser", +] diff --git a/ios/browser/api/version_info/DEPS b/ios/browser/api/version_info/DEPS index 5816b1714c1b..8ff899fbe5d9 100644 --- a/ios/browser/api/version_info/DEPS +++ b/ios/browser/api/version_info/DEPS @@ -1,3 +1,4 @@ include_rules = [ + "+brave/components/version_info", "+ios/chrome/common/channel_info.h", ] diff --git a/ios/browser/api/web/ui/DEPS b/ios/browser/api/web/ui/DEPS new file mode 100644 index 000000000000..40f9d6fe6a63 --- /dev/null +++ b/ios/browser/api/web/ui/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + "+ios/web/js_messaging", + "+ios/web/webui", +] diff --git a/ios/browser/api/webcompat_reporter/DEPS b/ios/browser/api/webcompat_reporter/DEPS new file mode 100644 index 000000000000..0937deb867ca --- /dev/null +++ b/ios/browser/api/webcompat_reporter/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + "+brave/components/webcompat_reporter/browser", + "+brave/components/webcompat_reporter/common", +] diff --git a/ios/browser/application_context/DEPS b/ios/browser/application_context/DEPS new file mode 100644 index 000000000000..997299351926 --- /dev/null +++ b/ios/browser/application_context/DEPS @@ -0,0 +1,7 @@ +include_rules = [ + "+brave/components/brave_component_updater/browser", + "+brave/components/debounce/core/browser", + "+brave/components/brave_wallet/browser", + "+brave/components/https_upgrade_exceptions/browser", + "+brave/components/url_sanitizer/browser", +] diff --git a/ios/browser/brave_ads/DEPS b/ios/browser/brave_ads/DEPS new file mode 100644 index 000000000000..7040c55142c3 --- /dev/null +++ b/ios/browser/brave_ads/DEPS @@ -0,0 +1,5 @@ +include_rules = [ + "+brave/components/brave_ads/core/browser", + "+brave/components/brave_ads/core/mojom", + "+brave/components/brave_ads/core/public", +] diff --git a/ios/browser/brave_stats/DEPS b/ios/browser/brave_stats/DEPS new file mode 100644 index 000000000000..031120ffd392 --- /dev/null +++ b/ios/browser/brave_stats/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/brave_wallet/browser", +] diff --git a/ios/browser/brave_wallet/DEPS b/ios/browser/brave_wallet/DEPS new file mode 100644 index 000000000000..469b25698f14 --- /dev/null +++ b/ios/browser/brave_wallet/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + "+brave/components/brave_wallet/browser", + "+brave/components/brave_wallet/common", +] diff --git a/ios/browser/debounce/DEPS b/ios/browser/debounce/DEPS new file mode 100644 index 000000000000..e98f3e8af441 --- /dev/null +++ b/ios/browser/debounce/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + "+brave/components/debounce/core/browser", + "+brave/components/debounce/core/common", +] diff --git a/ios/browser/flags/DEPS b/ios/browser/flags/DEPS new file mode 100644 index 000000000000..cf9388d89769 --- /dev/null +++ b/ios/browser/flags/DEPS @@ -0,0 +1,12 @@ +include_rules = [ + "+brave/components/ai_chat/core/common/features.h", + "+brave/components/brave_ads/core/public/ads_feature.h", + "+brave/components/brave_component_updater/browser/features.h", + "+brave/components/brave_rewards/common/features.h", + "+brave/components/brave_shields/core/common/features.h", + "+brave/components/brave_wallet/common/features.h", + "+brave/components/de_amp/common/features.h", + "+brave/components/debounce/core/common/features.h", + "+brave/components/ntp_background_images/browser/features.h", + "+brave/components/skus/common/features.h", +] diff --git a/ios/browser/qr_code_generator/DEPS b/ios/browser/qr_code_generator/DEPS index e8fc7572bf2e..fdeaee1cfa15 100644 --- a/ios/browser/qr_code_generator/DEPS +++ b/ios/browser/qr_code_generator/DEPS @@ -1,4 +1,5 @@ include_rules = [ + "+components/qr_code_generator", "+ui/gfx", "+third_party/skia/include/core/SkBitmap.h", "+third_party/skia/include/core/SkCanvas.h", diff --git a/ios/browser/skus/DEPS b/ios/browser/skus/DEPS new file mode 100644 index 000000000000..4d5b70781f90 --- /dev/null +++ b/ios/browser/skus/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + "+brave/components/skus/common", + "+brave/components/skus/browser", +] diff --git a/ios/browser/ui/DEPS b/ios/browser/ui/DEPS new file mode 100644 index 000000000000..6026466e893a --- /dev/null +++ b/ios/browser/ui/DEPS @@ -0,0 +1,2 @@ +from brave_chromium_utils import inline_file +inline_file('//ios/chrome/browser/ui/DEPS', globals(), locals()) diff --git a/ios/browser/ui/webui/DEPS b/ios/browser/ui/webui/DEPS index 8050e7e95ff7..306145920241 100644 --- a/ios/browser/ui/webui/DEPS +++ b/ios/browser/ui/webui/DEPS @@ -1,6 +1,4 @@ include_rules = [ - "+components/account_id", - "+ios/chrome/browser/ui/policy/user_policy_util.h", - "+ios/components/webui", - "+mojo/public", + "+brave/components/constants", + "+brave/components/webui", ] diff --git a/ios/browser/ui/webui/ads/DEPS b/ios/browser/ui/webui/ads/DEPS index f6641aadf9af..2e62744d920b 100644 --- a/ios/browser/ui/webui/ads/DEPS +++ b/ios/browser/ui/webui/ads/DEPS @@ -1,4 +1,6 @@ include_rules = [ - "+mojo/public", - "+ios/components/webui", + "+brave/components/brave_ads/core/browser", + "+brave/components/services/bat_ads/public/interfaces", + "+brave/components/brave_ads/browser/resources", + "+brave/components/constants", ] diff --git a/ios/browser/ui/webui/skus/DEPS b/ios/browser/ui/webui/skus/DEPS index f6641aadf9af..881005b44780 100644 --- a/ios/browser/ui/webui/skus/DEPS +++ b/ios/browser/ui/webui/skus/DEPS @@ -1,4 +1,6 @@ include_rules = [ - "+mojo/public", - "+ios/components/webui", + "+brave/components/skus/common", + "+brave/components/skus/browser", + "+brave/components/constants", + "+brave/components/l10n/common", ] diff --git a/ios/browser/url_sanitizer/DEPS b/ios/browser/url_sanitizer/DEPS new file mode 100644 index 000000000000..bc0952e1b5c3 --- /dev/null +++ b/ios/browser/url_sanitizer/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+brave/components/url_sanitizer/browser", +] diff --git a/ios/testing/DEPS b/ios/testing/DEPS new file mode 100644 index 000000000000..398dafe95941 --- /dev/null +++ b/ios/testing/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + "+net", + "+brave/build/ios/mojom", +] diff --git a/net/DEPS b/net/DEPS new file mode 100644 index 000000000000..12af900d0c59 --- /dev/null +++ b/net/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + "+crypto", + "+net", +] diff --git a/renderer/DEPS b/renderer/DEPS index aa0c73aa6bed..faed770d2287 100644 --- a/renderer/DEPS +++ b/renderer/DEPS @@ -1,20 +1,43 @@ -include_rules = [ +from brave_chromium_utils import inline_file +inline_file("//chrome/DEPS", globals(), locals()) + +chrome_renderer_deps = {} +inline_file("//chrome/renderer/DEPS", {}, chrome_renderer_deps) +include_rules += chrome_renderer_deps["include_rules"] + +include_rules += [ "+brave/common", - "+chrome/common", "+chrome/renderer", - "+chrome/test", - "+content/public/common", - "+content/public/renderer", - "+content/public/test", - "+components/feed/content/renderer", - "+media/base", - "+mojo/public/cpp/bindings", - "+services/network/public/cpp", - "+services/service_manager/public/cpp", - "+third_party/blink/public/common", - "+third_party/blink/public/platform", - "+third_party/blink/public/public_buildflags.h", - "+third_party/blink/public/web", - "+third_party/widevine/cdm", - "+v8/include", + "+brave/components/ai_chat/core/common", + "+brave/components/ai_chat/renderer", + "+brave/components/ai_rewriter/common", + "+brave/components/brave_search/common", + "+brave/components/brave_search/renderer", + "+brave/components/brave_shields/core/common", + "+brave/components/brave_vpn/common/buildflags/buildflags.h", + "+brave/components/brave_wallet/common", + "+brave/components/cosmetic_filters/renderer", + "+brave/components/playlist/common", + "+brave/components/safe_builtins/renderer/safe_builtins.h", + "+brave/components/script_injector/renderer", + "+brave/components/skus/common", + "+brave/components/skus/renderer", + "+brave/components/speedreader/common", + "+brave/components/ai_rewriter/common", + "+brave/components/ai_rewriter/renderer", + "+brave/components/speedreader/common", + "+brave/components/speedreader/renderer", + "+brave/components/brave_vpn/common", + "!brave/components/brave_mobile_subscription/renderer/android/subscription_render_frame_observer.h", + "+brave/components/playlist/common", + "+brave/components/playlist/renderer", ] + +specific_include_rules = { + ".*browsertest\.cc": [ + "+chrome/test", + "+chrome/app/chrome_command_ids.h", + "+content/public/test", + "+net", + ] +} diff --git a/renderer/brave_wallet/DEPS b/renderer/brave_wallet/DEPS index 473de8eac993..260c91537fc6 100644 --- a/renderer/brave_wallet/DEPS +++ b/renderer/brave_wallet/DEPS @@ -1,8 +1,3 @@ include_rules = [ - "+brave/common", - "+content/public/common", - "+content/public/renderer", - "+gin/converter.h", - "+third_party/blink/public", - "+v8/include", + "+brave/components/brave_wallet/renderer", ] diff --git a/renderer/test/DEPS b/renderer/test/DEPS index e822c77bbc62..e7f1be969f47 100644 --- a/renderer/test/DEPS +++ b/renderer/test/DEPS @@ -1,13 +1,14 @@ specific_include_rules = { # browser tests should not be in renderer "digital_goods_api_browsertest\.cc": [ + "!brave/components/constants/brave_paths.h", "!chrome/browser/ui/browser.h", "!chrome/browser/ui/tabs/tab_strip_model.h", "!content/public/browser/render_frame_host.h", "!content/public/browser/web_contents.h", - "!content/public/common/content_switches.h", ], "file_system_access_browsertest\.cc": [ + "!brave/components/constants/brave_paths.h", "!chrome/browser/ui/browser.h", "!chrome/browser/ui/tabs/tab_strip_model.h", "!content/public/browser/render_frame_host.h", @@ -25,8 +26,14 @@ specific_include_rules = { "!extensions/browser/extension_system.h", "!extensions/common/extension.h", "!extensions/common/extension_builder.h", + "!brave/components/brave_wallet/browser/brave_wallet_service.h", + "!brave/components/brave_wallet/browser/brave_wallet_utils.h", + "!brave/components/brave_wallet/browser/json_rpc_service.h", + "!brave/components/brave_wallet/browser/keyring_service.h", + "!brave/components/constants/brave_paths.h", ], "navigator_connection_attribute_browsertest\.cc": [ + "!brave/components/constants/brave_paths.h", "!chrome/browser/ui/browser.h", "!chrome/browser/ui/tabs/tab_strip_model.h", "!content/public/browser/render_frame_host.h", @@ -38,5 +45,8 @@ specific_include_rules = { "!components/web_package/web_bundle_builder.h", "!content/public/browser/render_frame_host.h", "!content/public/browser/web_contents.h", - ] + ], + "font_browsertest\.cc": [ + "!brave/components/constants/brave_paths.h", + ], } diff --git a/test/base/DEPS b/test/base/DEPS index 3b5ddb556e37..97b81009732b 100644 --- a/test/base/DEPS +++ b/test/base/DEPS @@ -1,4 +1,5 @@ include_rules = [ + "+brave/components", "+chrome/install_static", "+components/gcm_driver", "+components/prefs", diff --git a/test/views/snapshot/DEPS b/test/views/snapshot/DEPS index 0c5dd6297930..37233fcd6993 100644 --- a/test/views/snapshot/DEPS +++ b/test/views/snapshot/DEPS @@ -1,4 +1,5 @@ include_rules = [ + "!brave/components/constants/brave_paths.h", "+cc/test", "+ui/compositor", "+ui/gfx/image", diff --git a/third_party/blink/renderer/DEPS b/third_party/blink/renderer/DEPS index 1e31e61851e2..c386eb522853 100644 --- a/third_party/blink/renderer/DEPS +++ b/third_party/blink/renderer/DEPS @@ -1,3 +1,7 @@ # Inline upstream rules. from brave_chromium_utils import inline_file inline_file('//third_party/blink/renderer/DEPS', globals(), locals()) + +include_rules += [ + "!brave/components/brave_shields/core/common/shields_settings.mojom.h" +] diff --git a/third_party/blink/renderer/core/DEPS b/third_party/blink/renderer/core/DEPS index c5d434df93af..5fa3c11560d0 100644 --- a/third_party/blink/renderer/core/DEPS +++ b/third_party/blink/renderer/core/DEPS @@ -2,3 +2,9 @@ from brave_chromium_utils import inline_file inline_file('//third_party/blink/renderer/core/DEPS', globals(), locals()) include_rules += [ "+third_party/blink/renderer/bindings/modules" ] + +include_rules += [ + "!brave/components/brave_page_graph/common/features.h", + "!brave/components/brave_shields/core/common/brave_shield_constants.h", + "+brave/v8/include/v8-isolate-page-graph-utils.h", +] diff --git a/third_party/blink/renderer/core/farbling/DEPS b/third_party/blink/renderer/core/farbling/DEPS index cd06d5abd085..96808831a74a 100644 --- a/third_party/blink/renderer/core/farbling/DEPS +++ b/third_party/blink/renderer/core/farbling/DEPS @@ -1,4 +1,5 @@ include_rules = [ + "+crypto", "+components/content_settings/core/common", "+third_party/abseil-cpp/absl/random/random.h", "+third_party/blink/public/platform", diff --git a/third_party/blink/renderer/modules/brave/DEPS b/third_party/blink/renderer/modules/brave/DEPS index 0fc900bfd6b3..9ad479737afa 100644 --- a/third_party/blink/renderer/modules/brave/DEPS +++ b/third_party/blink/renderer/modules/brave/DEPS @@ -1,10 +1,11 @@ specific_include_rules = { - # browser tests should go in brave/browser + # TODO(bridiver) browser tests should go in brave/browser "navigator_browsertest\.cc": [ "!chrome/browser/ui/browser.h", "!chrome/test/base/in_process_browser_test.h", "!chrome/test/base/ui_test_utils.h", "!content/public/test/browser_test.h", "!content/public/test/browser_test_utils.h", + "+brave/components/constants/brave_paths.h", ] } diff --git a/utility/DEPS b/utility/DEPS index 2d1e4a438862..192aff6e3fd1 100644 --- a/utility/DEPS +++ b/utility/DEPS @@ -1,8 +1,19 @@ -include_rules = [ +from brave_chromium_utils import inline_file +inline_file("//chrome/DEPS", globals(), locals()) + +chrome_utility_deps = {} +inline_file("//chrome/utility/DEPS", {}, chrome_utility_deps) +include_rules += chrome_utility_deps["include_rules"] + +include_rules += [ "+brave/common", - "+chrome/common", - "+chrome/grit", + "+brave/grit", "+chrome/utility", - "+content/public/utility", - "+mojo/public/cpp", + "+brave/components/constants", + "+brave/components/constants", + "+brave/components/services/bat_ads", + "+brave/components/services/bat_rewards", + "+brave/components/services/brave_wallet", + "+brave/components/services/tor", + "+brave/components/tor/buildflags", ] diff --git a/utility/importer/DEPS b/utility/importer/DEPS index df349197895e..64b2766f3c7b 100644 --- a/utility/importer/DEPS +++ b/utility/importer/DEPS @@ -1,9 +1,14 @@ include_rules = [ - "+brave/common/importer", - "+components/favicon_base", - "+components/os_crypt/sync", - "+components/password_manager/core/browser", "+components/password_manager/core/common", - "+components/prefs", "+components/webdata/common", + "+brave/components/constants/brave_paths.h", ] + +specific_include_rules = { + "chrome_importer(_unittest)?\.(cc|h)$": [ + "!components/password_manager/core/browser", + "!components/os_crypt/sync", + "!components/prefs", + "!components/favicon_base", + ] +} diff --git a/v8/include/DEPS b/v8/include/DEPS index 194d4904dddc..ad697392e1b0 100644 --- a/v8/include/DEPS +++ b/v8/include/DEPS @@ -1,3 +1,9 @@ include_rules = [ "+v8/include", ] + +specific_include_rules = { + "v8-isolate-page-graph-utils\.h": [ + "!brave/components/brave_page_graph/common/buildflags.h", + ] +} diff --git a/vendor/brave_base/BUILD.gn b/vendor/brave_base/BUILD.gn index 8fd682c4cb4b..606fb4596af4 100644 --- a/vendor/brave_base/BUILD.gn +++ b/vendor/brave_base/BUILD.gn @@ -1,15 +1,9 @@ +# Copyright (c) 2019 The Brave Authors. All rights reserved. # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, -# You can obtain one at http://mozilla.org/MPL/2.0/. - -config("external_config") { - include_dirs = [ ".." ] -} +# You can obtain one at https://mozilla.org/MPL/2.0/. source_set("brave_base") { - public_configs = [ ":external_config" ] - configs += [ ":external_config" ] - sources = [ "random.cc", "random.h", diff --git a/vendor/brave_base/DEPS b/vendor/brave_base/DEPS new file mode 100644 index 000000000000..2d1432b78584 --- /dev/null +++ b/vendor/brave_base/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + "+brave/vendor/brave_base", + "+crypto", +] diff --git a/vendor/brave_base/random.cc b/vendor/brave_base/random.cc index a4ed4217740d..59fad3b7f1fb 100644 --- a/vendor/brave_base/random.cc +++ b/vendor/brave_base/random.cc @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "brave_base/random.h" +#include "brave/vendor/brave_base/random.h" #include #include diff --git a/vendor/brave_base/random_unittest.cc b/vendor/brave_base/random_unittest.cc index f4cbd874373d..b4ee23998526 100644 --- a/vendor/brave_base/random_unittest.cc +++ b/vendor/brave_base/random_unittest.cc @@ -5,9 +5,10 @@ #define _USE_MATH_DEFINES // Microsoft, please define M_LN2 in . +#include "brave/vendor/brave_base/random.h" + #include -#include "brave_base/random.h" #include "testing/gtest/include/gtest/gtest.h" class BraveRandomDeterministicTest : public testing::Test {