From 43dbb5e70b5633bacb113fea1067a86187204c06 Mon Sep 17 00:00:00 2001 From: csagan5 <32685696+csagan5@users.noreply.github.com> Date: Mon, 15 Nov 2021 09:39:39 +0100 Subject: [PATCH] Consolidate some patches, updates --- build/bromite_patches_list.txt | 2 +- .../Automated-domain-substitution.patch | 18 +++--- ...le-Accessibility-service-by-default.patch} | 0 ...Disable-fetching-of-all-field-trials.patch | 63 ++++++++++++++++++- .../Disable-seed-based-field-trials.patch | 37 ----------- 5 files changed, 72 insertions(+), 48 deletions(-) rename build/patches/{Disable-accessibility-server-by-default.patch => Disable-Accessibility-service-by-default.patch} (100%) delete mode 100644 build/patches/Disable-seed-based-field-trials.patch diff --git a/build/bromite_patches_list.txt b/build/bromite_patches_list.txt index 64b95e1e..4d8e8412 100644 --- a/build/bromite_patches_list.txt +++ b/build/bromite_patches_list.txt @@ -54,7 +54,6 @@ Add-bookmark-import-export-actions.patch Add-an-always-incognito-mode.patch Add-option-to-not-persist-tabs-across-sessions.patch Disable-fetching-of-all-field-trials.patch -Disable-seed-based-field-trials.patch Disable-plugins-enumeration.patch net-cert-increase-default-key-length-for-newly-generated-RSA-keys.patch dns-send-IPv6-connectivity-probes-to-RIPE-DNS.patch @@ -164,4 +163,5 @@ Enable-native-Android-autofill.patch Keep-empty-tabs-between-sessions.patch Disable-third-party-origin-trials.patch Never-use-HTTP-probes-for-connection-detection.patch +Disable-Accessibility-service-by-default.patch Automated-domain-substitution.patch diff --git a/build/patches/Automated-domain-substitution.patch b/build/patches/Automated-domain-substitution.patch index 26a9b359..705112af 100644 --- a/build/patches/Automated-domain-substitution.patch +++ b/build/patches/Automated-domain-substitution.patch @@ -8328,7 +8328,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro Blocked site -@@ -1511,7 +1511,7 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1517,7 +1517,7 @@ Your Google account may have other forms of browsing history like searches and a In Lite mode, Chrome loads pages faster and uses up to 60 percent less data. To optimize the pages that you visit, Chrome sends your web traffic to Google. <link>Learn more</link> @@ -8337,7 +8337,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro Turn on Lite mode -@@ -1729,10 +1729,10 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1735,10 +1735,10 @@ Your Google account may have other forms of browsing history like searches and a Waiting for details of parents. @@ -8350,7 +8350,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro Content -@@ -1791,22 +1791,22 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1797,22 +1797,22 @@ Your Google account may have other forms of browsing history like searches and a Google Terms of Service @@ -8377,7 +8377,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro -@@ -1823,7 +1823,7 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1829,7 +1829,7 @@ Your Google account may have other forms of browsing history like searches and a Also clear your Chrome data from this device @@ -8386,7 +8386,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro Contacting Google. This may take a minute… -@@ -1928,7 +1928,7 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1934,7 +1934,7 @@ Your Google account may have other forms of browsing history like searches and a Your data was encrypted with your <learnmore>sync passphrase</learnmore> on %1$sSept 1, 2012. Enter it to start sync. @@ -8395,7 +8395,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro This field cannot be blank -@@ -3982,7 +3982,7 @@ To change this setting, <resetlink>reset sync

<resetlink>reset sync

@@ -8404,7 +8404,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro No compatible devices found -@@ -4016,7 +4016,7 @@ To change this setting, <resetlink>reset sync

<resetlink>reset sync

@@ -8413,7 +8413,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro %1$sYouTube also has data in Chrome -@@ -4370,7 +4370,7 @@ To change this setting, <resetlink>reset sync

<resetlink>reset sync

%1$sTanya's Pixel 2... @@ -8422,7 +8422,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro List of devices to share a tab with. -@@ -4409,7 +4409,7 @@ To change this setting, <resetlink>reset sync

