Fix //headless's deps on other directories.
This CL fixes the BUILD.gn file to some extent, and adds nogncheck suppressions (with bug references) for a preexisting issue that requires more complicated changes. This does not address issues that are totally internal to //headless; it only addresses issues that involve other directories. Also fixes a use of OS_WIN without first including build/build_config.h. Bug: 1158989, 1227148 Change-Id: Id0e5c98a018f544d179c9d0aabb4603fa9925440 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3021323 Commit-Queue: Chris Fredrickson <cfredric@chromium.org> Auto-Submit: Chris Fredrickson <cfredric@chromium.org> Reviewed-by: Dirk Pranke <dpranke@google.com> Reviewed-by: Andrey Kosyakov <caseq@chromium.org> Cr-Commit-Position: refs/heads/master@{#901032}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
851cfca7ac
commit
a66d36cf3e
2
.gn
2
.gn
@ -65,7 +65,7 @@ default_args = {
|
||||
no_check_targets = [
|
||||
"//extensions/browser:*", # 20 errors
|
||||
"//extensions:*", # 28 errors
|
||||
"//headless:*", # 167 errors
|
||||
"//headless:*", # 107 errors
|
||||
"//ppapi/proxy:ipc_sources", # 13 errors
|
||||
"//ppapi/thunk:*", # 1071 errors
|
||||
"//remoting/host/security_key:*", # 10 errors
|
||||
|
@ -264,8 +264,8 @@ inspector_protocol_generate("protocol_sources") {
|
||||
# |headless_non_renderer| components.
|
||||
source_set("headless_shared_sources") {
|
||||
visibility = [
|
||||
"//headless:headless",
|
||||
"//headless:headless_non_renderer",
|
||||
":headless",
|
||||
":headless_non_renderer",
|
||||
]
|
||||
defines = []
|
||||
|
||||
@ -309,10 +309,13 @@ source_set("headless_shared_sources") {
|
||||
]
|
||||
|
||||
if (!is_fuchsia) {
|
||||
deps += [ "//components/crash/content/browser" ]
|
||||
deps += [
|
||||
"//components/crash/content/browser",
|
||||
"//components/crash/core/app",
|
||||
]
|
||||
}
|
||||
if (is_component_build && is_win) {
|
||||
deps += [ "//components/crash/core/app:crash_export_thunks" ]
|
||||
if (is_win) {
|
||||
deps += [ "//sandbox" ]
|
||||
}
|
||||
|
||||
configs += [ ":inside_headless_component" ]
|
||||
@ -434,16 +437,26 @@ component("headless_non_renderer") {
|
||||
":headless_shared_sources",
|
||||
":version_header",
|
||||
"//base:base_static",
|
||||
"//build:branding_buildflags",
|
||||
"//build:chromeos_buildflags",
|
||||
"//components/cookie_config",
|
||||
"//components/embedder_support",
|
||||
"//components/keyed_service/content",
|
||||
"//components/policy:policy_code_generate",
|
||||
"//components/policy/core/browser",
|
||||
"//components/policy/core/common:common_constants",
|
||||
"//components/pref_registry",
|
||||
"//components/prefs",
|
||||
"//components/profile_metrics",
|
||||
"//components/security_state/core",
|
||||
"//content/public/app",
|
||||
"//content/public/browser",
|
||||
"//content/public/common",
|
||||
"//printing/buildflags",
|
||||
"//services/cert_verifier/public/mojom",
|
||||
"//services/device/public/cpp/geolocation",
|
||||
"//services/service_manager/public/cpp",
|
||||
"//third_party/inspector_protocol:crdtp",
|
||||
"//ui/base",
|
||||
"//ui/base/clipboard",
|
||||
"//ui/compositor",
|
||||
@ -454,7 +467,12 @@ component("headless_non_renderer") {
|
||||
]
|
||||
|
||||
if (enable_basic_printing) {
|
||||
deps += [ "//components/printing/browser" ]
|
||||
deps += [
|
||||
"//components/printing/browser",
|
||||
"//components/printing/common:mojo_interfaces",
|
||||
"//printing",
|
||||
"//printing/mojom",
|
||||
]
|
||||
}
|
||||
|
||||
if (is_component_build) {
|
||||
@ -492,10 +510,10 @@ component("headless_non_renderer") {
|
||||
]
|
||||
|
||||
if (!is_fuchsia) {
|
||||
deps += [ "//components/crash/content/browser" ]
|
||||
}
|
||||
if (is_win) {
|
||||
deps += [ "//components/crash/core/app:crash_export_thunks" ]
|
||||
deps += [
|
||||
"//components/crash/content/browser",
|
||||
"//components/crash/core/app",
|
||||
]
|
||||
}
|
||||
|
||||
if (enable_basic_printing) {
|
||||
@ -507,8 +525,15 @@ component("headless_non_renderer") {
|
||||
]
|
||||
}
|
||||
|
||||
if (headless_use_prefs) {
|
||||
deps += [ "//components/os_crypt" ]
|
||||
}
|
||||
|
||||
if (headless_use_policy) {
|
||||
deps += [ "//components/policy/content" ]
|
||||
deps += [
|
||||
"//components/policy/content",
|
||||
"//components/user_prefs",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@ -593,11 +618,24 @@ if (!is_component_build) {
|
||||
|
||||
deps = [
|
||||
":headless",
|
||||
"//build:chromeos_buildflags",
|
||||
"//components/crash/core/common",
|
||||
"//components/security_state/content",
|
||||
"//components/security_state/core",
|
||||
"//content/public/app",
|
||||
"//content/public/browser",
|
||||
"//content/public/common",
|
||||
"//content/public/renderer",
|
||||
"//content/public/utility",
|
||||
"//printing/buildflags",
|
||||
"//third_party/blink/public:blink_headers",
|
||||
"//ui/base",
|
||||
"//ui/compositor",
|
||||
"//v8",
|
||||
]
|
||||
if (use_ozone) {
|
||||
deps += [ "//ui/ozone" ]
|
||||
}
|
||||
if (enable_basic_printing) {
|
||||
deps += [
|
||||
"//components/printing/renderer",
|
||||
@ -614,6 +652,10 @@ if (!is_component_build) {
|
||||
"$root_gen_dir/headless/embedded_resource_pak.h",
|
||||
]
|
||||
}
|
||||
|
||||
if (is_mac || is_win || is_linux || is_chromeos) {
|
||||
deps += [ "//components/crash/core/app" ]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
# For component builds all dependencies are already included in the headless
|
||||
@ -660,6 +702,8 @@ test("headless_unittests") {
|
||||
sources += [ "lib/browser/headless_printing_unittest.cc" ]
|
||||
deps += [
|
||||
"//components/printing/browser",
|
||||
"//printing",
|
||||
"//printing/buildflags",
|
||||
"//third_party/blink/public:blink",
|
||||
]
|
||||
}
|
||||
@ -737,8 +781,12 @@ test("headless_browsertests") {
|
||||
":headless_shell_lib",
|
||||
"//base",
|
||||
"//cc:test_support",
|
||||
"//components/policy/core/browser",
|
||||
"//components/security_state/content",
|
||||
"//content/test:browsertest_support",
|
||||
"//content/test:test_support",
|
||||
"//net:test_support",
|
||||
"//printing/buildflags",
|
||||
"//services/network/public/mojom",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
@ -753,6 +801,7 @@ test("headless_browsertests") {
|
||||
deps += [
|
||||
"//components/printing/browser",
|
||||
"//pdf",
|
||||
"//printing",
|
||||
]
|
||||
}
|
||||
|
||||
@ -777,12 +826,19 @@ if (is_win) {
|
||||
deps = [
|
||||
":headless_non_renderer",
|
||||
"//build:branding_buildflags",
|
||||
"//components/crash/core/app:run_as_crashpad_handler",
|
||||
"//components/embedder_support",
|
||||
"//content:sandbox_helper_win",
|
||||
"//content/public/app",
|
||||
"//content/public/browser",
|
||||
"//content/public/common",
|
||||
"//net",
|
||||
"//printing/buildflags",
|
||||
"//sandbox",
|
||||
]
|
||||
if (headless_use_policy) {
|
||||
deps += [ "//components/policy/content" ]
|
||||
}
|
||||
configs += [ ":headless_defines_config" ]
|
||||
}
|
||||
}
|
||||
@ -809,11 +865,15 @@ static_library("headless_shell_lib") {
|
||||
deps = [
|
||||
":headless_renderer",
|
||||
"//build:branding_buildflags",
|
||||
"//components/embedder_support",
|
||||
"//components/security_state/content",
|
||||
"//content",
|
||||
"//content/public/app",
|
||||
"//content/public/browser",
|
||||
"//content/public/child:child",
|
||||
"//content/public/common",
|
||||
"//content/public/utility",
|
||||
"//printing/buildflags",
|
||||
]
|
||||
|
||||
public_deps = [ "//base" ]
|
||||
@ -843,7 +903,6 @@ static_library("headless_shell_lib") {
|
||||
defines = [ "HEADLESS_USE_CRASHPAD" ]
|
||||
|
||||
deps += [
|
||||
"//components/crash/core/app:crash_export_thunks",
|
||||
"//components/crash/core/app:run_as_crashpad_handler",
|
||||
"//content:sandbox_helper_win",
|
||||
"//sandbox",
|
||||
@ -854,6 +913,10 @@ static_library("headless_shell_lib") {
|
||||
deps += [ "//components/os_crypt" ]
|
||||
}
|
||||
|
||||
if (is_win || (is_posix && !is_mac)) {
|
||||
deps += [ "//components/crash/core/app" ]
|
||||
}
|
||||
|
||||
configs += [ ":headless_defines_config" ]
|
||||
}
|
||||
|
||||
@ -881,7 +944,10 @@ executable("headless_shell") {
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
deps += [ "//build/win:default_exe_manifest" ]
|
||||
deps += [
|
||||
"//build/win:default_exe_manifest",
|
||||
"//content/public/app",
|
||||
]
|
||||
}
|
||||
|
||||
if (is_mac) {
|
||||
@ -906,8 +972,15 @@ executable("headless_example") {
|
||||
|
||||
deps = [
|
||||
":headless_shell_lib",
|
||||
"//content",
|
||||
"//sandbox",
|
||||
"//skia", # we need this to override font render hinting in headless build
|
||||
"//ui/gfx/geometry",
|
||||
]
|
||||
|
||||
if (is_win) {
|
||||
deps += [ "//content/public/app" ]
|
||||
}
|
||||
|
||||
configs += [ ":headless_defines_config" ]
|
||||
}
|
||||
|
@ -52,13 +52,13 @@
|
||||
#include "ui/gfx/geometry/size.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#include "components/crash/core/app/crash_switches.h"
|
||||
#include "components/crash/core/app/crash_switches.h" // nogncheck
|
||||
#include "components/crash/core/app/run_as_crashpad_handler_win.h"
|
||||
#include "sandbox/win/src/sandbox_types.h"
|
||||
#endif
|
||||
|
||||
#if defined(OS_MAC)
|
||||
#include "components/os_crypt/os_crypt_switches.h"
|
||||
#include "components/os_crypt/os_crypt_switches.h" // nogncheck
|
||||
#endif
|
||||
|
||||
#if defined(HEADLESS_USE_POLICY)
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#include "content/public/app/sandbox_helper_win.h"
|
||||
#include "sandbox/win/src/sandbox_types.h"
|
||||
#include "sandbox/win/src/sandbox_types.h" // nogncheck
|
||||
#elif defined(OS_MAC)
|
||||
#include "base/check.h"
|
||||
#include "sandbox/mac/seatbelt_exec.h"
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "ui/base/resource/resource_bundle.h"
|
||||
|
||||
#if defined(HEADLESS_USE_POLICY)
|
||||
#include "components/user_prefs/user_prefs.h"
|
||||
#include "components/user_prefs/user_prefs.h" // nogncheck
|
||||
#endif
|
||||
|
||||
namespace headless {
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "headless/lib/browser/headless_screen.h"
|
||||
|
||||
#if defined(HEADLESS_USE_PREFS)
|
||||
#include "components/os_crypt/os_crypt.h"
|
||||
#include "components/os_crypt/os_crypt.h" // nogncheck
|
||||
#include "components/pref_registry/pref_registry_syncable.h"
|
||||
#include "components/prefs/in_memory_pref_store.h"
|
||||
#include "components/prefs/json_pref_store.h"
|
||||
|
@ -53,7 +53,7 @@
|
||||
|
||||
#if defined(HEADLESS_USE_POLICY)
|
||||
#include "components/policy/content/policy_blocklist_navigation_throttle.h"
|
||||
#include "components/policy/core/common/policy_service.h"
|
||||
#include "components/policy/core/common/policy_service.h" // nogncheck http://crbug.com/1227148
|
||||
#include "content/public/browser/navigation_handle.h"
|
||||
#include "content/public/browser/navigation_throttle.h"
|
||||
#endif // defined(HEADLESS_USE_POLICY)
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "services/network/url_request_context_builder_mojo.h"
|
||||
|
||||
#if defined(HEADLESS_USE_PREFS)
|
||||
#include "components/os_crypt/os_crypt.h"
|
||||
#include "components/os_crypt/os_crypt.h" // nogncheck
|
||||
#include "content/public/common/network_service_util.h"
|
||||
#endif
|
||||
|
||||
|
@ -14,9 +14,9 @@
|
||||
#include "base/task/thread_pool.h"
|
||||
#include "build/branding_buildflags.h"
|
||||
#include "build/build_config.h"
|
||||
#include "components/policy/core/browser/configuration_policy_handler.h"
|
||||
#include "components/policy/core/browser/url_blocklist_policy_handler.h"
|
||||
#include "components/policy/core/common/async_policy_provider.h"
|
||||
#include "components/policy/core/browser/configuration_policy_handler.h" // nogncheck http://crbug.com/1227148
|
||||
#include "components/policy/core/browser/url_blocklist_policy_handler.h" // nogncheck http://crbug.com/1227148
|
||||
#include "components/policy/core/common/async_policy_provider.h" // nogncheck http://crbug.com/1227148
|
||||
#include "components/policy/core/common/policy_pref_names.h"
|
||||
#include "components/policy/policy_constants.h"
|
||||
#include "headless/lib/browser/headless_pref_names.h"
|
||||
@ -33,7 +33,7 @@
|
||||
#include "components/policy/core/common/policy_loader_mac.h"
|
||||
#include "components/policy/core/common/preferences_mac.h"
|
||||
#elif defined(OS_POSIX) && !defined(OS_ANDROID)
|
||||
#include "components/policy/core/common/config_dir_policy_loader.h"
|
||||
#include "components/policy/core/common/config_dir_policy_loader.h" // nogncheck http://crbug.com/1227148
|
||||
#endif
|
||||
|
||||
namespace policy {
|
||||
|
@ -6,8 +6,8 @@
|
||||
#define HEADLESS_LIB_BROWSER_POLICY_HEADLESS_BROWSER_POLICY_CONNECTOR_H_
|
||||
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "components/policy/core/browser/browser_policy_connector.h"
|
||||
#include "components/policy/core/browser/configuration_policy_pref_store.h"
|
||||
#include "components/policy/core/browser/browser_policy_connector.h" // nogncheck http://crbug.com/1227148
|
||||
#include "components/policy/core/browser/configuration_policy_pref_store.h" // nogncheck http://crbug.com/1227148
|
||||
#include "services/network/public/cpp/shared_url_loader_factory.h"
|
||||
|
||||
namespace policy {
|
||||
|
@ -5,7 +5,7 @@
|
||||
#ifndef HEADLESS_LIB_BROWSER_POLICY_HEADLESS_MODE_POLICY_H_
|
||||
#define HEADLESS_LIB_BROWSER_POLICY_HEADLESS_MODE_POLICY_H_
|
||||
|
||||
#include "components/policy/core/browser/configuration_policy_handler.h"
|
||||
#include "components/policy/core/browser/configuration_policy_handler.h" // nogncheck http://crbug.com/1227148
|
||||
#include "headless/public/headless_export.h"
|
||||
|
||||
class PrefService;
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include "headless/lib/browser/policy/headless_policies.h"
|
||||
|
||||
#include "base/check.h"
|
||||
#include "components/policy/core/browser/url_blocklist_manager.h"
|
||||
#include "components/policy/core/browser/url_blocklist_manager.h" // nogncheck http://crbug.com/1227148
|
||||
#include "components/policy/policy_constants.h"
|
||||
#include "components/pref_registry/pref_registry_syncable.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "components/viz/common/switches.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "headless/lib/browser/headless_browser_impl.h"
|
||||
#include "headless/lib/browser/headless_web_contents_impl.h"
|
||||
#include "headless/lib/browser/headless_web_contents_impl.h" // nogncheck http://crbug.com/1227378
|
||||
#include "third_party/skia/include/core/SkBitmap.h"
|
||||
#include "ui/base/resource/resource_bundle.h"
|
||||
#include "ui/gfx/codec/jpeg_codec.h"
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "build/build_config.h"
|
||||
#include "headless/public/headless_browser_context.h"
|
||||
#include "headless/public/headless_devtools_channel.h"
|
||||
#include "headless/public/headless_export.h"
|
||||
|
@ -52,7 +52,7 @@
|
||||
#include "ui/gfx/geometry/size.h"
|
||||
|
||||
#if defined(OS_MAC)
|
||||
#include "third_party/crashpad/crashpad/client/crash_report_database.h"
|
||||
#include "third_party/crashpad/crashpad/client/crash_report_database.h" // nogncheck
|
||||
#endif
|
||||
|
||||
using testing::UnorderedElementsAre;
|
||||
|
Reference in New Issue
Block a user