mirror of
https://github.com/termux/termux-packages.git
synced 2025-06-03 17:45:16 +00:00
2135 lines
93 KiB
Diff
2135 lines
93 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 +-
|
|
.../render_widget_host_view_aura.cc | 2 +-
|
|
.../spare_render_process_host_manager_impl.cc | 12 +-
|
|
.../cross_origin_opener_policy_reporter.cc | 4 +
|
|
.../dip/document_isolation_policy_reporter.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 +-
|
|
62 files changed, 391 insertions(+), 193 deletions(-)
|
|
|
|
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
|
|
index 3256304fe1..ddd80e7072 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")
|
|
@@ -54,7 +55,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 = [
|
|
@@ -162,8 +272,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",
|
|
@@ -342,6 +450,7 @@ source_set("browser") {
|
|
"//ui/webui/resources",
|
|
"//v8",
|
|
"//v8:v8_version",
|
|
+ ":devtools_protocol",
|
|
]
|
|
|
|
public_deps = [
|
|
@@ -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",
|
|
@@ -2500,6 +2553,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 += [
|
|
@@ -2517,8 +2571,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",
|
|
]
|
|
@@ -2554,8 +2606,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",
|
|
]
|
|
@@ -2944,6 +2994,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 += [
|
|
@@ -3402,6 +3455,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",
|
|
@@ -3434,9 +3493,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",
|
|
@@ -3683,8 +3739,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 3cb7a97605..f21e5c945d 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.
|
|
@@ -1161,3 +1163,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 e6f84529b8..26095c13a3 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.
|
|
@@ -907,7 +907,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,
|
|
@@ -989,7 +989,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 3ae4de7dc7..98aa4e5306 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 {
|
|
@@ -3168,3 +3171,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 ac8e19fd02..ef5424cd90 100644
|
|
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
|
|
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
|
@@ -397,7 +397,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
|
|
@@ -527,7 +527,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
|
|
@@ -543,7 +543,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)
|
|
@@ -1243,7 +1243,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;
|
|
@@ -1678,7 +1678,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 4985c6a59e..5e46af03ce 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 {
|
|
@@ -976,3 +978,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 70da4fd0d2..9379bbd77b 100644
|
|
--- a/content/browser/media/cdm_storage_database.cc
|
|
+++ b/content/browser/media/cdm_storage_database.cc
|
|
@@ -12,6 +12,8 @@
|
|
#include "base/metrics/histogram_functions.h"
|
|
#include "sql/statement.h"
|
|
|
|
+#define kUmaPrefix kUmaPrefix_CdmStorageDatabase
|
|
+
|
|
namespace content {
|
|
|
|
namespace {
|
|
@@ -688,3 +690,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 ed57c7512b..3fd30f764d 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 {
|
|
@@ -2111,3 +2113,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 df6baa2e0c..b8d1a481ac 100644
|
|
--- a/content/browser/preloading/prefetch/prefetch_url_loader_interceptor.cc
|
|
+++ b/content/browser/preloading/prefetch/prefetch_url_loader_interceptor.cc
|
|
@@ -27,6 +27,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 {
|
|
|
|
@@ -280,3 +282,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 4d3189e34c..62494dd343 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
|
|
@@ -1710,3 +1713,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 b9dd4751b0..2c75216d84 100644
|
|
--- a/content/browser/renderer_host/media/media_stream_manager.cc
|
|
+++ b/content/browser/renderer_host/media/media_stream_manager.cc
|
|
@@ -107,6 +107,9 @@
|
|
|
|
using ::blink::mojom::MediaDeviceType;
|
|
|
|
+#define DeviceTypeToString DeviceTypeToString_MediaStreamManager
|
|
+#define SendLogMessage SendLogMessage_MediaStreamManager
|
|
+
|
|
namespace content {
|
|
|
|
constinit thread_local MediaStreamManager* media_stream_manager = nullptr;
|
|
@@ -4653,3 +4656,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 b5568f298b..bd232ee0d7 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 8ec8da33fe..3841b96337 100644
|
|
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
|
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
|
@@ -456,9 +456,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
|
|
@@ -998,7 +998,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()) {
|
|
@@ -1006,11 +1006,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.
|
|
@@ -3880,7 +3880,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
|
|
@@ -4334,7 +4334,7 @@ bool RenderFrameHostImpl::CreateRenderFrame(
|
|
(navigation_request->commit_params()
|
|
.is_cross_site_cross_browsing_context_group &&
|
|
base::FeatureList::IsEnabled(
|
|
- features::kClearCrossSiteCrossBrowsingContextGroupWindowName)));
|
|
+ ::features::kClearCrossSiteCrossBrowsingContextGroupWindowName)));
|
|
|
|
if (should_clear_browsing_instance_name) {
|
|
params->replication_state->name = "";
|
|
@@ -5833,7 +5833,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 {
|
|
@@ -6546,7 +6546,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(),
|
|
@@ -8603,14 +8603,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;
|
|
@@ -8648,7 +8648,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);
|
|
@@ -9049,7 +9049,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(
|
|
@@ -11257,7 +11257,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)) {
|
|
@@ -11361,7 +11361,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)) {
|
|
@@ -11754,7 +11754,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;
|
|
@@ -13731,7 +13731,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)) {
|
|
@@ -16058,7 +16058,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
|
|
@@ -16459,7 +16459,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();
|
|
|
|
@@ -16467,7 +16467,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_,
|
|
@@ -17065,7 +17065,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
|
|
}
|
|
@@ -17114,7 +17114,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
|
|
@@ -18317,14 +18317,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
|
|
@@ -18619,7 +18619,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 d26c850e28..1c33b4e8d1 100644
|
|
--- a/content/browser/renderer_host/render_frame_host_manager.cc
|
|
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
|
|
@@ -388,18 +388,18 @@ void UpdateProcessReusePolicyForProcessPerSiteWithMainFrameThreshold(
|
|
return;
|
|
}
|
|
if (!base::FeatureList::IsEnabled(
|
|
- features::kProcessPerSiteUpToMainFrameThreshold)) {
|
|
+ ::features::kProcessPerSiteUpToMainFrameThreshold)) {
|
|
return;
|
|
}
|
|
if (!frame_tree_node->IsOutermostMainFrame()) {
|
|
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::
|
|
@@ -420,7 +420,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::
|
|
@@ -648,8 +648,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>(
|
|
@@ -699,8 +699,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>(
|
|
@@ -1074,14 +1074,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.
|
|
@@ -1482,7 +1482,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
|
|
@@ -1491,7 +1491,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.
|
|
@@ -1503,9 +1503,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);
|
|
@@ -1752,7 +1752,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 =
|
|
@@ -1760,7 +1760,7 @@ RenderFrameHostManager::GetFrameHostForNavigation(
|
|
browsing_context_group_swap,
|
|
reason_output);
|
|
if (reason && base::FeatureList::IsEnabled(
|
|
- features::kHoldbackDebugReasonStringRemoval)) {
|
|
+ ::features::kHoldbackDebugReasonStringRemoval)) {
|
|
reason->append(site_instance_reason);
|
|
}
|
|
|
|
@@ -2722,8 +2722,8 @@ RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation(
|
|
current_instance->GetRelatedActiveContentsCount()),
|
|
51);
|
|
if (base::FeatureList::IsEnabled(
|
|
- features::kPrefetchStateContaminationMitigation) &&
|
|
- features::kPrefetchStateContaminationSwapsBrowsingContextGroup.Get()) {
|
|
+ ::features::kPrefetchStateContaminationMitigation) &&
|
|
+ ::features::kPrefetchStateContaminationSwapsBrowsingContextGroup.Get()) {
|
|
return BrowsingContextGroupSwap::CreateSecuritySwap();
|
|
}
|
|
}
|
|
@@ -3067,7 +3067,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(
|
|
@@ -3176,7 +3176,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();
|
|
@@ -4164,8 +4164,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,
|
|
@@ -4232,8 +4232,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 {
|
|
@@ -4491,8 +4491,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,
|
|
@@ -4944,8 +4944,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()
|
|
@@ -5093,8 +5093,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 52fecb017e..669d220f3c 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 {
|
|
@@ -595,7 +597,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();
|
|
@@ -1073,3 +1075,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 6606217ec5..7304f222fc 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;
|
|
}
|
|
@@ -690,7 +690,7 @@ const void* const kEmptySiteProcessCountTrackerKey =
|
|
// processes to optimize process creation and navigation performance.
|
|
bool IsEmptyRendererProcessesReuseAllowed() {
|
|
return base::FeatureList::IsEnabled(
|
|
- features::kTrackEmptyRendererProcessesForReuse);
|
|
+ ::features::kTrackEmptyRendererProcessesForReuse);
|
|
}
|
|
|
|
class SiteProcessCountTracker : public base::SupportsUserData::Data,
|
|
@@ -3168,19 +3168,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;
|
|
}
|
|
@@ -3382,7 +3382,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);
|
|
@@ -4736,7 +4736,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) {
|
|
@@ -4870,7 +4870,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) {
|
|
@@ -4944,7 +4944,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();
|
|
}
|
|
}
|
|
@@ -5444,7 +5444,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 00b1dc2ab7..7f572f3c59 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_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
|
index 5867fc3e77..d63bccd31a 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 b11e5e18d5..a596809948 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
|
|
@@ -197,7 +197,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,
|
|
@@ -700,17 +700,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
|
|
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 334f15a6bc..9f650fdecf 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 {
|
|
@@ -298,3 +300,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/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 5a5b7c3edf..fb143dd78a 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 b44ff7f5a4..78185ae7ba 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 7424d33cc3..e5f576cc0b 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 476b1d98cf..e776576c41 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 {
|
|
@@ -1534,3 +1536,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 f7d795f4df..ec38016a19 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",
|
|
@@ -112,6 +113,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 126c0d5164..a3135901bc 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")
|
|
@@ -43,7 +44,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
|
|
@@ -1026,7 +1027,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 2221c3969c..aa5a301ba0 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 = [
|
|
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 a596809948..9279b57c5d 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
|
|
@@ -828,7 +828,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);
|
|
}
|
|
|