0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-10-31 21:36:01 +00:00
Files

2486 lines
109 KiB
Diff

From 943a8c834c77219426620b196603d993d4c984c1 Mon Sep 17 00:00:00 2001
From: Chongyun Lee <licy183@termux.dev>
Date: Fri, 18 Apr 2025 23:54:01 +0800
Subject: [PATCH] reland jumbo 9
Enable jumbo build for the following component(s)/source_set(s):
- //content:browser
- //content:devtools_protocol
- //content/child:child
- //content/common:common
- //content/gpu:gpu_sources
- //content/public/browser:browser_sources
- //content/public/child:child_sources
- //content/public/common:common_sources
- //content/public/renderer:renderer_sources
- //content/renderer:renderer
- //content/services/auction_worklet:auction_worklet
- //content/utility:utility
---
content/browser/BUILD.gn | 190 +++++++++++-------
.../aggregation_service_storage_sql.cc | 4 +
.../attribution_resolver_impl.cc | 6 +-
.../attribution_storage_sql.cc | 6 +
content/browser/btm/btm_database.h | 2 +-
.../browser/btm/btm_page_visit_observer.cc | 4 +
.../browser/btm/btm_short_visit_observer.cc | 4 +
content/browser/devtools/BUILD.gn | 2 +-
.../devtools/protocol/fedcm_handler.cc | 2 +-
.../render_frame_devtools_agent_host.cc | 4 +
.../web_contents_devtools_agent_host.cc | 4 +
.../direct_sockets_service_impl.cc | 4 +
.../file_system_access_change_source.cc | 4 +
.../file_system_access_watcher_manager.cc | 4 +
content/browser/find_request_manager.cc | 2 +-
.../frame_sensor_provider_proxy.cc | 2 +-
.../gpu/gpu_data_manager_impl_private.cc | 10 +-
content/browser/guest_page_holder_impl.cc | 2 +-
content/browser/hid/hid_service.cc | 4 +
content/browser/host_zoom_map_impl.cc | 2 +-
.../in_memory_federated_permission_context.cc | 2 +-
.../bidding_and_auction_response.cc | 4 +
.../bidding_and_auction_serializer.cc | 4 +
.../interest_group_manager_impl.cc | 4 +
.../interest_group_permissions_checker.cc | 4 +
.../interest_group_update_manager.cc | 4 +
.../interest_group/trusted_signals_fetcher.cc | 4 +
content/browser/media/cdm_storage_common.cc | 4 +
content/browser/media/cdm_storage_database.cc | 4 +
.../preloading/prefetch/prefetch_service.cc | 4 +
.../prefetch_url_loader_interceptor.cc | 4 +
.../prerender_commit_deferring_condition.cc | 4 +
..._vary_search_commit_deferring_condition.cc | 4 +
.../media/media_devices_manager.cc | 6 +
.../media/media_stream_manager.cc | 6 +
...render_frame_audio_input_stream_factory.cc | 4 +
.../partitioned_popins_navigation_throttle.cc | 2 +-
.../private_network_access_util.cc | 18 +-
.../randomized_confidence_utils.cc | 2 +-
.../renderer_host/render_frame_host_impl.cc | 52 ++---
.../render_frame_host_manager.cc | 64 +++---
.../renderer_host/render_frame_proxy_host.cc | 6 +-
.../renderer_host/render_message_filter.cc | 2 +-
.../renderer_host/render_process_host_impl.cc | 28 +--
.../renderer_host/render_view_host_impl.cc | 2 +-
.../renderer_host/render_widget_host_impl.cc | 2 +-
.../render_widget_host_view_aura.cc | 2 +-
.../spare_render_process_host_manager_impl.cc | 14 +-
.../cross_origin_opener_policy_reporter.cc | 4 +
.../dip/document_isolation_policy_reporter.cc | 4 +
.../webid/federated_auth_request_impl.cc | 4 +
content/child/BUILD.gn | 5 +-
content/common/BUILD.gn | 6 +-
content/gpu/BUILD.gn | 5 +-
content/public/browser/BUILD.gn | 3 +-
content/public/child/BUILD.gn | 3 +-
content/public/common/BUILD.gn | 3 +-
content/public/renderer/BUILD.gn | 5 +-
content/renderer/BUILD.gn | 5 +-
.../service_worker_subresource_loader.cc | 4 +
.../web_service_worker_provider_impl.cc | 4 +
content/services/auction_worklet/BUILD.gn | 7 +-
content/test/BUILD.gn | 5 +-
content/utility/BUILD.gn | 3 +-
64 files changed, 397 insertions(+), 195 deletions(-)
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 933abcca12..a32e41518a 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -6,6 +6,7 @@ import("//base/allocator/partition_allocator/partition_alloc.gni")
import("//build/buildflag_header.gni")
import("//build/config/compiler/pgo/pgo.gni")
import("//build/config/features.gni")
+import("//build/config/jumbo.gni")
import("//build/config/linux/pangocairo/pangocairo.gni")
import("//build/config/ozone.gni")
import("//build/config/ui.gni")
@@ -55,7 +56,116 @@ if (is_ios) {
import("//build/config/apple/mobile_config.gni") # For `target_platform`
}
-source_set("browser") {
+jumbo_static_library("devtools_protocol") {
+ configs += [
+ "//build/config:precompiled_headers",
+ "//content:content_implementation",
+ ]
+
+ deps = [
+ "//base",
+ "//content/browser/devtools:devtools_background_services_proto",
+ "//content/browser/devtools:protocol_sources",
+ "//content/common:buildflags",
+ "//services/viz/privileged/mojom",
+ "//third_party/blink/public/mojom:mojom_platform",
+ "//third_party/inspector_protocol:crdtp",
+ ]
+
+ sources = [
+ "$target_gen_dir/devtools/protocol/audits.cc",
+ "$target_gen_dir/devtools/protocol/audits.h",
+ "$target_gen_dir/devtools/protocol/background_service.cc",
+ "$target_gen_dir/devtools/protocol/background_service.h",
+ "$target_gen_dir/devtools/protocol/browser.cc",
+ "$target_gen_dir/devtools/protocol/browser.h",
+ "$target_gen_dir/devtools/protocol/device_access.cc",
+ "$target_gen_dir/devtools/protocol/device_access.h",
+ "$target_gen_dir/devtools/protocol/device_orientation.cc",
+ "$target_gen_dir/devtools/protocol/device_orientation.h",
+ "$target_gen_dir/devtools/protocol/dom.cc",
+ "$target_gen_dir/devtools/protocol/dom.h",
+ "$target_gen_dir/devtools/protocol/emulation.cc",
+ "$target_gen_dir/devtools/protocol/emulation.h",
+ "$target_gen_dir/devtools/protocol/fed_cm.cc",
+ "$target_gen_dir/devtools/protocol/fed_cm.h",
+ "$target_gen_dir/devtools/protocol/fetch.cc",
+ "$target_gen_dir/devtools/protocol/fetch.h",
+ "$target_gen_dir/devtools/protocol/forward.h",
+ "$target_gen_dir/devtools/protocol/input.cc",
+ "$target_gen_dir/devtools/protocol/input.h",
+ "$target_gen_dir/devtools/protocol/inspector.cc",
+ "$target_gen_dir/devtools/protocol/inspector.h",
+ "$target_gen_dir/devtools/protocol/io.cc",
+ "$target_gen_dir/devtools/protocol/io.h",
+ "$target_gen_dir/devtools/protocol/log.cc",
+ "$target_gen_dir/devtools/protocol/log.h",
+ "$target_gen_dir/devtools/protocol/memory.cc",
+ "$target_gen_dir/devtools/protocol/memory.h",
+ "$target_gen_dir/devtools/protocol/network.cc",
+ "$target_gen_dir/devtools/protocol/network.h",
+ "$target_gen_dir/devtools/protocol/overlay.cc",
+ "$target_gen_dir/devtools/protocol/overlay.h",
+ "$target_gen_dir/devtools/protocol/page.cc",
+ "$target_gen_dir/devtools/protocol/page.h",
+ "$target_gen_dir/devtools/protocol/preload.cc",
+ "$target_gen_dir/devtools/protocol/preload.h",
+ "$target_gen_dir/devtools/protocol/protocol.h",
+ "$target_gen_dir/devtools/protocol/runtime.cc",
+ "$target_gen_dir/devtools/protocol/runtime.h",
+ "$target_gen_dir/devtools/protocol/schema.cc",
+ "$target_gen_dir/devtools/protocol/schema.h",
+ "$target_gen_dir/devtools/protocol/security.cc",
+ "$target_gen_dir/devtools/protocol/security.h",
+ "$target_gen_dir/devtools/protocol/service_worker.cc",
+ "$target_gen_dir/devtools/protocol/service_worker.h",
+ "$target_gen_dir/devtools/protocol/storage.cc",
+ "$target_gen_dir/devtools/protocol/storage.h",
+ "$target_gen_dir/devtools/protocol/system_info.cc",
+ "$target_gen_dir/devtools/protocol/system_info.h",
+ "$target_gen_dir/devtools/protocol/target.cc",
+ "$target_gen_dir/devtools/protocol/target.h",
+ "$target_gen_dir/devtools/protocol/tethering.cc",
+ "$target_gen_dir/devtools/protocol/tethering.h",
+ "$target_gen_dir/devtools/protocol/tracing.cc",
+ "$target_gen_dir/devtools/protocol/tracing.h",
+ ]
+ if (!is_android) {
+ # The WebAuthn devtools protocol API is not supported in Android yet.
+ sources += [
+ "$target_gen_dir/devtools/protocol/web_authn.cc",
+ "$target_gen_dir/devtools/protocol/web_authn.h",
+ ]
+ }
+
+ if (use_viz_debugger) {
+ sources += [
+ "$target_gen_dir/devtools/protocol/visual_debugger.cc",
+ "$target_gen_dir/devtools/protocol/visual_debugger.h",
+ ]
+ }
+
+ if (enable_bluetooth_emulation) {
+ deps += [
+ "//device/bluetooth:fake_bluetooth",
+ "//device/bluetooth/public/mojom:fake_bluetooth_interfaces",
+ ]
+
+ sources += [
+ "$target_gen_dir/devtools/protocol/bluetooth_emulation.cc",
+ "$target_gen_dir/devtools/protocol/bluetooth_emulation.h",
+ ]
+ }
+
+ if (use_clang_profiling_inside_sandbox && chrome_pgo_phase == 1) {
+ sources += [
+ "$target_gen_dir/devtools/protocol/native_profiling.cc",
+ "$target_gen_dir/devtools/protocol/native_profiling.h",
+ ]
+ }
+}
+
+jumbo_source_set("browser") {
# Only the public target should depend on this. All other targets (even
# internal content ones) should depend on the public one.
visibility = [
@@ -163,8 +273,6 @@ source_set("browser") {
"//content/browser/cache_storage:cache_storage_proto",
"//content/browser/content_index:content_index_proto",
"//content/browser/cookie_store:cookie_store_proto",
- "//content/browser/devtools:devtools_background_services_proto",
- "//content/browser/devtools:protocol_sources",
"//content/browser/download:proto",
"//content/browser/file_system_access:proto",
"//content/browser/indexed_db:internals_mojo_bindings",
@@ -329,6 +437,7 @@ source_set("browser") {
"//ui/webui/resources",
"//v8",
"//v8:v8_version",
+ ":devtools_protocol",
"//electron/build/config:generate_mas_config",
]
@@ -359,62 +468,6 @@ source_set("browser") {
]
sources = [
- "$target_gen_dir/devtools/protocol/audits.cc",
- "$target_gen_dir/devtools/protocol/audits.h",
- "$target_gen_dir/devtools/protocol/background_service.cc",
- "$target_gen_dir/devtools/protocol/background_service.h",
- "$target_gen_dir/devtools/protocol/browser.cc",
- "$target_gen_dir/devtools/protocol/browser.h",
- "$target_gen_dir/devtools/protocol/device_access.cc",
- "$target_gen_dir/devtools/protocol/device_access.h",
- "$target_gen_dir/devtools/protocol/device_orientation.cc",
- "$target_gen_dir/devtools/protocol/device_orientation.h",
- "$target_gen_dir/devtools/protocol/dom.cc",
- "$target_gen_dir/devtools/protocol/dom.h",
- "$target_gen_dir/devtools/protocol/emulation.cc",
- "$target_gen_dir/devtools/protocol/emulation.h",
- "$target_gen_dir/devtools/protocol/fed_cm.cc",
- "$target_gen_dir/devtools/protocol/fed_cm.h",
- "$target_gen_dir/devtools/protocol/fetch.cc",
- "$target_gen_dir/devtools/protocol/fetch.h",
- "$target_gen_dir/devtools/protocol/forward.h",
- "$target_gen_dir/devtools/protocol/input.cc",
- "$target_gen_dir/devtools/protocol/input.h",
- "$target_gen_dir/devtools/protocol/inspector.cc",
- "$target_gen_dir/devtools/protocol/inspector.h",
- "$target_gen_dir/devtools/protocol/io.cc",
- "$target_gen_dir/devtools/protocol/io.h",
- "$target_gen_dir/devtools/protocol/log.cc",
- "$target_gen_dir/devtools/protocol/log.h",
- "$target_gen_dir/devtools/protocol/memory.cc",
- "$target_gen_dir/devtools/protocol/memory.h",
- "$target_gen_dir/devtools/protocol/network.cc",
- "$target_gen_dir/devtools/protocol/network.h",
- "$target_gen_dir/devtools/protocol/overlay.cc",
- "$target_gen_dir/devtools/protocol/overlay.h",
- "$target_gen_dir/devtools/protocol/page.cc",
- "$target_gen_dir/devtools/protocol/page.h",
- "$target_gen_dir/devtools/protocol/preload.cc",
- "$target_gen_dir/devtools/protocol/preload.h",
- "$target_gen_dir/devtools/protocol/protocol.h",
- "$target_gen_dir/devtools/protocol/runtime.cc",
- "$target_gen_dir/devtools/protocol/runtime.h",
- "$target_gen_dir/devtools/protocol/schema.cc",
- "$target_gen_dir/devtools/protocol/schema.h",
- "$target_gen_dir/devtools/protocol/security.cc",
- "$target_gen_dir/devtools/protocol/security.h",
- "$target_gen_dir/devtools/protocol/service_worker.cc",
- "$target_gen_dir/devtools/protocol/service_worker.h",
- "$target_gen_dir/devtools/protocol/storage.cc",
- "$target_gen_dir/devtools/protocol/storage.h",
- "$target_gen_dir/devtools/protocol/system_info.cc",
- "$target_gen_dir/devtools/protocol/system_info.h",
- "$target_gen_dir/devtools/protocol/target.cc",
- "$target_gen_dir/devtools/protocol/target.h",
- "$target_gen_dir/devtools/protocol/tethering.cc",
- "$target_gen_dir/devtools/protocol/tethering.h",
- "$target_gen_dir/devtools/protocol/tracing.cc",
- "$target_gen_dir/devtools/protocol/tracing.h",
"about_url_loader_factory.cc",
"about_url_loader_factory.h",
"accessibility/accessibility_tree_formatter_blink.cc",
@@ -2505,6 +2558,7 @@ source_set("browser") {
"worker_host/worker_script_loader_factory.cc",
"worker_host/worker_script_loader_factory.h",
]
+ jumbo_excluded_sources = []
if (is_android) {
sources += [
@@ -2522,8 +2576,6 @@ source_set("browser") {
]
sources += [
- "$target_gen_dir/devtools/protocol/bluetooth_emulation.cc",
- "$target_gen_dir/devtools/protocol/bluetooth_emulation.h",
"devtools/protocol/bluetooth_emulation_handler.cc",
"devtools/protocol/bluetooth_emulation_handler.h",
]
@@ -2561,8 +2613,6 @@ source_set("browser") {
if (use_viz_debugger) {
sources += [
- "$target_gen_dir/devtools/protocol/visual_debugger.cc",
- "$target_gen_dir/devtools/protocol/visual_debugger.h",
"devtools/protocol/visual_debugger_handler.cc",
"devtools/protocol/visual_debugger_handler.h",
]
@@ -2956,6 +3006,9 @@ source_set("browser") {
]
public_deps += [ "//ui/base/cursor" ]
deps += [ "//third_party/webrtc_overrides:webrtc_component" ]
+ jumbo_excluded_sources += [
+ "media/capture/desktop_capture_device.cc",
+ ]
}
if (use_aura) {
sources += [
@@ -3414,6 +3467,12 @@ source_set("browser") {
"web_contents/web_contents_view_android.h",
]
+ jumbo_excluded_sources += [
+ # Files with kJavaLangClass and similar constants:
+ # Bug https://crbug.com/787557.
+ "android/java/java_method.cc", # and in gin_java_bound_object.cc.
+ ]
+
deps += [
":fontations_name_table_ffi",
":reflection_jni_headers",
@@ -3446,9 +3505,6 @@ source_set("browser") {
} else {
# Not Android.
sources += [
- # The WebAuthn devtools protocol API is not supported in Android yet.
- "$target_gen_dir/devtools/protocol/web_authn.cc",
- "$target_gen_dir/devtools/protocol/web_authn.h",
"devtools/protocol/webauthn_handler.cc",
"devtools/protocol/webauthn_handler.h",
"media/session/audio_focus_delegate_default.cc",
@@ -3695,8 +3751,6 @@ source_set("browser") {
if (use_clang_profiling_inside_sandbox && chrome_pgo_phase == 1) {
sources += [
- "$target_gen_dir/devtools/protocol/native_profiling.cc",
- "$target_gen_dir/devtools/protocol/native_profiling.h",
"devtools/protocol/native_profiling_handler.cc",
"devtools/protocol/native_profiling_handler.h",
"profiling_utils.cc",
diff --git a/content/browser/aggregation_service/aggregation_service_storage_sql.cc b/content/browser/aggregation_service/aggregation_service_storage_sql.cc
index 42604daf23..e06280aa5d 100644
--- a/content/browser/aggregation_service/aggregation_service_storage_sql.cc
+++ b/content/browser/aggregation_service/aggregation_service_storage_sql.cc
@@ -45,6 +45,8 @@
#include "url/gurl.h"
#include "url/origin.h"
+#define kDatabasePath kDatabasePath_AggregationServiceStorageSql
+
namespace content {
// Version number of the database.
@@ -1158,3 +1160,5 @@ void AggregationServiceStorageSql::DatabaseErrorCallback(int extended_error,
}
} // namespace content
+
+#undef kDatabasePath
diff --git a/content/browser/attribution_reporting/attribution_resolver_impl.cc b/content/browser/attribution_reporting/attribution_resolver_impl.cc
index 6fad864eb7..366cd2e21f 100644
--- a/content/browser/attribution_reporting/attribution_resolver_impl.cc
+++ b/content/browser/attribution_reporting/attribution_resolver_impl.cc
@@ -63,7 +63,7 @@ using AggregatableResult = AttributionTrigger::AggregatableResult;
using EventLevelResult = AttributionTrigger::EventLevelResult;
using StoredSourceData = AttributionStorageSql::StoredSourceData;
-constexpr int64_t kUnsetRecordId = -1;
+constexpr int64_t kUnsetRecordId_AttributionResolverImpl = -1;
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
@@ -901,7 +901,7 @@ AttributionResolverImpl::MaybeCreateEventLevelReport(
return CreateReportResult::EventLevelSuccess(
AttributionReport(
- attribution_info, AttributionReport::Id(kUnsetRecordId), report_time,
+ attribution_info, AttributionReport::Id(kUnsetRecordId_AttributionResolverImpl), report_time,
/*initial_report_time=*/report_time, delegate_->NewReportID(),
/*failed_send_attempts=*/0,
AttributionReport::EventLevelData(*trigger_data,
@@ -983,7 +983,7 @@ AttributionResolverImpl::MaybeCreateAggregatableAttributionReport(
GetAggregatableReportTime(trigger, attribution_info.time);
return CreateReportResult::AggregatableSuccess(AttributionReport(
- attribution_info, AttributionReport::Id(kUnsetRecordId), report_time,
+ attribution_info, AttributionReport::Id(kUnsetRecordId_AttributionResolverImpl), report_time,
/*initial_report_time=*/report_time, delegate_->NewReportID(),
/*failed_send_attempts=*/0,
AttributionReport::AggregatableData(
diff --git a/content/browser/attribution_reporting/attribution_storage_sql.cc b/content/browser/attribution_reporting/attribution_storage_sql.cc
index c88ed1c92c..77d25f26a1 100644
--- a/content/browser/attribution_reporting/attribution_storage_sql.cc
+++ b/content/browser/attribution_reporting/attribution_storage_sql.cc
@@ -99,6 +99,9 @@
#include "third_party/blink/public/mojom/aggregation_service/aggregatable_report.mojom.h"
#include "url/origin.h"
+#define kDatabasePath kDatabasePath_AttributionStorageSQL
+#define kUnsetRecordId kUnsetRecordId_AttributionStorageSQL
+
namespace content {
namespace {
@@ -3175,3 +3178,6 @@ int64_t AttributionStorageSql::CountUniqueReportingOriginsPerSiteForAttribution(
}
} // namespace content
+
+#undef kDatabasePath
+#undef kUnsetRecordId
diff --git a/content/browser/btm/btm_database.h b/content/browser/btm/btm_database.h
index dfad2d4940..ca7a9b8d6c 100644
--- a/content/browser/btm/btm_database.h
+++ b/content/browser/btm/btm_database.h
@@ -73,7 +73,7 @@ class CONTENT_EXPORT BtmDatabase {
// This is implicitly `inline`. Don't move its definition to the .cc file.
bool HasExpired(std::optional<base::Time> time) {
return time.has_value() &&
- (time.value() + features::kBtmInteractionTtl.Get()) < clock_->Now();
+ (time.value() + ::features::kBtmInteractionTtl.Get()) < clock_->Now();
}
std::optional<StateValue> Read(const std::string& site);
diff --git a/content/browser/btm/btm_page_visit_observer.cc b/content/browser/btm/btm_page_visit_observer.cc
index c651d2b866..69a844d1ab 100644
--- a/content/browser/btm/btm_page_visit_observer.cc
+++ b/content/browser/btm/btm_page_visit_observer.cc
@@ -53,6 +53,8 @@ BtmPageVisitObserver::~BtmPageVisitObserver() {
}
}
+#define NavigationState NavigationState_PageVisit
+
namespace {
inline bool IsWrite(BtmDataAccessType t) {
@@ -385,3 +387,5 @@ void BtmPageVisitObserver::WebAuthnAssertionRequestSucceeded(
}
} // namespace content
+
+#undef NavigationState
diff --git a/content/browser/btm/btm_short_visit_observer.cc b/content/browser/btm/btm_short_visit_observer.cc
index c01dd31b37..69b91160bd 100644
--- a/content/browser/btm/btm_short_visit_observer.cc
+++ b/content/browser/btm/btm_short_visit_observer.cc
@@ -32,6 +32,8 @@
#include "url/gurl.h"
#include "url/origin.h"
+#define NavigationState NavigationState_ShortVisit
+
namespace content {
namespace {
@@ -401,3 +403,5 @@ void BtmShortVisitObserver::NotifyStorageAccessed(
}
} // namespace content
+
+#undef NavigationState
diff --git a/content/browser/devtools/BUILD.gn b/content/browser/devtools/BUILD.gn
index 4cecc088a0..5e5894fd4d 100644
--- a/content/browser/devtools/BUILD.gn
+++ b/content/browser/devtools/BUILD.gn
@@ -83,7 +83,7 @@ action("concatenate_protocols") {
}
inspector_protocol_generate("protocol_sources") {
- visibility = [ "//content/browser" ]
+ visibility = [ "//content/browser:*" ]
deps = [ ":concatenate_protocols" ]
inspector_protocol_dir = "//third_party/inspector_protocol"
out_dir = target_gen_dir
diff --git a/content/browser/devtools/protocol/fedcm_handler.cc b/content/browser/devtools/protocol/fedcm_handler.cc
index cee5a2097d..a076779b16 100644
--- a/content/browser/devtools/protocol/fedcm_handler.cc
+++ b/content/browser/devtools/protocol/fedcm_handler.cc
@@ -345,7 +345,7 @@ FederatedAuthRequestPageData* FedCmHandler::GetPageData() {
if (!frame_host_) {
return nullptr;
}
- Page& page = frame_host_->GetPage();
+ content::Page& page = frame_host_->GetPage();
return PageUserData<FederatedAuthRequestPageData>::GetOrCreateForPage(page);
}
diff --git a/content/browser/devtools/render_frame_devtools_agent_host.cc b/content/browser/devtools/render_frame_devtools_agent_host.cc
index ce011f0b1e..be0d8548e8 100644
--- a/content/browser/devtools/render_frame_devtools_agent_host.cc
+++ b/content/browser/devtools/render_frame_devtools_agent_host.cc
@@ -89,6 +89,8 @@
#include "content/browser/devtools/protocol/visual_debugger_handler.h"
#endif
+#define g_agent_host_instances g_agent_host_instances_render_frame_devtools_agent_host
+
namespace content {
namespace {
@@ -1102,3 +1104,5 @@ bool RenderFrameDevToolsAgentHost::HasSessionsWithoutTabTargetSupport() const {
}
} // namespace content
+
+#undef g_agent_host_instances
diff --git a/content/browser/devtools/web_contents_devtools_agent_host.cc b/content/browser/devtools/web_contents_devtools_agent_host.cc
index 15e5a7cd36..c65712e78f 100644
--- a/content/browser/devtools/web_contents_devtools_agent_host.cc
+++ b/content/browser/devtools/web_contents_devtools_agent_host.cc
@@ -15,6 +15,8 @@
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/common/content_features.h"
+#define g_agent_host_instances g_agent_host_instances_web_contents_devtools_agent_host
+
namespace content {
namespace {
@@ -415,3 +417,5 @@ WebContentsDevToolsAgentHost::RevalidateSessionAccess() {
}
} // namespace content
+
+#undef g_agent_host_instances
diff --git a/content/browser/direct_sockets/direct_sockets_service_impl.cc b/content/browser/direct_sockets/direct_sockets_service_impl.cc
index 7765e9be7e..96bb53d4ab 100644
--- a/content/browser/direct_sockets/direct_sockets_service_impl.cc
+++ b/content/browser/direct_sockets/direct_sockets_service_impl.cc
@@ -58,6 +58,8 @@
#include "services/network/public/mojom/socket_connection_tracker.mojom.h"
#endif // BUILDFLAG(IS_CHROMEOS)
+#define DocumentHelper DocumentHelper_DirectSocketsServiceImpl
+
namespace content {
namespace {
@@ -835,3 +837,5 @@ void DirectSocketsServiceImpl::CreateRestrictedUDPSocketImpl(
}
} // namespace content
+
+#undef DocumentHelper
diff --git a/content/browser/file_system_access/file_system_access_change_source.cc b/content/browser/file_system_access/file_system_access_change_source.cc
index 566dc1ea40..d15da0acca 100644
--- a/content/browser/file_system_access/file_system_access_change_source.cc
+++ b/content/browser/file_system_access/file_system_access_change_source.cc
@@ -6,6 +6,8 @@
#include "base/functional/callback.h"
+#define ToFileSystemURL ToFileSystemURL_FileSystemAccessChangeSource
+
namespace content {
namespace {
@@ -133,3 +135,5 @@ void FileSystemAccessChangeSource::NotifyOfUsageChange(size_t old_usage,
}
} // namespace content
+
+#undef ToFileSystemURL
diff --git a/content/browser/file_system_access/file_system_access_watcher_manager.cc b/content/browser/file_system_access/file_system_access_watcher_manager.cc
index a73f255744..7686578279 100644
--- a/content/browser/file_system_access/file_system_access_watcher_manager.cc
+++ b/content/browser/file_system_access/file_system_access_watcher_manager.cc
@@ -38,6 +38,8 @@
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS) &&
// !BUILDFLAG(IS_FUCHSIA)
+#define ToFileSystemURL ToFileSystemURL_FileSystemAccessWatcherManager
+
namespace content {
using WatchType = FileSystemAccessWatchScope::WatchType;
@@ -569,3 +571,5 @@ FileSystemAccessWatcherManager::CreateOwnedSourceForScope(
}
} // namespace content
+
+#undef ToFileSystemURL
diff --git a/content/browser/find_request_manager.cc b/content/browser/find_request_manager.cc
index affdc0cb28..b382bafcfb 100644
--- a/content/browser/find_request_manager.cc
+++ b/content/browser/find_request_manager.cc
@@ -170,7 +170,7 @@ bool IsFindInPageDisabled(RenderFrameHost* rfh) {
}
bool IsUnattachedGuestView(RenderFrameHost* rfh) {
- if (base::FeatureList::IsEnabled(features::kGuestViewMPArch)) {
+ if (base::FeatureList::IsEnabled(::features::kGuestViewMPArch)) {
NOTIMPLEMENTED();
return false;
} else {
diff --git a/content/browser/generic_sensor/frame_sensor_provider_proxy.cc b/content/browser/generic_sensor/frame_sensor_provider_proxy.cc
index 2836e5233c..e03335155b 100644
--- a/content/browser/generic_sensor/frame_sensor_provider_proxy.cc
+++ b/content/browser/generic_sensor/frame_sensor_provider_proxy.cc
@@ -120,7 +120,7 @@ void FrameSensorProviderProxy::OnPermissionRequestCompleted(
break;
default:
if (!base::FeatureList::IsEnabled(
- features::kAllowSensorsToEnterBfcache)) {
+ ::features::kAllowSensorsToEnterBfcache)) {
static_cast<RenderFrameHostImpl*>(&render_frame_host())
->OnBackForwardCacheDisablingStickyFeatureUsed(
blink::scheduler::WebSchedulerTrackedFeature::
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
index 9e30a243a9..5c6104b914 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -396,7 +396,7 @@ bool SoftwareGLAllowed() {
const base::CommandLine* command_line =
base::CommandLine::ForCurrentProcess();
return !command_line->HasSwitch(switches::kDisableSoftwareRasterizer) &&
- features::IsAnySoftwareGLAllowed(command_line);
+ ::features::IsAnySoftwareGLAllowed(command_line);
}
// These values are logged to UMA. Entries should not be renumbered and numeric
@@ -526,7 +526,7 @@ void GpuDataManagerImplPrivate::InitializeGpuModes() {
BUILDFLAG(IS_CHROMEOS)
NOTREACHED() << "GPU acceleration is required on certain platforms!";
#endif
- } else if (features::IsSkiaGraphiteEnabled(command_line)) {
+ } else if (::features::IsSkiaGraphiteEnabled(command_line)) {
// If Graphite is enabled, fall back to Ganesh/GL on platforms that do not
// support software compositing or sometimes fail dawn initialization.
// TODO(b/323953910): Eliminate this fallback on each platform once Graphite
@@ -542,7 +542,7 @@ void GpuDataManagerImplPrivate::InitializeGpuModes() {
#else
fallback_modes_.push_back(gpu::GpuMode::HARDWARE_GL);
// Prefer Vulkan over GL if enabled.
- if (features::IsUsingVulkan()) {
+ if (::features::IsUsingVulkan()) {
fallback_modes_.push_back(gpu::GpuMode::HARDWARE_VULKAN);
}
#endif // BUILDFLAG(IS_FUCHSIA)
@@ -1242,7 +1242,7 @@ void GpuDataManagerImplPrivate::UpdateGpuFeatureInfo(
}
is_gpu_rasterization_for_ui_enabled_ =
- features::IsUiGpuRasterizationEnabled() &&
+ ::features::IsUiGpuRasterizationEnabled() &&
gpu_feature_info_
.status_values[gpu::GPU_FEATURE_TYPE_GPU_TILE_RASTERIZATION] ==
gpu::kGpuFeatureStatusEnabled;
@@ -1677,7 +1677,7 @@ void GpuDataManagerImplPrivate::FallBackToNextGpuModeDueToCrash() {
// If we fell back to sofware GL due to crashes and it is disabled with a
// feature. Fall back again.
if (gpu_mode_ == gpu::GpuMode::SOFTWARE_GL &&
- !features::IsSoftwareGLFallbackDueToCrashesAllowed(
+ !::features::IsSoftwareGLFallbackDueToCrashesAllowed(
base::CommandLine::ForCurrentProcess())) {
FallBackToNextGpuMode();
DCHECK_NE(gpu_mode_, gpu::GpuMode::SOFTWARE_GL);
diff --git a/content/browser/guest_page_holder_impl.cc b/content/browser/guest_page_holder_impl.cc
index 6c8c488087..fb301afbf5 100644
--- a/content/browser/guest_page_holder_impl.cc
+++ b/content/browser/guest_page_holder_impl.cc
@@ -305,7 +305,7 @@ FrameTree* GuestPageHolderImpl::CreateNewWindow(
bool GuestPageHolderImpl::OnRenderFrameProxyVisibilityChanged(
RenderFrameProxyHost* render_frame_proxy_host,
blink::mojom::FrameVisibility visibility) {
- CHECK(base::FeatureList::IsEnabled(features::kGuestViewMPArch));
+ CHECK(base::FeatureList::IsEnabled(::features::kGuestViewMPArch));
if (render_frame_proxy_host->frame_tree_node() != frame_tree_.root()) {
return false;
diff --git a/content/browser/hid/hid_service.cc b/content/browser/hid/hid_service.cc
index 5c153a6996..9091357b31 100644
--- a/content/browser/hid/hid_service.cc
+++ b/content/browser/hid/hid_service.cc
@@ -26,6 +26,8 @@
#include "services/device/public/cpp/device_features.h"
#include "services/network/public/mojom/permissions_policy/permissions_policy_feature.mojom.h"
+#define DocumentHelper DocumentHelper_HidService
+
namespace content {
// Deletes the HidService when the connected document is destroyed.
@@ -595,3 +597,5 @@ BrowserContext* HidService::GetBrowserContext() {
}
} // namespace content
+
+#undef DocumentHelper
diff --git a/content/browser/host_zoom_map_impl.cc b/content/browser/host_zoom_map_impl.cc
index 5b75a5577d..bc3034362a 100644
--- a/content/browser/host_zoom_map_impl.cc
+++ b/content/browser/host_zoom_map_impl.cc
@@ -75,7 +75,7 @@ bool IsIndependentSubframeZoomEnabled() {
// only return true here if some feature that requires subframe zoom is also
// enabled.
return base::FeatureList::IsEnabled(kSubframeZoom) &&
- (base::FeatureList::IsEnabled(features::kGuestViewMPArch) ||
+ (base::FeatureList::IsEnabled(::features::kGuestViewMPArch) ||
GetContentClient()->browser()->ShouldEnableSubframeZoom());
}
diff --git a/content/browser/in_memory_federated_permission_context.cc b/content/browser/in_memory_federated_permission_context.cc
index fede9ac819..24fe22a7b7 100644
--- a/content/browser/in_memory_federated_permission_context.cc
+++ b/content/browser/in_memory_federated_permission_context.cc
@@ -28,7 +28,7 @@ InMemoryFederatedPermissionContext::~InMemoryFederatedPermissionContext() =
content::FederatedIdentityApiPermissionContextDelegate::PermissionStatus
InMemoryFederatedPermissionContext::GetApiPermissionStatus(
const url::Origin& relying_party_embedder) {
- if (!base::FeatureList::IsEnabled(features::kFedCm)) {
+ if (!base::FeatureList::IsEnabled(::features::kFedCm)) {
return PermissionStatus::BLOCKED_VARIATIONS;
}
diff --git a/content/browser/interest_group/bidding_and_auction_response.cc b/content/browser/interest_group/bidding_and_auction_response.cc
index 771736dea6..dbcbb60703 100644
--- a/content/browser/interest_group/bidding_and_auction_response.cc
+++ b/content/browser/interest_group/bidding_and_auction_response.cc
@@ -24,6 +24,8 @@
#include "third_party/blink/public/mojom/private_aggregation/private_aggregation_host.mojom.h"
#include "url/origin.h"
+#define kFramingHeaderSize kFramingHeaderSize_BiddingAndAuctionResponse
+
namespace content {
namespace {
@@ -971,3 +973,5 @@ BiddingAndAuctionResponse::ReportingURLs::TryParse(
}
} // namespace content
+
+#undef kFramingHeaderSize
diff --git a/content/browser/interest_group/bidding_and_auction_serializer.cc b/content/browser/interest_group/bidding_and_auction_serializer.cc
index f66cd503b4..5f02772233 100644
--- a/content/browser/interest_group/bidding_and_auction_serializer.cc
+++ b/content/browser/interest_group/bidding_and_auction_serializer.cc
@@ -41,6 +41,8 @@
#include "third_party/blink/public/mojom/interest_group/interest_group_types.mojom.h"
#include "third_party/zlib/google/compression_utils.h"
+#define kFramingHeaderSize kFramingHeaderSize_BiddingAndAuctionSerializer
+
namespace content {
namespace {
@@ -1218,3 +1220,5 @@ BiddingAndAuctionSerializer::BuildRequestFromMessage(const url::Origin& seller,
}
} // namespace content
+
+#undef kFramingHeaderSize
diff --git a/content/browser/interest_group/interest_group_manager_impl.cc b/content/browser/interest_group/interest_group_manager_impl.cc
index 12f64c3b28..c1c169c608 100644
--- a/content/browser/interest_group/interest_group_manager_impl.cc
+++ b/content/browser/interest_group/interest_group_manager_impl.cc
@@ -57,6 +57,8 @@
#include "url/gurl.h"
#include "url/origin.h"
+#define kTrafficAnnotation kTrafficAnnotation_InterestGroupManagerImpl
+
namespace content {
class BrowserContext;
@@ -1294,3 +1296,5 @@ InterestGroupManagerImpl::CreateNotifyInterestGroupAccessedCallback(
}
} // namespace content
+
+#undef kTrafficAnnotation
diff --git a/content/browser/interest_group/interest_group_permissions_checker.cc b/content/browser/interest_group/interest_group_permissions_checker.cc
index 7f240a09f9..83f5e81889 100644
--- a/content/browser/interest_group/interest_group_permissions_checker.cc
+++ b/content/browser/interest_group/interest_group_permissions_checker.cc
@@ -24,6 +24,8 @@
#include "url/origin.h"
#include "url/url_constants.h"
+#define kTrafficAnnotation kTrafficAnnotation_InterestGroupPermissionsChecker
+
namespace content {
namespace {
@@ -230,3 +232,5 @@ bool InterestGroupPermissionsChecker::AllowsOperation(Permissions permissions,
}
} // namespace content
+
+#undef kTrafficAnnotation
diff --git a/content/browser/interest_group/interest_group_update_manager.cc b/content/browser/interest_group/interest_group_update_manager.cc
index aa93392ed0..eed456c493 100644
--- a/content/browser/interest_group/interest_group_update_manager.cc
+++ b/content/browser/interest_group/interest_group_update_manager.cc
@@ -53,6 +53,8 @@
#include "url/origin.h"
#include "url/url_constants.h"
+#define kTrafficAnnotation kTrafficAnnotation_InterestGroupUpdateManager
+
namespace content {
namespace {
@@ -1355,3 +1357,5 @@ void InterestGroupUpdateManager::ReportUpdateFailed(
}
} // namespace content
+
+#undef kTrafficAnnotation
diff --git a/content/browser/interest_group/trusted_signals_fetcher.cc b/content/browser/interest_group/trusted_signals_fetcher.cc
index 4639e9ce9c..c75d1f9801 100644
--- a/content/browser/interest_group/trusted_signals_fetcher.cc
+++ b/content/browser/interest_group/trusted_signals_fetcher.cc
@@ -59,6 +59,8 @@
#include "url/gurl.h"
#include "url/origin.h"
+#define kOhttpHeaderSize kOhttpHeaderSize_TrustedSignalsFetcher
+
namespace content {
namespace {
@@ -722,3 +724,5 @@ std::string TrustedSignalsFetcher::CreateError(
}
} // namespace content
+
+#undef kOhttpHeaderSize
diff --git a/content/browser/media/cdm_storage_common.cc b/content/browser/media/cdm_storage_common.cc
index 342a066ec5..67937452f5 100644
--- a/content/browser/media/cdm_storage_common.cc
+++ b/content/browser/media/cdm_storage_common.cc
@@ -6,6 +6,8 @@
#include "content/public/common/content_features.h"
+#define kUmaPrefix kUmaPrefix_CdmStorageCommon
+
namespace content {
namespace {
@@ -36,3 +38,5 @@ std::string GetCdmStorageManagerHistogramName(const std::string& operation,
}
} // namespace content
+
+#undef kUmaPrefix
diff --git a/content/browser/media/cdm_storage_database.cc b/content/browser/media/cdm_storage_database.cc
index d3fac47497..24ac12eb77 100644
--- a/content/browser/media/cdm_storage_database.cc
+++ b/content/browser/media/cdm_storage_database.cc
@@ -13,6 +13,8 @@
#include "base/strings/string_number_conversions.h"
#include "sql/statement.h"
+#define kUmaPrefix kUmaPrefix_CdmStorageDatabase
+
namespace content {
namespace {
@@ -689,3 +691,5 @@ void CdmStorageDatabase::OnDatabaseError(int error, sql::Statement* stmt) {
}
} // namespace content
+
+#undef kUmaPrefix
diff --git a/content/browser/preloading/prefetch/prefetch_service.cc b/content/browser/preloading/prefetch/prefetch_service.cc
index 094f65438e..3e8057ba79 100644
--- a/content/browser/preloading/prefetch/prefetch_service.cc
+++ b/content/browser/preloading/prefetch/prefetch_service.cc
@@ -78,6 +78,8 @@
#include "url/origin.h"
#include "url/url_constants.h"
+#define BrowserContextFromFrameTreeNodeId BrowserContextFromFrameTreeNodeId_PrefetchService
+
namespace content {
namespace {
@@ -2129,3 +2131,5 @@ void PrefetchService::EvictPrefetchesForBrowsingDataRemoval(
}
} // namespace content
+
+#undef BrowserContextFromFrameTreeNodeId
diff --git a/content/browser/preloading/prefetch/prefetch_url_loader_interceptor.cc b/content/browser/preloading/prefetch/prefetch_url_loader_interceptor.cc
index 7b5682d768..67cb8fdebe 100644
--- a/content/browser/preloading/prefetch/prefetch_url_loader_interceptor.cc
+++ b/content/browser/preloading/prefetch/prefetch_url_loader_interceptor.cc
@@ -28,6 +28,8 @@
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/cpp/single_request_url_loader_factory.h"
+#define BrowserContextFromFrameTreeNodeId BrowserContextFromFrameTreeNodeId_PrefetchURLLoaderInterceptor
+
namespace content {
namespace {
@@ -304,3 +306,5 @@ void PrefetchURLLoaderInterceptor::OnGetPrefetchComplete(
}
} // namespace content
+
+#undef BrowserContextFromFrameTreeNodeId
diff --git a/content/browser/preloading/prerender/prerender_commit_deferring_condition.cc b/content/browser/preloading/prerender/prerender_commit_deferring_condition.cc
index 279d46371c..31076b1ef4 100644
--- a/content/browser/preloading/prerender/prerender_commit_deferring_condition.cc
+++ b/content/browser/preloading/prerender/prerender_commit_deferring_condition.cc
@@ -13,6 +13,8 @@
#include "content/browser/renderer_host/navigation_request.h"
#include "content/public/browser/render_frame_host.h"
+#define GetRootPrerenderFrameTreeNode GetRootPrerenderFrameTreeNode_PrerenderCommitDeferringCondition
+
namespace content {
namespace {
@@ -140,3 +142,5 @@ void PrerenderCommitDeferringCondition::DidFinishNavigation(
}
} // namespace content
+
+#undef GetRootPrerenderFrameTreeNode
diff --git a/content/browser/preloading/prerender/prerender_no_vary_search_commit_deferring_condition.cc b/content/browser/preloading/prerender/prerender_no_vary_search_commit_deferring_condition.cc
index 2eef5a66d3..3e9fe2e2c9 100644
--- a/content/browser/preloading/prerender/prerender_no_vary_search_commit_deferring_condition.cc
+++ b/content/browser/preloading/prerender/prerender_no_vary_search_commit_deferring_condition.cc
@@ -14,6 +14,8 @@
#include "content/browser/renderer_host/navigation_request.h"
#include "content/public/browser/render_frame_host.h"
+#define GetRootPrerenderFrameTreeNode GetRootPrerenderFrameTreeNode_PrerenderNoVarySearchCommitDeferringCondition
+
namespace content {
namespace {
@@ -134,3 +136,5 @@ const char* PrerenderNoVarySearchCommitDeferringCondition::TraceEventName()
}
} // namespace content
+
+#undef GetRootPrerenderFrameTreeNode
diff --git a/content/browser/renderer_host/media/media_devices_manager.cc b/content/browser/renderer_host/media/media_devices_manager.cc
index 20ca4a9894..29eba26c2a 100644
--- a/content/browser/renderer_host/media/media_devices_manager.cc
+++ b/content/browser/renderer_host/media/media_devices_manager.cc
@@ -56,6 +56,9 @@
#include "media/device_monitors/device_monitor_mac.h"
#endif
+#define DeviceTypeToString DeviceTypeToString_MediaDevicesManager
+#define SendLogMessage SendLogMessage_MediaDevicesManager
+
namespace content {
// Release video source provider in VideoCaptureDevicesChangedObserver
@@ -1730,3 +1733,6 @@ MediaDevicesManager::EnumerationState& MediaDevicesManager::EnumerationState::
operator=(EnumerationState&& other) = default;
} // namespace content
+
+#undef DeviceTypeToString
+#undef SendLogMessage
diff --git a/content/browser/renderer_host/media/media_stream_manager.cc b/content/browser/renderer_host/media/media_stream_manager.cc
index 61454ad42f..dd14960568 100644
--- a/content/browser/renderer_host/media/media_stream_manager.cc
+++ b/content/browser/renderer_host/media/media_stream_manager.cc
@@ -106,6 +106,9 @@
using ::blink::mojom::MediaDeviceType;
+#define DeviceTypeToString DeviceTypeToString_MediaStreamManager
+#define SendLogMessage SendLogMessage_MediaStreamManager
+
namespace content {
constinit thread_local MediaStreamManager* media_stream_manager = nullptr;
@@ -4659,3 +4662,6 @@ void MediaStreamManager::OnVideoCaptureHostConnectionError() {
#endif
} // namespace content
+
+#undef DeviceTypeToString
+#undef SendLogMessage
diff --git a/content/browser/renderer_host/media/render_frame_audio_input_stream_factory.cc b/content/browser/renderer_host/media/render_frame_audio_input_stream_factory.cc
index 9d68d830df..5fcd6376b2 100644
--- a/content/browser/renderer_host/media/render_frame_audio_input_stream_factory.cc
+++ b/content/browser/renderer_host/media/render_frame_audio_input_stream_factory.cc
@@ -42,6 +42,8 @@
using blink::mojom::MediaDeviceType;
+#define GotSaltAndOrigin GotSaltAndOrigin_RenderFrameAudioInputStreamFactory
+
namespace content {
namespace {
@@ -378,3 +380,5 @@ void RenderFrameAudioInputStreamFactory::Core::
}
} // namespace content
+
+#undef GotSaltAndOrigin
diff --git a/content/browser/renderer_host/partitioned_popins/partitioned_popins_navigation_throttle.cc b/content/browser/renderer_host/partitioned_popins/partitioned_popins_navigation_throttle.cc
index 5c35b86bdd..22a42d3716 100644
--- a/content/browser/renderer_host/partitioned_popins/partitioned_popins_navigation_throttle.cc
+++ b/content/browser/renderer_host/partitioned_popins/partitioned_popins_navigation_throttle.cc
@@ -85,7 +85,7 @@ PartitionedPopinsNavigationThrottle::PartitionedPopinsNavigationThrottle(
bool PartitionedPopinsNavigationThrottle::DoesPopinPolicyBlockResponse() {
if (base::FeatureList::IsEnabled(
- features::kPartitionedPopinsHeaderPolicyBypass)) {
+ ::features::kPartitionedPopinsHeaderPolicyBypass)) {
return false;
}
const net::HttpResponseHeaders* response_headers =
diff --git a/content/browser/renderer_host/private_network_access_util.cc b/content/browser/renderer_host/private_network_access_util.cc
index 870e65eaf0..1c33481d7e 100644
--- a/content/browser/renderer_host/private_network_access_util.cc
+++ b/content/browser/renderer_host/private_network_access_util.cc
@@ -39,24 +39,24 @@ FeatureState FeatureStateForContext(RequestContext request_context) {
return FeatureState::kEnabled;
case RequestContext::kWorker:
if (!base::FeatureList::IsEnabled(
- features::kPrivateNetworkAccessForWorkers)) {
+ ::features::kPrivateNetworkAccessForWorkers)) {
return FeatureState::kDisabled;
}
if (base::FeatureList::IsEnabled(
- features::kPrivateNetworkAccessForWorkersWarningOnly)) {
+ ::features::kPrivateNetworkAccessForWorkersWarningOnly)) {
return FeatureState::kWarningOnly;
}
return FeatureState::kEnabled;
case RequestContext::kNavigation:
if (!base::FeatureList::IsEnabled(
- features::kPrivateNetworkAccessForNavigations)) {
+ ::features::kPrivateNetworkAccessForNavigations)) {
return FeatureState::kDisabled;
}
if (base::FeatureList::IsEnabled(
- features::kPrivateNetworkAccessForNavigationsWarningOnly)) {
+ ::features::kPrivateNetworkAccessForNavigationsWarningOnly)) {
return FeatureState::kWarningOnly;
}
@@ -88,7 +88,7 @@ Policy DerivePolicyForNonSecureContext(
// because it is unclear why they happen in the first place. The goal is
// to reduce instances of this happening before enabling this feature.
return base::FeatureList::IsEnabled(
- features::kBlockInsecurePrivateNetworkRequestsFromUnknown)
+ ::features::kBlockInsecurePrivateNetworkRequestsFromUnknown)
? Policy::kBlock
: Policy::kAllow;
case AddressSpace::kPrivate:
@@ -97,7 +97,7 @@ Policy DerivePolicyForNonSecureContext(
// This is controlled separately because private network websites face
// additional hurdles compared to public websites. See crbug.com/1234044.
return base::FeatureList::IsEnabled(
- features::kBlockInsecurePrivateNetworkRequestsFromPrivate)
+ ::features::kBlockInsecurePrivateNetworkRequestsFromPrivate)
? Policy::kBlock
: Policy::kWarn;
case AddressSpace::kPublic:
@@ -110,7 +110,7 @@ Policy DerivePolicyForNonSecureContext(
// are never considered private network requests - they cannot target
// more-private address spaces.
return base::FeatureList::IsEnabled(
- features::kBlockInsecurePrivateNetworkRequests)
+ ::features::kBlockInsecurePrivateNetworkRequests)
? Policy::kBlock
: Policy::kWarn;
}
@@ -133,12 +133,12 @@ Policy DerivePolicyForSecureContext(AddressSpace ip_address_space,
}
if (base::FeatureList::IsEnabled(
- features::kPrivateNetworkAccessRespectPreflightResults)) {
+ ::features::kPrivateNetworkAccessRespectPreflightResults)) {
return Policy::kPreflightBlock;
}
if (base::FeatureList::IsEnabled(
- features::kPrivateNetworkAccessSendPreflights)) {
+ ::features::kPrivateNetworkAccessSendPreflights)) {
return Policy::kPreflightWarn;
}
diff --git a/content/browser/renderer_host/randomized_confidence_utils.cc b/content/browser/renderer_host/randomized_confidence_utils.cc
index 4297ff2a1a..a0a2f4bc1c 100644
--- a/content/browser/renderer_host/randomized_confidence_utils.cc
+++ b/content/browser/renderer_host/randomized_confidence_utils.cc
@@ -17,7 +17,7 @@ double GetConfidenceRandomizedTriggerRate() {
int32_t state_count = 1 + (int32_t)blink::mojom::ConfidenceLevel::kMaxValue;
double navigation_confidence_epsilon = std::max(
0.0, std::min(g_max_navigation_confidence_epsilon,
- features::kNavigationConfidenceEpsilonValue.Get()));
+ ::features::kNavigationConfidenceEpsilonValue.Get()));
double randomized_response_rate =
state_count /
((state_count - 1) + std::exp(navigation_confidence_epsilon));
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index 23cd457563..be5ab78534 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -460,9 +460,9 @@ using RoutingIDIsolatableSandboxedIframesSet =
base::LazyInstance<RoutingIDIsolatableSandboxedIframesSet>::DestructorAtExit
g_routing_id_isolatable_sandboxed_iframes_set = LAZY_INSTANCE_INITIALIZER;
-using TokenFrameMap =
+using TokenFrameMap_RenderFrameHostImpl =
absl::flat_hash_map<blink::LocalFrameToken, RenderFrameHostImpl*>;
-base::LazyInstance<TokenFrameMap>::Leaky g_token_frame_map =
+base::LazyInstance<TokenFrameMap_RenderFrameHostImpl>::Leaky g_token_frame_map =
LAZY_INSTANCE_INITIALIZER;
BackForwardCacheMetrics::NotRestoredReason
@@ -891,7 +891,7 @@ GURL GetLastDocumentURL(
// Return true when `mode` is enabled for kAvoidUnnecessaryBeforeUnloadCheckSync
// feature (see: https://crbug.com/396998476).
bool IsAvoidUnnecessaryBeforeUnloadCheckSyncEnabledFor(
- features::AvoidUnnecessaryBeforeUnloadCheckSyncMode mode) {
+ ::features::AvoidUnnecessaryBeforeUnloadCheckSyncMode mode) {
if (!GetContentClient()
->browser()
->SupportsAvoidUnnecessaryBeforeUnloadCheckSync()) {
@@ -899,11 +899,11 @@ bool IsAvoidUnnecessaryBeforeUnloadCheckSyncEnabledFor(
}
if (!base::FeatureList::IsEnabled(
- features::kAvoidUnnecessaryBeforeUnloadCheckSync)) {
+ ::features::kAvoidUnnecessaryBeforeUnloadCheckSync)) {
return false;
}
- return features::kAvoidUnnecessaryBeforeUnloadCheckSyncMode.Get() == mode;
+ return ::features::kAvoidUnnecessaryBeforeUnloadCheckSyncMode.Get() == mode;
}
// Returns true if `host` has the Window Management permission granted.
@@ -3795,7 +3795,7 @@ RenderFrameHostImpl::AccessibilityGetAcceleratedWidget() {
gfx::NativeViewAccessible
RenderFrameHostImpl::AccessibilityGetNativeViewAccessible() {
- if (base::FeatureList::IsEnabled(features::kEvictOnAXEvents) &&
+ if (base::FeatureList::IsEnabled(::features::kEvictOnAXEvents) &&
IsInactiveAndDisallowActivation(
DisallowActivationReasonId::kAXGetNativeView)) {
// |AccessibilityGetNativeViewAccessible()| should be only accessible when
@@ -4247,7 +4247,7 @@ bool RenderFrameHostImpl::CreateRenderFrame(
(navigation_request->commit_params()
.is_cross_site_cross_browsing_context_group &&
base::FeatureList::IsEnabled(
- features::kClearCrossSiteCrossBrowsingContextGroupWindowName) &&
+ ::features::kClearCrossSiteCrossBrowsingContextGroupWindowName) &&
GetContentClient()
->browser()
->IsClearWindowNameForNewBrowsingContextGroupAllowed(context)));
@@ -5758,7 +5758,7 @@ bool RenderFrameHostImpl::VerifyFencedFrameFocusChange(
// TODO(crbug.com/40274134): We will later badmessage the renderer, but, for
// now, we will dump without crashing to monitor if any legitimate cases are
// reaching this point.
- if (base::FeatureList::IsEnabled(features::kFencedFramesEnforceFocus)) {
+ if (base::FeatureList::IsEnabled(::features::kFencedFramesEnforceFocus)) {
bad_message::ReceivedBadMessage(
GetProcess(), bad_message::RFH_FOCUS_ACROSS_FENCED_BOUNDARY);
} else {
@@ -6471,7 +6471,7 @@ void RenderFrameHostImpl::SwapOuterDelegateFrame(
// `devtools_frame_token`) to indicate to DevTools clients that the guest has
// been attached to this placeholder iframe.
const bool should_swap_devtools_frame_token =
- base::FeatureList::IsEnabled(features::kGuestViewMPArch);
+ base::FeatureList::IsEnabled(::features::kGuestViewMPArch);
GetMojomFrameInRenderer()->Unload(
/*is_loading=*/false,
browsing_context_state_->current_replication_state().Clone(),
@@ -8550,14 +8550,14 @@ bool RenderFrameHostImpl::IsInactiveAndDisallowActivation(uint64_t reason) {
// back/forward cache, because |HandleAXevents()| will continue to process
// accessibility events without evicting unless the kEvictOnAXEvents flag
// is on.
- if (!base::FeatureList::IsEnabled(features::kEvictOnAXEvents))
+ if (!base::FeatureList::IsEnabled(::features::kEvictOnAXEvents))
CHECK_NE(reason, kAXEvent);
// This function should not be called with kAXLocationChange when the
// page is in back/forward cache, because `HandleAXLocationChange()` will
// continue to process accessibility location changes unless
// kDoNotEvictOnAXLocationChange is off.
if (base::FeatureList::IsEnabled(
- features::kDoNotEvictOnAXLocationChange)) {
+ ::features::kDoNotEvictOnAXLocationChange)) {
CHECK_NE(reason, kAXLocationChange);
}
BackForwardCacheCanStoreDocumentResult can_store_flat;
@@ -8595,7 +8595,7 @@ bool RenderFrameHostImpl::IsInactiveAndDisallowActivation(uint64_t reason) {
bool RenderFrameHostImpl::IsInactiveAndDisallowActivationForAXEvents(
const std::vector<ui::AXEvent>& events) {
- DCHECK(base::FeatureList::IsEnabled(features::kEvictOnAXEvents));
+ DCHECK(base::FeatureList::IsEnabled(::features::kEvictOnAXEvents));
if (lifecycle_state_ != LifecycleStateImpl::kInBackForwardCache) {
return IsInactiveAndDisallowActivation(
DisallowActivationReasonId::kAXEvent);
@@ -8996,7 +8996,7 @@ void RenderFrameHostImpl::MaybeIsolateForUserActivation() {
// the isolation eligibility checks, such as having the corresponding
// feature enabled or satisfying memory requirements.
DCHECK(base::FeatureList::IsEnabled(
- features::kSiteIsolationForCrossOriginOpenerPolicy));
+ ::features::kSiteIsolationForCrossOriginOpenerPolicy));
bool is_same_origin_activation =
GetParent() ? GetMainFrame()->GetLastCommittedOrigin().IsSameOriginWith(
@@ -11213,7 +11213,7 @@ void RenderFrameHostImpl::HandleAXEvents(
// TODO(accessibility): we should probably consolidate these two params.
updates_and_events.ax_tree_id = tree_id;
- if (base::FeatureList::IsEnabled(features::kEvictOnAXEvents)) {
+ if (base::FeatureList::IsEnabled(::features::kEvictOnAXEvents)) {
// If the flag is on, evict the bfcache entry now that AX events are
// received.
if (IsInactiveAndDisallowActivationForAXEvents(updates_and_events.events)) {
@@ -11317,7 +11317,7 @@ void RenderFrameHostImpl::HandleAXLocationChanges(
return;
}
- if (!base::FeatureList::IsEnabled(features::kDoNotEvictOnAXLocationChange)) {
+ if (!base::FeatureList::IsEnabled(::features::kDoNotEvictOnAXLocationChange)) {
// If the flag is off, we should evict the back/forward cache entry.
if (IsInactiveAndDisallowActivation(
DisallowActivationReasonId::kAXLocationChange)) {
@@ -11714,7 +11714,7 @@ RenderFrameHostImpl::CheckOrDispatchBeforeUnloadForFrame(
const bool run_beforeunload_for_legacy_frame =
rfh == this && !rfh->has_before_unload_handler_ &&
!IsAvoidUnnecessaryBeforeUnloadCheckSyncEnabledFor(
- features::AvoidUnnecessaryBeforeUnloadCheckSyncMode::
+ ::features::AvoidUnnecessaryBeforeUnloadCheckSyncMode::
kWithoutSendBeforeUnload);
const bool should_run_beforeunload =
rfh->has_before_unload_handler_ || run_beforeunload_for_legacy_frame;
@@ -13696,7 +13696,7 @@ void RenderFrameHostImpl::CreateSecurePaymentConfirmationService(
void RenderFrameHostImpl::CreateWebUsbService(
mojo::PendingReceiver<blink::mojom::WebUsbService> receiver) {
- if (!base::FeatureList::IsEnabled(features::kWebUsb)) {
+ if (!base::FeatureList::IsEnabled(::features::kWebUsb)) {
return;
}
if (!IsFeatureEnabled(network::mojom::PermissionsPolicyFeature::kUsb)) {
@@ -16016,7 +16016,7 @@ void RenderFrameHostImpl::SendCommitNavigation(
// TODO(crbug.com/40205612): Remove the kill switch for this check.
bool should_block_storage_access_for_pdf =
GetSiteInstance()->GetSiteInfo().is_pdf() &&
- base::FeatureList::IsEnabled(features::kPdfEnforcements);
+ base::FeatureList::IsEnabled(::features::kPdfEnforcements);
// Make sure the origin of the isolation info and origin to commit match,
// otherwise the cookie manager will crash. Sending the cookie manager here
@@ -16411,7 +16411,7 @@ void RenderFrameHostImpl::SendBeforeUnload(
const bool can_be_in_navigate_to_pending_entry =
is_eligible_for_avoid_unnecessary_beforeunload &&
IsAvoidUnnecessaryBeforeUnloadCheckSyncEnabledFor(
- features::AvoidUnnecessaryBeforeUnloadCheckSyncMode::
+ ::features::AvoidUnnecessaryBeforeUnloadCheckSyncMode::
kDumpWithoutCrashing) &&
frame_tree()->controller().in_navigate_to_pending_entry();
@@ -16419,7 +16419,7 @@ void RenderFrameHostImpl::SendBeforeUnload(
if (is_eligible_for_avoid_unnecessary_beforeunload &&
IsAvoidUnnecessaryBeforeUnloadCheckSyncEnabledFor(
- features::AvoidUnnecessaryBeforeUnloadCheckSyncMode::
+ ::features::AvoidUnnecessaryBeforeUnloadCheckSyncMode::
kWithSendBeforeUnload)) {
std::move(before_unload_closure)
.Run(/*proceed=*/true, send_before_unload_start_time_,
@@ -17014,7 +17014,7 @@ bool ShouldVerify(const std::string& param) {
// For other params, default to disable checking the param. However, it's
// possible to force-enable checking the param via the VerifyDidCommitParams
// flag's param.
- return GetFieldTrialParamByFeatureAsBool(features::kVerifyDidCommitParams,
+ return GetFieldTrialParamByFeatureAsBool(::features::kVerifyDidCommitParams,
param, false);
#endif
}
@@ -17063,7 +17063,7 @@ void RenderFrameHostImpl::
#if !DCHECK_IS_ON()
// Only check for the flag if DCHECK is not enabled, so that we will always
// verify the params for tests.
- if (!base::FeatureList::IsEnabled(features::kVerifyDidCommitParams))
+ if (!base::FeatureList::IsEnabled(::features::kVerifyDidCommitParams))
return;
#endif
// Check if these values from DidCommitProvisionalLoadParams sent by the
@@ -18280,14 +18280,14 @@ void RenderFrameHostImpl::SetFrameTreeNode(FrameTreeNode& frame_tree_node) {
// the new functionality for swapping BrowsingContext on cross
// BrowsingInstance navigations, the BrowsingContextState is the only field
// that will need to be swapped.
- switch (features::GetBrowsingContextMode()) {
- case (features::BrowsingContextStateImplementationType::
+ switch (::features::GetBrowsingContextMode()) {
+ case (::features::BrowsingContextStateImplementationType::
kLegacyOneToOneWithFrameTreeNode):
browsing_context_state_ = frame_tree_node_->render_manager()
->current_frame_host()
->browsing_context_state();
break;
- case (features::BrowsingContextStateImplementationType::
+ case (::features::BrowsingContextStateImplementationType::
kSwapForCrossBrowsingInstanceNavigations):
// TODO(crbug.com/40205442): implement functionality for swapping on cross
// browsing instance navigations as needed. This will likely be removed
@@ -18582,7 +18582,7 @@ bool RenderFrameHostImpl::ShouldReuseCompositing(
return false;
}
- if (!base::FeatureList::IsEnabled(features::kRenderDocumentCompositorReuse)) {
+ if (!base::FeatureList::IsEnabled(::features::kRenderDocumentCompositorReuse)) {
return false;
}
diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc
index a194fbb2be..1d9f294388 100644
--- a/content/browser/renderer_host/render_frame_host_manager.cc
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
@@ -390,7 +390,7 @@ void UpdateProcessReusePolicyForProcessPerSiteWithMainFrameThreshold(
return;
}
if (!base::FeatureList::IsEnabled(
- features::kProcessPerSiteUpToMainFrameThreshold)) {
+ ::features::kProcessPerSiteUpToMainFrameThreshold)) {
return;
}
if (!frame_tree_node->IsOutermostMainFrame()) {
@@ -402,12 +402,12 @@ void UpdateProcessReusePolicyForProcessPerSiteWithMainFrameThreshold(
if (!is_new_site_instance) {
return;
}
- if (base::FeatureList::IsEnabled(features::kDisableProcessReuse)) {
+ if (base::FeatureList::IsEnabled(::features::kDisableProcessReuse)) {
RecordProcessPerSiteWithMainFrameThresholdBlockReason(
ProcessPerSiteWithMainFrameThresholdBlockReason::kDisableProcessResuse);
return;
}
- if (!features::kProcessPerSiteMainFrameAllowDevToolsAttached.Get() &&
+ if (!::features::kProcessPerSiteMainFrameAllowDevToolsAttached.Get() &&
RenderFrameDevToolsAgentHost::WasEverAttachedToAnyFrame()) {
RecordProcessPerSiteWithMainFrameThresholdBlockReason(
ProcessPerSiteWithMainFrameThresholdBlockReason::
@@ -428,7 +428,7 @@ void UpdateProcessReusePolicyForProcessPerSiteWithMainFrameThreshold(
// for process reuse to work around the problem, unless a field parameter
// explicitly allows it.
const GURL& site_url = site_instance->GetSiteURL();
- if (!features::kProcessPerSiteMainFrameAllowIPAndLocalhost.Get() &&
+ if (!::features::kProcessPerSiteMainFrameAllowIPAndLocalhost.Get() &&
(site_url.HostIsIPAddress() || net::IsLocalHostname(site_url.host()))) {
RecordProcessPerSiteWithMainFrameThresholdBlockReason(
ProcessPerSiteWithMainFrameThresholdBlockReason::
@@ -672,8 +672,8 @@ void RenderFrameHostManager::InitRoot(
const std::string& name,
const base::UnguessableToken& devtools_frame_token) {
bool is_legacy_browsing_context_state_mode =
- features::GetBrowsingContextMode() ==
- features::BrowsingContextStateImplementationType::
+ ::features::GetBrowsingContextMode() ==
+ ::features::BrowsingContextStateImplementationType::
kLegacyOneToOneWithFrameTreeNode;
scoped_refptr<BrowsingContextState> browsing_context_state =
base::MakeRefCounted<BrowsingContextState>(
@@ -726,8 +726,8 @@ void RenderFrameHostManager::InitChild(
std::string frame_name,
std::string frame_unique_name) {
bool is_legacy_browsing_context_state_mode =
- features::GetBrowsingContextMode() ==
- features::BrowsingContextStateImplementationType::
+ ::features::GetBrowsingContextMode() ==
+ ::features::BrowsingContextStateImplementationType::
kLegacyOneToOneWithFrameTreeNode;
scoped_refptr<BrowsingContextState> browsing_context_state =
base::MakeRefCounted<BrowsingContextState>(
@@ -1098,14 +1098,14 @@ void RenderFrameHostManager::PrepareForCollectingPage(
// in FrameTree (which, for example, is shared between the new page and
// the page entering BFCache), so they have to be collected explicitly above.
// Since proxies are not collected, we can return early here.
- if (features::GetBrowsingContextMode() ==
- features::BrowsingContextStateImplementationType::
+ if (::features::GetBrowsingContextMode() ==
+ ::features::BrowsingContextStateImplementationType::
kSwapForCrossBrowsingInstanceNavigations) {
return;
}
- DCHECK_EQ(features::GetBrowsingContextMode(),
- features::BrowsingContextStateImplementationType::
+ DCHECK_EQ(::features::GetBrowsingContextMode(),
+ ::features::BrowsingContextStateImplementationType::
kLegacyOneToOneWithFrameTreeNode);
// Prepare the proxies.
@@ -1508,7 +1508,7 @@ void RenderFrameHostManager::DidCreateNavigationRequest(
frame_tree_node_->navigator().controller().GetBrowserContext();
DeferSpeculativeRFHAction defer_action =
DeferSpeculativeRFHAction::kNotDeferred;
- if (base::FeatureList::IsEnabled(features::kDeferSpeculativeRFHCreation) &&
+ if (base::FeatureList::IsEnabled(::features::kDeferSpeculativeRFHCreation) &&
CanIntentionallyDeferSpeculativeRFHForRequest(request, browser_context,
frame_tree_node_)) {
// By skipping GetFrameHostForNavigation(), we are no longer calculating
@@ -1517,7 +1517,7 @@ void RenderFrameHostManager::DidCreateNavigationRequest(
// on a very powerful workstation in a release build.
// The GetFrameHostForNavigation() function will be called in
// NavigationRequest::OnStartChecksComplete after staring the URL loader.
- if (features::kWarmupSpareProcessCreationWhenDeferRFH.Get() &&
+ if (::features::kWarmupSpareProcessCreationWhenDeferRFH.Get() &&
RenderProcessHostImpl::IsSpareProcessKeptAtAllTimes()) {
// Since Android does not create a spare renderer by default, we choose
// to check IsSpareProcessKeptAtAllTimes() before warming up a renderer.
@@ -1529,9 +1529,9 @@ void RenderFrameHostManager::DidCreateNavigationRequest(
// TODO(crbug.com/394973143): Move the timeout logic to
// SpareRenderProcessHostManagerImpl
if (base::FeatureList::IsEnabled(
- features::kAndroidWarmUpSpareRendererWithTimeout)) {
+ ::features::kAndroidWarmUpSpareRendererWithTimeout)) {
timeout = base::Seconds(
- features::kAndroidSpareRendererTimeoutSeconds.Get());
+ ::features::kAndroidSpareRendererTimeoutSeconds.Get());
}
SpareRenderProcessHostManagerImpl::Get().WarmupSpare(browser_context,
timeout);
@@ -1778,7 +1778,7 @@ RenderFrameHostManager::GetFrameHostForNavigation(
IsSameSiteGetter is_same_site_getter(is_same_site);
std::string site_instance_reason;
std::string* reason_output =
- base::FeatureList::IsEnabled(features::kHoldbackDebugReasonStringRemoval)
+ base::FeatureList::IsEnabled(::features::kHoldbackDebugReasonStringRemoval)
? &site_instance_reason
: reason;
scoped_refptr<SiteInstanceImpl> dest_site_instance =
@@ -1786,7 +1786,7 @@ RenderFrameHostManager::GetFrameHostForNavigation(
browsing_context_group_swap,
reason_output);
if (reason && base::FeatureList::IsEnabled(
- features::kHoldbackDebugReasonStringRemoval)) {
+ ::features::kHoldbackDebugReasonStringRemoval)) {
reason->append(site_instance_reason);
}
@@ -2755,8 +2755,8 @@ RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation(
current_instance->GetRelatedActiveContentsCount()),
51);
if (base::FeatureList::IsEnabled(
- features::kPrefetchStateContaminationMitigation) &&
- features::kPrefetchStateContaminationSwapsBrowsingContextGroup.Get()) {
+ ::features::kPrefetchStateContaminationMitigation) &&
+ ::features::kPrefetchStateContaminationSwapsBrowsingContextGroup.Get()) {
return BrowsingContextGroupSwap::CreateSecuritySwap();
}
}
@@ -3110,7 +3110,7 @@ RenderFrameHostManager::GetSiteInstanceForNavigation(
// this decision. Certain frames have different enough workloads so that
// it's better to avoid placing a subframe into an existing process for
// better performance isolation. See https://crbug.com/899418.
- if (!base::FeatureList::IsEnabled(features::kDisableProcessReuse) &&
+ if (!base::FeatureList::IsEnabled(::features::kDisableProcessReuse) &&
GetContentClient()
->browser()
->ShouldEmbeddedFramesTryToReuseExistingProcess(
@@ -3217,7 +3217,7 @@ RenderFrameHostManager::GetSiteInstanceForNavigation(
ProcessReuseOnCOOPType::kSameSiteNavigationInSingleWebContents;
process_to_reuse = current_instance->GetProcess();
} else if (base::FeatureList::IsEnabled(
- features::kProcessReuseOnPrerenderCOOPSwap) &&
+ ::features::kProcessReuseOnPrerenderCOOPSwap) &&
frame_tree_node_->frame_tree().is_prerendering()) {
coop_process_reuse_type = ProcessReuseOnCOOPType::kPrerender;
process_to_reuse = current_instance->GetProcess();
@@ -4168,8 +4168,8 @@ RenderFrameHostManager::CreateRenderFrameHost(
if (!render_view_host) {
render_view_host = frame_tree.CreateRenderViewHost(
site_instance->group(), frame_routing_id, renderer_initiated_creation,
- features::GetBrowsingContextMode() ==
- features::BrowsingContextStateImplementationType::
+ ::features::GetBrowsingContextMode() ==
+ ::features::BrowsingContextStateImplementationType::
kSwapForCrossBrowsingInstanceNavigations
? browsing_context_state
: nullptr,
@@ -4237,8 +4237,8 @@ bool RenderFrameHostManager::CreateSpeculativeRenderFrameHost(
}
scoped_refptr<BrowsingContextState> browsing_context_state;
- if (features::GetBrowsingContextMode() ==
- features::BrowsingContextStateImplementationType::
+ if (::features::GetBrowsingContextMode() ==
+ ::features::BrowsingContextStateImplementationType::
kLegacyOneToOneWithFrameTreeNode) {
browsing_context_state = render_frame_host_->browsing_context_state();
} else {
@@ -4501,8 +4501,8 @@ void RenderFrameHostManager::CreateRenderFrameProxy(
render_view_host = frame_tree_node_->frame_tree().CreateRenderViewHost(
group, /*main_frame_routing_id=*/MSG_ROUTING_NONE,
/*renderer_initiated_creation=*/false,
- features::GetBrowsingContextMode() ==
- features::BrowsingContextStateImplementationType::
+ ::features::GetBrowsingContextMode() ==
+ ::features::BrowsingContextStateImplementationType::
kSwapForCrossBrowsingInstanceNavigations
? render_frame_host_->browsing_context_state()
: nullptr,
@@ -4934,8 +4934,8 @@ RenderFrameHostManager::GetFrameTokenForSiteInstanceGroup(
// instance after a browsing instance swap, and we want to ensure that this
// doesn't break anything, so we tie it to the GetBrowsingContextMode which
// needs it and is disabled-by-default)
- if (features::GetBrowsingContextMode() ==
- features::BrowsingContextStateImplementationType::
+ if (::features::GetBrowsingContextMode() ==
+ ::features::BrowsingContextStateImplementationType::
kSwapForCrossBrowsingInstanceNavigations &&
!render_frame_host_->GetSiteInstance()
->group()
@@ -5083,8 +5083,8 @@ void RenderFrameHostManager::CommitPending(
// because in the new implementation, proxies will be swapped/restored
// whenever the RenderFrameHost (and internal BrowsingContextState) is
// restored.
- if (features::GetBrowsingContextMode() ==
- features::BrowsingContextStateImplementationType::
+ if (::features::GetBrowsingContextMode() ==
+ ::features::BrowsingContextStateImplementationType::
kLegacyOneToOneWithFrameTreeNode) {
BrowsingContextState::RenderFrameProxyHostMap proxy_hosts_to_restore =
pending_stored_page->TakeProxyHosts();
diff --git a/content/browser/renderer_host/render_frame_proxy_host.cc b/content/browser/renderer_host/render_frame_proxy_host.cc
index 2c2e4c14b5..68a6199940 100644
--- a/content/browser/renderer_host/render_frame_proxy_host.cc
+++ b/content/browser/renderer_host/render_frame_proxy_host.cc
@@ -55,6 +55,8 @@
#include "third_party/blink/public/mojom/scroll/scroll_into_view_params.mojom.h"
#include "ui/gfx/geometry/rect_f.h"
+#define TokenFrameMap TokenFrameMap_RenderFrameProxyHost
+
namespace content {
namespace {
@@ -591,7 +593,7 @@ void RenderFrameProxyHost::RouteMessageEvent(
// origins once rollout is complete.
bool should_verify_source_origin =
base::FeatureList::IsEnabled(
- features::kAdditionalOpaqueOriginEnforcements) ||
+ ::features::kAdditionalOpaqueOriginEnforcements) ||
source_origin_string != u"null";
if (should_verify_source_origin) {
auto* policy = ChildProcessSecurityPolicyImpl::GetInstance();
@@ -1062,3 +1064,5 @@ base::SafeRef<RenderFrameProxyHost> RenderFrameProxyHost::GetSafeRef() {
}
} // namespace content
+
+#undef TokenFrameMap
diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc
index 7517bdd84c..ca2d78e5b8 100644
--- a/content/browser/renderer_host/render_message_filter.cc
+++ b/content/browser/renderer_host/render_message_filter.cc
@@ -18,7 +18,7 @@ RenderMessageFilter::RenderMessageFilter(
RenderWidgetHelper* render_widget_helper)
: render_widget_helper_(render_widget_helper),
render_process_id_(render_process_id),
- cache_response_size_(features::kFrameRoutingCacheResponseSize.Get()) {
+ cache_response_size_(::features::kFrameRoutingCacheResponseSize.Get()) {
if (render_widget_helper) {
render_widget_helper_->Init(render_process_id_);
}
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 67cdf0f30f..946a01d1b2 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -517,10 +517,10 @@ bool HasEnoughMemoryForAnotherMainFrame(RenderProcessHost* host,
private_memory_footprint /
std::max(main_frame_count, static_cast<size_t>(1));
uint64_t process_memory_limit = base::saturated_cast<uint64_t>(
- features::kProcessPerSiteMainFrameTotalMemoryLimit.Get());
+ ::features::kProcessPerSiteMainFrameTotalMemoryLimit.Get());
double frame_size_factor =
- features::kProcessPerSiteMainFrameSiteScalingFactor.Get();
+ ::features::kProcessPerSiteMainFrameSiteScalingFactor.Get();
// Check that we have a factor of at least 1.
if (frame_size_factor < 1.0f) {
frame_size_factor = 1.0f;
@@ -563,7 +563,7 @@ bool IsBelowReuseResourceThresholds(RenderProcessHost* host,
if (process_reuse_policy ==
ProcessReusePolicy::REUSE_PENDING_OR_COMMITTED_SITE_SUBFRAME &&
!base::FeatureList::IsEnabled(
- features::kSubframeProcessReuseThresholds)) {
+ ::features::kSubframeProcessReuseThresholds)) {
return true;
}
@@ -591,7 +591,7 @@ bool IsBelowReuseResourceThresholds(RenderProcessHost* host,
// If a threshold is specified, don't reuse `host` if it already hosts more
// main frames (including BFCached and prerendered) than the threshold.
size_t main_frame_threshold = base::checked_cast<size_t>(
- features::kProcessPerSiteMainFrameThreshold.Get());
+ ::features::kProcessPerSiteMainFrameThreshold.Get());
if (main_frame_count >= main_frame_threshold) {
return false;
}
@@ -621,7 +621,7 @@ bool IsBelowReuseResourceThresholds(RenderProcessHost* host,
// would be necessarily added to `host` later if the current frame were
// allowed to reuse it (e.g., as its subframes), etc.
uint64_t process_memory_limit = base::saturated_cast<uint64_t>(
- features::kSubframeProcessReuseMemoryThreshold.Get());
+ ::features::kSubframeProcessReuseMemoryThreshold.Get());
if (host->GetPrivateMemoryFootprint() < process_memory_limit) {
return true;
}
@@ -696,7 +696,7 @@ bool IsEmptyRendererProcessesReuseAllowed() {
return false;
}
return base::FeatureList::IsEnabled(
- features::kTrackEmptyRendererProcessesForReuse);
+ ::features::kTrackEmptyRendererProcessesForReuse);
}
class SiteProcessCountTracker : public base::SupportsUserData::Data,
@@ -3187,19 +3187,19 @@ bool RenderProcessHostImpl::IsSpareProcessKeptAtAllTimes() {
// ensure that devices with exactly 1GB of RAM won't get included because of
// inaccuracies or off-by-one errors.
if (base::SysInfo::AmountOfPhysicalMemoryMB() <=
- features::kAndroidSpareRendererMemoryThreshold.Get()) {
+ ::features::kAndroidSpareRendererMemoryThreshold.Get()) {
return false;
}
bool android_spare_process_override = base::FeatureList::IsEnabled(
- features::kAndroidWarmUpSpareRendererWithTimeout);
+ ::features::kAndroidWarmUpSpareRendererWithTimeout);
if (!SiteIsolationPolicy::UseDedicatedProcessesForAllSites() &&
!android_spare_process_override) {
return false;
}
if (!base::FeatureList::IsEnabled(
- features::kSpareRendererForSitePerProcess) &&
+ ::features::kSpareRendererForSitePerProcess) &&
!android_spare_process_override) {
return false;
}
@@ -3401,7 +3401,7 @@ void RenderProcessHostImpl::AppendRendererCommandLine(
command_line->AppendSwitch(switches::kDisallowV8FeatureFlagOverrides);
}
- if (features::IsTouchTextEditingRedesignEnabled()) {
+ if (::features::IsTouchTextEditingRedesignEnabled()) {
command_line->AppendSwitchASCII(
blink::switches::kTouchTextSelectionStrategy,
blink::switches::kTouchTextSelectionStrategy_Direction);
@@ -4755,7 +4755,7 @@ bool RenderProcessHost::IsProcessLimitReached() {
// users, as the experiment is configured with "starts_active" set to false
// (meaning it only collects data from users who reach this code).
#if !BUILDFLAG(IS_ANDROID)
- if (base::FeatureList::IsEnabled(features::kRemoveRendererProcessLimit)) {
+ if (base::FeatureList::IsEnabled(::features::kRemoveRendererProcessLimit)) {
// This is used for tests. To avoid changing test behaviors, don't
// change the behavior when it is set.
if (g_max_renderer_count_override) {
@@ -4889,7 +4889,7 @@ RenderProcessHost* RenderProcessHostImpl::GetProcessHostForSiteInstance(
case ProcessReusePolicy::
REUSE_PENDING_OR_COMMITTED_SITE_WITH_MAIN_FRAME_THRESHOLD: {
CHECK(base::FeatureList::IsEnabled(
- features::kProcessPerSiteUpToMainFrameThreshold));
+ ::features::kProcessPerSiteUpToMainFrameThreshold));
render_process_host = FindReusableProcessHostForSiteInstance(
site_instance, process_reuse_policy);
if (render_process_host) {
@@ -4963,7 +4963,7 @@ RenderProcessHost* RenderProcessHostImpl::GetProcessHostForSiteInstance(
base::UmaHistogramBoolean(
"BrowserRenderProcessHost.ExistingRendererIsInitializedAndNotDead",
render_process_host->IsInitializedAndNotDead());
- if (base::FeatureList::IsEnabled(features::kEnsureExistingRendererAlive)) {
+ if (base::FeatureList::IsEnabled(::features::kEnsureExistingRendererAlive)) {
render_process_host->Init();
}
}
@@ -5464,7 +5464,7 @@ void RenderProcessHostImpl::UpdateProcessPriority() {
}
#if BUILDFLAG(IS_MAC)
if (base::FeatureList::IsEnabled(
- features::kMacAllowBackgroundingRenderProcesses)) {
+ ::features::kMacAllowBackgroundingRenderProcesses)) {
child_process_launcher_->SetProcessPriority(process_priority);
}
#else // !BUILDFLAG(IS_MAC)
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index a0335fef25..a6547f7966 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -542,7 +542,7 @@ bool RenderViewHostImpl::CreateRenderView(
frame_tree_node->current_frame_host()->GetFrameToken()));
} else if (frame_tree_->is_prerendering() &&
(!base::FeatureList::IsEnabled(
- features::kPrerenderMoreCorrectSpeculativeRFHCreation) ||
+ ::features::kPrerenderMoreCorrectSpeculativeRFHCreation) ||
main_rfh->lifecycle_state() ==
RenderFrameHostImpl::LifecycleStateImpl::kSpeculative)) {
// During prerender, the browser may need to create new speculative local
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 52f772876a..ccd78a6c37 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -2150,7 +2150,7 @@ void RenderWidgetHostImpl::GetSnapshotFromBrowser(
if (from_surface) {
pending_surface_browser_snapshots_.insert(
std::make_pair(snapshot_id, std::move(callback)));
- if (base::FeatureList::IsEnabled(features::kCDPScreenshotNewSurface)) {
+ if (base::FeatureList::IsEnabled(::features::kCDPScreenshotNewSurface)) {
// 1. Force content redraw in the renderer.
blink_widget_->ForceRedraw(base::DoNothing());
// 2. Force a repaint to ensure that surface is updated.
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index e6235611a2..8f2d10dc75 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -3071,7 +3071,7 @@ void RenderWidgetHostViewAura::CreateSelectionController() {
tsc_config.tap_slop = ui::GestureConfiguration::GetInstance()
->max_touch_move_in_pixels_for_click();
tsc_config.enable_longpress_drag_selection =
- features::IsTouchTextEditingRedesignEnabled();
+ ::features::IsTouchTextEditingRedesignEnabled();
selection_controller_ = std::make_unique<ui::TouchSelectionController>(
selection_controller_client_.get(), tsc_config);
}
diff --git a/content/browser/renderer_host/spare_render_process_host_manager_impl.cc b/content/browser/renderer_host/spare_render_process_host_manager_impl.cc
index debe95af98..a614ed6c5f 100644
--- a/content/browser/renderer_host/spare_render_process_host_manager_impl.cc
+++ b/content/browser/renderer_host/spare_render_process_host_manager_impl.cc
@@ -203,7 +203,7 @@ size_t GetSpareRPHCount() {
if (available_ram < 4 * 1024) {
return 1u;
}
- return features::kMultipleSpareRPHsCount.Get();
+ return ::features::kMultipleSpareRPHsCount.Get();
}
void LogAllocationContext(const std::string& source_uma_name,
@@ -705,17 +705,17 @@ void SpareRenderProcessHostManagerImpl::PrepareForFutureRequests(
if (RenderProcessHostImpl::IsSpareProcessKeptAtAllTimes()) {
std::optional<base::TimeDelta> timeout = std::nullopt;
if (base::FeatureList::IsEnabled(
- features::kAndroidWarmUpSpareRendererWithTimeout)) {
- if (features::kAndroidSpareRendererCreationTiming.Get() !=
- features::kAndroidSpareRendererCreationDelayedDuringLoading) {
+ ::features::kAndroidWarmUpSpareRendererWithTimeout)) {
+ if (::features::kAndroidSpareRendererCreationTiming.Get() !=
+ ::features::kAndroidSpareRendererCreationDelayedDuringLoading) {
// The creation of the spare renderer will be managed in
// WebContentsImpl::DidStopLoading or
// WebContentsImpl::OnFirstVisuallyNonEmptyPaint.
return;
}
- if (features::kAndroidSpareRendererTimeoutSeconds.Get() > 0) {
+ if (::features::kAndroidSpareRendererTimeoutSeconds.Get() > 0) {
timeout =
- base::Seconds(features::kAndroidSpareRendererTimeoutSeconds.Get());
+ base::Seconds(::features::kAndroidSpareRendererTimeoutSeconds.Get());
}
}
// Always keep around a spare process for the most recently requested
@@ -833,7 +833,7 @@ void SpareRenderProcessHostManagerImpl::RenderProcessReady(
UMA_HISTOGRAM_TIMES("BrowserRenderProcessHost.SpareProcessStartupTime",
process_startup_timer_->Elapsed());
- if (base::FeatureList::IsEnabled(features::kSpareRendererProcessPriority)) {
+ if (base::FeatureList::IsEnabled(::features::kSpareRendererProcessPriority)) {
host->SetHasSpareRendererPriority(true);
}
diff --git a/content/browser/security/coop/cross_origin_opener_policy_reporter.cc b/content/browser/security/coop/cross_origin_opener_policy_reporter.cc
index 27af8106d6..150541127c 100644
--- a/content/browser/security/coop/cross_origin_opener_policy_reporter.cc
+++ b/content/browser/security/coop/cross_origin_opener_policy_reporter.cc
@@ -19,6 +19,8 @@
#include "services/network/public/mojom/source_location.mojom.h"
#include "url/origin.h"
+#define kType kType_CrossOriginOpenerPolicyReporter
+
namespace content {
namespace {
@@ -293,3 +295,5 @@ void CrossOriginOpenerPolicyReporter::QueueNavigationReport(
}
} // namespace content
+
+#undef kType
diff --git a/content/browser/security/dip/document_isolation_policy_reporter.cc b/content/browser/security/dip/document_isolation_policy_reporter.cc
index 464954acf9..696389fd45 100644
--- a/content/browser/security/dip/document_isolation_policy_reporter.cc
+++ b/content/browser/security/dip/document_isolation_policy_reporter.cc
@@ -11,6 +11,8 @@
#include "services/network/public/cpp/request_destination.h"
#include "services/network/public/mojom/network_context.mojom.h"
+#define kType kType_DocumentIsolationPolicyReporter
+
namespace content {
namespace {
@@ -103,3 +105,5 @@ void DocumentIsolationPolicyReporter::QueueAndNotify(
}
} // namespace content
+
+#undef kType
diff --git a/content/browser/webid/federated_auth_request_impl.cc b/content/browser/webid/federated_auth_request_impl.cc
index 5458912939..4362cd0a6f 100644
--- a/content/browser/webid/federated_auth_request_impl.cc
+++ b/content/browser/webid/federated_auth_request_impl.cc
@@ -82,6 +82,8 @@ using CompleteRequestWithErrorCallback =
std::optional<content::FedCmRequestIdTokenStatus>,
bool)>;
+#define IsFrameActive IsFrameActive_FederatedAuthRequestImpl
+
namespace content {
namespace {
@@ -2730,3 +2732,5 @@ RelyingPartyData FederatedAuthRequestImpl::CreateRpData() const {
}
} // namespace content
+
+#undef IsFrameActive
diff --git a/content/child/BUILD.gn b/content/child/BUILD.gn
index cecc5e382a..7ab8f08117 100644
--- a/content/child/BUILD.gn
+++ b/content/child/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//build/config/features.gni")
+import("//build/config/jumbo.gni")
import("//build/config/ui.gni")
import("//device/vr/buildflags/buildflags.gni")
import("//ppapi/buildflags/buildflags.gni")
@@ -12,9 +13,9 @@ if (is_android) {
}
if (is_component_build) {
- link_target_type = "source_set"
+ link_target_type = "jumbo_source_set"
} else {
- link_target_type = "static_library"
+ link_target_type = "jumbo_static_library"
}
target(link_target_type, "child") {
# Targets external to content should always link to the public API.
diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn
index 9f40e65fa5..fe554377ab 100644
--- a/content/common/BUILD.gn
+++ b/content/common/BUILD.gn
@@ -60,7 +60,7 @@ if (is_linux || is_chromeos) {
}
}
-source_set("common") {
+jumbo_source_set("common") {
# Targets external to content should always link to the public API.
# In addition, targets outside of the content component (shell and tests)
# must not link to this because it will duplicate the code in the component
@@ -191,6 +191,10 @@ source_set("common") {
"webid/identity_url_loader_throttle.cc",
"webid/identity_url_loader_throttle.h",
]
+ jumbo_excluded_sources = [
+ "common_param_traits.cc",
+ "content_param_traits.cc",
+ ]
configs += [
"//content:content_implementation",
diff --git a/content/gpu/BUILD.gn b/content/gpu/BUILD.gn
index c6a90abae4..4c903cd958 100644
--- a/content/gpu/BUILD.gn
+++ b/content/gpu/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//build/config/cast.gni")
+import("//build/config/jumbo.gni")
import("//build/config/ui.gni")
import("//gpu/vulkan/features.gni")
import("//media/media_options.gni")
@@ -19,9 +20,9 @@ group("gpu") {
}
if (is_component_build) {
- link_target_type = "source_set"
+ link_target_type = "jumbo_source_set"
} else {
- link_target_type = "static_library"
+ link_target_type = "jumbo_static_library"
}
target(link_target_type, "gpu_sources") {
diff --git a/content/public/browser/BUILD.gn b/content/public/browser/BUILD.gn
index 2714f3b881..863f4d5d81 100644
--- a/content/public/browser/BUILD.gn
+++ b/content/public/browser/BUILD.gn
@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD - style license that can be
# found in the LICENSE file.
+import("//build/config/jumbo.gni")
import("//build/config/ui.gni")
import("//content/common/features.gni")
import("//device/vr/buildflags/buildflags.gni")
@@ -24,7 +25,7 @@ group("browser") {
}
}
-source_set("browser_sources") {
+jumbo_source_set("browser_sources") {
# External code should depend on via ":browser" above.
visibility = [ "//content/*" ]
sources = [
diff --git a/content/public/child/BUILD.gn b/content/public/child/BUILD.gn
index 73fce2d993..2f298f5cda 100644
--- a/content/public/child/BUILD.gn
+++ b/content/public/child/BUILD.gn
@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/config/jumbo.gni")
import("//ppapi/buildflags/buildflags.gni")
# See //content/BUILD.gn for how this works.
@@ -19,7 +20,7 @@ group("child") {
}
}
-source_set("child_sources") {
+jumbo_source_set("child_sources") {
# External code should depend in via ":child" above.
visibility = [ "//content/*" ]
diff --git a/content/public/common/BUILD.gn b/content/public/common/BUILD.gn
index 35fc76646e..6c640da094 100644
--- a/content/public/common/BUILD.gn
+++ b/content/public/common/BUILD.gn
@@ -4,6 +4,7 @@
import("//build/buildflag_header.gni")
import("//build/config/features.gni")
+import("//build/config/jumbo.gni")
import("//build/config/ui.gni")
import("//content/browser/devtools/features.gni")
import("//content/public/common/features.gni")
@@ -160,7 +161,7 @@ component("main_function_params") {
configs += [ "//content:content_implementation" ]
}
-source_set("common_sources") {
+jumbo_source_set("common_sources") {
# External code should depend on via ":common" above.
visibility = [ "//content/*" ]
diff --git a/content/public/renderer/BUILD.gn b/content/public/renderer/BUILD.gn
index 1708aa82d3..8b39b24ca7 100644
--- a/content/public/renderer/BUILD.gn
+++ b/content/public/renderer/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//build/config/features.gni")
+import("//build/config/jumbo.gni")
import("//media/media_options.gni")
import("//ppapi/buildflags/buildflags.gni")
@@ -19,9 +20,9 @@ group("renderer") {
}
if (is_component_build) {
- link_target_type = "source_set"
+ link_target_type = "jumbo_source_set"
} else {
- link_target_type = "static_library"
+ link_target_type = "jumbo_static_library"
}
target(link_target_type, "renderer_sources") {
# External code should depend on via ":renderer" above.
diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn
index b8fd955057..b20ef5cdf5 100644
--- a/content/renderer/BUILD.gn
+++ b/content/renderer/BUILD.gn
@@ -5,6 +5,7 @@
import("//build/config/cast.gni")
import("//build/config/chromeos/ui_mode.gni")
import("//build/config/features.gni")
+import("//build/config/jumbo.gni")
import("//build/config/ui.gni")
import("//content/common/features.gni")
import("//media/media_options.gni")
@@ -16,9 +17,9 @@ import("//third_party/webrtc/webrtc.gni")
import("//tools/ipc_fuzzer/ipc_fuzzer.gni")
if (is_component_build) {
- link_target_type = "source_set"
+ link_target_type = "jumbo_source_set"
} else {
- link_target_type = "static_library"
+ link_target_type = "jumbo_static_library"
}
target(link_target_type, "renderer") {
diff --git a/content/renderer/service_worker/service_worker_subresource_loader.cc b/content/renderer/service_worker/service_worker_subresource_loader.cc
index b9761791e1..2b5026b05a 100644
--- a/content/renderer/service_worker/service_worker_subresource_loader.cc
+++ b/content/renderer/service_worker/service_worker_subresource_loader.cc
@@ -44,6 +44,8 @@
#include "third_party/blink/public/mojom/service_worker/service_worker_stream_handle.mojom.h"
#include "third_party/blink/public/platform/web_url_response.h"
+#define MojoEnumToString MojoEnumToString_ServiceWorkerSubresourceLoader
+
namespace content {
namespace {
@@ -1543,3 +1545,5 @@ void ServiceWorkerSubresourceLoader::DidCacheStorageMatch(
}
} // namespace content
+
+#undef MojoEnumToString
diff --git a/content/renderer/service_worker/web_service_worker_provider_impl.cc b/content/renderer/service_worker/web_service_worker_provider_impl.cc
index 22c2752f46..f2c17c84b2 100644
--- a/content/renderer/service_worker/web_service_worker_provider_impl.cc
+++ b/content/renderer/service_worker/web_service_worker_provider_impl.cc
@@ -25,6 +25,8 @@
using blink::WebURL;
+#define MojoEnumToString MojoEnumToString_WebServiceWorkerProviderImpl
+
namespace content {
namespace {
@@ -331,3 +333,5 @@ void WebServiceWorkerProviderImpl::OnDidGetRegistrationForReady(
}
} // namespace content
+
+#undef MojoEnumToString
diff --git a/content/services/auction_worklet/BUILD.gn b/content/services/auction_worklet/BUILD.gn
index 8cfa702b80..8035501301 100644
--- a/content/services/auction_worklet/BUILD.gn
+++ b/content/services/auction_worklet/BUILD.gn
@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/config/jumbo.gni")
import("//third_party/inspector_protocol/inspector_protocol.gni")
import("//v8/gni/v8.gni")
@@ -30,7 +31,7 @@ inspector_protocol_generate("protocol_sources") {
]
}
-source_set("auction_worklet") {
+jumbo_source_set("auction_worklet") {
sources = [
"auction_v8_devtools_agent.cc",
"auction_v8_devtools_agent.h",
@@ -114,6 +115,10 @@ source_set("auction_worklet") {
sources += get_target_outputs(":protocol_sources")
+ jumbo_excluded_sources = [
+ "seller_worklet.cc",
+ ]
+
configs += [
"//build/config/compiler:wexit_time_destructors",
"//v8:external_startup_data",
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
index d7cea6b7ef..53113e5fb6 100644
--- a/content/test/BUILD.gn
+++ b/content/test/BUILD.gn
@@ -7,6 +7,7 @@ import("//build/config/chrome_build.gni")
import("//build/config/chromeos/ui_mode.gni")
import("//build/config/compiler/compiler.gni")
import("//build/config/features.gni")
+import("//build/config/jumbo.gni")
import("//build/config/ui.gni")
import("//build/nocompile.gni")
import("//components/viz/common/debugger/viz_debugger.gni")
@@ -44,7 +45,7 @@ if (is_ios) {
# Use a static library here because many test binaries depend on this but don't
# require many files from it. This makes linking more efficient.
-static_library("test_support") {
+jumbo_static_library("test_support") {
testonly = true
# See comment at the top of //content/BUILD.gn for why this is disabled in
@@ -1033,7 +1034,7 @@ source_set("default_content_test_launcher") {
# browsertest_support can be used by targets that run content_shell based
# browser tests.
-static_library("browsertest_support") {
+jumbo_static_library("browsertest_support") {
testonly = true
# See comment at the top of //content/BUILD.gn for why this is disabled in
diff --git a/content/utility/BUILD.gn b/content/utility/BUILD.gn
index 5ff547b646..c2bcf80199 100644
--- a/content/utility/BUILD.gn
+++ b/content/utility/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//build/config/chromeos/ui_mode.gni")
+import("//build/config/jumbo.gni")
import("//chromeos/ash/components/assistant/assistant.gni")
import("//components/services/on_device_translation/buildflags/features.gni")
import("//device/vr/buildflags/buildflags.gni")
@@ -14,7 +15,7 @@ import("//services/accessibility/buildflags.gni")
import("//services/screen_ai/buildflags/features.gni")
import("//services/video_effects/args.gni")
-source_set("utility") {
+jumbo_source_set("utility") {
# Only the public target should depend on this. All other targets (even
# internal content ones other than test) should depend on the public one.
visibility = [
--- a/content/browser/devtools/protocol/page_handler.cc
+++ b/content/browser/devtools/protocol/page_handler.cc
@@ -88,6 +88,8 @@
#include "content/browser/renderer_host/compositor_impl_android.h"
#endif
+#define kCommandIsOnlyAvailableAtTopTarget kCommandIsOnlyAvailableAtTopTarget_PageHandler
+
namespace content {
namespace protocol {
@@ -2426,3 +2428,5 @@
} // namespace protocol
} // namespace content
+
+#undef kCommandIsOnlyAvailableAtTopTarget
--- a/content/browser/installedapp/installed_app_provider_impl.cc
+++ b/content/browser/installedapp/installed_app_provider_impl.cc
@@ -62,7 +62,7 @@
bool add_saved_related_applications,
FilterInstalledAppsCallback callback) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
- if (!base::FeatureList::IsEnabled(features::kInstalledAppProvider)) {
+ if (!base::FeatureList::IsEnabled(::features::kInstalledAppProvider)) {
base::SequencedTaskRunner::GetCurrentDefault()->PostTask(
FROM_HERE,
base::BindOnce(std::move(callback),
@@ -92,7 +92,7 @@
base::ConcurrentCallbacks<FetchRelatedAppsTaskResult> concurrent;
#if BUILDFLAG(IS_WIN)
- if (base::FeatureList::IsEnabled(features::kFilterInstalledAppsWinMatching)) {
+ if (base::FeatureList::IsEnabled(::features::kFilterInstalledAppsWinMatching)) {
StartTask(std::make_unique<FetchRelatedWinAppsTask>(
native_win_app_fetcher_factory_.Run()),
related_apps, concurrent.CreateCallback());
@@ -101,7 +101,7 @@
#if !BUILDFLAG(IS_ANDROID)
if (base::FeatureList::IsEnabled(
- features::kFilterInstalledAppsWebAppMatching)) {
+ ::features::kFilterInstalledAppsWebAppMatching)) {
StartTask(std::make_unique<FetchRelatedWebAppsTask>(
render_frame_host().GetBrowserContext()),
related_apps, concurrent.CreateCallback());
--- a/content/browser/interest_group/ad_auction_service_impl.cc
+++ b/content/browser/interest_group/ad_auction_service_impl.cc
@@ -427,7 +427,7 @@
// been invalidated or the current frame's `PageImpl` has changed to a
// different one, abort the auction.
// See crbug.com/1422301.
- if (base::FeatureList::IsEnabled(features::kDetectInconsistentPageImpl) &&
+ if (base::FeatureList::IsEnabled(::features::kDetectInconsistentPageImpl) &&
(!GetFrame()->auction_initiator_page() ||
GetFrame()->auction_initiator_page().get() !=
&(GetFrame()->GetPage()))) {
@@ -465,7 +465,7 @@
// Try to preconnect to owner and bidding signals origins if this is an
// on-device auction.
- if (base::FeatureList::IsEnabled(features::kFledgeUsePreconnectCache) &&
+ if (base::FeatureList::IsEnabled(::features::kFledgeUsePreconnectCache) &&
!config.server_response.has_value()) {
size_t n_owners_cached = PreconnectToBuyerOrigins(config);
for (const blink::AuctionConfig& component_config :
@@ -747,7 +747,7 @@
network::mojom::ClientSecurityStatePtr
AdAuctionServiceImpl::GetClientSecurityState() {
if (base::FeatureList::IsEnabled(
- features::kFledgeOnlyUseIpAddressSpaceInClientSecurityState)) {
+ ::features::kFledgeOnlyUseIpAddressSpaceInClientSecurityState)) {
PolicyContainerHost* policies = GetFrame()->policy_container_host();
// This matches what GetFrame()->BuildClientSecurityState() does, in the no
// PolicyContainer case. According to comments there, PolicyContainerHost
@@ -769,7 +769,7 @@
std::optional<std::string> AdAuctionServiceImpl::GetCookieDeprecationLabel() {
if (!base::FeatureList::IsEnabled(
- features::kFledgeFacilitatedTestingSignalsHeaders)) {
+ ::features::kFledgeFacilitatedTestingSignalsHeaders)) {
return std::nullopt;
}
@@ -891,7 +891,7 @@
kCrossOriginOwnerInterestGroupSubframeCheckFailed);
if (base::FeatureList::IsEnabled(
- features::kFledgeModifyInterestGroupPolicyCheckOnOwner)) {
+ ::features::kFledgeModifyInterestGroupPolicyCheckOnOwner)) {
return false;
}
}
@@ -969,7 +969,7 @@
// been invalidated or the current frame's `PageImpl` has changed to a
// different one, abort the auction.
// See crbug.com/1422301.
- if (base::FeatureList::IsEnabled(features::kDetectInconsistentPageImpl) &&
+ if (base::FeatureList::IsEnabled(::features::kDetectInconsistentPageImpl) &&
(!GetFrame()->auction_initiator_page() ||
GetFrame()->auction_initiator_page().get() !=
&(GetFrame()->GetPage()))) {
@@ -1390,7 +1390,7 @@
// been invalidated or the current frame's `PageImpl` has changed to a
// different one, signal that state is no longer available.
// See crbug.com/1422301.
- if (base::FeatureList::IsEnabled(features::kDetectInconsistentPageImpl) &&
+ if (base::FeatureList::IsEnabled(::features::kDetectInconsistentPageImpl) &&
(!GetFrame()->auction_initiator_page() ||
GetFrame()->auction_initiator_page().get() !=
&(GetFrame()->GetPage()))) {
--- a/content/browser/interest_group/auction_process_manager.cc
+++ b/content/browser/interest_group/auction_process_manager.cc
@@ -99,7 +99,7 @@
if (is_idle_) {
remove_idle_process_from_manager_timer_.Start(
FROM_HERE,
- features::kFledgeStartAnticipatoryProcessExpirationTime.Get(),
+ ::features::kFledgeStartAnticipatoryProcessExpirationTime.Get(),
base::BindOnce(&RecordIdleProcessExpiredUma, true)
.Then(base::BindOnce(&WorkletProcess::RemoveFromProcessManager,
base::Unretained(this),
@@ -393,7 +393,7 @@
SiteInstance* frame_site_instance,
WorkletType worklet_type) {
if (!base::FeatureList::IsEnabled(
- features::kFledgeStartAnticipatoryProcesses)) {
+ ::features::kFledgeStartAnticipatoryProcesses)) {
return;
}
--- a/content/browser/interest_group/auction_runner.cc
+++ b/content/browser/interest_group/auction_runner.cc
@@ -45,7 +45,7 @@
auction_worklet::mojom::KAnonymityBidMode DetermineKAnonMode() {
// K-anonymity enforcement is always disabled for the testing population.
if (base::FeatureList::IsEnabled(
- features::kCookieDeprecationFacilitatedTesting)) {
+ ::features::kCookieDeprecationFacilitatedTesting)) {
return auction_worklet::mojom::KAnonymityBidMode::kNone;
}
if (base::FeatureList::IsEnabled(
@@ -762,7 +762,7 @@
});
if (base::FeatureList::IsEnabled(
- features::kFledgeDelayPostAuctionInterestGroupUpdate)) {
+ ::features::kFledgeDelayPostAuctionInterestGroupUpdate)) {
interest_group_manager_->UpdateInterestGroupsOfOwnersWithDelay(
std::move(update_owners), client_security_state_.Clone(),
std::move(user_agent_override_), std::move(attestation_callback_),
--- a/content/browser/interest_group/auction_url_loader_factory_proxy.cc
+++ b/content/browser/interest_group/auction_url_loader_factory_proxy.cc
@@ -63,7 +63,7 @@
const url::Origin& top_frame_origin,
const url::Origin& seller_origin) {
if (base::FeatureList::IsEnabled(
- features::kFledgeUseNonTransientNIKForSeller)) {
+ ::features::kFledgeUseNonTransientNIKForSeller)) {
return net::IsolationInfo::Create(
net::IsolationInfo::RequestType::kOther, top_frame_origin,
seller_origin, net::SiteForCookies(), /*nonce=*/std::nullopt,
--- a/content/browser/interest_group/auction_worklet_manager.cc
+++ b/content/browser/interest_group/auction_worklet_manager.cc
@@ -338,7 +338,7 @@
// When `kFledgeUseKVv2SignalsCache` is enabled, the TrustedSignalsCache
// manages KVv2 fetches in the browser process, so don't need get a key to
// pass to the worklet process.
- if (!base::FeatureList::IsEnabled(features::kFledgeUseKVv2SignalsCache)) {
+ if (!base::FeatureList::IsEnabled(::features::kFledgeUseKVv2SignalsCache)) {
waiting_on_trusted_signals_kvv2_public_key_ = true;
worklet_manager_->delegate()->GetTrustedKeyValueServerKey(
url::Origin::Create(worklet_info_.signals_url.value_or(GURL())),
@@ -689,7 +689,7 @@
for (size_t i = 0;
i < static_cast<size_t>(
- features::kFledgeSellerWorkletThreadPoolSize.Get());
+ ::features::kFledgeSellerWorkletThreadPoolSize.Get());
++i) {
worklet_debugs_.emplace_back(new DebuggableAuctionWorklet(
delegate->GetFrame(), process_handle_, worklet_info_.script_url,
@@ -723,7 +723,7 @@
worklet_info_.trusted_signals_coordinator &&
base::FeatureList::IsEnabled(
blink::features::kFledgeTrustedSignalsKVv2Support) &&
- base::FeatureList::IsEnabled(features::kFledgeUseKVv2SignalsCache)) {
+ base::FeatureList::IsEnabled(::features::kFledgeUseKVv2SignalsCache)) {
if (url::Origin::Create(worklet_info_.script_url)
.IsSameOriginWith(*worklet_info_.signals_url)) {
// If the script and signals URLs are same-origin, they may always be
--- a/content/browser/interest_group/ad_auction_headers_util.cc
+++ b/content/browser/interest_group/ad_auction_headers_util.cc
@@ -344,7 +344,7 @@
// We intentionally leave the `Ad-Auction-Result` response header in place.
if (base::FeatureList::IsEnabled(
- features::kFledgeBiddingAndAuctionNonceSupport)) {
+ ::features::kFledgeBiddingAndAuctionNonceSupport)) {
if (std::optional<std::string> ad_auction_results =
headers->GetNormalizedHeader(
kAdAuctionResultNonceResponseHeaderKey)) {
--- a/content/browser/interest_group/ad_auction_result_metrics.cc
+++ b/content/browser/interest_group/ad_auction_result_metrics.cc
@@ -53,9 +53,9 @@
bool AdAuctionResultMetrics::ShouldRunAuction() {
num_requested_auctions_++;
- if (!base::FeatureList::IsEnabled(features::kFledgeLimitNumAuctions))
+ if (!base::FeatureList::IsEnabled(::features::kFledgeLimitNumAuctions))
return true;
- if (num_requested_auctions_ > features::kFledgeLimitNumAuctionsParam.Get()) {
+ if (num_requested_auctions_ > ::features::kFledgeLimitNumAuctionsParam.Get()) {
num_auctions_not_run_due_to_auction_limit_++;
return false;
}
--- a/content/browser/interest_group/bidding_and_auction_response.cc
+++ b/content/browser/interest_group/bidding_and_auction_response.cc
@@ -113,7 +113,7 @@
}
if (base::FeatureList::IsEnabled(
- features::kFledgeBiddingAndAuctionNonceSupport)) {
+ ::features::kFledgeBiddingAndAuctionNonceSupport)) {
const std::string* nonce = input_dict->FindString("nonce");
if (nonce) {
base::Uuid nonce_uuid = base::Uuid::ParseCaseInsensitive(*nonce);
@@ -313,7 +313,7 @@
}
}
- if (base::FeatureList::IsEnabled(features::kEnableBandAKAnonEnforcement)) {
+ if (base::FeatureList::IsEnabled(::features::kEnableBandAKAnonEnforcement)) {
base::Value::Dict* k_anon_winner_join_candidate =
input_dict->FindDict("kAnonWinnerJoinCandidates");
if (k_anon_winner_join_candidate) {
@@ -331,7 +331,7 @@
if (base::FeatureList::IsEnabled(blink::features::kPrivateAggregationApi) &&
blink::features::kPrivateAggregationApiEnabledInProtectedAudience.Get() &&
- base::FeatureList::IsEnabled(features::kEnableBandAPrivateAggregation)) {
+ base::FeatureList::IsEnabled(::features::kEnableBandAPrivateAggregation)) {
const base::Value::List* pagg_response =
input_dict->FindList("paggResponse");
if (pagg_response) {
@@ -340,7 +340,7 @@
}
}
- if (base::FeatureList::IsEnabled(features::kEnableBandASampleDebugReports)) {
+ if (base::FeatureList::IsEnabled(::features::kEnableBandASampleDebugReports)) {
base::Value::List* for_debugging_only_reports =
input_dict->FindList("debugReports");
if (for_debugging_only_reports) {
@@ -349,7 +349,7 @@
}
base::Value::Dict* triggered_updates = input_dict->FindDict("updateGroups");
- if (base::FeatureList::IsEnabled(features::kEnableBandATriggeredUpdates) &&
+ if (base::FeatureList::IsEnabled(::features::kEnableBandATriggeredUpdates) &&
triggered_updates) {
for (const auto owner_groups : *triggered_updates) {
url::Origin owner = url::Origin::Create(GURL(owner_groups.first));
--- a/content/browser/interest_group/bidding_and_auction_serializer.cc
+++ b/content/browser/interest_group/bidding_and_auction_serializer.cc
@@ -114,7 +114,7 @@
bool KAnonIsEnabled() {
// K-anonymity enforcement is always disabled for the testing population.
if (base::FeatureList::IsEnabled(
- features::kCookieDeprecationFacilitatedTesting)) {
+ ::features::kCookieDeprecationFacilitatedTesting)) {
return false;
}
return base::FeatureList::IsEnabled(
@@ -350,7 +350,7 @@
TaggedSIntLength(recency);
if (group->bidding_browser_signals->view_and_click_counts &&
- base::FeatureList::IsEnabled(features::kEnableBandAClickiness)) {
+ base::FeatureList::IsEnabled(::features::kEnableBandAClickiness)) {
if (group->bidding_browser_signals->view_and_click_counts->view_counts) {
std::pair<cbor::Value::ArrayValue, size_t> views = BuildClickinessArray(
*group->bidding_browser_signals->view_and_click_counts->view_counts);
@@ -448,7 +448,7 @@
cbor::Value(std::move(browser_signals));
if (base::FeatureList::IsEnabled(
- features::kFledgeSendDebugReportCooldownsToBandA)) {
+ ::features::kFledgeSendDebugReportCooldownsToBandA)) {
group_elements_size +=
TaggedStringLength(constexpr_strlen("inCooldownOrLockout")) + 1;
group_obj[cbor::Value("inCooldownOrLockout")] =
@@ -1034,7 +1034,7 @@
TaggedStringLength(constexpr_strlen("enableDebugReporting")) + 1;
if (base::FeatureList::IsEnabled(
- features::kFledgeSendDebugReportCooldownsToBandA)) {
+ ::features::kFledgeSendDebugReportCooldownsToBandA)) {
// Note: here this field's value is set false as a placeholder only, but it
// will be overwritten in
// `InterestGroupManagerImpl::OnAdAuctionDataLoadComplete` to its real
@@ -1081,7 +1081,7 @@
TaggedStringLength(constexpr_strlen("requestTimestampMs")) +
TaggedSIntLength(timestamp);
- if (base::FeatureList::IsEnabled(features::kEnableBandAKAnonEnforcement) &&
+ if (base::FeatureList::IsEnabled(::features::kEnableBandAKAnonEnforcement) &&
KAnonIsEnabled()) {
message_obj[cbor::Value("enforceKAnon")] = cbor::Value(true);
message_elements_size +=
@@ -1153,7 +1153,7 @@
NOTREACHED(base::NotFatalUntil::M138);
}
if (base::FeatureList::IsEnabled(
- features::kFledgeSendDebugReportCooldownsToBandA)) {
+ ::features::kFledgeSendDebugReportCooldownsToBandA)) {
bool debug_report_in_cooldown_or_lockout =
debug_report_in_lockout_ ||
IsInDebugReportCooldown(seller, debug_report_cooldown_map_, now);