Skip to content

Commit

Permalink
[Code health] Fix some gn check errors in //extensions/browser:*
Browse files Browse the repository at this point in the history
This CL fixes gn errors in //extensions/browser:*. Sources in
//extensions/browser were including
extensions/browser/api/extensions_api_client.h and
extensions/browser/api/guest_view/web_view/web_view_internal_api.h,
which were both included in //extensions/browser/api. These
errors were fixed by moving extensions_api_client and
web_view_internal_api to //extensions/browser. As a result of
this, we also have to move those files' dependencies into
//extensions/browser.

While not ideal, this is no worse than things currently were, since now
GN files simply reflect the "real" state of the world and this does not
introduce any new dependencies.

Bug: 1158987
Change-Id: I8ca22b4cd9cdfe5899279519bd918bea52b080ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2942852
Commit-Queue: Ghazale Hosseinabadi <ghazale@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#893223}
  • Loading branch information
Ghazale Hosseinabadi authored and Chromium LUCI CQ committed Jun 16, 2021
1 parent d15b94a commit 6dffc0e
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 53 deletions.
37 changes: 37 additions & 0 deletions extensions/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ source_set("browser_sources") {
# TODO(ghazale): anything under api/ should be moved out of this target.
"api/activity_log/web_request_constants.cc",
"api/activity_log/web_request_constants.h",
"api/api_resource.cc",
"api/api_resource.h",
"api/api_resource_manager.h",
"api/declarative/declarative_api.cc",
"api/declarative/declarative_api.h",
"api/declarative/declarative_rule.h",
Expand Down Expand Up @@ -126,6 +129,38 @@ source_set("browser_sources") {
"api/declarative_webrequest/webrequest_constants.h",
"api/declarative_webrequest/webrequest_rules_registry.cc",
"api/declarative_webrequest/webrequest_rules_registry.h",
"api/device_permissions_manager.cc",
"api/device_permissions_manager.h",
"api/device_permissions_prompt.cc",
"api/device_permissions_prompt.h",
"api/execute_code_function.cc",
"api/execute_code_function.h",
"api/extensions_api_client.cc",
"api/extensions_api_client.h",
"api/guest_view/app_view/app_view_guest_internal_api.cc",
"api/guest_view/app_view/app_view_guest_internal_api.h",
"api/guest_view/guest_view_internal_api.cc",
"api/guest_view/guest_view_internal_api.h",
"api/guest_view/web_view/web_view_internal_api.cc",
"api/guest_view/web_view/web_view_internal_api.h",
"api/hid/hid_api.cc",
"api/hid/hid_api.h",
"api/hid/hid_connection_resource.cc",
"api/hid/hid_connection_resource.h",
"api/hid/hid_device_manager.cc",
"api/hid/hid_device_manager.h",
"api/system_display/display_info_provider.cc",
"api/system_display/display_info_provider.h",
"api/system_display/system_display_api.cc",
"api/system_display/system_display_api.h",
"api/usb/usb_api.cc",
"api/usb/usb_api.h",
"api/usb/usb_device_manager.cc",
"api/usb/usb_device_manager.h",
"api/usb/usb_device_resource.cc",
"api/usb/usb_device_resource.h",
"api/web_contents_capture_client.cc",
"api/web_contents_capture_client.h",
"api/web_request/form_data_parser.cc",
"api/web_request/form_data_parser.h",
"api/web_request/permission_helper.cc",
Expand Down Expand Up @@ -512,6 +547,7 @@ source_set("browser_sources") {
"//content/public/common",
"//crypto:platform",
"//extensions:extensions_browser_resources",
"//extensions/browser/api/virtual_keyboard_private:virtual_keyboard_delegate",
"//extensions/browser/guest_view/web_view/web_ui",
"//extensions/buildflags",
"//extensions/common",
Expand Down Expand Up @@ -553,6 +589,7 @@ source_set("browser_sources") {
"//extensions/browser/kiosk",
"//extensions/browser/value_store",
"//ipc",
"//services/device/public/cpp/usb:usb",
"//third_party/re2",
]

Expand Down
55 changes: 2 additions & 53 deletions extensions/browser/api/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,11 @@ assert(enable_extensions,

source_set("api") {
sources = [
"api_resource.cc",
"api_resource.h",
"api_resource_manager.h",
"async_api_function.cc",
"async_api_function.h",
"device_permissions_manager.cc",
"device_permissions_manager.h",
"device_permissions_prompt.cc",
"device_permissions_prompt.h",
"execute_code_function.cc",
"execute_code_function.h",
"extensions_api_client.cc",
"extensions_api_client.h",
"guest_view/app_view/app_view_guest_internal_api.cc",
"guest_view/app_view/app_view_guest_internal_api.h",
"guest_view/guest_view_internal_api.cc",
"guest_view/guest_view_internal_api.h",
"guest_view/web_view/web_view_internal_api.cc",
"guest_view/web_view/web_view_internal_api.h",

# TODO(crbug.com/1206265): anything under hid/, storage/, system_display/
# and usb/ should be moved out of this target.
"hid/hid_api.cc",
"hid/hid_api.h",
"hid/hid_connection_resource.cc",
"hid/hid_connection_resource.h",
"hid/hid_device_manager.cc",
"hid/hid_device_manager.h",
# TODO(crbug.com/1206265): anything under storage/ should be moved out of
# this target.
"storage/backend_task_runner.cc",
"storage/backend_task_runner.h",
"storage/local_value_store_cache.cc",
Expand All @@ -59,55 +36,27 @@ source_set("api") {
"storage/value_store_cache.h",
"storage/weak_unlimited_settings_storage.cc",
"storage/weak_unlimited_settings_storage.h",
"system_display/display_info_provider.cc",
"system_display/display_info_provider.h",
"system_display/system_display_api.cc",
"system_display/system_display_api.h",
"usb/usb_api.cc",
"usb/usb_api.h",
"usb/usb_device_manager.cc",
"usb/usb_device_manager.h",
"usb/usb_device_resource.cc",
"usb/usb_device_resource.h",
"web_contents_capture_client.cc",
"web_contents_capture_client.h",
]

configs += [
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
"//build/config/compiler:no_size_t_to_int_warning",
]

public_deps = [
"//base",
"//content/public/browser",
"//content/public/common",
"//extensions/browser:browser_sources",
"//extensions/common",
"//extensions/common/api",
"//ipc",
"//services/device/public/cpp/usb:usb",
]

deps = [
"//base:i18n",
"//build:chromeos_buildflags",
"//components/guest_view/browser:browser",
"//components/guest_view/common:common",
"//components/keyed_service/content:content",
"//content/public/browser",
"//content/public/common",
"//extensions/browser:browser_sources",
"//extensions/browser/api/virtual_keyboard_private:virtual_keyboard_delegate",
"//extensions/browser/guest_view/web_view/web_ui:web_ui",
"//extensions/common",
"//extensions/common:mojom",
"//extensions/common/api",
"//extensions/strings",
"//services/device/public/cpp/hid",
"//services/device/public/cpp/usb",
"//services/device/public/mojom",
"//services/device/public/mojom:usb",
]

# TODO(michaelpg): Move these deps to the individual APIs that require them.
Expand Down

0 comments on commit 6dffc0e

Please sign in to comment.