From 4a9cbe673df842c3df74e60018c11763dded6f5e Mon Sep 17 00:00:00 2001 From: csagan5 <32685696+csagan5@users.noreply.github.com> Date: Sat, 21 Dec 2019 10:03:09 +0100 Subject: [PATCH] Bugfixes to build vanilla Chromium --- build/GN_ARGS | 1 - ...-password-reuse-detection-on-android.patch | 11 +++--- build/patches/Disable-safe-browsing.patch | 12 ------- ...-consent-miscellanous-backport-fixes.patch | 34 +++++++++++++------ 4 files changed, 30 insertions(+), 28 deletions(-) diff --git a/build/GN_ARGS b/build/GN_ARGS index 96e84b37..18c108e0 100644 --- a/build/GN_ARGS +++ b/build/GN_ARGS @@ -1,5 +1,4 @@ android_channel="stable" -blink_symbol_level=0 blink_symbol_level=1 dcheck_always_on=false debuggable_apks=false diff --git a/build/patches/Disable-password-reuse-detection-on-android.patch b/build/patches/Disable-password-reuse-detection-on-android.patch index e18e3942..1d4179ab 100644 --- a/build/patches/Disable-password-reuse-detection-on-android.patch +++ b/build/patches/Disable-password-reuse-detection-on-android.patch @@ -3,21 +3,24 @@ Date: Sun, 15 Dec 2019 22:39:56 +0100 Subject: Disable password reuse detection on android --- - components/password_manager/core/browser/BUILD.gn | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + components/password_manager/core/browser/BUILD.gn | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/password_manager/core/browser/BUILD.gn b/components/password_manager/core/browser/BUILD.gn --- a/components/password_manager/core/browser/BUILD.gn +++ b/components/password_manager/core/browser/BUILD.gn -@@ -12,7 +12,7 @@ if (is_android) { +@@ -12,9 +12,9 @@ if (is_android) { # TODO(crbug.com/1006430): Fix password reuse detection not fully functional on # Android. -password_reuse_detection_support = !is_ios +password_reuse_detection_support = !is_ios && !is_android password_reuse_warning_support = !is_android && !is_ios - password_on_focus_ping_support = !is_android && !is_ios +-password_on_focus_ping_support = !is_ios ++password_on_focus_ping_support = !is_android && !is_ios + config("password_reuse_detection_config") { + defines = [] -- 2.17.1 diff --git a/build/patches/Disable-safe-browsing.patch b/build/patches/Disable-safe-browsing.patch index 1694ace7..f6f0d150 100644 --- a/build/patches/Disable-safe-browsing.patch +++ b/build/patches/Disable-safe-browsing.patch @@ -2005,18 +2005,6 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer #include "components/spellcheck/spellcheck_buildflags.h" #include "components/startup_metric_utils/common/startup_metric.mojom.h" #include "components/subresource_filter/content/renderer/subresource_filter_agent.h" -diff --git a/components/password_manager/core/browser/BUILD.gn b/components/password_manager/core/browser/BUILD.gn ---- a/components/password_manager/core/browser/BUILD.gn -+++ b/components/password_manager/core/browser/BUILD.gn -@@ -14,7 +14,7 @@ if (is_android) { - # Android. - password_reuse_detection_support = !is_ios - password_reuse_warning_support = !is_android && !is_ios --password_on_focus_ping_support = !is_ios -+password_on_focus_ping_support = !is_android && !is_ios - - config("password_reuse_detection_config") { - defines = [] diff --git a/components/safe_browsing/features.cc b/components/safe_browsing/features.cc --- a/components/safe_browsing/features.cc +++ b/components/safe_browsing/features.cc diff --git a/build/patches/Unified-consent-miscellanous-backport-fixes.patch b/build/patches/Unified-consent-miscellanous-backport-fixes.patch index 723729e0..a9ddd6b3 100644 --- a/build/patches/Unified-consent-miscellanous-backport-fixes.patch +++ b/build/patches/Unified-consent-miscellanous-backport-fixes.patch @@ -3,14 +3,14 @@ Date: Wed, 18 Dec 2019 23:54:37 +0100 Subject: Unified consent miscellanous backport fixes --- - .../privacy/PrivacyPreferences.java | 26 ------------------- - .../sync/SyncNotificationController.java | 12 +++------ - 2 files changed, 3 insertions(+), 35 deletions(-) + .../privacy/PrivacyPreferences.java | 38 ------------------- + .../sync/SyncNotificationController.java | 12 ++---- + 2 files changed, 3 insertions(+), 47 deletions(-) diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java --- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java -@@ -10,7 +10,6 @@ import android.support.graphics.drawable.VectorDrawableCompat; +@@ -9,7 +9,6 @@ import android.support.graphics.drawable.VectorDrawableCompat; import android.support.v7.preference.CheckBoxPreference; import android.support.v7.preference.Preference; import android.support.v7.preference.PreferenceFragmentCompat; @@ -18,7 +18,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/pri import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; -@@ -50,13 +49,10 @@ public class PrivacyPreferences +@@ -56,13 +55,10 @@ public class PrivacyPreferences @Override public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { @@ -32,14 +32,18 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/pri mManagedPreferenceDelegate = createManagedPreferenceDelegate(); -@@ -70,27 +66,6 @@ public class PrivacyPreferences +@@ -76,39 +72,6 @@ public class PrivacyPreferences networkPredictionPref.setOnPreferenceChangeListener(this); networkPredictionPref.setManagedPreferenceDelegate(mManagedPreferenceDelegate); - if (ChromeFeatureList.isEnabled(ChromeFeatureList.UNIFIED_CONSENT)) { - // Remove preferences that were migrated to SyncAndServicesPreferences. +- preferenceScreen.removePreference(findPreference(PREF_NAVIGATION_ERROR)); - preferenceScreen.removePreference(findPreference(PREF_SEARCH_SUGGESTIONS)); +- preferenceScreen.removePreference(findPreference(PREF_SAFE_BROWSING_SCOUT_REPORTING)); +- preferenceScreen.removePreference(findPreference(PREF_SAFE_BROWSING)); - preferenceScreen.removePreference(findPreference(PREF_CONTEXTUAL_SEARCH)); +- preferenceScreen.removePreference(findPreference(PREF_USAGE_AND_CRASH_REPORTING)); - - // TODO(https://crbug.com/846376): Update strings in XML after UNIFIED_CONSENT launch. - networkPredictionPref.setTitle(R.string.preload_pages_title); @@ -53,14 +57,22 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/pri - networkPredictionPref.setOrder(canMakePaymentPref.getOrder()); - preferenceScreen.addPreference(networkPredictionPref); - +- Preference syncAndServicesLink = findPreference(PREF_SYNC_AND_SERVICES_LINK); +- NoUnderlineClickableSpan linkSpan = new NoUnderlineClickableSpan(getResources(), view -> { +- PreferencesLauncher.launchSettingsPage(getActivity(), SyncAndServicesPreferences.class, +- SyncAndServicesPreferences.createArguments(false)); +- }); +- syncAndServicesLink.setSummary( +- SpanApplier.applySpans(getString(R.string.privacy_sync_and_services_link), +- new SpanApplier.SpanInfo("", "", linkSpan))); +- - updateSummaries(); - return; - } -- - ChromeBaseCheckBoxPreference searchSuggestionsPref = - (ChromeBaseCheckBoxPreference) findPreference(PREF_SEARCH_SUGGESTIONS); - searchSuggestionsPref.setOnPreferenceChangeListener(this); -@@ -135,7 +110,6 @@ public class PrivacyPreferences + preferenceScreen.removePreference(findPreference(PREF_SYNC_AND_SERVICES_LINK_DIVIDER)); + preferenceScreen.removePreference(findPreference(PREF_SYNC_AND_SERVICES_LINK)); + +@@ -176,7 +139,6 @@ public class PrivacyPreferences */ public void updateSummaries() { PrefServiceBridge prefServiceBridge = PrefServiceBridge.getInstance();