add more patches

This commit is contained in:
Carmelo Messina
2023-11-29 12:40:31 +01:00
parent b4fc6f76c8
commit 4e490e90de
59 changed files with 1158 additions and 2252 deletions
+36 -93
View File
@@ -15,7 +15,6 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
.../browser/predictors/loading_predictor.cc | 4 +-
.../predictors/loading_predictor_config.cc | 4 +-
.../browser/predictors/predictors_features.cc | 14 +---
chrome/common/chrome_features.cc | 6 +-
.../browser/autofill_optimization_guide.cc | 5 +-
.../optimization_guide/core/hints_fetcher.cc | 1 +
.../optimization_guide/core/hints_manager.cc | 5 ++
@@ -23,10 +22,14 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
.../core/prediction_model_download_manager.cc | 6 +-
.../core/prediction_model_fetcher_impl.cc | 1 +
components/optimization_guide/features.gni | 3 +-
components/permissions/features.cc | 16 ++--
third_party/blink/common/features.cc | 12 +--
.../Disable-all-predictors-code.inc | 7 ++
.../Disable-all-predictors-code.inc | 4 +
.../Disable-all-predictors-code.inc | 2 +
.../platform/runtime_enabled_features.json5 | 2 +-
21 files changed, 82 insertions(+), 112 deletions(-)
21 files changed, 80 insertions(+), 93 deletions(-)
create mode 100644 cromite_flags/chrome/common/chrome_features_cc/Disable-all-predictors-code.inc
create mode 100644 cromite_flags/components/permissions/features_cc/Disable-all-predictors-code.inc
create mode 100644 cromite_flags/third_party/blink/common/features_cc/Disable-all-predictors-code.inc
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
--- a/chrome/browser/BUILD.gn
@@ -221,29 +224,6 @@ diff --git a/chrome/browser/predictors/predictors_features.cc b/chrome/browser/p
// Modifies loading predictor so that it does prefetches of subresources instead
// of preconnects.
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
--- a/chrome/common/chrome_features.cc
+++ b/chrome/common/chrome_features.cc
@@ -1044,7 +1044,7 @@ BASE_FEATURE(kPluginVm, "PluginVm", base::FEATURE_DISABLED_BY_DEFAULT);
// Allows Chrome to do preconnect when prerender fails.
BASE_FEATURE(kPrerenderFallbackToPreconnect,
"PrerenderFallbackToPreconnect",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ base::FEATURE_DISABLED_BY_DEFAULT);
#if BUILDFLAG(IS_CHROMEOS)
// Enable improved printer state and error state messaging for Print Preview.
@@ -1105,8 +1105,8 @@ BASE_FEATURE(kSafetyCheckExtensions,
// Enables notification permission module in Safety Check.
BASE_FEATURE(kSafetyCheckNotificationPermissions,
- "SafetyCheckNotificationPermissions",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ "SafetyCheckNotificationPermissions", // disabled by default
+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite
const base::FeatureParam<int>
kSafetyCheckNotificationPermissionsMinEnagementLimit{
diff --git a/components/autofill/core/browser/autofill_optimization_guide.cc b/components/autofill/core/browser/autofill_optimization_guide.cc
--- a/components/autofill/core/browser/autofill_optimization_guide.cc
+++ b/components/autofill/core/browser/autofill_optimization_guide.cc
@@ -538,75 +518,38 @@ diff --git a/components/optimization_guide/features.gni b/components/optimizatio
}
declare_args() {
diff --git a/components/permissions/features.cc b/components/permissions/features.cc
--- a/components/permissions/features.cc
+++ b/components/permissions/features.cc
@@ -93,24 +93,24 @@ BASE_FEATURE(kFailFastQuietChip,
// When enabled, use the value of the `service_url` FeatureParam as the url
// for the Web Permission Predictions Service.
BASE_FEATURE(kPermissionPredictionServiceUseUrlOverride,
- "kPermissionPredictionServiceUseUrlOverride",
- base::FEATURE_DISABLED_BY_DEFAULT);
+ "kPermissionPredictionServiceUseUrlOverride", // disabled by default
+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite
BASE_FEATURE(kPermissionOnDeviceNotificationPredictions,
- "PermissionOnDeviceNotificationPredictions",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ "PermissionOnDeviceNotificationPredictions", // disabled by default
+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite
BASE_FEATURE(kPermissionOnDeviceGeolocationPredictions,
- "PermissionOnDeviceGeolocationPredictions",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ "PermissionOnDeviceGeolocationPredictions", // disabled by default
+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite
BASE_FEATURE(kPermissionDedicatedCpssSetting,
"PermissionDedicatedCpssSettings",
base::FEATURE_DISABLED_BY_DEFAULT);
BASE_FEATURE(kPermissionPredictionsV2,
- "PermissionPredictionsV2",
- base::FEATURE_DISABLED_BY_DEFAULT);
+ "PermissionPredictionsV2", // disabled by default
+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite
#if BUILDFLAG(IS_ANDROID)
diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc
--- a/third_party/blink/common/features.cc
+++ b/third_party/blink/common/features.cc
@@ -1217,12 +1217,8 @@ BASE_FEATURE(kMemoryCacheStrongReferenceSingleUnload,
// in the first viewport after the page load and the metrics of the clicked
// anchor element will be extracted and recorded.
BASE_FEATURE(kNavigationPredictor,
- "NavigationPredictor",
-#if BUILDFLAG(IS_ANDROID)
- base::FEATURE_ENABLED_BY_DEFAULT
-#else
- base::FEATURE_DISABLED_BY_DEFAULT
-#endif
+ "NavigationPredictor", // disabled by default
+ base::FEATURE_DISABLED_BY_DEFAULT // in Bromite
);
BASE_FEATURE(kNewBaseUrlInheritanceBehavior,
@@ -1359,8 +1355,8 @@ BASE_FEATURE(kPrefetchPrivacyChanges,
base::FEATURE_ENABLED_BY_DEFAULT); // in Bromite
BASE_FEATURE(kPreloadingHeuristicsMLModel,
- "PreloadingHeuristicsMLModel",
- base::FEATURE_DISABLED_BY_DEFAULT);
+ "PreloadingHeuristicsMLModel", // must be disabled
+ base::FEATURE_DISABLED_BY_DEFAULT); // in cromite
BASE_FEATURE(kPrerender2InNewTab,
"Prerender2InNewTab",
diff --git a/cromite_flags/chrome/common/chrome_features_cc/Disable-all-predictors-code.inc b/cromite_flags/chrome/common/chrome_features_cc/Disable-all-predictors-code.inc
new file mode 100644
--- /dev/null
+++ b/cromite_flags/chrome/common/chrome_features_cc/Disable-all-predictors-code.inc
@@ -0,0 +1,7 @@
+SET_CROMITE_FEATURE_DISABLED(kPrerenderFallbackToPreconnect);
+
+#if !BUILDFLAG(IS_ANDROID)
+
+SET_CROMITE_FEATURE_DISABLED(kSafetyCheckNotificationPermissions);
+
+#endif
diff --git a/cromite_flags/components/permissions/features_cc/Disable-all-predictors-code.inc b/cromite_flags/components/permissions/features_cc/Disable-all-predictors-code.inc
new file mode 100644
--- /dev/null
+++ b/cromite_flags/components/permissions/features_cc/Disable-all-predictors-code.inc
@@ -0,0 +1,4 @@
+SET_CROMITE_FEATURE_DISABLED(kPermissionPredictionServiceUseUrlOverride);
+SET_CROMITE_FEATURE_DISABLED(kPermissionOnDeviceNotificationPredictions);
+SET_CROMITE_FEATURE_DISABLED(kPermissionOnDeviceGeolocationPredictions);
+SET_CROMITE_FEATURE_DISABLED(kPermissionPredictionsV2);
diff --git a/cromite_flags/third_party/blink/common/features_cc/Disable-all-predictors-code.inc b/cromite_flags/third_party/blink/common/features_cc/Disable-all-predictors-code.inc
new file mode 100644
--- /dev/null
+++ b/cromite_flags/third_party/blink/common/features_cc/Disable-all-predictors-code.inc
@@ -0,0 +1,2 @@
+SET_CROMITE_FEATURE_DISABLED(kNavigationPredictor);
+SET_CROMITE_FEATURE_DISABLED(kPreloadingHeuristicsMLModel);
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -3014,7 +3014,7 @@
@@ -3007,7 +3007,7 @@
{
// https://crbug.com/1126305
name: "Prerender2",