Commit f587b41f authored by Devlin Cronin's avatar Devlin Cronin Committed by Commit Bot

[Extensions + Apps] Restrict extensions includes of apps code

Add restrictions so that code from chrome/browser/extensions is not
allowed to include files in chrome/browser/apps. Carve out exceptions
for existing includes, which should gradually be cleaned up.

Bug: 873872
Change-Id: I50c3338945456ec5b9deba02865cc8d38cf93462
Reviewed-on: https://chromium-review.googlesource.com/1172155
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Reviewed-by: default avatarDominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582788}
parent 45fd6a8b
...@@ -13,8 +13,25 @@ include_rules = [ ...@@ -13,8 +13,25 @@ include_rules = [
# For access to testing command line switches. # For access to testing command line switches.
"+ppapi/shared_impl", "+ppapi/shared_impl",
# The extensions system should not depend on Chrome Platform Apps (or any
# other component of the apps system).
# https://crbug.com/873872.
"-chrome/browser/apps/",
] ]
specific_include_rules = { specific_include_rules = {
"extension_system_impl\.cc": [
# TODO(https://crbug.com/873872): Remove this.
"+chrome/browser/apps/platform_apps/browser_context_keyed_service_factories.h",
],
".*test(_chromeos)?\.(cc|h)$": [
# For now, tests are allowed to depend on app_browsertest_util.h, since
# that's where PlatformAppBrowserTest is defined. Ideally, we'd eventually
# move all Platform App-specific tests to chrome/browser/apps/platform_apps.
"+chrome/browser/apps/platform_apps/app_browsertest_util.h",
],
"extension_protocols_unittest\.cc": [ "extension_protocols_unittest\.cc": [
"+services/network/test", "+services/network/test",
], ],
......
include_rules = [ include_rules = [
"+apps", "+apps",
"+chrome/browser/apps",
"+components/about_handler", "+components/about_handler",
"+components/guest_view/common", "+components/guest_view/common",
"+components/language/core/browser", "+components/language/core/browser",
......
specific_include_rules = { specific_include_rules = {
"show_permissions_dialog_helper.cc": [
#TODO(https://crbug.com/873872): Remove this.
"+chrome/browser/apps/platform_apps/app_load_service.h",
],
"developer_private_api_unittest.cc": [ "developer_private_api_unittest.cc": [
# Allow the unittest to create a data_decoder service. # Allow the unittest to create a data_decoder service.
"+services/data_decoder" "+services/data_decoder"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment