From 1953e3d4157adea9e7f533ded0c5d07803ff7eea Mon Sep 17 00:00:00 2001 From: csagan5 <32685696+csagan5@users.noreply.github.com> Date: Wed, 19 May 2021 19:52:13 +0200 Subject: [PATCH] Release 91.0.4472.50 --- CHANGELOG.md | 6 ++ README.md | 2 +- build/bromite_patches_list.txt | 1 + .../Add-a-proxy-configuration-page.patch | 2 +- .../Add-an-always-incognito-mode.patch | 13 ++++- .../Automated-domain-substitution.patch | 43 +++++--------- .../Bromite-AdBlockUpdaterService.patch | 4 +- build/patches/Disable-safe-browsing.patch | 18 +++++- ...uiltin-autocomplete-for-chrome-flags.patch | 14 ++--- ...e-signin-and-data-saver-integrations.patch | 56 +++++++++++-------- ...ce-DoH-probe-domain-with-RIPE-domain.patch | 18 +++++- build/patches/Unexpire-tab-groups-flags.patch | 32 +++++++++++ build/patches/User-agent-customization.patch | 31 +++++----- 13 files changed, 161 insertions(+), 79 deletions(-) create mode 100644 build/patches/Unexpire-tab-groups-flags.patch diff --git a/CHANGELOG.md b/CHANGELOG.md index 998c0a7e..63a2391f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 91.0.4472.50 +* unexpire tab group flags `#enable-tab-groups` and `#enable-tab-groups-ui-improvements` +* replace known good hostname used for DoH test (fixes https://github.com/bromite/bromite/issues/1148) +* drop patch to disable preview fetching +* drop patch to restore horizontal tab switcher + # 90.0.4430.204 * fix for custom tab intent tab crashes when in always incognito mode (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1116) diff --git a/README.md b/README.md index 89148910..bc41c2f1 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,6 @@ You can inspect all functionality/privacy changes by reading the [patches](https Flags which have been retired from upstream Chromium but are still available in Bromite. -* `#enable-horizontal-tab-switcher` * `#pull-to-refresh` * `#enable-search-ready-omnibox` * `#darken-websites-checkbox-in-themes-setting` @@ -101,6 +100,7 @@ Flags which have been retired from upstream Chromium but are still available in * `#enable-text-fragment-anchor`, disabled by default * `#num-raster-threads` * `#enable-image-reader`, enabled by default +* `#enable-tab-groups` and `#enable-tab-groups-ui-improvements` New flags: diff --git a/build/bromite_patches_list.txt b/build/bromite_patches_list.txt index 901f37c5..ec34410c 100644 --- a/build/bromite_patches_list.txt +++ b/build/bromite_patches_list.txt @@ -147,4 +147,5 @@ Add-AllowUserCertificates-flag.patch Add-IsCleartextPermitted-flag.patch Disable-RTCGetCurrentBrowsingContextMedia-by-default.patch Disable-FLoC-by-default.patch +Unexpire-tab-groups-flags.patch Automated-domain-substitution.patch diff --git a/build/patches/Add-a-proxy-configuration-page.patch b/build/patches/Add-a-proxy-configuration-page.patch index 1f47c1d5..333c56c6 100644 --- a/build/patches/Add-a-proxy-configuration-page.patch +++ b/build/patches/Add-a-proxy-configuration-page.patch @@ -81,7 +81,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc --- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc +++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc -@@ -344,6 +344,8 @@ std::vector ChromeAutocompleteProviderClient::GetBuiltinURLs() { +@@ -342,6 +342,8 @@ std::vector ChromeAutocompleteProviderClient::GetBuiltinURLs() { std::vector ChromeAutocompleteProviderClient::GetBuiltinsToProvideAsUserTypes() { std::vector builtins_to_provide; diff --git a/build/patches/Add-an-always-incognito-mode.patch b/build/patches/Add-an-always-incognito-mode.patch index 29949e2f..240b9fff 100644 --- a/build/patches/Add-an-always-incognito-mode.patch +++ b/build/patches/Add-an-always-incognito-mode.patch @@ -10,7 +10,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c chrome/android/chrome_java_sources.gni | 1 + .../java/res/xml/privacy_preferences.xml | 5 ++ .../AlwaysIncognitoLinkInterceptor.java | 80 +++++++++++++++++++ - .../chrome/browser/ChromeTabbedActivity.java | 6 +- + .../chrome/browser/ChromeTabbedActivity.java | 8 +- .../chrome/browser/app/ChromeActivity.java | 4 + .../AppMenuPropertiesDelegateImpl.java | 6 ++ .../ChromeContextMenuPopulator.java | 28 +++++-- @@ -23,7 +23,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c .../webapps/WebappIntentDataProvider.java | 14 ++++ .../flags/android/chrome_feature_list.cc | 2 +- .../strings/android_chrome_strings.grd | 7 ++ - 16 files changed, 186 insertions(+), 38 deletions(-) + 16 files changed, 187 insertions(+), 39 deletions(-) create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/AlwaysIncognitoLinkInterceptor.java diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni @@ -160,6 +160,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct int index = savedInstanceState != null ? savedInstanceState.getInt(WINDOW_INDEX, 0) : 0; mNextTabPolicySupplier = new ChromeNextTabPolicySupplier(mOverviewModeBehaviorSupplier); +@@ -1715,7 +1717,7 @@ public class ChromeTabbedActivity extends ChromeActivity @@ -7727,7 +7714,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro This setting is disabled on managed browsers -@@ -887,7 +887,7 @@ Privacy Sandbox is still in active development and is available in selected regi +@@ -922,7 +922,7 @@ Privacy Sandbox is still in active development and is available in selected regi The selected data has been removed from Chrome and your synced devices. @@ -7736,7 +7723,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro Cached images and files -@@ -924,10 +924,10 @@ Your Google account may have other forms of browsing history like searches and a +@@ -959,10 +959,10 @@ Your Google account may have other forms of browsing history like searches and a Record history even in incognito mode @@ -7749,7 +7736,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro To clear <link1>search</link1> or other forms of history, visit <link2>My Google Activity</link2> -@@ -990,7 +990,7 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1025,7 +1025,7 @@ Your Google account may have other forms of browsing history like searches and a Basic @@ -7758,7 +7745,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro Blocked site -@@ -1400,7 +1400,7 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1435,7 +1435,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> @@ -7767,7 +7754,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro Turn on Lite mode -@@ -1587,10 +1587,10 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1622,10 +1622,10 @@ Your Google account may have other forms of browsing history like searches and a Waiting for details of parents. @@ -7780,7 +7767,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro Content -@@ -1649,22 +1649,22 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1684,22 +1684,22 @@ Your Google account may have other forms of browsing history like searches and a Google Terms of Service @@ -7807,7 +7794,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro -@@ -1681,7 +1681,7 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1716,7 +1716,7 @@ Your Google account may have other forms of browsing history like searches and a Also clear your Chrome data from this device @@ -7816,7 +7803,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro Contacting Google. This may take a minute… -@@ -1826,7 +1826,7 @@ To change this setting, <resetlink>reset sync

<resetlink>reset sync

@@ -7825,7 +7812,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro <link>Get help</link> while scanning for devices… -@@ -1871,7 +1871,7 @@ To change this setting, <resetlink>reset sync

<resetlink>reset sync

@@ -7834,7 +7821,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro Unknown or unsupported device (%1$sA1:B2:C3:D4:E5:F6) -@@ -3716,7 +3716,7 @@ Data from your Incognito session will only be cleared from Chrome when you @@ -7843,7 +7830,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro No compatible devices found -@@ -3755,7 +3755,7 @@ Data from your Incognito session will only be cleared from Chrome when you @@ -7852,7 +7839,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro Got it -@@ -4019,7 +4019,7 @@ Data from your Incognito session will only be cleared from Chrome when you %1$sTanya's Pixel 2... @@ -23905,7 +23892,7 @@ diff --git a/content/browser/speech/tts_mac.mm b/content/browser/speech/tts_mac. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -6479,7 +6479,7 @@ void WebContentsImpl::RunJavaScriptDialog( +@@ -6483,7 +6483,7 @@ void WebContentsImpl::RunJavaScriptDialog( base::StringPrintf( "A different origin subframe tried to create a JavaScript " "dialog. This is no longer allowed and was blocked. See " diff --git a/build/patches/Bromite-AdBlockUpdaterService.patch b/build/patches/Bromite-AdBlockUpdaterService.patch index 0f5ac49a..48090019 100644 --- a/build/patches/Bromite-AdBlockUpdaterService.patch +++ b/build/patches/Bromite-AdBlockUpdaterService.patch @@ -242,8 +242,8 @@ diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/j + android:order="13" + android:title="@string/prefs_adblock"/> +- + ChromeAutocompleteProviderClient::GetBuiltinURLs() { - #if !defined(OS_ANDROID) - std::u16string settings(base::ASCIIToUTF16(chrome::kChromeUISettingsHost) + - u"/"); +@@ -350,6 +350,8 @@ ChromeAutocompleteProviderClient::GetBuiltinsToProvideAsUserTypes() { + #endif + builtins_to_provide.push_back( + base::ASCIIToUTF16(chrome::kChromeUIVersionURL)); + builtins_to_provide.push_back( + base::ASCIIToUTF16(chrome::kChromeUIFlagsURL)); - for (size_t i = 0; i < base::size(kChromeSettingsSubPages); i++) { - builtins.push_back(settings + - base::ASCIIToUTF16(kChromeSettingsSubPages[i])); + return builtins_to_provide; + } + -- 2.17.1 diff --git a/build/patches/Remove-signin-and-data-saver-integrations.patch b/build/patches/Remove-signin-and-data-saver-integrations.patch index 2c63f8c1..998d3931 100644 --- a/build/patches/Remove-signin-and-data-saver-integrations.patch +++ b/build/patches/Remove-signin-and-data-saver-integrations.patch @@ -45,7 +45,7 @@ ld.lld: error: undefined symbol: notifier::NotifierOptions::NotifierOptions() .../identity_disc/IdentityDiscController.java | 3 +- .../init/ChromeBrowserInitializer.java | 2 - .../init/ProcessInitializationHandler.java | 20 -- - .../chrome/browser/ntp/RecentTabsManager.java | 60 +----- + .../chrome/browser/ntp/RecentTabsManager.java | 75 +------ .../browser/ntp/RecentTabsRowAdapter.java | 6 - .../browser/omaha/RequestGenerator.java | 3 - .../PasswordManagerLauncher.java | 15 +- @@ -73,7 +73,7 @@ ld.lld: error: undefined symbol: notifier::NotifierOptions::NotifierOptions() .../signin/SystemAccountManagerDelegate.java | 35 +--- .../net/HttpNegotiateAuthenticator.java | 88 +-------- .../chromoting/base/OAuthTokenFetcher.java | 2 - - 54 files changed, 44 insertions(+), 1256 deletions(-) + 54 files changed, 45 insertions(+), 1270 deletions(-) delete mode 100644 chrome/android/java/src/org/chromium/chrome/browser/signin/SigninHelperProvider.java diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn @@ -480,7 +480,7 @@ diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/j @@ -1563,13 +1563,13 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessIni diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsManager.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsManager.java --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsManager.java -@@ -17,15 +17,11 @@ import org.chromium.chrome.browser.invalidation.SessionsInvalidationManager; +@@ -17,15 +17,10 @@ import org.chromium.chrome.browser.invalidation.SessionsInvalidationManager; import org.chromium.chrome.browser.ntp.ForeignSessionHelper.ForeignSession; import org.chromium.chrome.browser.ntp.ForeignSessionHelper.ForeignSessionTab; import org.chromium.chrome.browser.profiles.Profile; -import org.chromium.chrome.browser.signin.SigninActivityLauncherImpl; import org.chromium.chrome.browser.signin.services.IdentityServicesProvider; - import org.chromium.chrome.browser.signin.services.ProfileDataCache; +-import org.chromium.chrome.browser.signin.services.ProfileDataCache; import org.chromium.chrome.browser.signin.services.SigninManager; import org.chromium.chrome.browser.signin.services.SigninManager.SignInStateObserver; import org.chromium.chrome.browser.signin.ui.PersonalizedSigninPromoView; @@ -1579,16 +1579,18 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsM import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.ui.favicon.FaviconHelper; import org.chromium.chrome.browser.ui.favicon.FaviconHelper.FaviconImageCallback; -@@ -43,7 +39,7 @@ import java.util.List; +@@ -43,8 +38,8 @@ import java.util.List; /** * Provides the domain logic and data for RecentTabsPage and RecentTabsRowAdapter. */ -public class RecentTabsManager implements ProfileSyncService.SyncStateChangedListener, +- SignInStateObserver, ProfileDataCache.Observer, +public class RecentTabsManager implements - SignInStateObserver, ProfileDataCache.Observer, ++ SignInStateObserver, AccountsChangeObserver { /** -@@ -79,14 +75,10 @@ public class RecentTabsManager implements ProfileSyncService.SyncStateChangedLis + * Implement this to receive updates when the page contents change. +@@ -79,15 +74,9 @@ public class RecentTabsManager implements ProfileSyncService.SyncStateChangedLis private List mRecentlyClosedTabs; private RecentTabsPagePrefs mPrefs; private RecentlyClosedTabManager mRecentlyClosedTabManager; @@ -1596,40 +1598,43 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsM private UpdatedCallback mUpdatedCallback; private boolean mIsDestroyed; - private final ProfileDataCache mProfileDataCache; +- private final ProfileDataCache mProfileDataCache; - private final SigninPromoController mSigninPromoController; - @Nullable - private final ProfileSyncService mProfileSyncService; - +- /** * Create an RecentTabsManager to be used with RecentTabsPage and RecentTabsRowAdapter. -@@ -107,12 +99,8 @@ public class RecentTabsManager implements ProfileSyncService.SyncStateChangedLis + * +@@ -107,12 +96,6 @@ public class RecentTabsManager implements ProfileSyncService.SyncStateChangedLis mRecentlyClosedTabManager = sRecentlyClosedTabManagerForTests != null ? sRecentlyClosedTabManagerForTests : new RecentlyClosedBridge(profile); - mSignInManager = IdentityServicesProvider.get().getSigninManager(mProfile); - - mProfileDataCache = ProfileDataCache.createWithDefaultImageSizeAndNoBadge(context); +- +- mProfileDataCache = ProfileDataCache.createWithDefaultImageSizeAndNoBadge(context); - mSigninPromoController = new SigninPromoController( - SigninAccessPoint.RECENT_TABS, SigninActivityLauncherImpl.get()); - mProfileSyncService = ProfileSyncService.get(); mRecentlyClosedTabManager.setTabsUpdatedRunnable(() -> { updateRecentlyClosedTabs(); -@@ -133,12 +121,6 @@ public class RecentTabsManager implements ProfileSyncService.SyncStateChangedLis +@@ -133,14 +116,7 @@ public class RecentTabsManager implements ProfileSyncService.SyncStateChangedLis */ public void destroy() { mIsDestroyed = true; - if (mProfileSyncService != null) { - mProfileSyncService.removeSyncStateChangedListener(this); - } -- + - mSignInManager.removeSignInStateObserver(this); - mSignInManager = null; - - mProfileDataCache.removeObserver(this); +- +- mProfileDataCache.removeObserver(this); AccountManagerFacadeProvider.getInstance().removeObserver(this); -@@ -169,12 +151,6 @@ public class RecentTabsManager implements ProfileSyncService.SyncStateChangedLis + + mFaviconHelper.destroy(); +@@ -169,13 +145,6 @@ public class RecentTabsManager implements ProfileSyncService.SyncStateChangedLis } private void registerObservers() { @@ -1639,10 +1644,11 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsM - - mSignInManager.addSignInStateObserver(this); - - mProfileDataCache.addObserver(this); +- mProfileDataCache.addObserver(this); AccountManagerFacadeProvider.getInstance().addObserver(this); } -@@ -370,29 +346,7 @@ public class RecentTabsManager implements ProfileSyncService.SyncStateChangedLis + +@@ -370,29 +339,7 @@ public class RecentTabsManager implements ProfileSyncService.SyncStateChangedLis */ @PromoState int getPromoType() { @@ -1673,7 +1679,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsM } /** -@@ -400,13 +354,9 @@ public class RecentTabsManager implements ProfileSyncService.SyncStateChangedLis +@@ -400,13 +347,9 @@ public class RecentTabsManager implements ProfileSyncService.SyncStateChangedLis * @param view The view to be configured. */ void setupPersonalizedSigninPromo(PersonalizedSigninPromoView view) { @@ -1687,10 +1693,16 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsM } // SignInStateObserver implementation. -@@ -432,12 +382,6 @@ public class RecentTabsManager implements ProfileSyncService.SyncStateChangedLis +@@ -426,18 +369,6 @@ public class RecentTabsManager implements ProfileSyncService.SyncStateChangedLis update(); } +- // ProfileDataCache.Observer implementation. +- @Override +- public void onProfileDataUpdated(String accountEmail) { +- update(); +- } +- - // ProfileSyncService.SyncStateChangedListener implementation. - @Override - public void syncStateChanged() { diff --git a/build/patches/Replace-DoH-probe-domain-with-RIPE-domain.patch b/build/patches/Replace-DoH-probe-domain-with-RIPE-domain.patch index b0fd576c..df63a4ef 100644 --- a/build/patches/Replace-DoH-probe-domain-with-RIPE-domain.patch +++ b/build/patches/Replace-DoH-probe-domain-with-RIPE-domain.patch @@ -2,10 +2,24 @@ From: csagan5 <32685696+csagan5@users.noreply.github.com> Date: Sun, 27 Oct 2019 10:00:13 +0100 Subject: Replace DoH probe domain with RIPE domain +Replace known good hostname --- - net/dns/dns_transaction.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + chrome/browser/net/dns_probe_runner.cc | 2 +- + net/dns/dns_transaction.cc | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) +diff --git a/chrome/browser/net/dns_probe_runner.cc b/chrome/browser/net/dns_probe_runner.cc +--- a/chrome/browser/net/dns_probe_runner.cc ++++ b/chrome/browser/net/dns_probe_runner.cc +@@ -18,7 +18,7 @@ + + namespace chrome_browser_net { + +-const char DnsProbeRunner::kKnownGoodHostname[] = "google.com"; ++const char DnsProbeRunner::kKnownGoodHostname[] = "www.ripe.net"; + + namespace { + diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc --- a/net/dns/dns_transaction.cc +++ b/net/dns/dns_transaction.cc diff --git a/build/patches/Unexpire-tab-groups-flags.patch b/build/patches/Unexpire-tab-groups-flags.patch new file mode 100644 index 00000000..8144a3a2 --- /dev/null +++ b/build/patches/Unexpire-tab-groups-flags.patch @@ -0,0 +1,32 @@ +From: csagan5 <32685696+csagan5@users.noreply.github.com> +Date: Mon, 17 May 2021 22:32:36 +0200 +Subject: Unexpire tab groups flags + +--- + chrome/browser/flag-metadata.json | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json +--- a/chrome/browser/flag-metadata.json ++++ b/chrome/browser/flag-metadata.json +@@ -2509,7 +2509,7 @@ + { + "name": "enable-tab-groups", + "owners": [ "memex-team@google.com" ], +- "expiry_milestone": 90 ++ "expiry_milestone": -1 + }, + { + "name": "enable-tab-groups-continuation", +@@ -2519,7 +2519,7 @@ + { + "name": "enable-tab-groups-ui-improvements", + "owners": [ "memex-team@google.com" ], +- "expiry_milestone": 90 ++ "expiry_milestone": -1 + }, + { + "name": "enable-tab-search", +-- +2.17.1 + diff --git a/build/patches/User-agent-customization.patch b/build/patches/User-agent-customization.patch index 43b2107c..9d14579d 100644 --- a/build/patches/User-agent-customization.patch +++ b/build/patches/User-agent-customization.patch @@ -20,7 +20,7 @@ to use the flag in the hamburger menu to navigate with a custom useragent leavin .../chromium/chrome/browser/tab/TabImpl.java | 71 +++++++ .../chromium/chrome/browser/tab/TabUtils.java | 18 +- .../browser/android/content/content_utils.cc | 28 +++ - .../preferences/browser_prefs_android.cc | 6 + + .../preferences/browser_prefs_android.cc | 7 + .../privacy_preferences_manager_impl.cc | 118 +++++++++++ .../preferences/ChromePreferenceKeys.java | 7 +- .../settings/PrivacyPreferencesManager.java | 8 + @@ -35,10 +35,10 @@ to use the flag in the hamburger menu to navigate with a custom useragent leavin .../navigation_controller_android.cc | 6 +- .../navigation_controller_android.h | 3 +- .../renderer_host/render_process_host_impl.cc | 1 + - .../browser/web_contents/web_contents_impl.cc | 6 + + .../browser/web_contents/web_contents_impl.cc | 4 + .../framehost/NavigationControllerImpl.java | 6 +- content/renderer/render_thread_impl.cc | 1 - - 31 files changed, 748 insertions(+), 10 deletions(-) + 31 files changed, 747 insertions(+), 10 deletions(-) create mode 100644 chrome/android/java/res/layout/custom_useragent_preferences.xml create mode 100644 chrome/android/java/res/xml/useragent_preferences.xml create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/settings/UserAgentPreferences.java @@ -202,7 +202,7 @@ new file mode 100644 diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/java/res/xml/main_preferences.xml --- a/chrome/android/java/res/xml/main_preferences.xml +++ b/chrome/android/java/res/xml/main_preferences.xml -@@ -101,6 +101,11 @@ +@@ -96,6 +96,11 @@ android:key="content_settings" android:order="19" android:title="@string/prefs_site_settings"/> @@ -711,7 +711,14 @@ diff --git a/chrome/browser/android/content/content_utils.cc b/chrome/browser/an diff --git a/chrome/browser/android/preferences/browser_prefs_android.cc b/chrome/browser/android/preferences/browser_prefs_android.cc --- a/chrome/browser/android/preferences/browser_prefs_android.cc +++ b/chrome/browser/android/preferences/browser_prefs_android.cc -@@ -17,6 +17,12 @@ namespace android { +@@ -11,12 +11,19 @@ + #include "chrome/browser/webauthn/android/cable_module_android.h" + #include "components/pref_registry/pref_registry_syncable.h" + #include "components/prefs/pref_registry_simple.h" ++#include "chrome/common/pref_names.h" + + namespace android { + void RegisterPrefs(PrefRegistrySimple* registry) { RegisterClipboardAndroidPrefs(registry); webauthn::authenticator::RegisterLocalState(registry); @@ -1129,18 +1136,16 @@ diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser #include "base/threading/thread_task_runner_handle.h" #include "base/time/time.h" #include "base/trace_event/optional_trace_event.h" -@@ -2487,6 +2488,11 @@ const blink::web_pref::WebPreferences WebContentsImpl::ComputeWebPreferences() { +@@ -2485,6 +2486,9 @@ const blink::web_pref::WebPreferences WebContentsImpl::ComputeWebPreferences() { + !renderer_preferences_.user_agent_override.ua_metadata_override->mobile) + #endif prefs.viewport_meta_enabled = false; ++ if (!command_line.HasSwitch(switches::kDesktopModeViewportMetaEnabled)) { ++ prefs.viewport_meta_enabled = false; ++ } } -+ if (IsOverridingUserAgent() && -+ !command_line.HasSwitch(switches::kDesktopModeViewportMetaEnabled)) { -+ prefs.viewport_meta_enabled = false; -+ } -+ prefs.main_frame_resizes_are_orientation_changes = - command_line.HasSwitch(switches::kMainFrameResizesAreOrientationChanges); - diff --git a/content/public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java b/content/public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java --- a/content/public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java +++ b/content/public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java