2024-04-19 21:15:15 +00:00
|
|
|
From 54ec71011a6ebb873590802a70b2bc07578ba201 Mon Sep 17 00:00:00 2001
|
|
|
|
|
From: Szabolcs David <davidsz@inf.u-szeged.hu>
|
|
|
|
|
Date: Mon, 10 Oct 2022 17:20:43 +0200
|
|
|
|
|
Subject: Make user agent helpers buildable without unwanted dependencies
|
|
|
|
|
|
|
|
|
|
"//components/policy" is enormously large with its resource files and
|
|
|
|
|
we don't want to build it for only one preference name.
|
|
|
|
|
|
|
|
|
|
User agent utils are required to fill
|
|
|
|
|
navigator.userAgentData members in JavaScript.
|
|
|
|
|
|
|
|
|
|
Task-number: QTBUG-107260
|
|
|
|
|
Task-number: QTBUG-107451
|
|
|
|
|
Change-Id: I752df68a8095ddb3f598a71f0419c1a2c9c408bb
|
|
|
|
|
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
---
|
|
|
|
|
chromium/components/embedder_support/user_agent_utils.cc | 2 ++
|
|
|
|
|
1 file changed, 2 insertions(+)
|
|
|
|
|
|
|
|
|
|
diff --git a/chromium/components/embedder_support/user_agent_utils.cc b/chromium/components/embedder_support/user_agent_utils.cc
|
|
|
|
|
index c957a691efc..408fb837d80 100644
|
|
|
|
|
--- a/components/embedder_support/user_agent_utils.cc
|
|
|
|
|
+++ b/components/embedder_support/user_agent_utils.cc
|
|
|
|
|
@@ -446,12 +446,14 @@ blink::UserAgentMetadata GetUserAgentMetadata(const PrefService* pref_service,
|
|
|
|
|
bool enable_updated_grease_by_policy = true;
|
2024-09-16 18:02:24 +00:00
|
|
|
// TODO(crbug.com/40838057): Remove this after M126 which deprecates the
|
|
|
|
|
// policy.
|
2024-04-19 21:15:15 +00:00
|
|
|
+#if 0
|
|
|
|
|
if (pref_service) {
|
|
|
|
|
if (pref_service->HasPrefPath(
|
|
|
|
|
policy::policy_prefs::kUserAgentClientHintsGREASEUpdateEnabled))
|
|
|
|
|
enable_updated_grease_by_policy = pref_service->GetBoolean(
|
|
|
|
|
policy::policy_prefs::kUserAgentClientHintsGREASEUpdateEnabled);
|
|
|
|
|
}
|
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
|
|
// Low entropy client hints.
|
|
|
|
|
metadata.brand_version_list =
|
|
|
|
|
--
|
|
|
|
|
cgit v1.2.3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
…and now come Electron—specific changes to support the above:
|
|
|
|
|
|
|
|
|
|
--- src/components/browsing_data/core/BUILD.gn.old
|
|
|
|
|
+++ src/components/browsing_data/core/BUILD.gn
|
|
|
|
|
@@ -36,9 +36,7 @@ static_library("core") {
|
|
|
|
|
deps = [
|
|
|
|
|
"//base",
|
|
|
|
|
"//components/autofill/core/browser",
|
|
|
|
|
- "//components/bookmarks/browser",
|
|
|
|
|
"//components/history/core/browser",
|
|
|
|
|
- "//components/password_manager/core/browser",
|
|
|
|
|
"//components/pref_registry",
|
|
|
|
|
"//components/prefs",
|
|
|
|
|
"//components/strings",
|
|
|
|
|
--- src/components/sync/BUILD.gn.old
|
|
|
|
|
+++ src/components/sync/BUILD.gn
|
|
|
|
|
@@ -11,7 +11,6 @@ group("sync") {
|
|
|
|
|
"//components/sync/engine",
|
|
|
|
|
"//components/sync/model",
|
|
|
|
|
"//components/sync/nigori",
|
|
|
|
|
- "//components/sync/service",
|
|
|
|
|
]
|
|
|
|
|
if (is_chromeos) {
|
|
|
|
|
public_deps += [ "//components/sync/chromeos" ]
|
|
|
|
|
--- src/components/permissions/prediction_service/BUILD.gn.old
|
|
|
|
|
+++ src/components/permissions/prediction_service/BUILD.gn
|
|
|
|
|
@@ -31,8 +31,6 @@ source_set("prediction_service") {
|
|
|
|
|
]
|
|
|
|
|
public_deps = [
|
|
|
|
|
":prediction_service_messages_proto",
|
|
|
|
|
- "//components/optimization_guide/core",
|
|
|
|
|
- "//components/optimization_guide/proto:optimization_guide_proto",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
if (build_with_tflite_lib) {
|
|
|
|
|
--- src/components/embedder_support/BUILD.gn.old
|
|
|
|
|
+++ src/components/embedder_support/BUILD.gn
|
2024-09-16 18:02:24 +00:00
|
|
|
@@ -24,12 +24,8 @@ static_library("browser_util") {
|
2024-04-19 21:15:15 +00:00
|
|
|
deps = [
|
|
|
|
|
":embedder_support",
|
|
|
|
|
"//build:branding_buildflags",
|
|
|
|
|
- "//components/background_sync",
|
|
|
|
|
- "//components/content_settings/browser",
|
|
|
|
|
"//components/content_settings/core/browser",
|
2024-09-16 18:02:24 +00:00
|
|
|
- "//components/content_settings/core/browser:cookie_settings",
|
2024-04-19 21:15:15 +00:00
|
|
|
"//components/permissions",
|
|
|
|
|
- "//components/policy/core/common",
|
|
|
|
|
"//components/prefs",
|
|
|
|
|
"//components/version_info",
|
|
|
|
|
"//content/public/browser",
|
|
|
|
|
--- src/components/permissions/BUILD.gn.old
|
|
|
|
|
+++ src/components/permissions/BUILD.gn
|
2024-09-16 18:02:24 +00:00
|
|
|
@@ -109,10 +109,7 @@ source_set("permissions") {
|
2024-04-19 21:15:15 +00:00
|
|
|
deps = [
|
|
|
|
|
"//base",
|
|
|
|
|
"//build:chromeos_buildflags",
|
|
|
|
|
- "//components/back_forward_cache",
|
|
|
|
|
- "//components/content_settings/browser",
|
|
|
|
|
"//components/content_settings/core/browser",
|
2024-09-16 18:02:24 +00:00
|
|
|
- "//components/content_settings/core/browser:cookie_settings",
|
2024-04-19 21:15:15 +00:00
|
|
|
"//components/favicon/core:core",
|
|
|
|
|
"//components/keyed_service/content",
|
2024-09-16 18:02:24 +00:00
|
|
|
"//components/permissions/prediction_service",
|
2024-04-19 21:15:15 +00:00
|
|
|
--- src/components/proxy_config/BUILD.gn.old
|
|
|
|
|
+++ src/components/proxy_config/BUILD.gn
|
|
|
|
|
@@ -23,9 +23,6 @@ component("proxy_config") {
|
|
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
|
"//base",
|
|
|
|
|
- "//components/policy:generated",
|
|
|
|
|
- "//components/policy/core/browser",
|
|
|
|
|
- "//components/policy/core/common",
|
|
|
|
|
"//components/prefs",
|
|
|
|
|
"//components/strings",
|
|
|
|
|
"//net",
|
|
|
|
|
@@ -42,7 +39,7 @@ component("proxy_config") {
|
|
|
|
|
deps += [ "//components/pref_registry" ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- if (!is_ios) {
|
|
|
|
|
+ if (false) {
|
|
|
|
|
sources += [
|
|
|
|
|
"proxy_policy_handler.cc",
|
|
|
|
|
"proxy_policy_handler.h",
|
2024-09-16 18:02:24 +00:00
|
|
|
--- src/components/content_settings/core/browser/BUILD.gn.orig
|
2024-04-19 21:15:15 +00:00
|
|
|
+++ src/components/content_settings/core/browser/BUILD.gn
|
2024-09-16 18:02:24 +00:00
|
|
|
@@ -69,7 +69,7 @@ static_library("browser") {
|
2024-04-19 21:15:15 +00:00
|
|
|
"//url",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
- if (!is_ios) {
|
|
|
|
|
+ if (false) {
|
|
|
|
|
sources += [
|
2024-09-16 18:02:24 +00:00
|
|
|
"insecure_private_network_policy_handler.cc",
|
|
|
|
|
"insecure_private_network_policy_handler.h",
|
|
|
|
|
@@ -78,8 +78,6 @@ static_library("browser") {
|
|
|
|
|
|
2024-04-19 21:15:15 +00:00
|
|
|
if (use_blink) {
|
|
|
|
|
deps += [
|
|
|
|
|
- "//components/policy:generated",
|
|
|
|
|
- "//components/policy/core/browser",
|
|
|
|
|
"//components/privacy_sandbox:privacy_sandbox_prefs",
|
|
|
|
|
]
|
|
|
|
|
}
|
2024-09-16 18:02:24 +00:00
|
|
|
@@ -93,7 +91,7 @@ source_set("cookie_settings") {
|
|
|
|
|
"cookie_settings.h",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
- if (!is_ios) {
|
|
|
|
|
+ if (false) {
|
|
|
|
|
sources += [
|
|
|
|
|
"cookie_settings_policy_handler.cc",
|
|
|
|
|
"cookie_settings_policy_handler.h",
|
2024-04-19 21:15:15 +00:00
|
|
|
--- src/electron/chromium_src/BUILD.gn.orig
|
|
|
|
|
+++ src/electron/chromium_src/BUILD.gn
|
|
|
|
|
@@ -466,7 +466,7 @@ source_set("chrome_spellchecker") {
|
|
|
|
|
"//chrome/browser/spellchecker/spellcheck_service.h",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
- if (!is_mac) {
|
|
|
|
|
+ if (false) {
|
|
|
|
|
sources += [
|
|
|
|
|
"//chrome/browser/spellchecker/spellcheck_language_blocklist_policy_handler.cc",
|
|
|
|
|
"//chrome/browser/spellchecker/spellcheck_language_blocklist_policy_handler.h",
|
|
|
|
|
--- src/chrome/common/BUILD.gn.old
|
|
|
|
|
+++ src/chrome/common/BUILD.gn
|
|
|
|
|
@@ -210,14 +210,11 @@ static_library("common_lib") {
|
|
|
|
|
"//components/nacl/common:switches",
|
|
|
|
|
"//components/net_log",
|
|
|
|
|
"//components/network_session_configurator/common",
|
|
|
|
|
- "//components/ntp_tiles",
|
|
|
|
|
"//components/offline_pages/buildflags",
|
|
|
|
|
"//components/offline_pages/core:switches",
|
|
|
|
|
"//components/omnibox/common",
|
|
|
|
|
"//components/page_load_metrics/common:page_load_metrics_mojom",
|
|
|
|
|
"//components/password_manager/core/common",
|
|
|
|
|
- "//components/policy:generated",
|
|
|
|
|
- "//components/policy/core/common",
|
|
|
|
|
"//components/prefs",
|
|
|
|
|
"//components/safe_browsing:buildflags",
|
|
|
|
|
"//components/safe_search_api",
|
|
|
|
|
@@ -606,8 +603,6 @@ static_library("url_constants") {
|
|
|
|
|
"//components/lens:buildflags",
|
|
|
|
|
"//components/nacl/common:buildflags",
|
|
|
|
|
"//components/optimization_guide/optimization_guide_internals/webui:url_constants",
|
|
|
|
|
- "//components/password_manager/content/common",
|
|
|
|
|
- "//components/safe_browsing/core/common",
|
|
|
|
|
"//device/vr/buildflags",
|
|
|
|
|
]
|
|
|
|
|
}
|
2025-01-12 20:37:55 +00:00
|
|
|
--- src/components/search_engines/BUILD.gn.orig 2024-12-08 18:34:56.928006713 +0100
|
|
|
|
|
+++ src/components/search_engines/BUILD.gn 2024-12-18 12:48:04.888029763 +0100
|
|
|
|
|
@@ -16,45 +16,23 @@ static_library("search_engines") {
|
2024-04-19 21:15:15 +00:00
|
|
|
"default_search_manager.cc",
|
|
|
|
|
"default_search_manager.h",
|
|
|
|
|
"eea_countries_ids.h",
|
2025-01-12 20:37:55 +00:00
|
|
|
- "enterprise/default_search_policy_handler.cc",
|
|
|
|
|
- "enterprise/default_search_policy_handler.h",
|
|
|
|
|
"enterprise/enterprise_site_search_manager.cc",
|
|
|
|
|
"enterprise/enterprise_site_search_manager.h",
|
2024-04-19 21:15:15 +00:00
|
|
|
- "keyword_table.cc",
|
|
|
|
|
- "keyword_table.h",
|
|
|
|
|
"keyword_web_data_service.cc",
|
|
|
|
|
"keyword_web_data_service.h",
|
2025-01-12 20:37:55 +00:00
|
|
|
"search_engine_choice/search_engine_choice_metrics_service_accessor.h",
|
2024-04-19 21:15:15 +00:00
|
|
|
- "search_engine_choice/search_engine_choice_service.cc",
|
|
|
|
|
- "search_engine_choice/search_engine_choice_service.h",
|
2024-09-16 18:02:24 +00:00
|
|
|
- "search_engine_choice/search_engine_choice_utils.cc",
|
|
|
|
|
- "search_engine_choice/search_engine_choice_utils.h",
|
2024-04-19 21:15:15 +00:00
|
|
|
"search_engines_pref_names.h",
|
|
|
|
|
- "search_host_to_urls_map.cc",
|
|
|
|
|
- "search_host_to_urls_map.h",
|
|
|
|
|
"search_terms_data.cc",
|
|
|
|
|
"search_terms_data.h",
|
|
|
|
|
- "template_url.cc",
|
|
|
|
|
- "template_url.h",
|
|
|
|
|
"template_url_data.cc",
|
|
|
|
|
"template_url_data.h",
|
|
|
|
|
"template_url_data_util.cc",
|
|
|
|
|
"template_url_data_util.h",
|
|
|
|
|
- "template_url_fetcher.cc",
|
|
|
|
|
- "template_url_fetcher.h",
|
|
|
|
|
"template_url_id.h",
|
|
|
|
|
- "template_url_parser.cc",
|
|
|
|
|
- "template_url_parser.h",
|
|
|
|
|
- "template_url_prepopulate_data.cc",
|
|
|
|
|
- "template_url_prepopulate_data.h",
|
|
|
|
|
- "template_url_service.cc",
|
|
|
|
|
- "template_url_service.h",
|
|
|
|
|
"template_url_service_client.h",
|
|
|
|
|
"template_url_service_observer.h",
|
|
|
|
|
"template_url_starter_pack_data.cc",
|
|
|
|
|
"template_url_starter_pack_data.h",
|
|
|
|
|
- "util.cc",
|
|
|
|
|
- "util.h",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
public_deps = [
|
2025-01-12 20:37:55 +00:00
|
|
|
@@ -69,7 +47,6 @@ static_library("search_engines") {
|
2024-04-19 21:15:15 +00:00
|
|
|
"//components/sync",
|
|
|
|
|
"//components/webdata/common",
|
|
|
|
|
"//third_party/metrics_proto",
|
|
|
|
|
- "//third_party/omnibox_proto",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
deps = [
|
2025-01-12 20:37:55 +00:00
|
|
|
@@ -77,15 +54,9 @@ static_library("search_engines") {
|
2024-04-19 21:15:15 +00:00
|
|
|
"//components/country_codes",
|
2025-01-12 20:37:55 +00:00
|
|
|
"//components/crash/core/common:crash_key",
|
2024-04-19 21:15:15 +00:00
|
|
|
"//components/database_utils",
|
|
|
|
|
- "//components/infobars/core",
|
|
|
|
|
- "//components/lens:lens",
|
2024-09-16 18:02:24 +00:00
|
|
|
- "//components/lens/proto/server:proto",
|
2025-01-12 20:37:55 +00:00
|
|
|
"//components/metrics",
|
2024-04-19 21:15:15 +00:00
|
|
|
"//components/omnibox/common",
|
|
|
|
|
- "//components/policy:generated",
|
|
|
|
|
- "//components/policy/core/browser",
|
|
|
|
|
"//components/pref_registry",
|
|
|
|
|
- "//components/search_provider_logos:switches",
|
|
|
|
|
"//components/signin/public/base",
|
|
|
|
|
"//components/strings",
|
|
|
|
|
"//components/url_formatter",
|
2025-01-12 20:37:55 +00:00
|
|
|
@@ -97,7 +68,6 @@ static_library("search_engines") {
|
2024-04-19 21:15:15 +00:00
|
|
|
"//services/network/public/mojom",
|
|
|
|
|
"//sql",
|
|
|
|
|
"//third_party/metrics_proto",
|
|
|
|
|
- "//third_party/omnibox_proto",
|
|
|
|
|
"//ui/base",
|
|
|
|
|
"//ui/gfx",
|
|
|
|
|
"//ui/gfx/geometry",
|
2025-01-12 20:37:55 +00:00
|
|
|
@@ -123,7 +93,7 @@ static_library("search_engines") {
|
|
|
|
|
]
|
2024-09-16 18:02:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- if (!is_android) {
|
|
|
|
|
+ if (false) {
|
|
|
|
|
sources += [ "search_engine_choice/generated_marketing_snippets.cc" ]
|
|
|
|
|
deps += [
|
|
|
|
|
":generate_search_engine_icons",
|
2025-01-12 20:37:55 +00:00
|
|
|
@@ -132,7 +102,7 @@ static_library("search_engines") {
|
2024-04-19 21:15:15 +00:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2024-07-12 10:45:39 +00:00
|
|
|
- if (is_linux || is_win || is_mac || is_chromeos) {
|
2024-04-19 21:15:15 +00:00
|
|
|
+ if (false) {
|
|
|
|
|
sources += [
|
2025-01-12 20:37:55 +00:00
|
|
|
"enterprise/site_search_policy_handler.cc",
|
|
|
|
|
"enterprise/site_search_policy_handler.h",
|
2024-04-19 21:15:15 +00:00
|
|
|
--- src/components/search/BUILD.gn.old
|
|
|
|
|
+++ src/components/search/BUILD.gn
|
|
|
|
|
@@ -6,10 +6,6 @@ static_library("search") {
|
|
|
|
|
sources = [
|
|
|
|
|
"ntp_features.cc",
|
|
|
|
|
"ntp_features.h",
|
|
|
|
|
- "search.cc",
|
|
|
|
|
- "search.h",
|
|
|
|
|
- "search_provider_observer.cc",
|
|
|
|
|
- "search_provider_observer.h",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
deps = [
|
2024-09-16 18:02:24 +00:00
|
|
|
--- src/extensions/common/BUILD.gn.orig
|
|
|
|
|
+++ src/extensions/common/BUILD.gn
|
|
|
|
|
@@ -301,8 +301,6 @@ static_library("common") {
|
|
|
|
|
"extension_set.cc",
|
|
|
|
|
"extension_set.h",
|
|
|
|
|
"extension_updater_uma.h",
|
|
|
|
|
- "extension_urls.cc",
|
|
|
|
|
- "extension_urls.h",
|
|
|
|
|
"extension_utility_types.h",
|
|
|
|
|
"extensions_client.cc",
|
|
|
|
|
"extensions_client.h",
|
|
|
|
|
@@ -498,8 +496,6 @@ static_library("common") {
|
|
|
|
|
"//components/crash/core/common",
|
|
|
|
|
"//components/crx_file",
|
|
|
|
|
"//components/nacl/common:buildflags",
|
|
|
|
|
- "//components/safe_browsing/core/common",
|
|
|
|
|
- "//components/safe_browsing/core/common/hashprefix_realtime:hash_realtime_utils",
|
|
|
|
|
"//components/url_formatter",
|
|
|
|
|
"//components/url_matcher",
|
|
|
|
|
"//components/version_info",
|
2025-01-12 20:37:55 +00:00
|
|
|
--- src/components/password_manager/core/browser/password_manager_switches.cc.orig 2024-12-08 18:34:56.591340037 +0100
|
|
|
|
|
+++ src/components/password_manager/core/browser/password_manager_switches.cc 2024-12-18 12:47:00.934694855 +0100
|
2024-09-16 18:02:24 +00:00
|
|
|
@@ -10,11 +10,9 @@ namespace password_manager {
|
|
|
|
|
// Specifies which encryption storage backend to use. Possible values are
|
|
|
|
|
// kwallet, kwallet5, kwallet6, gnome-libsecret, basic.
|
|
|
|
|
// Any other value will lead to Chrome detecting the best backend automatically.
|
|
|
|
|
-const char kPasswordStore[] = "password-store";
|
|
|
|
|
|
|
|
|
|
// Enables the feature of allowing the user to disable the backend via a
|
|
|
|
|
// setting.
|
|
|
|
|
-const char kEnableEncryptionSelection[] = "enable-encryption-selection";
|
|
|
|
|
#endif // BUILDFLAG(IS_LINUX)
|
|
|
|
|
|
2025-01-12 20:37:55 +00:00
|
|
|
// Enables Password Sharing button in password details UI in settings when
|
|
|
|
|
--- src/components/password_manager/core/browser/password_manager_switches.h.orig 2024-12-08 18:34:56.591340037 +0100
|
|
|
|
|
+++ src/components/password_manager/core/browser/password_manager_switches.h 2024-12-18 12:48:40.918030653 +0100
|
2024-09-16 18:02:24 +00:00
|
|
|
@@ -11,8 +11,8 @@
|
|
|
|
|
namespace password_manager {
|
|
|
|
|
|
|
|
|
|
#if BUILDFLAG(IS_LINUX)
|
|
|
|
|
-extern const char kPasswordStore[];
|
|
|
|
|
-extern const char kEnableEncryptionSelection[];
|
|
|
|
|
+inline constexpr const char kPasswordStore[] = "password-store";
|
|
|
|
|
+inline constexpr const char kEnableEncryptionSelection[] = "enable-encryption-selection";
|
2025-01-12 20:37:55 +00:00
|
|
|
#endif // BUILDFLAG(IS_LINUX)
|
2024-09-16 18:02:24 +00:00
|
|
|
|
2025-01-12 20:37:55 +00:00
|
|
|
extern const char kEnableShareButtonUnbranded[];
|
|
|
|
|
--- src/chrome/common/extensions/BUILD.gn.orig 2025-01-02 10:33:17.939583644 +0100
|
|
|
|
|
+++ src/chrome/common/extensions/BUILD.gn 2025-01-02 11:36:57.232099250 +0100
|
|
|
|
|
@@ -76,7 +76,6 @@ source_set("extensions") {
|
|
|
|
|
"//chrome/common/extensions/api:extensions_features",
|
|
|
|
|
"//components/app_constants",
|
|
|
|
|
"//components/device_signals/core/common:features",
|
|
|
|
|
- "//components/policy/core/common",
|
|
|
|
|
"//components/url_formatter",
|
|
|
|
|
"//components/version_info",
|
|
|
|
|
"//extensions:extensions_resources",
|