<resetlink>reset sync

%1$sphone diff --git a/build/patches/Disable-accessibility-server-by-default.patch b/build/patches/Disable-Accessibility-service-by-default.patch similarity index 100% rename from build/patches/Disable-accessibility-server-by-default.patch rename to build/patches/Disable-Accessibility-service-by-default.patch diff --git a/build/patches/Disable-fetching-of-all-field-trials.patch b/build/patches/Disable-fetching-of-all-field-trials.patch index 6f68bbad..42dd05bb 100644 --- a/build/patches/Disable-fetching-of-all-field-trials.patch +++ b/build/patches/Disable-fetching-of-all-field-trials.patch @@ -2,16 +2,51 @@ From: csagan5 <32685696+csagan5@users.noreply.github.com> Date: Sun, 8 Jul 2018 18:16:34 +0200 Subject: Disable fetching of all field trials +Disable seed-based field trials --- + android_webview/nonembedded/BUILD.gn | 2 -- + .../services/VariationsSeedServer.java | 2 -- .../chrome_metrics_services_manager_client.cc | 2 ++ components/ukm/ukm_recorder_impl.cc | 3 +++ .../firstrun/VariationsSeedBridge.java | 2 +- .../firstrun/VariationsSeedFetcher.java | 23 ++++--------------- .../variations/net/omnibox_http_headers.cc | 2 +- .../variations/net/variations_http_headers.cc | 3 +++ + .../service/variations_field_trial_creator.cc | 4 +++- .../variations/service/variations_service.cc | 15 +++--------- - 7 files changed, 17 insertions(+), 33 deletions(-) + 10 files changed, 20 insertions(+), 38 deletions(-) +diff --git a/android_webview/nonembedded/BUILD.gn b/android_webview/nonembedded/BUILD.gn +--- a/android_webview/nonembedded/BUILD.gn ++++ b/android_webview/nonembedded/BUILD.gn +@@ -96,7 +96,6 @@ android_library("services_java") { + sources = [ + "java/src/org/chromium/android_webview/services/AwMinidumpUploadJobService.java", + "java/src/org/chromium/android_webview/services/AwMinidumpUploaderDelegate.java", +- "java/src/org/chromium/android_webview/services/AwVariationsSeedFetcher.java", + "java/src/org/chromium/android_webview/services/ComponentUpdaterSafeModeUtils.java", + "java/src/org/chromium/android_webview/services/ComponentsProviderPathUtil.java", + "java/src/org/chromium/android_webview/services/ComponentsProviderService.java", +@@ -107,7 +106,6 @@ android_library("services_java") { + "java/src/org/chromium/android_webview/services/MetricsUploadService.java", + "java/src/org/chromium/android_webview/services/SafeModeContentProvider.java", + "java/src/org/chromium/android_webview/services/SafeModeService.java", +- "java/src/org/chromium/android_webview/services/VariationsSeedHolder.java", + "java/src/org/chromium/android_webview/services/VariationsSeedServer.java", + ] + deps = [ +diff --git a/android_webview/nonembedded/java/src/org/chromium/android_webview/services/VariationsSeedServer.java b/android_webview/nonembedded/java/src/org/chromium/android_webview/services/VariationsSeedServer.java +--- a/android_webview/nonembedded/java/src/org/chromium/android_webview/services/VariationsSeedServer.java ++++ b/android_webview/nonembedded/java/src/org/chromium/android_webview/services/VariationsSeedServer.java +@@ -30,8 +30,6 @@ public class VariationsSeedServer extends Service { + @Override + public void getSeed(ParcelFileDescriptor newSeedFile, long oldSeedDate, + IVariationsSeedServerCallback callback) { +- maybeReportMetrics(callback); +- VariationsSeedHolder.getInstance().writeSeedIfNewer(newSeedFile, oldSeedDate); + } + }; + diff --git a/chrome/browser/metrics/chrome_metrics_services_manager_client.cc b/chrome/browser/metrics/chrome_metrics_services_manager_client.cc --- a/chrome/browser/metrics/chrome_metrics_services_manager_client.cc +++ b/chrome/browser/metrics/chrome_metrics_services_manager_client.cc @@ -122,6 +157,32 @@ diff --git a/components/variations/net/variations_http_headers.cc b/components/v AppendOmniboxOnDeviceSuggestionsHeaderIfNeeded(url, resource_request_); // Note the criteria for attaching client experiment headers: +diff --git a/components/variations/service/variations_field_trial_creator.cc b/components/variations/service/variations_field_trial_creator.cc +--- a/components/variations/service/variations_field_trial_creator.cc ++++ b/components/variations/service/variations_field_trial_creator.cc +@@ -263,8 +263,8 @@ bool VariationsFieldTrialCreator::SetupFieldTrials( + // instance is set. + feature_list->RegisterExtraFeatureOverrides(extra_overrides); + +- bool used_testing_config = false; + #if BUILDFLAG(FIELDTRIAL_TESTING_ENABLED) ++ bool used_testing_config = false; + if (!command_line->HasSwitch(switches::kDisableFieldTrialTestingConfig) && + !command_line->HasSwitch(::switches::kForceFieldTrials) && + !command_line->HasSwitch(switches::kVariationsServerURL)) { +@@ -278,10 +278,12 @@ bool VariationsFieldTrialCreator::SetupFieldTrials( + } + #endif // BUILDFLAG(FIELDTRIAL_TESTING_ENABLED) + bool used_seed = false; ++#if defined(FIELDTRIAL_SEED_ENABLED) + if (!used_testing_config) { + used_seed = CreateTrialsFromSeed(low_entropy_provider.get(), + feature_list.get(), safe_seed_manager); + } ++#endif // BUILDFLAG(FIELDTRIAL_SEED_ENABLED) + + platform_field_trials->SetupFeatureControllingFieldTrials( + used_seed, low_entropy_provider.get(), feature_list.get()); diff --git a/components/variations/service/variations_service.cc b/components/variations/service/variations_service.cc --- a/components/variations/service/variations_service.cc +++ b/components/variations/service/variations_service.cc diff --git a/build/patches/Disable-seed-based-field-trials.patch b/build/patches/Disable-seed-based-field-trials.patch deleted file mode 100644 index 9e45c075..00000000 --- a/build/patches/Disable-seed-based-field-trials.patch +++ /dev/null @@ -1,37 +0,0 @@ -From: Daniel Micay -Date: Tue, 25 Dec 2018 16:19:51 -0500 -Subject: Disable seed-based field trials - ---- - .../variations/service/variations_field_trial_creator.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/components/variations/service/variations_field_trial_creator.cc b/components/variations/service/variations_field_trial_creator.cc ---- a/components/variations/service/variations_field_trial_creator.cc -+++ b/components/variations/service/variations_field_trial_creator.cc -@@ -263,8 +263,8 @@ bool VariationsFieldTrialCreator::SetupFieldTrials( - // instance is set. - feature_list->RegisterExtraFeatureOverrides(extra_overrides); - -- bool used_testing_config = false; - #if BUILDFLAG(FIELDTRIAL_TESTING_ENABLED) -+ bool used_testing_config = false; - if (!command_line->HasSwitch(switches::kDisableFieldTrialTestingConfig) && - !command_line->HasSwitch(::switches::kForceFieldTrials) && - !command_line->HasSwitch(switches::kVariationsServerURL)) { -@@ -278,10 +278,12 @@ bool VariationsFieldTrialCreator::SetupFieldTrials( - } - #endif // BUILDFLAG(FIELDTRIAL_TESTING_ENABLED) - bool used_seed = false; -+#if defined(FIELDTRIAL_SEED_ENABLED) - if (!used_testing_config) { - used_seed = CreateTrialsFromSeed(low_entropy_provider.get(), - feature_list.get(), safe_seed_manager); - } -+#endif // BUILDFLAG(FIELDTRIAL_SEED_ENABLED) - - platform_field_trials->SetupFeatureControllingFieldTrials( - used_seed, low_entropy_provider.get(), feature_list.get()); --- -2.20.1 -