diff --git a/build/RELEASE b/build/RELEASE index aadf4b09d..92e9d5047 100644 --- a/build/RELEASE +++ b/build/RELEASE @@ -1 +1 @@ -128.0.6613.120 \ No newline at end of file +129.0.6668.35 \ No newline at end of file diff --git a/build/cromite.gn_args b/build/cromite.gn_args index 258483e41..ed0218b62 100644 --- a/build/cromite.gn_args +++ b/build/cromite.gn_args @@ -31,7 +31,6 @@ use_sysroot=false webview_includes_weblayer=false enable_arcore=false enable_openxr=false -enable_feed_v2=false enable_cardboard=false is_high_end_android=true diff --git a/build/cromite_patches_list.txt b/build/cromite_patches_list.txt index 1c2cfc375..9c0e4a343 100644 --- a/build/cromite_patches_list.txt +++ b/build/cromite_patches_list.txt @@ -169,7 +169,6 @@ sharing-hub-always-use-visible-URL.patch Enable-HEVC-by-default.patch Partition-blobs-by-top-frame-URL.patch Override-Navigator-Language.patch -Disable-add-to-home-screen-prompt.patch Remove-HTTP-referrals-in-cross-origin-navigation.patch Enable-third-party-storage-partitioning.patch Restore-adaptive-button-in-top-toolbar-customization.patch diff --git a/build/patches/AImageReader-CFI-crash-mitigations.patch b/build/patches/AImageReader-CFI-crash-mitigations.patch index c2944cbbc..7de74ef55 100644 --- a/build/patches/AImageReader-CFI-crash-mitigations.patch +++ b/build/patches/AImageReader-CFI-crash-mitigations.patch @@ -90,7 +90,7 @@ diff --git a/base/android/android_image_reader_compat.h b/base/android/android_i 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 -@@ -3355,9 +3355,9 @@ +@@ -3406,9 +3406,9 @@ "expiry_milestone": 135 }, { @@ -121,7 +121,7 @@ new file mode 100644 diff --git a/gpu/config/gpu_driver_bug_list.json b/gpu/config/gpu_driver_bug_list.json --- a/gpu/config/gpu_driver_bug_list.json +++ b/gpu/config/gpu_driver_bug_list.json -@@ -2618,6 +2618,22 @@ +@@ -2606,6 +2606,22 @@ "no_downscaled_overlay_promotion" ] }, @@ -183,7 +183,7 @@ diff --git a/gpu/config/gpu_util.cc b/gpu/config/gpu_util.cc if (!gpu_preferences.enable_android_surface_control) return kGpuFeatureStatusDisabled; -@@ -401,6 +404,11 @@ void AdjustGpuFeatureStatusToWorkarounds(GpuFeatureInfo* gpu_feature_info, +@@ -379,6 +382,11 @@ void AdjustGpuFeatureStatusToWorkarounds(GpuFeatureInfo* gpu_feature_info, kGpuFeatureStatusSoftware; } } @@ -209,7 +209,7 @@ diff --git a/gpu/config/gpu_workaround_list.txt b/gpu/config/gpu_workaround_list diff --git a/gpu/ipc/service/gpu_init.cc b/gpu/ipc/service/gpu_init.cc --- a/gpu/ipc/service/gpu_init.cc +++ b/gpu/ipc/service/gpu_init.cc -@@ -69,6 +69,7 @@ +@@ -68,6 +68,7 @@ #if BUILDFLAG(IS_ANDROID) #include "ui/gfx/android/android_surface_control_compat.h" @@ -217,7 +217,7 @@ diff --git a/gpu/ipc/service/gpu_init.cc b/gpu/ipc/service/gpu_init.cc #endif #if BUILDFLAG(ENABLE_VULKAN) -@@ -718,6 +719,13 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line, +@@ -702,6 +703,13 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line, } #endif // BUILDFLAG(IS_WIN) diff --git a/build/patches/Add-AllowUserCertificates-flag.patch b/build/patches/Add-AllowUserCertificates-flag.patch index 267b1c033..fdfed7635 100644 --- a/build/patches/Add-AllowUserCertificates-flag.patch +++ b/build/patches/Add-AllowUserCertificates-flag.patch @@ -20,7 +20,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java -@@ -229,6 +229,7 @@ import org.chromium.content_public.browser.ScreenOrientationProvider; +@@ -232,6 +232,7 @@ import org.chromium.content_public.browser.ScreenOrientationProvider; import org.chromium.content_public.browser.SelectionPopupController; import org.chromium.content_public.browser.WebContents; import org.chromium.content_public.common.ContentSwitches; @@ -28,7 +28,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv import org.chromium.printing.PrintManagerDelegateImpl; import org.chromium.printing.PrintingController; import org.chromium.printing.PrintingControllerImpl; -@@ -1043,6 +1044,8 @@ public abstract class ChromeActivity +@@ -1053,6 +1054,8 @@ public abstract class ChromeActivity ChromeActivitySessionTracker.getInstance().onStartWithNative(getProfileProviderSupplier()); ChromeCachedFlags.getInstance().cacheNativeFlags(); @@ -40,7 +40,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc --- a/chrome/browser/flags/android/chrome_feature_list.cc +++ b/chrome/browser/flags/android/chrome_feature_list.cc -@@ -148,6 +148,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { +@@ -157,6 +157,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { &feed::kFeedPerformanceStudy, &feed::kFeedShowSignInCommand, &feed::kFeedSignedOutViewDemotion, @@ -51,7 +51,7 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java -@@ -157,6 +157,7 @@ public abstract class ChromeFeatureList { +@@ -159,6 +159,7 @@ public abstract class ChromeFeatureList { /* Alphabetical: */ public static final String ACCOUNT_REAUTHENTICATION_RECENT_TIME_WINDOW = "AccountReauthenticationRecentTimeWindow"; @@ -59,16 +59,16 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f public static final String ADAPTIVE_BUTTON_IN_TOP_TOOLBAR_TRANSLATE = "AdaptiveButtonInTopToolbarTranslate"; public static final String ADAPTIVE_BUTTON_IN_TOP_TOOLBAR_ADD_TO_BOOKMARKS = -@@ -576,6 +577,8 @@ public abstract class ChromeFeatureList { - public static final CachedFlag sAndroidTabGroupStableIds = - newCachedFlag(ANDROID_TAB_GROUP_STABLE_IDS, true); - public static final CachedFlag sAppSpecificHistory = newCachedFlag(APP_SPECIFIC_HISTORY, false); +@@ -572,6 +573,8 @@ public abstract class ChromeFeatureList { + public static final CachedFlag sAndroidTabDeclutterDedupeTabIdsKillSwitch = + newCachedFlag(ANDROID_TAB_DECLUTTER_DEDUPE_TAB_IDS_KILL_SWITCH, true); + public static final CachedFlag sAppSpecificHistory = newCachedFlag(APP_SPECIFIC_HISTORY, true); + public static final CachedFlag sAllowUserCertificates = + newCachedFlag(ALLOW_USER_CERTIFICATES, false); - public static final CachedFlag sArchiveTabService = newCachedFlag(ARCHIVE_TAB_SERVICE, false); public static final CachedFlag sAsyncNotificationManager = newCachedFlag(ASYNC_NOTIFICATION_MANAGER, false); -@@ -734,6 +737,7 @@ public abstract class ChromeFeatureList { + public static final CachedFlag sBackGestureActivityTabProvider = +@@ -725,6 +728,7 @@ public abstract class ChromeFeatureList { public static final List sFlagsCachedFullBrowserChromium = List.of( sAccountReauthenticationRecentTimeWindow, diff --git a/build/patches/Add-Alt-D-hotkey-to-focus-address-bar.patch b/build/patches/Add-Alt-D-hotkey-to-focus-address-bar.patch index da1a6026e..ec406d8a2 100644 --- a/build/patches/Add-Alt-D-hotkey-to-focus-address-bar.patch +++ b/build/patches/Add-Alt-D-hotkey-to-focus-address-bar.patch @@ -10,7 +10,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java b/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java --- a/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java -@@ -204,6 +204,8 @@ public class KeyboardShortcuts { +@@ -392,6 +392,8 @@ public class KeyboardShortcuts { R.string.keyboard_shortcut_address_bar, KeyEvent.KEYCODE_L, KeyEvent.META_CTRL_ON); diff --git a/build/patches/Add-PartialLowEndModeOnMidRangeDevices-flag.patch b/build/patches/Add-PartialLowEndModeOnMidRangeDevices-flag.patch index 7764f10d5..7e9137dee 100644 --- a/build/patches/Add-PartialLowEndModeOnMidRangeDevices-flag.patch +++ b/build/patches/Add-PartialLowEndModeOnMidRangeDevices-flag.patch @@ -15,7 +15,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/base/features.cc b/base/features.cc --- a/base/features.cc +++ b/base/features.cc -@@ -109,6 +109,10 @@ BASE_FEATURE(kPostPowerMonitorBroadcastReceiverInitToBackground, +@@ -109,6 +109,10 @@ BASE_FEATURE(kPostGetMyMemoryStateToBackground, FEATURE_DISABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_ANDROID) @@ -29,7 +29,7 @@ diff --git a/base/features.cc b/base/features.cc diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -16,6 +16,7 @@ +@@ -21,6 +21,7 @@ #include "base/base_switches.h" #include "base/command_line.h" #include "base/feature_list.h" diff --git a/build/patches/Add-a-flag-to-disable-GamePad-API.patch b/build/patches/Add-a-flag-to-disable-GamePad-API.patch index 9c23eb2bb..5dc64db20 100644 --- a/build/patches/Add-a-flag-to-disable-GamePad-API.patch +++ b/build/patches/Add-a-flag-to-disable-GamePad-API.patch @@ -14,7 +14,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html 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 -@@ -7866,9 +7866,9 @@ +@@ -7908,9 +7908,9 @@ "expiry_milestone": 130 }, { @@ -29,7 +29,7 @@ diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.js diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc -@@ -3206,7 +3206,7 @@ const char kResetShortcutCustomizationsDescription[] = +@@ -3298,7 +3298,7 @@ const char kResetShortcutCustomizationsDescription[] = const char kRestrictGamepadAccessName[] = "Restrict gamepad access"; const char kRestrictGamepadAccessDescription[] = @@ -37,7 +37,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti + "Disable the Gamepad " "API"; - const char kRoundedDisplay[] = "Rounded display"; + const char kRippleForEnhancedProtectionName[] = diff --git a/device/gamepad/public/cpp/gamepad_features.cc b/device/gamepad/public/cpp/gamepad_features.cc --- a/device/gamepad/public/cpp/gamepad_features.cc +++ b/device/gamepad/public/cpp/gamepad_features.cc diff --git a/build/patches/Add-a-proxy-configuration-page.patch b/build/patches/Add-a-proxy-configuration-page.patch index 712d04092..98066a1de 100644 --- a/build/patches/Add-a-proxy-configuration-page.patch +++ b/build/patches/Add-a-proxy-configuration-page.patch @@ -77,7 +77,7 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java --- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java -@@ -74,6 +74,7 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -73,6 +73,7 @@ public class PrivacySettings extends ChromeBaseSettingsFragment private static final String PREF_SAFE_BROWSING = "safe_browsing"; private static final String PREF_SYNC_AND_SERVICES_LINK = "sync_and_services_link"; private static final String PREF_PRIVACY_SANDBOX = "privacy_sandbox"; @@ -99,7 +99,7 @@ diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd --- a/chrome/browser/browser_resources.grd +++ b/chrome/browser/browser_resources.grd -@@ -242,6 +242,9 @@ +@@ -244,6 +244,9 @@ @@ -112,7 +112,7 @@ diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resou diff --git a/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc b/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc --- a/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc +++ b/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc -@@ -387,7 +387,7 @@ std::optional CreateProxyConfigDict( +@@ -392,7 +392,7 @@ std::optional CreateProxyConfigDict( return std::nullopt; } return ProxyConfigDictionary::CreateFixedServers(proxy_rules_string, @@ -196,16 +196,16 @@ diff --git a/chrome/browser/net/proxy_service_factory.h b/chrome/browser/net/pro diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc -@@ -200,6 +200,8 @@ +@@ -201,6 +201,8 @@ + #include "printing/buildflags/buildflags.h" #include "rlz/buildflags/buildflags.h" - #include "services/screen_ai/buildflags/buildflags.h" +#include "chrome/browser/net/proxy_service_factory.h" + #if BUILDFLAG(ENABLE_BACKGROUND_MODE) #include "chrome/browser/background/background_mode_manager.h" #endif -@@ -1465,6 +1467,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) { +@@ -1496,6 +1498,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) { component_updater::RegisterPrefs(registry); domain_reliability::RegisterPrefs(registry); embedder_support::OriginTrialPrefs::RegisterPrefs(registry); @@ -660,7 +660,7 @@ new file mode 100644 diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn -@@ -338,6 +338,8 @@ static_library("ui") { +@@ -336,6 +336,8 @@ static_library("ui") { "webui/metrics_internals/metrics_internals_ui.h", "webui/net_export_ui.cc", "webui/net_export_ui.h", @@ -672,7 +672,7 @@ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc --- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc +++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -@@ -49,6 +49,7 @@ +@@ -50,6 +50,7 @@ #include "chrome/browser/ui/webui/ntp_tiles_internals_ui.h" #include "chrome/browser/ui/webui/omnibox/omnibox_ui.h" #include "chrome/browser/ui/webui/policy/policy_ui.h" @@ -680,7 +680,7 @@ diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrom #include "chrome/browser/ui/webui/predictors/predictors_ui.h" #include "chrome/browser/ui/webui/privacy_sandbox/privacy_sandbox_internals_ui.h" #include "chrome/browser/ui/webui/segmentation_internals/segmentation_internals_ui.h" -@@ -441,6 +442,8 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, +@@ -419,6 +420,8 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, #endif // BUILDFLAG(IS_CHROMEOS_ASH) if (url.host_piece() == chrome::kChromeUINetExportHost) return &NewWebUI; @@ -1307,7 +1307,7 @@ diff --git a/components/proxy_config/proxy_config_dictionary.h b/components/prox diff --git a/components/proxy_config/proxy_policy_handler.cc b/components/proxy_config/proxy_policy_handler.cc --- a/components/proxy_config/proxy_policy_handler.cc +++ b/components/proxy_config/proxy_policy_handler.cc -@@ -376,7 +376,7 @@ void ProxyPolicyHandler::ApplyPolicySettings(const PolicyMap& policies, +@@ -381,7 +381,7 @@ void ProxyPolicyHandler::ApplyPolicySettings(const PolicyMap& policies, set_proxy_pref_value(ProxyConfigDictionary::CreateFixedServers( server->GetString(), bypass_list && bypass_list->is_string() ? bypass_list->GetString() diff --git a/build/patches/Add-an-always-incognito-mode.patch b/build/patches/Add-an-always-incognito-mode.patch index 57d638164..da4fa6fd1 100644 --- a/build/patches/Add-an-always-incognito-mode.patch +++ b/build/patches/Add-an-always-incognito-mode.patch @@ -24,11 +24,11 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../java/res/xml/incognito_preferences.xml | 37 ++++ .../java/res/xml/privacy_preferences.xml | 5 + .../AlwaysIncognitoLinkInterceptor.java | 54 ++++++ - .../chrome/browser/ChromeTabbedActivity.java | 22 ++- + .../chrome/browser/ChromeTabbedActivity.java | 26 ++- .../chrome/browser/app/ChromeActivity.java | 4 + .../AppMenuPropertiesDelegateImpl.java | 28 ++- .../ChromeContextMenuPopulator.java | 7 +- - .../CustomTabActivityLifecycleUmaTracker.java | 31 ---- + .../CustomTabActivityLifecycleUmaTracker.java | 39 ----- .../CustomTabAppMenuPropertiesDelegate.java | 4 + .../CustomTabIntentDataProvider.java | 10 ++ .../browser/download/DownloadUtils.java | 16 +- @@ -84,8 +84,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../add-an-always-incognito-mode.inc | 1 + .../add-an-always-incognito-mode.inc | 3 + .../add-an-always-incognito-mode.inc | 1 + - net/base/file_stream_context.cc | 2 +- - 66 files changed, 781 insertions(+), 102 deletions(-) + 65 files changed, 782 insertions(+), 111 deletions(-) create mode 100644 chrome/android/java/res/xml/incognito_preferences.xml create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/AlwaysIncognitoLinkInterceptor.java create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/IncognitoSettings.java @@ -98,7 +97,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_java_resources.gni --- a/chrome/android/chrome_java_resources.gni +++ b/chrome/android/chrome_java_resources.gni -@@ -632,6 +632,7 @@ chrome_java_resources = [ +@@ -635,6 +635,7 @@ chrome_java_resources = [ "java/res/xml/manage_sync_preferences.xml", "java/res/xml/personalize_google_services_preferences.xml", "java/res/xml/phone_as_a_security_key_accessory_filter.xml", @@ -117,14 +116,14 @@ diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java "java/src/com/google/android/apps/chrome/appwidget/bookmarks/BookmarkThumbnailWidgetProvider.java", "java/src/org/chromium/chrome/browser/ActivityTabProvider.java", "java/src/org/chromium/chrome/browser/ActivityUtils.java", -@@ -955,6 +956,7 @@ chrome_java_sources = [ +@@ -946,6 +947,7 @@ chrome_java_sources = [ "java/src/org/chromium/chrome/browser/privacy/settings/IncognitoLockSettings.java", "java/src/org/chromium/chrome/browser/privacy/settings/PrivacyPreferencesManagerImpl.java", "java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java", + "java/src/org/chromium/chrome/browser/privacy/settings/IncognitoSettings.java", "java/src/org/chromium/chrome/browser/privacy_sandbox/CctHandler.java", "java/src/org/chromium/chrome/browser/privacy_sandbox/ChromeTrackingProtectionDelegate.java", - "java/src/org/chromium/chrome/browser/privacy_sandbox/TrackingProtectionNoticeController.java", + "java/src/org/chromium/chrome/browser/privacy_sandbox/TrackingProtectionSnackbarController.java", diff --git a/chrome/android/java/res/xml/incognito_preferences.xml b/chrome/android/java/res/xml/incognito_preferences.xml new file mode 100644 --- /dev/null @@ -255,13 +254,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct import org.chromium.chrome.browser.IntentHandler.TabOpenType; import org.chromium.chrome.browser.app.ChromeActivity; import org.chromium.chrome.browser.app.metrics.LaunchCauseMetrics; -@@ -677,10 +681,15 @@ public class ChromeTabbedActivity extends ChromeActivity +@@ -2041,6 +2042,9 @@ public abstract class ChromeActivity throw new IllegalStateException( "Attempting to access TabCreator before initialization"); } @@ -311,8 +314,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java --- a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java -@@ -37,6 +37,8 @@ import org.chromium.base.supplier.OneshotSupplier; - import org.chromium.base.supplier.Supplier; +@@ -38,6 +38,8 @@ import org.chromium.base.supplier.Supplier; + import org.chromium.build.BuildConfig; import org.chromium.chrome.R; import org.chromium.chrome.browser.ActivityTabProvider; +import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor; @@ -320,7 +323,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/App import org.chromium.chrome.browser.bookmarks.BookmarkModel; import org.chromium.chrome.browser.bookmarks.PowerBookmarkUtils; import org.chromium.chrome.browser.commerce.ShoppingFeatures; -@@ -99,6 +101,10 @@ import java.util.ArrayList; +@@ -100,6 +102,10 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -331,7 +334,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/App /** * Base implementation of {@link AppMenuPropertiesDelegate} that handles hiding and showing menu * items based on activity state. -@@ -583,6 +589,13 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate +@@ -584,6 +590,13 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate } private void prepareCommonMenuItems(Menu menu, @MenuGroup int menuGroup, boolean isIncognito) { @@ -345,7 +348,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/App // We have to iterate all menu items since same menu item ID may be associated with more // than one menu items. boolean isOverviewModeMenu = menuGroup == MenuGroup.OVERVIEW_MODE_MENU; -@@ -646,7 +659,15 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate +@@ -647,7 +660,15 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate } if (item.getItemId() == R.id.recent_tabs_menu_id) { @@ -362,7 +365,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/App } if (item.getItemId() == R.id.menu_select_tabs) { item.setVisible(isMenuSelectTabsVisible); -@@ -859,8 +880,9 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate +@@ -860,8 +881,9 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate && !isNativePage && !isFileScheme && !isContentScheme @@ -415,15 +418,22 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/Chr diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityLifecycleUmaTracker.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityLifecycleUmaTracker.java --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityLifecycleUmaTracker.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityLifecycleUmaTracker.java -@@ -70,37 +70,6 @@ public class CustomTabActivityLifecycleUmaTracker +@@ -71,45 +71,6 @@ public class CustomTabActivityLifecycleUmaTracker private boolean mIsInitialResume = true; private void recordIncognitoLaunchReason() { -- IncognitoCustomTabIntentDataProvider incognitoProvider = -- (IncognitoCustomTabIntentDataProvider) mIntentDataProvider; +- // TODO(crbug.com/352525607): Separate Ephemeral and Incognito CCT metrics. +- @IntentHandler.IncognitoCCTCallerId int incognitoCCTCallerId; +- if (mIntentDataProvider.getCustomTabMode() == CustomTabProfileType.INCOGNITO) { +- incognitoCCTCallerId = +- ((IncognitoCustomTabIntentDataProvider) mIntentDataProvider) +- .getFeatureIdForMetricsCollection(); +- } else { +- incognitoCCTCallerId = +- ((EphemeralCustomTabIntentDataProvider) mIntentDataProvider) +- .getFeatureIdForMetricsCollection(); +- } - -- @IntentHandler.IncognitoCCTCallerId -- int incognitoCCTCallerId = incognitoProvider.getFeatureIdForMetricsCollection(); - RecordHistogram.recordEnumeratedHistogram( - "CustomTabs.IncognitoCCTCallerId", - incognitoCCTCallerId, @@ -431,7 +441,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Cust - - // Record which 1P app launched Incognito CCT. - if (incognitoCCTCallerId == IntentHandler.IncognitoCCTCallerId.GOOGLE_APPS) { -- String sendersPackageName = incognitoProvider.getSendersPackageName(); +- String sendersPackageName = mIntentDataProvider.getClientPackageName(); - @IntentHandler.ExternalAppId - int externalId = IntentHandler.mapPackageToExternalAppId(sendersPackageName); - if (externalId != IntentHandler.ExternalAppId.OTHER) { @@ -443,7 +453,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Cust - // Using package name didn't give any meaningful insight on who launched the - // Incognito CCT, falling back to check if they provided EXTRA_APPLICATION_ID. - externalId = -- IntentHandler.determineExternalIntentSource(incognitoProvider.getIntent()); +- IntentHandler.determineExternalIntentSource( +- mIntentDataProvider.getIntent()); - RecordHistogram.recordEnumeratedHistogram( - "CustomTabs.ClientAppId.Incognito", - externalId, @@ -464,7 +475,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Cust import org.chromium.chrome.browser.DefaultBrowserInfo; import org.chromium.chrome.browser.app.appmenu.AppMenuPropertiesDelegateImpl; import org.chromium.chrome.browser.app.appmenu.DividerLineMenuItemViewBinder; -@@ -218,6 +219,9 @@ public class CustomTabAppMenuPropertiesDelegate extends AppMenuPropertiesDelegat +@@ -225,6 +226,9 @@ public class CustomTabAppMenuPropertiesDelegate extends AppMenuPropertiesDelegat openInChromeItemVisible = false; tryAddingReadAloud = false; } @@ -477,9 +488,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Cust diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java -@@ -88,6 +88,9 @@ import org.chromium.components.embedder_support.util.Origin; - import org.chromium.components.embedder_support.util.UrlConstants; +@@ -88,6 +88,9 @@ import org.chromium.components.embedder_support.util.UrlConstants; import org.chromium.device.mojom.ScreenOrientationLockType; + import org.chromium.net.NetId; +import org.chromium.base.ContextUtils; +import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor; @@ -487,7 +498,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Cust import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.ArrayList; -@@ -1194,6 +1197,13 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid +@@ -1161,6 +1164,13 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid return getInitialActivityWidth() > 0; } @@ -900,7 +911,7 @@ new file mode 100644 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java -@@ -87,6 +87,7 @@ import org.chromium.chrome.browser.sync.settings.AccountManagementFragment; +@@ -86,6 +86,7 @@ import org.chromium.chrome.browser.sync.settings.AccountManagementFragment; import org.chromium.chrome.browser.sync.settings.GoogleServicesSettings; import org.chromium.chrome.browser.sync.settings.ManageSyncSettings; import org.chromium.chrome.browser.ui.device_lock.MissingDeviceLockLauncher; @@ -908,7 +919,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager; import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager.SnackbarManageable; import org.chromium.chrome.browser.ui.messages.snackbar.Snackbar; -@@ -408,6 +409,9 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity +@@ -403,6 +404,9 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity ((ChromeBaseSettingsFragment)fragment).setRequestRestartDelegate( new RequestRestartDelegate(mSnackbarManager, this)); } @@ -921,7 +932,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore/HistoricalTabModelObserver.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore/HistoricalTabModelObserver.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore/HistoricalTabModelObserver.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore/HistoricalTabModelObserver.java -@@ -22,6 +22,8 @@ import java.util.HashMap; +@@ -24,6 +24,8 @@ import java.util.HashMap; import java.util.List; import java.util.Set; @@ -930,7 +941,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore /** A tab model observer for managing bulk closures. */ public class HistoricalTabModelObserver implements TabModelObserver { private final TabGroupModelFilter mTabGroupModelFilter; -@@ -53,9 +55,10 @@ public class HistoricalTabModelObserver implements TabModelObserver { +@@ -72,9 +74,10 @@ public class HistoricalTabModelObserver implements TabModelObserver { if (tabs.isEmpty() || !canRestore) return; if (tabs.size() == 1) { @@ -945,8 +956,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore/HistoricalTabSaver.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore/HistoricalTabSaver.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore/HistoricalTabSaver.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore/HistoricalTabSaver.java -@@ -14,7 +14,7 @@ public interface HistoricalTabSaver { - * Creates a Tab entry in TabRestoreService. +@@ -32,7 +32,7 @@ public interface HistoricalTabSaver { + * * @param tab The {@link Tab} to create an entry for. */ - void createHistoricalTab(Tab tab); @@ -966,9 +977,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore /** Creates historical entries in TabRestoreService. */ @JNINamespace("historical_tab_saver") public class HistoricalTabSaverImpl implements HistoricalTabSaver { -@@ -67,10 +69,10 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { +@@ -85,10 +87,10 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { + } - // HistoricalTabSaver implementation. @Override - public void createHistoricalTab(Tab tab) { + public void createHistoricalTab(Tab tab, boolean is_always_incognito) { @@ -979,7 +990,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore } @Override -@@ -131,7 +133,7 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { +@@ -149,7 +151,7 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { // If there is only a single valid tab remaining save it individually. if (validEntries.size() == 1 && validEntries.get(0).isSingleTab()) { @@ -988,7 +999,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore return; } -@@ -172,14 +174,15 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { +@@ -190,14 +192,15 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { CollectionUtil.integerCollectionToIntArray(savedStateVersions)); } @@ -1006,16 +1017,16 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore } /** -@@ -187,7 +190,7 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { +@@ -205,7 +208,7 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { * internal Chrome scheme, about:blank, or a native page and it cannot be incognito. */ private boolean shouldSave(Tab tab) { - if (tab.isIncognito()) return false; + if (tab.isIncognito() && !AlwaysIncognitoLinkInterceptor.isAlwaysIncognito()) return false; + // Check the secondary tab model to see if the tab was moved instead of deleted. + if (tabIdExistsInSecondaryModel(tab.getId())) return false; - // {@link GURL#getScheme()} is not available in unit tests. - if (mIgnoreUrlSchemesForTesting) return true; -@@ -268,7 +271,7 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { +@@ -295,7 +298,7 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { @NativeMethods interface Natives { @@ -1027,16 +1038,16 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java -@@ -149,6 +149,8 @@ import org.chromium.ui.InsetObserver; +@@ -144,6 +144,8 @@ import org.chromium.ui.InsetObserver; import org.chromium.ui.UiUtils; import org.chromium.ui.base.ActivityWindowAndroid; import org.chromium.ui.base.DeviceFormFactor; +import org.chromium.base.ContextUtils; +import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor; import org.chromium.ui.base.IntentRequestTracker; + import org.chromium.ui.base.LocalizationUtils; import org.chromium.ui.dragdrop.DragDropGlobalState; - import org.chromium.ui.modaldialog.ModalDialogManager; -@@ -1036,7 +1038,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { +@@ -975,7 +977,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { () -> { mTabCreatorManagerSupplier .get() @@ -1059,7 +1070,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/Chrome /** This class creates various kinds of new tabs and adds them to the right {@link TabModel}. */ public class ChromeTabCreator extends TabCreator { private final Activity mActivity; -@@ -500,7 +504,6 @@ public class ChromeTabCreator extends TabCreator { +@@ -502,7 +506,6 @@ public class ChromeTabCreator extends TabCreator { // TODO(crbug.com/40691614): Clean up the launches from SearchActivity/Chrome. public Tab launchUrlFromExternalApp( LoadUrlParams loadUrlParams, String appId, boolean forceNewTab, Intent intent) { @@ -1099,7 +1110,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPer import java.io.BufferedInputStream; import java.io.ByteArrayInputStream; import java.io.DataInputStream; -@@ -766,6 +768,13 @@ public class TabPersistentStore { +@@ -777,6 +779,13 @@ public class TabPersistentStore { } } } @@ -1116,15 +1127,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPer diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java -@@ -41,6 +41,7 @@ import org.chromium.base.supplier.OneshotSupplierImpl; - import org.chromium.base.supplier.Supplier; +@@ -43,6 +43,7 @@ import org.chromium.base.supplier.Supplier; + import org.chromium.cc.input.BrowserControlsState; import org.chromium.chrome.R; import org.chromium.chrome.browser.ActivityTabProvider; +import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor; import org.chromium.chrome.browser.IntentHandler; import org.chromium.chrome.browser.app.tabmodel.TabWindowManagerSingleton; import org.chromium.chrome.browser.back_press.BackPressManager; -@@ -625,7 +626,7 @@ public class ToolbarManager +@@ -644,7 +645,7 @@ public class ToolbarManager TraceEvent.end("isOfflinePage"); return ret; } @@ -1349,9 +1360,9 @@ diff --git a/chrome/browser/content_settings/host_content_settings_map_factory.c diff --git a/chrome/browser/history/history_tab_helper.cc b/chrome/browser/history/history_tab_helper.cc --- a/chrome/browser/history/history_tab_helper.cc +++ b/chrome/browser/history/history_tab_helper.cc -@@ -40,6 +40,9 @@ - #include "chrome/browser/ui/android/tab_model/tab_model.h" - #include "chrome/browser/ui/android/tab_model/tab_model_list.h" +@@ -42,6 +42,9 @@ + #include "components/feed/core/v2/public/feed_api.h" // nogncheck + #include "components/feed/core/v2/public/feed_service.h" // nogncheck #include "content/public/browser/web_contents.h" +#include "chrome/common/pref_names.h" +#include "components/prefs/pref_registry_simple.h" @@ -1359,7 +1370,7 @@ diff --git a/chrome/browser/history/history_tab_helper.cc b/chrome/browser/histo #else #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" -@@ -458,6 +461,13 @@ void HistoryTabHelper::TitleWasSet(NavigationEntry* entry) { +@@ -457,6 +460,13 @@ void HistoryTabHelper::TitleWasSet(NavigationEntry* entry) { history::HistoryService* HistoryTabHelper::GetHistoryService() { Profile* profile = Profile::FromBrowserContext(web_contents()->GetBrowserContext()); @@ -1373,7 +1384,7 @@ diff --git a/chrome/browser/history/history_tab_helper.cc b/chrome/browser/histo if (profile->IsOffTheRecord()) return nullptr; -@@ -465,6 +475,16 @@ history::HistoryService* HistoryTabHelper::GetHistoryService() { +@@ -464,6 +474,16 @@ history::HistoryService* HistoryTabHelper::GetHistoryService() { profile, ServiceAccessType::IMPLICIT_ACCESS); } @@ -1722,7 +1733,7 @@ diff --git a/chrome/browser/offline_pages/request_coordinator_factory.h b/chrome diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc -@@ -257,6 +257,7 @@ +@@ -247,6 +247,7 @@ #if BUILDFLAG(IS_ANDROID) #include "chrome/browser/accessibility/accessibility_prefs/android/accessibility_prefs_controller.h" @@ -1730,7 +1741,7 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browse #include "chrome/browser/android/bookmarks/partner_bookmarks_shim.h" #include "chrome/browser/android/ntp/recent_tabs_page_prefs.h" #include "chrome/browser/android/oom_intervention/oom_intervention_decider.h" -@@ -1914,6 +1915,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -1950,6 +1951,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, usage_stats::UsageStatsBridge::RegisterProfilePrefs(registry); variations::VariationsService::RegisterProfilePrefs(registry); webapps::InstallPromptPrefs::RegisterProfilePrefs(registry); @@ -1816,7 +1827,7 @@ diff --git a/chrome/browser/ui/android/native_page/java/src/org/chromium/chrome/ /** An interface for pages that will be using Android views instead of html/rendered Web content. */ public interface NativePage { -@@ -158,7 +160,8 @@ public interface NativePage { +@@ -166,7 +168,8 @@ public interface NativePage { */ static boolean isNativePageUrl(GURL url, boolean isIncognito, boolean hasPdfDownload) { return url != null @@ -1826,7 +1837,7 @@ diff --git a/chrome/browser/ui/android/native_page/java/src/org/chromium/chrome/ } /** -@@ -168,7 +171,7 @@ public interface NativePage { +@@ -176,7 +179,7 @@ public interface NativePage { * not have chrome or chrome-native scheme. */ static boolean isChromePageUrl(GURL url, boolean isIncognito) { @@ -1835,7 +1846,7 @@ diff --git a/chrome/browser/ui/android/native_page/java/src/org/chromium/chrome/ } /** -@@ -180,11 +183,12 @@ public interface NativePage { +@@ -188,11 +191,12 @@ public interface NativePage { */ // TODO(crbug.com/40549331) - Convert to using GURL. static @NativePageType int nativePageType( @@ -1850,7 +1861,7 @@ diff --git a/chrome/browser/ui/android/native_page/java/src/org/chromium/chrome/ } /** -@@ -195,7 +199,8 @@ public interface NativePage { +@@ -203,7 +207,8 @@ public interface NativePage { * @return Type of the native page defined in {@link NativePageType}. */ private static @NativePageType int nativePageType( @@ -1860,7 +1871,7 @@ diff --git a/chrome/browser/ui/android/native_page/java/src/org/chromium/chrome/ if (hasPdfDownload) { // For navigation with associated pdf download (e.g. open a pdf link), pdf page should // be created. -@@ -213,7 +218,7 @@ public interface NativePage { +@@ -221,7 +226,7 @@ public interface NativePage { // created after the pdf document is re-downloaded in other parts of the code. return NativePageType.NONE; } else { @@ -1869,7 +1880,7 @@ diff --git a/chrome/browser/ui/android/native_page/java/src/org/chromium/chrome/ } } -@@ -225,7 +230,7 @@ public interface NativePage { +@@ -233,7 +238,7 @@ public interface NativePage { * which do not have chrome or chrome-native scheme. */ private static @NativePageType int chromePageType( @@ -1878,7 +1889,7 @@ diff --git a/chrome/browser/ui/android/native_page/java/src/org/chromium/chrome/ String host = url.getHost(); String scheme = url.getScheme(); if (!UrlConstants.CHROME_NATIVE_SCHEME.equals(scheme) -@@ -245,7 +250,8 @@ public interface NativePage { +@@ -253,7 +258,8 @@ public interface NativePage { return NativePageType.DOWNLOADS; } else if (UrlConstants.HISTORY_HOST.equals(host)) { return NativePageType.HISTORY; @@ -1891,7 +1902,7 @@ diff --git a/chrome/browser/ui/android/native_page/java/src/org/chromium/chrome/ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd -@@ -1305,6 +1305,31 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1344,6 +1344,31 @@ Your Google account may have other forms of browsing history like searches and a Deletes history from all synced devices @@ -1926,7 +1937,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/LocationBarModel.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/LocationBarModel.java --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/LocationBarModel.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/LocationBarModel.java -@@ -159,6 +159,7 @@ public class LocationBarModel implements ToolbarDataProvider, LocationBarDataPro +@@ -161,6 +161,7 @@ public class LocationBarModel implements ToolbarDataProvider, LocationBarDataPro protected String mFormattedFullUrl; protected String mUrlForDisplay; private boolean mOmniboxUpdatedConnectionSecurityIndicatorsEnabled; @@ -1934,7 +1945,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow // notifyUrlChanged and notifySecurityStateChanged are usually called 3 times across a same // document navigation. The first call is usually necessary, which updates the UrlBar to reflect -@@ -182,7 +183,9 @@ public class LocationBarModel implements ToolbarDataProvider, LocationBarDataPro +@@ -184,7 +185,9 @@ public class LocationBarModel implements ToolbarDataProvider, LocationBarDataPro Context context, NewTabPageDelegate newTabPageDelegate, @NonNull UrlFormatter urlFormatter, @@ -1991,7 +2002,7 @@ new file mode 100644 diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h --- a/chrome/common/pref_names.h +++ b/chrome/common/pref_names.h -@@ -4142,6 +4142,12 @@ inline constexpr char kOutOfProcessSystemDnsResolutionEnabled[] = +@@ -4187,6 +4187,12 @@ inline constexpr char kOutOfProcessSystemDnsResolutionEnabled[] = "net.out_of_process_system_dns_resolution_enabled"; #endif // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) @@ -2188,16 +2199,4 @@ new file mode 100644 +++ b/cromite_flags/components/offline_pages/core/offline_page_feature_h/add-an-always-incognito-mode.inc @@ -0,0 +1 @@ +BASE_DECLARE_FEATURE(kOfflinePagesAutoSaveFeature); -diff --git a/net/base/file_stream_context.cc b/net/base/file_stream_context.cc ---- a/net/base/file_stream_context.cc -+++ b/net/base/file_stream_context.cc -@@ -171,7 +171,7 @@ FileStream::Context::OpenResult FileStream::Context::OpenFileImpl( - #if BUILDFLAG(IS_ANDROID) - if (path.IsContentUri()) { - // Check that only Read flags are set. -- DCHECK_EQ(open_flags & ~base::File::FLAG_ASYNC, -+ DCHECK_EQ(open_flags & ~base::File::FLAG_ASYNC & ~base::File::FLAG_WIN_EXCLUSIVE_READ, - base::File::FLAG_OPEN | base::File::FLAG_READ); - file = base::OpenContentUriForRead(path); - } else { -- diff --git a/build/patches/Add-autoplay-site-setting.patch b/build/patches/Add-autoplay-site-setting.patch index 4cda1d334..90f82c574 100644 --- a/build/patches/Add-autoplay-site-setting.patch +++ b/build/patches/Add-autoplay-site-setting.patch @@ -291,15 +291,15 @@ diff --git a/components/content_settings/core/browser/content_settings_registry. diff --git a/third_party/blink/renderer/core/html/media/autoplay_policy.cc b/third_party/blink/renderer/core/html/media/autoplay_policy.cc --- a/third_party/blink/renderer/core/html/media/autoplay_policy.cc +++ b/third_party/blink/renderer/core/html/media/autoplay_policy.cc -@@ -8,6 +8,7 @@ - #include "third_party/blink/public/mojom/autoplay/autoplay.mojom-blink.h" +@@ -9,6 +9,7 @@ + #include "third_party/blink/public/mojom/frame/lifecycle.mojom-blink.h" #include "third_party/blink/public/mojom/permissions_policy/permissions_policy.mojom-blink.h" #include "third_party/blink/public/mojom/webpreferences/web_preferences.mojom-blink.h" +#include "third_party/blink/public/platform/web_content_settings_client.h" #include "third_party/blink/public/platform/web_media_player.h" #include "third_party/blink/public/web/web_local_frame.h" #include "third_party/blink/public/web/web_local_frame_client.h" -@@ -331,6 +332,8 @@ void AutoplayPolicy::TryUnlockingUserGesture() { +@@ -338,6 +339,8 @@ void AutoplayPolicy::TryUnlockingUserGesture() { } bool AutoplayPolicy::IsGestureNeededForPlayback() const { @@ -308,7 +308,7 @@ diff --git a/third_party/blink/renderer/core/html/media/autoplay_policy.cc b/thi if (!IsLockedPendingUserGesture()) return false; -@@ -429,6 +432,17 @@ void AutoplayPolicy::MaybeSetAutoplayInitiated() { +@@ -450,6 +453,17 @@ void AutoplayPolicy::MaybeSetAutoplayInitiated() { } } @@ -329,7 +329,7 @@ diff --git a/third_party/blink/renderer/core/html/media/autoplay_policy.cc b/thi diff --git a/third_party/blink/renderer/core/html/media/autoplay_policy.h b/third_party/blink/renderer/core/html/media/autoplay_policy.h --- a/third_party/blink/renderer/core/html/media/autoplay_policy.h +++ b/third_party/blink/renderer/core/html/media/autoplay_policy.h -@@ -142,6 +142,10 @@ class CORE_EXPORT AutoplayPolicy final +@@ -151,6 +151,10 @@ class CORE_EXPORT AutoplayPolicy final // should use, if checking to see if an action is allowed. bool IsLockedPendingUserGesture() const; diff --git a/build/patches/Add-bookmark-import-export-actions.patch b/build/patches/Add-bookmark-import-export-actions.patch index 88987207a..5ec27e459 100644 --- a/build/patches/Add-bookmark-import-export-actions.patch +++ b/build/patches/Add-bookmark-import-export-actions.patch @@ -814,7 +814,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/Nat diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -201,6 +201,8 @@ static_library("browser") { +@@ -200,6 +200,8 @@ static_library("browser") { "bluetooth/chrome_bluetooth_delegate_impl_client.h", "bookmarks/bookmark_model_factory.cc", "bookmarks/bookmark_model_factory.h", @@ -823,9 +823,9 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn "bookmarks/chrome_bookmark_client.cc", "bookmarks/chrome_bookmark_client.h", "bookmarks/managed_bookmark_service_factory.cc", -@@ -1958,6 +1960,13 @@ static_library("browser") { - ] - } +@@ -1785,6 +1787,13 @@ static_library("browser") { + "webid/identity_provider_permission_request.h", + ] + if (is_android) { + sources += [ @@ -837,10 +837,10 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn configs += [ "//build/config/compiler:wexit_time_destructors", "//build/config:precompiled_headers", -@@ -3727,8 +3736,6 @@ static_library("browser") { - "badging/badge_manager_factory.h", - "banners/app_banner_manager_desktop.cc", - "banners/app_banner_manager_desktop.h", +@@ -3476,8 +3485,6 @@ static_library("browser") { + "bookmarks/bookmark_expanded_state_tracker.h", + "bookmarks/bookmark_expanded_state_tracker_factory.cc", + "bookmarks/bookmark_expanded_state_tracker_factory.h", - "bookmarks/bookmark_html_writer.cc", - "bookmarks/bookmark_html_writer.h", "bookmarks/url_and_id.h", @@ -849,7 +849,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browser/bookmarks/android/bookmark_bridge.cc --- a/chrome/browser/bookmarks/android/bookmark_bridge.cc +++ b/chrome/browser/bookmarks/android/bookmark_bridge.cc -@@ -59,6 +59,28 @@ +@@ -64,6 +64,28 @@ #include "content/public/browser/web_contents.h" #include "url/gurl.h" @@ -878,7 +878,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse // Must come after all headers that specialize FromJniType() / ToJniType(). #include "chrome/android/chrome_jni_headers/BookmarkBridge_jni.h" -@@ -77,12 +99,97 @@ using bookmarks::android::JavaBookmarkIdGetType; +@@ -82,12 +104,97 @@ using bookmarks::android::JavaBookmarkIdGetType; using content::BrowserThread; using power_bookmarks::PowerBookmarkMeta; @@ -976,7 +976,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse class BookmarkTitleComparer { public: explicit BookmarkTitleComparer(BookmarkBridge* bookmark_bridge, -@@ -223,6 +330,10 @@ BookmarkBridge::~BookmarkBridge() { +@@ -228,6 +335,10 @@ BookmarkBridge::~BookmarkBridge() { partner_bookmarks_shim_observation_.Reset(); bookmark_model_observation_.Reset(); profile_observation_.Reset(); @@ -987,7 +987,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse } void BookmarkBridge::Destroy(JNIEnv* env) { -@@ -762,6 +873,177 @@ jint BookmarkBridge::GetTotalBookmarkCount( +@@ -767,6 +878,177 @@ jint BookmarkBridge::GetTotalBookmarkCount( return count; } @@ -1080,7 +1080,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse +const std::string BookmarkBridge::FileSelectedImpl(const base::FilePath& path) { + base::File file; + if (path.IsContentUri()) { -+ file = base::OpenContentUriForRead(path); ++ file = base::OpenContentUri(path, base::File::FLAG_OPEN | base::File::FLAG_READ); + } else { + file.Initialize(path, base::File::FLAG_OPEN | base::File::FLAG_READ); + } @@ -1359,10 +1359,10 @@ diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browse diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc --- a/chrome/browser/flags/android/chrome_feature_list.cc +++ b/chrome/browser/flags/android/chrome_feature_list.cc -@@ -192,6 +192,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { +@@ -200,6 +200,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { &kCacheActivityTaskID, &kCastDeviceFilter, - &kCCTAuthView, + &kCCTAuthTab, + &kBookmarksExportUseSaf, &kCCTBeforeUnload, &kCCTClientDataHeader, @@ -1370,7 +1370,7 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java -@@ -538,6 +538,7 @@ public abstract class ChromeFeatureList { +@@ -530,6 +530,7 @@ public abstract class ChromeFeatureList { public static final String VERTICAL_AUTOMOTIVE_BACK_BUTTON_TOOLBAR = "VerticalAutomotiveBackButtonToolbar"; public static final String VISITED_URL_RANKING_SERVICE = "VisitedURLRankingService"; @@ -1433,7 +1433,7 @@ diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/bro /** Whether Chrome is set as the default browser. Default value is false. */ public static final String CHROME_DEFAULT_BROWSER = "applink.chrome_default_browser"; -@@ -914,6 +916,7 @@ public final class ChromePreferenceKeys { +@@ -920,6 +922,7 @@ public final class ChromePreferenceKeys { AUTOFILL_ASSISTANT_PROACTIVE_HELP_ENABLED, APP_LAUNCH_LAST_KNOWN_ACTIVE_TAB_STATE, APP_LAUNCH_SEARCH_ENGINE_HAD_LOGO, @@ -1472,7 +1472,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn --- a/chrome/common/BUILD.gn +++ b/chrome/common/BUILD.gn -@@ -402,6 +402,9 @@ static_library("common_lib") { +@@ -355,6 +355,9 @@ static_library("common_lib") { sources += [ "media/chrome_media_drm_bridge_client.cc", "media/chrome_media_drm_bridge_client.h", @@ -1494,7 +1494,7 @@ diff --git a/chrome/utility/BUILD.gn b/chrome/utility/BUILD.gn "importer/bookmarks_file_importer.cc", "importer/bookmarks_file_importer.h", "importer/external_process_importer_bridge.cc", -@@ -228,6 +226,11 @@ static_library("utility") { +@@ -225,6 +223,11 @@ static_library("utility") { ] } @@ -1672,7 +1672,7 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java b/ui private static final String AUDIO_TYPE = "audio"; private static final String ALL_TYPES = "*/*"; -@@ -306,6 +308,11 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick +@@ -307,6 +309,11 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick ResettersForTesting.register(() -> mFileTypes = oldValue); } @@ -1683,8 +1683,8 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java b/ui + /** * Creates and starts an intent based on the passed fileTypes and capture value. - * @param fileTypes MIME types requested (i.e. "image/*") -@@ -332,7 +339,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick + * +@@ -343,7 +350,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick List missingPermissions = new ArrayList<>(); String storagePermission = Manifest.permission.READ_EXTERNAL_STORAGE; boolean shouldUsePhotoPicker = shouldUsePhotoPicker(); @@ -1693,7 +1693,7 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java b/ui // The permission scenario for accessing media has evolved a bit over the years: // Early on, READ_EXTERNAL_STORAGE was required to access media, but that permission was // later deprecated. In its place (starting with Android T) READ_MEDIA_IMAGES and -@@ -385,7 +392,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick +@@ -396,7 +403,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick // TODO(finnur): Remove once we figure out the cause of // crbug.com/950024. @@ -1702,7 +1702,7 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java b/ui if (permissions.length != requestPermissions.length) { throw new RuntimeException( String.format( -@@ -402,7 +409,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick +@@ -413,7 +420,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick } } @@ -1711,7 +1711,7 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java b/ui if (permissions[i].equals(storagePermission) || permissions[i].equals( Manifest.permission.READ_MEDIA_IMAGES) -@@ -685,6 +692,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick +@@ -701,6 +708,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick } if (!mimeTypes.contains(mimeType)) mimeTypes.add(mimeType); } @@ -1719,7 +1719,7 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java b/ui return mimeTypes; } -@@ -1034,6 +1042,10 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick +@@ -1062,6 +1070,10 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick return countAcceptTypesFor(superType) == mFileTypes.size(); } @@ -1746,7 +1746,7 @@ diff --git a/ui/android/java/strings/android_ui_strings.grd b/ui/android/java/st diff --git a/ui/shell_dialogs/select_file_dialog.h b/ui/shell_dialogs/select_file_dialog.h --- a/ui/shell_dialogs/select_file_dialog.h +++ b/ui/shell_dialogs/select_file_dialog.h -@@ -220,6 +220,8 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog +@@ -224,6 +224,8 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog const GURL* caller = nullptr); bool HasMultipleFileTypeChoices(); @@ -1758,8 +1758,8 @@ diff --git a/ui/shell_dialogs/select_file_dialog.h b/ui/shell_dialogs/select_fil diff --git a/ui/shell_dialogs/select_file_dialog_android.cc b/ui/shell_dialogs/select_file_dialog_android.cc --- a/ui/shell_dialogs/select_file_dialog_android.cc +++ b/ui/shell_dialogs/select_file_dialog_android.cc -@@ -129,6 +129,12 @@ void SelectFileDialogImpl::SelectFileImpl( - owning_window->GetJavaObject()); +@@ -160,6 +160,12 @@ void SelectFileDialogImpl::SelectFileImpl( + accept_multiple_files, owning_window->GetJavaObject()); } +void SelectFileDialogImpl::ShowToast(const std::string& message) { @@ -1774,7 +1774,7 @@ diff --git a/ui/shell_dialogs/select_file_dialog_android.cc b/ui/shell_dialogs/s diff --git a/ui/shell_dialogs/select_file_dialog_android.h b/ui/shell_dialogs/select_file_dialog_android.h --- a/ui/shell_dialogs/select_file_dialog_android.h +++ b/ui/shell_dialogs/select_file_dialog_android.h -@@ -52,6 +52,8 @@ class SelectFileDialogImpl : public SelectFileDialog { +@@ -53,6 +53,8 @@ class SelectFileDialogImpl : public SelectFileDialog { gfx::NativeWindow owning_window, const GURL* caller) override; diff --git a/build/patches/Add-cromite-flags-support.patch b/build/patches/Add-cromite-flags-support.patch index 08bc9137c..6f5fba89e 100644 --- a/build/patches/Add-cromite-flags-support.patch +++ b/build/patches/Add-cromite-flags-support.patch @@ -26,7 +26,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../privacy/settings/PrivacySettings.java | 2 +- .../browser/settings/SettingsActivity.java | 36 ++++ chrome/browser/about_flags.cc | 11 ++ - chrome/browser/browser_features.cc | 1 + + chrome/browser/browser_features.cc | 2 + chrome/browser/flags/BUILD.gn | 13 ++ .../flags/android/chrome_feature_list.cc | 1 + .../flags/android/chrome_feature_list.h | 1 + @@ -96,7 +96,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html third_party/blink/public/common/features.h | 1 + ui/base/ui_base_features.cc | 1 + ui/base/ui_base_features.h | 1 + - 83 files changed, 770 insertions(+), 20 deletions(-) + 83 files changed, 771 insertions(+), 20 deletions(-) create mode 100644 chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/cromite/include_all_directory.java create mode 100644 chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/cromite/java_template/CromiteCachedFlag.java.tmpl create mode 100644 chrome/browser/ui/android/strings/cromite_android_chrome_strings_grd/Add-cromite-flags-support.grdp @@ -141,7 +141,7 @@ diff --git a/base/BUILD.gn b/base/BUILD.gn sources = [ "allocator/allocator_check.cc", "allocator/allocator_check.h", -@@ -1050,7 +1052,7 @@ component("base") { +@@ -1048,7 +1050,7 @@ component("base") { "//build/config/compiler:wglobal_constructors", ] @@ -293,7 +293,7 @@ diff --git a/base/feature_list.cc b/base/feature_list.cc diff --git a/base/feature_list.h b/base/feature_list.h --- a/base/feature_list.h +++ b/base/feature_list.h -@@ -108,8 +108,10 @@ enum class FeatureMacroHandshake { kSecret }; +@@ -153,8 +153,10 @@ enum class FeatureMacroHandshake { kSecret }; struct BASE_EXPORT LOGICALLY_CONST Feature { constexpr Feature(const char* name, FeatureState default_state, @@ -306,7 +306,7 @@ diff --git a/base/feature_list.h b/base/feature_list.h #if BUILDFLAG(ENABLE_BANNED_BASE_FEATURE_PREFIX) if (std::string_view(name).find(BUILDFLAG(BANNED_BASE_FEATURE_PREFIX)) == 0) { -@@ -136,6 +138,9 @@ struct BASE_EXPORT LOGICALLY_CONST Feature { +@@ -181,6 +183,9 @@ struct BASE_EXPORT LOGICALLY_CONST Feature { // command line switch. const FeatureState default_state; @@ -316,7 +316,7 @@ diff --git a/base/feature_list.h b/base/feature_list.h private: friend class FeatureList; -@@ -411,6 +416,11 @@ class BASE_EXPORT FeatureList { +@@ -456,6 +461,11 @@ class BASE_EXPORT FeatureList { // instance, which is checked in builds with DCHECKs enabled. static bool IsEnabled(const Feature& feature); @@ -328,7 +328,7 @@ diff --git a/base/feature_list.h b/base/feature_list.h // Some characters are not allowed to appear in feature names or the // associated field trial names, as they are used as special characters for // command-line serialization. This function checks that the strings are ASCII -@@ -676,4 +686,62 @@ class BASE_EXPORT FeatureList { +@@ -721,4 +731,62 @@ class BASE_EXPORT FeatureList { } // namespace base @@ -455,7 +455,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/s @@ -16,6 +16,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.image_descriptions.ImageDescriptionsController; import org.chromium.chrome.browser.preferences.Pref; - import org.chromium.chrome.browser.settings.SettingsLauncherImpl; + import org.chromium.chrome.browser.settings.SettingsLauncherFactory; +import org.chromium.chrome.browser.settings.ChromeBaseSettingsFragment; import org.chromium.components.browser_ui.accessibility.AccessibilitySettingsDelegate; import org.chromium.components.browser_ui.accessibility.FontSizePrefs; @@ -493,8 +493,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/homepage/settin diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java --- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java -@@ -78,7 +78,7 @@ public class PrivacySettings extends ChromeBaseSettingsFragment - private SettingsLauncher mSettingsLauncher; +@@ -76,7 +76,7 @@ public class PrivacySettings extends ChromeBaseSettingsFragment + private IncognitoLockSettings mIncognitoLockSettings; @Override - public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { @@ -513,7 +513,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin import android.annotation.SuppressLint; import android.content.Context; import android.content.Intent; -@@ -88,6 +89,7 @@ import org.chromium.chrome.browser.sync.settings.ManageSyncSettings; +@@ -87,6 +88,7 @@ import org.chromium.chrome.browser.sync.settings.ManageSyncSettings; import org.chromium.chrome.browser.ui.device_lock.MissingDeviceLockLauncher; import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager; import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager.SnackbarManageable; @@ -521,7 +521,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin import org.chromium.components.browser_ui.bottomsheet.BottomSheetController; import org.chromium.components.browser_ui.bottomsheet.BottomSheetControllerFactory; import org.chromium.components.browser_ui.bottomsheet.ManagedBottomSheetController; -@@ -128,6 +130,36 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity +@@ -126,6 +128,36 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity implements PreferenceFragmentCompat.OnPreferenceStartFragmentCallback, SnackbarManageable, DisplayStyleObserver { @@ -558,7 +558,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin @VisibleForTesting(otherwise = VisibleForTesting.PACKAGE_PRIVATE) public static final String EXTRA_SHOW_FRAGMENT = "show_fragment"; -@@ -371,6 +403,10 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity +@@ -366,6 +398,10 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity ((PrivacySandboxSettingsBaseFragment) fragment) .setSnackbarManager(getSnackbarManager()); } @@ -572,7 +572,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -375,6 +375,10 @@ using flags_ui::kOsLinux; +@@ -382,6 +382,10 @@ using flags_ui::kOsLinux; using flags_ui::kOsMac; using flags_ui::kOsWin; @@ -583,9 +583,9 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc namespace about_flags { namespace { -@@ -4162,6 +4166,10 @@ const FeatureEntry::FeatureVariation +@@ -4192,6 +4196,10 @@ const FeatureEntry::FeatureVariation + std::size(kSecurePaymentConfirmationNetworkAndIssuerIcons_Rows), nullptr}}; - #endif // BUILDFLAG(ENABLE_EXTENSIONS) +#define FEATURE_PARAM_SECTION +#include "cromite_flags/chrome_browser_about_flags_cc.inc" @@ -594,7 +594,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc // RECORDING USER METRICS FOR FLAGS: // ----------------------------------------------------------------------------- // The first line of the entry is the internal name. -@@ -4188,6 +4196,9 @@ const FeatureEntry::FeatureVariation +@@ -4218,6 +4226,9 @@ const FeatureEntry::FeatureVariation const FeatureEntry kFeatureEntries[] = { // Include generated flags for flag unexpiry; see //docs/flag_expiry.md and // //tools/flags/generate_unexpire_flags.py. @@ -607,10 +607,11 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc diff --git a/chrome/browser/browser_features.cc b/chrome/browser/browser_features.cc --- a/chrome/browser/browser_features.cc +++ b/chrome/browser/browser_features.cc -@@ -378,4 +378,5 @@ BASE_FEATURE(kBrowserDynamicCodeDisabled, - base::FEATURE_DISABLED_BY_DEFAULT); - #endif // BUILDFLAG(IS_WIN) - +@@ -410,4 +410,6 @@ BASE_FEATURE(kReportPakFileIntegrity, + BASE_FEATURE(kRemovalOfIWAsFromTabCapture, + "RemovalOfIWAsFromTabCapture", + base::FEATURE_ENABLED_BY_DEFAULT); ++ +#include "cromite_flags/chrome_browser_browser_features_cc.inc" } // namespace features diff --git a/chrome/browser/flags/BUILD.gn b/chrome/browser/flags/BUILD.gn @@ -655,7 +656,7 @@ diff --git a/chrome/browser/flags/BUILD.gn b/chrome/browser/flags/BUILD.gn diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc --- a/chrome/browser/flags/android/chrome_feature_list.cc +++ b/chrome/browser/flags/android/chrome_feature_list.cc -@@ -1052,5 +1052,6 @@ BASE_FEATURE(kWebApkAllowIconUpdate, +@@ -1050,5 +1050,6 @@ BASE_FEATURE(kWebApkAllowIconUpdate, "WebApkAllowIconUpdate", base::FEATURE_DISABLED_BY_DEFAULT); @@ -665,7 +666,7 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse diff --git a/chrome/browser/flags/android/chrome_feature_list.h b/chrome/browser/flags/android/chrome_feature_list.h --- a/chrome/browser/flags/android/chrome_feature_list.h +++ b/chrome/browser/flags/android/chrome_feature_list.h -@@ -204,6 +204,7 @@ constexpr base::FeatureParam kQuickDeleteAndroidSurveyTriggerId( +@@ -208,6 +208,7 @@ constexpr base::FeatureParam kQuickDeleteAndroidSurveyTriggerId( "trigger_id", /*default_value=*/""); @@ -676,7 +677,7 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.h b/chrome/browser diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java -@@ -15,6 +15,10 @@ import org.chromium.base.cached_flags.DoubleCachedFieldTrialParameter; +@@ -16,6 +16,10 @@ import org.chromium.base.cached_flags.DoubleCachedFieldTrialParameter; import org.chromium.base.cached_flags.IntCachedFieldTrialParameter; import org.chromium.base.cached_flags.StringCachedFieldTrialParameter; @@ -687,7 +688,7 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f import java.util.List; import java.util.Map; -@@ -721,7 +725,7 @@ public abstract class ChromeFeatureList { +@@ -712,7 +716,7 @@ public abstract class ChromeFeatureList { public static final CachedFlag sWebApkMinShellApkVersion = newCachedFlag(WEB_APK_MIN_SHELL_APK_VERSION, true); @@ -696,7 +697,7 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f List.of( sAccountReauthenticationRecentTimeWindow, sAndroidAppIntegration, -@@ -817,6 +821,13 @@ public abstract class ChromeFeatureList { +@@ -805,6 +809,13 @@ public abstract class ChromeFeatureList { sVerticalAutomotiveBackButtonToolbar, sWebApkMinShellApkVersion); @@ -771,9 +772,9 @@ new file mode 100644 diff --git a/chrome/browser/settings/BUILD.gn b/chrome/browser/settings/BUILD.gn --- a/chrome/browser/settings/BUILD.gn +++ b/chrome/browser/settings/BUILD.gn -@@ -32,6 +32,7 @@ android_library("java") { - deps = [ +@@ -35,6 +35,7 @@ android_library("java") { "//base:base_java", + "//chrome/browser/feedback/android:factory_java", "//chrome/browser/feedback/android:java", + "//chrome/browser/flags:java", "//chrome/browser/preferences:java", @@ -782,8 +783,8 @@ diff --git a/chrome/browser/settings/BUILD.gn b/chrome/browser/settings/BUILD.gn diff --git a/chrome/browser/settings/android/java/src/org/chromium/chrome/browser/settings/ChromeBaseSettingsFragment.java b/chrome/browser/settings/android/java/src/org/chromium/chrome/browser/settings/ChromeBaseSettingsFragment.java --- a/chrome/browser/settings/android/java/src/org/chromium/chrome/browser/settings/ChromeBaseSettingsFragment.java +++ b/chrome/browser/settings/android/java/src/org/chromium/chrome/browser/settings/ChromeBaseSettingsFragment.java -@@ -11,6 +11,12 @@ import org.chromium.chrome.browser.feedback.FragmentHelpAndFeedbackLauncher; - import org.chromium.chrome.browser.feedback.HelpAndFeedbackLauncher; +@@ -11,6 +11,12 @@ import org.chromium.chrome.browser.feedback.HelpAndFeedbackLauncher; + import org.chromium.chrome.browser.feedback.HelpAndFeedbackLauncherFactory; import org.chromium.chrome.browser.profiles.Profile; +import android.os.Bundle; @@ -795,9 +796,9 @@ diff --git a/chrome/browser/settings/android/java/src/org/chromium/chrome/browse /** * Base class for settings in Chrome. * -@@ -22,6 +28,47 @@ public abstract class ChromeBaseSettingsFragment extends PreferenceFragmentCompa +@@ -21,6 +27,47 @@ public abstract class ChromeBaseSettingsFragment extends PreferenceFragmentCompa + implements ProfileDependentSetting { private Profile mProfile; - private HelpAndFeedbackLauncher mHelpAndFeedbackLauncher; + private RequireRestartDelegate mRequireRestartDelegate; + @@ -840,9 +841,9 @@ diff --git a/chrome/browser/settings/android/java/src/org/chromium/chrome/browse + } + } + - /** @return The profile associated with the current Settings screen. */ - public Profile getProfile() { - assert mProfile != null : "Attempting to use the profile before initialization."; + /** + * @return The profile associated with the current Settings screen. + */ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd @@ -877,16 +878,16 @@ new file mode 100644 diff --git a/chrome/browser/ui/ui_features.cc b/chrome/browser/ui/ui_features.cc --- a/chrome/browser/ui/ui_features.cc +++ b/chrome/browser/ui/ui_features.cc -@@ -463,4 +463,5 @@ BASE_FEATURE(kUsePortalAccentColor, - base::FEATURE_ENABLED_BY_DEFAULT); - #endif +@@ -477,4 +477,5 @@ BASE_FEATURE(kUsePortalAccentColor, + + BASE_FEATURE(kCompactMode, "CompactMode", base::FEATURE_DISABLED_BY_DEFAULT); +#include "cromite_flags/chrome_browser_ui_ui_features_cc.inc" } // namespace features 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 -@@ -1744,4 +1744,5 @@ BASE_FEATURE(kPeriodicLogUploadMigration, +@@ -1760,4 +1760,5 @@ BASE_FEATURE(kPeriodicLogUploadMigration, base::FEATURE_DISABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_CHROMEOS_ASH) @@ -993,7 +994,7 @@ new file mode 100644 diff --git a/components/flags_ui/flags_state.cc b/components/flags_ui/flags_state.cc --- a/components/flags_ui/flags_state.cc +++ b/components/flags_ui/flags_state.cc -@@ -360,6 +360,21 @@ void FlagsState::GetSwitchesAndFeaturesFromFlags( +@@ -365,6 +365,21 @@ void FlagsState::GetSwitchesAndFeaturesFromFlags( for (const std::string& entry_name : enabled_entries) { const auto& entry_it = name_to_switch_map.find(entry_name); @@ -1015,7 +1016,7 @@ diff --git a/components/flags_ui/flags_state.cc b/components/flags_ui/flags_stat CHECK(entry_it != name_to_switch_map.end(), base::NotFatalUntil::M130); const SwitchEntry& entry = entry_it->second; -@@ -677,6 +692,27 @@ void FlagsState::GetFlagFeatureEntries( +@@ -682,6 +697,27 @@ void FlagsState::GetFlagFeatureEntries( data.Set("links", std::move(links)); } @@ -1043,7 +1044,7 @@ diff --git a/components/flags_ui/flags_state.cc b/components/flags_ui/flags_stat switch (entry.type) { case FeatureEntry::SINGLE_VALUE: case FeatureEntry::SINGLE_DISABLE_VALUE: -@@ -805,6 +841,16 @@ void FlagsState::AddSwitchesToCommandLine( +@@ -810,6 +846,16 @@ void FlagsState::AddSwitchesToCommandLine( for (const std::string& entry_name : enabled_entries) { const auto& entry_it = name_to_switch_map.find(entry_name); if (entry_it == name_to_switch_map.end()) { @@ -1060,7 +1061,7 @@ diff --git a/components/flags_ui/flags_state.cc b/components/flags_ui/flags_stat NOTREACHED_IN_MIGRATION(); continue; } -@@ -1057,6 +1103,14 @@ const FeatureEntry* FlagsState::FindFeatureEntryByName( +@@ -1062,6 +1108,14 @@ const FeatureEntry* FlagsState::FindFeatureEntryByName( bool FlagsState::IsSupportedFeature(const FlagsStorage* storage, const std::string& name, int platform_mask) const { @@ -1379,7 +1380,7 @@ diff --git a/components/offline_pages/core/offline_page_feature.h b/components/o diff --git a/components/password_manager/core/browser/features/password_features.cc b/components/password_manager/core/browser/features/password_features.cc --- a/components/password_manager/core/browser/features/password_features.cc +++ b/components/password_manager/core/browser/features/password_features.cc -@@ -192,4 +192,5 @@ BASE_FEATURE(kUseAsyncOsCryptInLoginDatabase, +@@ -159,4 +159,5 @@ BASE_FEATURE(kUseAsyncOsCryptInLoginDatabase, "UseAsyncOsCryptInLoginDatabase", base::FEATURE_DISABLED_BY_DEFAULT); @@ -1411,7 +1412,7 @@ diff --git a/components/version_ui/version_handler_helper.cc b/components/versio diff --git a/content/common/features.cc b/content/common/features.cc --- a/content/common/features.cc +++ b/content/common/features.cc -@@ -607,4 +607,5 @@ BASE_FEATURE(kScrollBubblingFix, +@@ -592,4 +592,5 @@ BASE_FEATURE(kScrollBubblingFix, // Please keep features in alphabetical order. @@ -1420,7 +1421,7 @@ diff --git a/content/common/features.cc b/content/common/features.cc diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc --- a/content/public/common/content_features.cc +++ b/content/public/common/content_features.cc -@@ -1334,4 +1334,5 @@ bool IsVideoCaptureServiceEnabledForBrowserProcess() { +@@ -1380,4 +1380,5 @@ bool IsVideoCaptureServiceEnabledForBrowserProcess() { VideoCaptureServiceConfiguration::kEnabledForBrowserProcess; } @@ -1429,7 +1430,7 @@ diff --git a/content/public/common/content_features.cc b/content/public/common/c diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h --- a/content/public/common/content_features.h +++ b/content/public/common/content_features.h -@@ -292,6 +292,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebRtcPipeWireCapturer); +@@ -311,6 +311,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebRtcPipeWireCapturer); CONTENT_EXPORT bool IsVideoCaptureServiceEnabledForOutOfProcess(); CONTENT_EXPORT bool IsVideoCaptureServiceEnabledForBrowserProcess(); @@ -1763,7 +1764,7 @@ new file mode 100755 diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc --- a/media/base/media_switches.cc +++ b/media/base/media_switches.cc -@@ -1917,5 +1917,5 @@ uint32_t GetPassthroughAudioFormats() { +@@ -1912,5 +1912,5 @@ uint32_t GetPassthroughAudioFormats() { return 0; #endif // BUILDFLAG(ENABLE_PASSTHROUGH_AUDIO_CODECS) } @@ -1773,7 +1774,7 @@ diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc diff --git a/media/base/media_switches.h b/media/base/media_switches.h --- a/media/base/media_switches.h +++ b/media/base/media_switches.h -@@ -583,5 +583,5 @@ MEDIA_EXPORT OOPVDMode GetOutOfProcessVideoDecodingMode(); +@@ -580,5 +580,5 @@ MEDIA_EXPORT OOPVDMode GetOutOfProcessVideoDecodingMode(); MEDIA_EXPORT uint32_t GetPassthroughAudioFormats(); } // namespace media @@ -1783,18 +1784,18 @@ diff --git a/media/base/media_switches.h b/media/base/media_switches.h diff --git a/net/base/features.cc b/net/base/features.cc --- a/net/base/features.cc +++ b/net/base/features.cc -@@ -570,4 +570,5 @@ BASE_FEATURE(kOptimizeParsingDataUrls, - "OptimizeParsingDataUrls", - base::FEATURE_DISABLED_BY_DEFAULT); +@@ -594,4 +594,5 @@ BASE_FEATURE(kLegacyPKCS1ForTLS13, + "LegacyPKCS1ForTLS13", + base::FEATURE_ENABLED_BY_DEFAULT); +#include "cromite_flags/net_base_features_cc.inc" } // namespace net::features diff --git a/net/base/features.h b/net/base/features.h --- a/net/base/features.h +++ b/net/base/features.h -@@ -562,6 +562,7 @@ NET_EXPORT BASE_DECLARE_FEATURE(kReportingApiEnableEnterpriseCookieIssues); - // Optimize parsing data: URLs. - NET_EXPORT BASE_DECLARE_FEATURE(kOptimizeParsingDataUrls); +@@ -600,6 +600,7 @@ NET_EXPORT BASE_DECLARE_FEATURE(kOptimizeParsingDataUrls); + // support RSA-PSS. + NET_EXPORT BASE_DECLARE_FEATURE(kLegacyPKCS1ForTLS13); +#include "cromite_flags/net_base_features_h.inc" } // namespace net::features @@ -1803,18 +1804,18 @@ diff --git a/net/base/features.h b/net/base/features.h diff --git a/services/network/public/cpp/features.cc b/services/network/public/cpp/features.cc --- a/services/network/public/cpp/features.cc +++ b/services/network/public/cpp/features.cc -@@ -474,4 +474,5 @@ const base::FeatureParam kNetworkContextPrefetchMaxLoaders{ - &kNetworkContextPrefetch, - /*name=*/"max_loaders", /*default_value=*/10}; +@@ -475,4 +475,5 @@ BASE_FEATURE(kTreatNullIPAsPublicAddressSpace, + "TreatNullIPAsPublicAddressSpace", + base::FEATURE_DISABLED_BY_DEFAULT); +#include "cromite_flags/services_network_public_cpp_features_cc.inc" } // namespace network::features diff --git a/services/network/public/cpp/features.h b/services/network/public/cpp/features.h --- a/services/network/public/cpp/features.h +++ b/services/network/public/cpp/features.h -@@ -187,6 +187,7 @@ BASE_DECLARE_FEATURE(kNetworkContextPrefetch); +@@ -186,6 +186,7 @@ extern const base::FeatureParam kNetworkContextPrefetchMaxLoaders; COMPONENT_EXPORT(NETWORK_CPP) - extern const base::FeatureParam kNetworkContextPrefetchMaxLoaders; + BASE_DECLARE_FEATURE(kTreatNullIPAsPublicAddressSpace); +#include "cromite_flags/services_network_public_cpp_features_h.inc" } // namespace network::features @@ -1823,19 +1824,18 @@ diff --git a/services/network/public/cpp/features.h b/services/network/public/cp 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 -@@ -2691,5 +2691,6 @@ BASE_FEATURE(kOptimizeLoadingDataUrls, - "OptimizeLoadingDataUrls", - base::FEATURE_DISABLED_BY_DEFAULT); +@@ -2708,4 +2708,5 @@ bool IsCanvasSharedBitmapConversionEnabled() { + features::kCanvasSharedBitmapToSharedImage); + } +#include "cromite_flags/third_party_blink_common_features_cc.inc" - } // namespace features - } // namespace blink + } // namespace blink::features diff --git a/third_party/blink/public/common/features.h b/third_party/blink/public/common/features.h --- a/third_party/blink/public/common/features.h +++ b/third_party/blink/public/common/features.h -@@ -1787,6 +1787,7 @@ BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kRenderSizeInScoreAdBrowserSignals); - // Optimize loading data: URLs. - BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kOptimizeLoadingDataUrls); +@@ -1831,6 +1831,7 @@ BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kOptimizeLoadingDataUrls); + + BLINK_COMMON_EXPORT bool IsCanvasSharedBitmapConversionEnabled(); +#include "cromite_flags/third_party_blink_common_features_h.inc" } // namespace features @@ -1844,7 +1844,7 @@ diff --git a/third_party/blink/public/common/features.h b/third_party/blink/publ diff --git a/ui/base/ui_base_features.cc b/ui/base/ui_base_features.cc --- a/ui/base/ui_base_features.cc +++ b/ui/base/ui_base_features.cc -@@ -546,4 +546,5 @@ BASE_FEATURE(kAsyncFullscreenWindowState, +@@ -536,4 +536,5 @@ BASE_FEATURE(kAsyncFullscreenWindowState, "AsyncFullscreenWindowState", base::FEATURE_DISABLED_BY_DEFAULT); @@ -1853,7 +1853,7 @@ diff --git a/ui/base/ui_base_features.cc b/ui/base/ui_base_features.cc diff --git a/ui/base/ui_base_features.h b/ui/base/ui_base_features.h --- a/ui/base/ui_base_features.h +++ b/ui/base/ui_base_features.h -@@ -261,6 +261,7 @@ BASE_DECLARE_FEATURE(kUseUtf8EncodingForSvgImage); +@@ -262,6 +262,7 @@ BASE_DECLARE_FEATURE(kUseUtf8EncodingForSvgImage); COMPONENT_EXPORT(UI_BASE_FEATURES) BASE_DECLARE_FEATURE(kAsyncFullscreenWindowState); diff --git a/build/patches/Add-custom-tab-intents-privacy-option.patch b/build/patches/Add-custom-tab-intents-privacy-option.patch index b52d9089e..9bc5b9128 100644 --- a/build/patches/Add-custom-tab-intents-privacy-option.patch +++ b/build/patches/Add-custom-tab-intents-privacy-option.patch @@ -46,7 +46,7 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java --- a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java -@@ -52,6 +52,9 @@ import java.lang.annotation.Retention; +@@ -58,6 +58,9 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.Set; @@ -56,8 +56,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDis /** * Dispatches incoming intents to the appropriate activity based on the current configuration and * Intent fired. -@@ -239,6 +242,9 @@ public class LaunchIntentDispatcher { - */ +@@ -244,6 +247,9 @@ public class LaunchIntentDispatcher { + @OptIn(markerClass = ExperimentalAuthTab.class) public static boolean isCustomTabIntent(Intent intent) { if (intent == null) return false; + if (!ContextUtils.getAppSharedPreferences() @@ -66,9 +66,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDis Log.w( TAG, "CustomTabsIntent#shouldAlwaysUseBrowserUI() = " -@@ -260,6 +266,10 @@ public class LaunchIntentDispatcher { - newIntent.setData(uri); - newIntent.setClassName(context, CustomTabActivity.class.getName()); +@@ -272,6 +278,10 @@ public class LaunchIntentDispatcher { + // Make sure the result of the CustomTabActivity is forwarded to the client. + newIntent.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT); + if (ContextUtils.getAppSharedPreferences() + .getBoolean(PrivacySettings.PREF_OPEN_EXTERNAL_LINKS_INCOGNITO, false)) @@ -77,7 +77,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDis // Since configureIntentForResizableCustomTab() might change the componenet/class // associated with the passed intent, it needs to be called after #setClassName(context, // CustomTabActivity.class.getName()); -@@ -407,6 +417,17 @@ public class LaunchIntentDispatcher { +@@ -445,6 +455,17 @@ public class LaunchIntentDispatcher { if (Intent.ACTION_VIEW.equals(newIntent.getAction()) && !IntentHandler.wasIntentSenderChrome(newIntent)) { @@ -98,7 +98,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDis diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java -@@ -912,6 +912,7 @@ public class CustomTabsConnection { +@@ -920,6 +920,7 @@ public class CustomTabsConnection { PostTask.postTask( TaskTraits.UI_DEFAULT, () -> { @@ -109,7 +109,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Cust diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/IncognitoCustomTabIntentDataProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/IncognitoCustomTabIntentDataProvider.java --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/IncognitoCustomTabIntentDataProvider.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/IncognitoCustomTabIntentDataProvider.java -@@ -40,6 +40,9 @@ import org.chromium.components.browser_ui.widget.TintedDrawable; +@@ -39,6 +39,9 @@ import org.chromium.components.browser_ui.widget.TintedDrawable; import java.util.ArrayList; import java.util.List; @@ -117,9 +117,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Inco +import org.chromium.chrome.browser.privacy.settings.PrivacySettings; + /** - * A model class that parses the incoming intent for incognito and ephemeral Custom Tabs specific - * customization data. -@@ -131,6 +134,9 @@ public class IncognitoCustomTabIntentDataProvider extends BrowserServicesIntentD + * A model class that parses the incoming intent for incognito Custom Tabs specific customization + * data. +@@ -116,6 +119,9 @@ public class IncognitoCustomTabIntentDataProvider extends BrowserServicesIntentD } private static boolean isIntentFromThirdPartyAllowed() { @@ -132,9 +132,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Inco diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java --- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java -@@ -101,6 +101,9 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -99,6 +99,9 @@ public class PrivacySettings extends ChromeBaseSettingsFragment + private IncognitoLockSettings mIncognitoLockSettings; - private SettingsLauncher mSettingsLauncher; + private ChromeSwitchPreference allowCustomTabIntentsPref; + private ChromeSwitchPreference openExternalLinksPref; @@ -142,7 +142,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting @Override public void onCreatePreferencesCromite(Bundle savedInstanceState, String rootKey) { getActivity().setTitle(R.string.prefs_privacy_security); -@@ -319,6 +322,9 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -312,6 +315,9 @@ public class PrivacySettings extends ChromeBaseSettingsFragment new SpanApplier.SpanInfo("", "", servicesLink)); } @@ -152,7 +152,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting @Override public boolean onPreferenceChange(Preference preference, Object newValue) { String key = preference.getKey(); -@@ -335,6 +341,14 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -328,6 +334,14 @@ public class PrivacySettings extends ChromeBaseSettingsFragment } else if (PREF_SEARCH_SUGGESTIONS.equals(key)) { UserPrefs.get(getProfile()) .setBoolean(Pref.SEARCH_SUGGEST_ENABLED, (boolean) newValue); @@ -167,7 +167,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting } return true; } -@@ -357,6 +371,16 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -350,6 +364,16 @@ public class PrivacySettings extends ChromeBaseSettingsFragment UserPrefs.get(getProfile()).getBoolean(Pref.CAN_MAKE_PAYMENT_ENABLED)); } @@ -203,7 +203,7 @@ diff --git a/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/TabAsso diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd -@@ -5699,6 +5699,20 @@ To change this setting, BEGIN_LINKdelete the Chrome d +@@ -5696,6 +5696,20 @@ To change this setting, BEGIN_LINKdelete the Chrome d Resume diff --git a/build/patches/Add-exit-menu-item.patch b/build/patches/Add-exit-menu-item.patch index 0f7265ea1..9dbe9eba9 100644 --- a/build/patches/Add-exit-menu-item.patch +++ b/build/patches/Add-exit-menu-item.patch @@ -67,9 +67,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct /** * This is the main activity for ChromeMobile when not running in document mode. All the tabs are * accessible via a chrome specific tab switching UI. -@@ -2693,6 +2695,8 @@ public class ChromeTabbedActivity extends ChromeActivity +@@ -2563,6 +2564,11 @@ public abstract class ChromeActivity return true; } @@ -102,7 +102,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd -@@ -4296,6 +4296,9 @@ To change this setting, BEGIN_LINKdelete the Chrome d +@@ -4245,6 +4245,9 @@ To change this setting, BEGIN_LINKdelete the Chrome d Dark theme diff --git a/build/patches/Add-flag-for-omnibox-autocomplete-filtering.patch b/build/patches/Add-flag-for-omnibox-autocomplete-filtering.patch index 8ebea7fce..2cd9a8112 100644 --- a/build/patches/Add-flag-for-omnibox-autocomplete-filtering.patch +++ b/build/patches/Add-flag-for-omnibox-autocomplete-filtering.patch @@ -26,7 +26,7 @@ diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/ #include "base/feature_list.h" #include "base/format_macros.h" #include "base/functional/bind.h" -@@ -529,6 +530,15 @@ AutocompleteController::AutocompleteController( +@@ -541,6 +542,15 @@ AutocompleteController::AutocompleteController( provider_client_->GetOmniboxTriggeredFeatureService()), steady_state_omnibox_position_( metrics::OmniboxEventProto::UNKNOWN_POSITION) { @@ -79,7 +79,7 @@ diff --git a/components/omnibox/browser/search_provider.cc b/components/omnibox/ diff --git a/components/url_formatter/url_fixer.cc b/components/url_formatter/url_fixer.cc --- a/components/url_formatter/url_fixer.cc +++ b/components/url_formatter/url_fixer.cc -@@ -9,6 +9,8 @@ +@@ -14,6 +14,8 @@ #include #include "base/check_op.h" @@ -88,7 +88,7 @@ diff --git a/components/url_formatter/url_fixer.cc b/components/url_formatter/ur #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/i18n/char_iterator.h" -@@ -620,6 +622,8 @@ GURL FixupURLInternal(const std::string& text, +@@ -625,6 +627,8 @@ GURL FixupURLInternal(const std::string& text, FixupHost(trimmed, parts.host, parts.scheme.is_valid(), desired_tld, &url); if (chrome_url && !parts.host.is_valid()) diff --git a/build/patches/Add-flag-to-disable-IPv6-probes.patch b/build/patches/Add-flag-to-disable-IPv6-probes.patch index 26d33b916..7a5b9bb46 100644 --- a/build/patches/Add-flag-to-disable-IPv6-probes.patch +++ b/build/patches/Add-flag-to-disable-IPv6-probes.patch @@ -45,7 +45,7 @@ new file mode 100644 diff --git a/net/BUILD.gn b/net/BUILD.gn --- a/net/BUILD.gn +++ b/net/BUILD.gn -@@ -1077,6 +1077,7 @@ component("net") { +@@ -1081,6 +1081,7 @@ component("net") { "//build:chromeos_buildflags", "//components/miracle_parameter/common", "//net/http:transport_security_state_generated_files", diff --git a/build/patches/Add-flag-to-disable-vibration.patch b/build/patches/Add-flag-to-disable-vibration.patch index 3b483be71..e7237dec6 100644 --- a/build/patches/Add-flag-to-disable-vibration.patch +++ b/build/patches/Add-flag-to-disable-vibration.patch @@ -104,7 +104,7 @@ diff --git a/third_party/blink/renderer/platform/exported/web_runtime_features.c 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 -@@ -721,6 +721,10 @@ +@@ -757,6 +757,10 @@ status: {"Android": "stable"}, base_feature: "none", }, diff --git a/build/patches/Add-kill-switch-for-unsupported-clangd-flags.patch b/build/patches/Add-kill-switch-for-unsupported-clangd-flags.patch index 7b6ebc5ff..682b7b9eb 100644 --- a/build/patches/Add-kill-switch-for-unsupported-clangd-flags.patch +++ b/build/patches/Add-kill-switch-for-unsupported-clangd-flags.patch @@ -14,7 +14,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn -@@ -1950,7 +1950,6 @@ config("default_warnings") { +@@ -1962,7 +1962,6 @@ config("default_warnings") { # TODO(crbug.com/40284799): Fix and re-enable. "-Wno-thread-safety-reference-return", ] @@ -22,18 +22,18 @@ diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn cflags_cc += [ # TODO(crbug.com/328490295): Fix and re-enable for C flags. "-Wenum-compare-conditional", -@@ -1965,6 +1964,16 @@ config("default_warnings") { - # TODO(crbug.com/344680447): Fix and re-enable. - cflags_cc += [ "-Wno-missing-template-arg-list-after-template-kw" ] +@@ -1980,6 +1979,16 @@ config("default_warnings") { + # TODO(crbug.com/356172342): Fix and re-enable. + cflags_cc += [ "-Wno-dangling-assignment-gsl" ] } + if (skip_clangd_unsupported_options) { + cflags -= [ -+ "-Wno-deprecated-builtins", + "-Wno-thread-safety-reference-return", + ] + cflags_cc -= [ + "-Wno-c++11-narrowing-const-reference", + "-Wno-missing-template-arg-list-after-template-kw", ++ "-Wno-dangling-assignment-gsl", + ] + } } diff --git a/build/patches/Add-lifetime-options-for-permissions.patch b/build/patches/Add-lifetime-options-for-permissions.patch index 9c10bbb54..4f6830dab 100644 --- a/build/patches/Add-lifetime-options-for-permissions.patch +++ b/build/patches/Add-lifetime-options-for-permissions.patch @@ -229,7 +229,7 @@ diff --git a/chrome/browser/permissions/one_time_permissions_tracker_factory.cc diff --git a/chrome/browser/ui/views/permissions/embedded_permission_prompt.cc b/chrome/browser/ui/views/permissions/embedded_permission_prompt.cc --- a/chrome/browser/ui/views/permissions/embedded_permission_prompt.cc +++ b/chrome/browser/ui/views/permissions/embedded_permission_prompt.cc -@@ -650,7 +650,7 @@ void EmbeddedPermissionPrompt::SendDelegateAction(Action action) { +@@ -654,7 +654,7 @@ void EmbeddedPermissionPrompt::SendDelegateAction(Action action) { delegate_->Accept(); break; case Action::kAllowThisTime: @@ -288,7 +288,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c private void setUpClearDataPreference() { ClearWebsiteStorage preference = findPreference(PREF_CLEAR_DATA); long usage = mSite.getTotalUsage(); -@@ -1091,6 +1096,10 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -1092,6 +1097,10 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment AppCompatResources.getColorStateList(getContext(), mHighlightColor) .getDefaultColor()); } @@ -329,7 +329,7 @@ diff --git a/components/browser_ui/strings/android/browser_ui_strings.grd b/comp diff --git a/components/content_settings/core/browser/content_settings_utils.cc b/components/content_settings/core/browser/content_settings_utils.cc --- a/components/content_settings/core/browser/content_settings_utils.cc +++ b/components/content_settings/core/browser/content_settings_utils.cc -@@ -155,6 +155,42 @@ bool IsConstraintPersistent(const ContentSettingConstraints& constraints) { +@@ -160,6 +160,42 @@ bool IsConstraintPersistent(const ContentSettingConstraints& constraints) { return constraints.session_model() == mojom::SessionModel::DURABLE; } @@ -509,7 +509,7 @@ diff --git a/components/page_info/android/page_info_controller_android.cc b/comp diff --git a/components/page_info/page_info.cc b/components/page_info/page_info.cc --- a/components/page_info/page_info.cc +++ b/components/page_info/page_info.cc -@@ -1178,6 +1178,8 @@ void PageInfo::PopulatePermissionInfo(PermissionInfo& permission_info, +@@ -1179,6 +1179,8 @@ void PageInfo::PopulatePermissionInfo(PermissionInfo& permission_info, permission_info.is_one_time = (info.metadata.session_model() == content_settings::mojom::SessionModel::ONE_TIME); @@ -606,8 +606,8 @@ diff --git a/components/permissions/android/java/src/org/chromium/components/per + TextView lifetimeOptionsText = new TextView(context); + lifetimeOptionsText.setText(context.getString( + org.chromium.components.permissions.R.string.session_permissions_title)); -+ ApiCompatibilityUtils.setTextAppearance( -+ lifetimeOptionsText, R.style.TextAppearance_TextMedium_Primary); ++ lifetimeOptionsText.setTextAppearance( ++ lifetimeOptionsText.getContext(), R.style.TextAppearance_TextMedium_Primary); + + LinearLayout.LayoutParams lifetimeOptionsTextLayoutParams = + new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); @@ -667,7 +667,7 @@ diff --git a/components/permissions/android/java/src/org/chromium/components/per diff --git a/components/permissions/android/permission_prompt/permission_dialog_delegate.cc b/components/permissions/android/permission_prompt/permission_dialog_delegate.cc --- a/components/permissions/android/permission_prompt/permission_dialog_delegate.cc +++ b/components/permissions/android/permission_prompt/permission_dialog_delegate.cc -@@ -159,6 +159,11 @@ void PermissionDialogJavaDelegate::DismissDialog() { +@@ -158,6 +158,11 @@ void PermissionDialogJavaDelegate::DismissDialog() { Java_PermissionDialogDelegate_dismissFromNative(env, j_delegate_); } @@ -679,7 +679,7 @@ diff --git a/components/permissions/android/permission_prompt/permission_dialog_ // static void PermissionDialogDelegate::Create( content::WebContents* web_contents, -@@ -187,6 +192,13 @@ PermissionDialogDelegate* PermissionDialogDelegate::CreateForTesting( +@@ -186,6 +191,13 @@ PermissionDialogDelegate* PermissionDialogDelegate::CreateForTesting( void PermissionDialogDelegate::Accept(JNIEnv* env, const JavaParamRef& obj) { CHECK(permission_prompt_); @@ -693,7 +693,7 @@ diff --git a/components/permissions/android/permission_prompt/permission_dialog_ permission_prompt_->Accept(); } -@@ -194,12 +206,22 @@ void PermissionDialogDelegate::AcceptThisTime( +@@ -193,12 +205,22 @@ void PermissionDialogDelegate::AcceptThisTime( JNIEnv* env, const JavaParamRef& obj) { CHECK(permission_prompt_); @@ -1212,8 +1212,8 @@ diff --git a/components/permissions/permission_request_manager.cc b/components/p if (should_auto_approve_request) { if (should_auto_approve_request == PermissionAction::GRANTED) { -- request->PermissionGranted(/*is_one_time=*/false); -+ request->PermissionGranted(/*is_one_time=*/false, content_settings::mojom::LifetimeMode::ALWAYS); +- request->PermissionGranted(/*is_one_time=*/true); ++ request->PermissionGranted(/*is_one_time=*/true, content_settings::mojom::LifetimeMode::UNTIL_ORIGIN_CLOSED); } request->RequestFinished(); return; diff --git a/build/patches/Add-menu-item-to-bookmark-all-tabs.patch b/build/patches/Add-menu-item-to-bookmark-all-tabs.patch index c5fff2370..fd8e45bcb 100644 --- a/build/patches/Add-menu-item-to-bookmark-all-tabs.patch +++ b/build/patches/Add-menu-item-to-bookmark-all-tabs.patch @@ -51,11 +51,11 @@ diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/re + android:icon="@drawable/ic_folder_blue_24dp" /> + android:icon="@drawable/ic_select_check_box_24dp" /> diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java -@@ -91,6 +91,7 @@ import org.chromium.chrome.browser.base.ColdStartTracker; +@@ -92,6 +92,7 @@ import org.chromium.chrome.browser.base.ColdStartTracker; import org.chromium.chrome.browser.bookmarks.BookmarkUtils; import org.chromium.chrome.browser.browserservices.intents.WebappConstants; import org.chromium.chrome.browser.compositor.CompositorViewHolder; @@ -63,7 +63,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct import org.chromium.chrome.browser.compositor.layouts.Layout; import org.chromium.chrome.browser.compositor.layouts.LayoutManagerChrome; import org.chromium.chrome.browser.compositor.layouts.LayoutManagerChromePhone; -@@ -2725,6 +2726,8 @@ public class ChromeTabbedActivity extends ChromeActivityGetJavaObject(), @@ -229,7 +229,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse result == Result::kSuccess); delete this; } -@@ -350,6 +350,33 @@ jboolean BookmarkBridge::AreAccountBookmarkFoldersActive(JNIEnv* env) { +@@ -355,6 +355,33 @@ jboolean BookmarkBridge::AreAccountBookmarkFoldersActive(JNIEnv* env) { return bookmark_model_->account_mobile_node() != nullptr; } @@ -263,7 +263,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse base::android::ScopedJavaLocalRef BookmarkBridge::GetMostRecentlyAddedUserBookmarkIdForUrl(JNIEnv* env, const GURL& url) { -@@ -462,6 +489,7 @@ void BookmarkBridge::GetAllFoldersWithDepths( +@@ -467,6 +494,7 @@ void BookmarkBridge::GetAllFoldersWithDepths( // Vector to temporarily contain all child bookmarks at same level for sorting std::vector bookmarks = { bookmark_model_->mobile_node(), @@ -271,7 +271,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse bookmark_model_->bookmark_bar_node(), bookmark_model_->other_node(), }; -@@ -555,6 +583,9 @@ std::vector BookmarkBridge::GetTopLevelFolderIdsImpl( +@@ -560,6 +588,9 @@ std::vector BookmarkBridge::GetTopLevelFolderIdsImpl( top_level_folders.push_back(other_node); } @@ -281,7 +281,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse const BookmarkNode* reading_list_node = local_or_syncable_reading_list_manager_->GetRoot(); if (IsPermanentFolderVisible(ignore_visibility, reading_list_node)) { -@@ -1261,6 +1292,17 @@ void BookmarkBridge::GetBookmarksOfType( +@@ -1266,6 +1297,17 @@ void BookmarkBridge::GetBookmarksOfType( AddBookmarkNodesToBookmarkIdList(env, j_list, results); } @@ -391,7 +391,7 @@ diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browse diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd -@@ -4423,6 +4423,9 @@ To change this setting, BEGIN_LINKdelete the Chrome d +@@ -4372,6 +4372,9 @@ To change this setting, BEGIN_LINKdelete the Chrome d Select tabs @@ -705,7 +705,7 @@ diff --git a/components/bookmarks/browser/bookmark_node.cc b/components/bookmark + case bookmarks::BookmarkNode::TABS_COLLECTION: + return !is_desktop; case BookmarkNode::URL: - NOTREACHED_NORETURN(); + NOTREACHED(); case BookmarkNode::FOLDER: @@ -211,6 +213,15 @@ BookmarkPermanentNode::CreateMobileBookmarks(int64_t id) { l10n_util::GetStringUTF16(IDS_BOOKMARK_BAR_MOBILE_FOLDER_NAME))); diff --git a/build/patches/Add-menu-item-to-view-source.patch b/build/patches/Add-menu-item-to-view-source.patch index b0657efc0..cd0f8edef 100644 --- a/build/patches/Add-menu-item-to-view-source.patch +++ b/build/patches/Add-menu-item-to-view-source.patch @@ -16,7 +16,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/android/java/res/menu/custom_tabs_menu.xml b/chrome/android/java/res/menu/custom_tabs_menu.xml --- a/chrome/android/java/res/menu/custom_tabs_menu.xml +++ b/chrome/android/java/res/menu/custom_tabs_menu.xml -@@ -62,6 +62,9 @@ found in the LICENSE file. +@@ -58,6 +58,9 @@ found in the LICENSE file. @@ -42,7 +42,7 @@ diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/re diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java -@@ -2758,6 +2758,8 @@ public class ChromeTabbedActivity extends ChromeActivity +@@ -2720,6 +2720,11 @@ public abstract class ChromeActivity return doOpenWebApk(currentTab); } @@ -69,7 +69,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java --- a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java -@@ -565,6 +565,7 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate +@@ -566,6 +566,7 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate isNativePage, isFileScheme, isContentScheme, isIncognito, url)); updateRequestDesktopSiteMenuItem(menu, currentTab, true /* can show */, isNativePage); @@ -77,7 +77,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/App updateAutoDarkMenuItem(menu, currentTab, isNativePage); -@@ -1297,6 +1298,23 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate +@@ -1298,6 +1299,23 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate findInPageMenuRow.setVisible(itemVisible); } @@ -104,7 +104,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/App diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabAppMenuPropertiesDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabAppMenuPropertiesDelegate.java --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabAppMenuPropertiesDelegate.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabAppMenuPropertiesDelegate.java -@@ -292,6 +292,7 @@ public class CustomTabAppMenuPropertiesDelegate extends AppMenuPropertiesDelegat +@@ -299,6 +299,7 @@ public class CustomTabAppMenuPropertiesDelegate extends AppMenuPropertiesDelegat updateRequestDesktopSiteMenuItem( menu, currentTab, requestDesktopSiteVisible, isNativePage); diff --git a/build/patches/Add-option-to-disable-snapshots.patch b/build/patches/Add-option-to-disable-snapshots.patch index 04c14c9a7..7f3863339 100644 --- a/build/patches/Add-option-to-disable-snapshots.patch +++ b/build/patches/Add-option-to-disable-snapshots.patch @@ -4,23 +4,21 @@ Subject: Add option to disable snapshots License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - .../tab_management/TabGridViewBinder.java | 10 +++-- + .../tab_management/TabGridViewBinder.java | 8 +++- .../tasks/tab_management/TabProperties.java | 5 +++ .../java/res/xml/privacy_preferences.xml | 5 +++ .../chrome/browser/app/ChromeActivity.java | 3 +- .../privacy/settings/PrivacySettings.java | 43 ++++++++++++++++++- .../strings/android_chrome_strings.grd | 8 ++++ - 6 files changed, 69 insertions(+), 5 deletions(-) + 6 files changed, 69 insertions(+), 3 deletions(-) diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridViewBinder.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridViewBinder.java --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridViewBinder.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridViewBinder.java -@@ -333,9 +333,12 @@ class TabGridViewBinder { - // Adjust bitmap to thumbnail. - TabUtils.setBitmapAndUpdateImageMatrix(thumbnail, result, thumbnailSize); - } else if (isMostRecentRequest) { -- // If the most recent request is a null bitmap ensure a placeholder is -- // visible. +@@ -336,7 +336,12 @@ class TabGridViewBinder { + if (result != null) { + TabUtils.setDrawableAndUpdateImageMatrix(thumbnail, result, thumbnailSize); + } else { - thumbnail.setImageDrawable(null); + TabListFaviconProvider.TabFavicon tabFavicon = model.get(TabProperties.FAVICON); + if (tabFavicon != null) { @@ -31,7 +29,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser } }; if (sThumbnailFetcherForTesting != null) { -@@ -374,6 +377,7 @@ class TabGridViewBinder { +@@ -375,6 +380,7 @@ class TabGridViewBinder { ViewLookupCachingFrameLayout rootView, PropertyModel model, TabListFaviconProvider.TabFavicon favicon) { @@ -42,7 +40,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabProperties.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabProperties.java --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabProperties.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabProperties.java -@@ -77,6 +77,9 @@ public class TabProperties { +@@ -82,6 +82,9 @@ public class TabProperties { public static final WritableBooleanPropertyKey FAVICON_FETCHED = new WritableBooleanPropertyKey(); @@ -52,7 +50,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser /** Property for lazily fetching favicons when required by an item in a UI. */ public static final WritableObjectPropertyKey FAVICON_FETCHER = new WritableObjectPropertyKey<>(); -@@ -175,6 +178,7 @@ public class TabProperties { +@@ -180,6 +183,7 @@ public class TabProperties { CARD_TYPE, CONTENT_DESCRIPTION_STRING, ACTION_BUTTON_DESCRIPTION_STRING, @@ -60,7 +58,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser SHOPPING_PERSISTED_TAB_DATA_FETCHER, SHOULD_SHOW_PRICE_DROP_TOOLTIP, QUICK_DELETE_ANIMATION_STATUS, -@@ -190,6 +194,7 @@ public class TabProperties { +@@ -196,6 +200,7 @@ public class TabProperties { TAB_ACTION_BUTTON_LISTENER, FAVICON_FETCHED, FAVICON_FETCHER, @@ -86,15 +84,15 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java -@@ -142,6 +142,7 @@ import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; +@@ -144,6 +144,7 @@ import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; import org.chromium.chrome.browser.preferences.Pref; import org.chromium.chrome.browser.printing.TabPrinter; +import org.chromium.chrome.browser.privacy.settings.PrivacySettings; import org.chromium.chrome.browser.profiles.Profile; + import org.chromium.chrome.browser.profiles.ProfileManager; import org.chromium.chrome.browser.profiles.ProfileProvider; - import org.chromium.chrome.browser.readaloud.ReadAloudController; -@@ -718,7 +719,7 @@ public abstract class ChromeActivity +@@ -724,7 +725,7 @@ public abstract class ChromeActivity new TabContentManager( this, mBrowserControlsManagerSupplier.get(), @@ -106,7 +104,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java --- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java -@@ -64,12 +64,26 @@ import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; +@@ -63,12 +63,26 @@ import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; import org.chromium.components.browser_ui.settings.ChromeSwitchPreference; import org.chromium.components.browser_ui.settings.ManagedPreferenceDelegate; @@ -120,8 +118,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting /** Fragment to keep track of the all the privacy related preferences. */ public class PrivacySettings extends ChromeBaseSettingsFragment -- implements Preference.OnPreferenceChangeListener, FragmentSettingsLauncher { -+ implements Preference.OnPreferenceChangeListener, FragmentSettingsLauncher, INeedSnackbarManager { +- implements Preference.OnPreferenceChangeListener { ++ implements Preference.OnPreferenceChangeListener, INeedSnackbarManager { + + private SnackbarManager mSnackbarManager; + private Snackbar mSnackbar; @@ -134,7 +132,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting private static final String PREF_CAN_MAKE_PAYMENT = "can_make_payment"; private static final String PREF_PRELOAD_PAGES = "preload_pages"; private static final String PREF_HTTPS_FIRST_MODE = "https_first_mode"; -@@ -157,6 +171,21 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -153,6 +167,21 @@ public class PrivacySettings extends ChromeBaseSettingsFragment } } @@ -156,7 +154,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting Preference privacyGuidePreference = findPreference(PREF_PRIVACY_GUIDE); // Record the launch of PG from the S&P link-row entry point privacyGuidePreference.setOnPreferenceClickListener( -@@ -366,6 +395,7 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -359,6 +388,7 @@ public class PrivacySettings extends ChromeBaseSettingsFragment public static final String PREF_ALLOW_CUSTOM_TAB_INTENTS = "allow_custom_tab_intents"; public static final String PREF_OPEN_EXTERNAL_LINKS_INCOGNITO = "open_external_links_incognito"; @@ -164,7 +162,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting @Override public boolean onPreferenceChange(Preference preference, Object newValue) { -@@ -391,6 +421,13 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -384,6 +414,13 @@ public class PrivacySettings extends ChromeBaseSettingsFragment SharedPreferences.Editor sharedPreferencesEditor = ContextUtils.getAppSharedPreferences().edit(); sharedPreferencesEditor.putBoolean(PREF_OPEN_EXTERNAL_LINKS_INCOGNITO, (boolean)newValue); sharedPreferencesEditor.apply(); @@ -178,7 +176,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting } return true; } -@@ -447,6 +484,10 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -440,6 +477,10 @@ public class PrivacySettings extends ChromeBaseSettingsFragment : R.string.text_off); } @@ -192,7 +190,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd -@@ -5909,6 +5909,14 @@ To change this setting, BEGIN_LINKdelete the Chrome d +@@ -5906,6 +5906,14 @@ To change this setting, BEGIN_LINKdelete the Chrome d Your %1$swww.amazon.com timer ran out. It'll start again tomorrow. diff --git a/build/patches/Add-option-to-force-tablet-UI.patch b/build/patches/Add-option-to-force-tablet-UI.patch index eb9fd9d01..2ff4e21b5 100644 --- a/build/patches/Add-option-to-force-tablet-UI.patch +++ b/build/patches/Add-option-to-force-tablet-UI.patch @@ -4,7 +4,6 @@ Subject: Add option to force tablet UI License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - .../start_surface/StartSurfaceMediator.java | 5 +++- .../layout/custom_tabs_control_container.xml | 2 +- .../java/res/layout/recent_tabs_page.xml | 2 +- .../java/res/values-sw600dp/dimens.xml | 4 ++-- @@ -36,30 +35,8 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../res/xml/accessibility_preferences.xml | 5 ++++ .../AccessibilitySettingsDelegate.java | 11 +++++++++ .../chromium/ui/base/DeviceFormFactor.java | 9 +++++++ - 32 files changed, 162 insertions(+), 31 deletions(-) + 31 files changed, 158 insertions(+), 30 deletions(-) -diff --git a/chrome/android/features/start_surface/java/src/org/chromium/chrome/features/start_surface/StartSurfaceMediator.java b/chrome/android/features/start_surface/java/src/org/chromium/chrome/features/start_surface/StartSurfaceMediator.java ---- a/chrome/android/features/start_surface/java/src/org/chromium/chrome/features/start_surface/StartSurfaceMediator.java -+++ b/chrome/android/features/start_surface/java/src/org/chromium/chrome/features/start_surface/StartSurfaceMediator.java -@@ -90,6 +90,7 @@ import org.chromium.components.browser_ui.widget.gesture.BackPressHandler; - import org.chromium.components.embedder_support.util.UrlUtilities; - import org.chromium.components.prefs.PrefService; - import org.chromium.content_public.browser.LoadUrlParams; -+import org.chromium.ui.base.DeviceFormFactor; - import org.chromium.ui.modelutil.PropertyModel; - import org.chromium.ui.text.EmptyTextWatcher; - import org.chromium.ui.util.ColorUtils; -@@ -992,7 +993,9 @@ class StartSurfaceMediator - int getTopToolbarPlaceholderHeight() { - // If logo is visible in Start surface instead of in the toolbar, we don't need to show the - // top margin of the fake search box. -- return getPixelSize(R.dimen.control_container_height) -+ return DeviceFormFactor.isForceTabletUI() -+ ? getPixelSize(R.dimen.control_container_height_tabletui) -+ : getPixelSize(R.dimen.control_container_height_cromite) - + (isLogoVisible() - ? 0 - : getPixelSize(R.dimen.start_surface_fake_search_box_top_margin)); diff --git a/chrome/android/java/res/layout/custom_tabs_control_container.xml b/chrome/android/java/res/layout/custom_tabs_control_container.xml --- a/chrome/android/java/res/layout/custom_tabs_control_container.xml +++ b/chrome/android/java/res/layout/custom_tabs_control_container.xml @@ -97,7 +74,7 @@ diff --git a/chrome/android/java/res/values-sw600dp/dimens.xml b/chrome/android/ + 96dp - 60dp + 60dp diff --git a/chrome/android/java/res/values/dimens.xml b/chrome/android/java/res/values/dimens.xml --- a/chrome/android/java/res/values/dimens.xml +++ b/chrome/android/java/res/values/dimens.xml @@ -119,15 +96,15 @@ diff --git a/chrome/android/java/res/values/dimens.xml b/chrome/android/java/res diff --git a/chrome/android/java/src/org/chromium/chrome/browser/WarmupManager.java b/chrome/android/java/src/org/chromium/chrome/browser/WarmupManager.java --- a/chrome/android/java/src/org/chromium/chrome/browser/WarmupManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/WarmupManager.java -@@ -62,6 +62,7 @@ import org.chromium.components.embedder_support.util.UrlConstants; - import org.chromium.content_public.browser.WebContents; +@@ -61,6 +61,7 @@ import org.chromium.content_public.browser.WebContents; import org.chromium.content_public.browser.WebContentsObserver; + import org.chromium.net.NetId; import org.chromium.ui.LayoutInflaterUtils; +import org.chromium.ui.base.DeviceFormFactor; import org.chromium.ui.base.WindowAndroid; import org.chromium.ui.display.DisplayUtil; import org.chromium.url.GURL; -@@ -455,7 +456,9 @@ public class WarmupManager { +@@ -454,7 +455,9 @@ public class WarmupManager { ControlContainer controlContainer = mainView.findViewById(R.id.control_container); if (toolbarId != ActivityUtils.NO_RESOURCE_ID && controlContainer != null) { @@ -142,7 +119,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/s --- a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/AccessibilitySettings.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/AccessibilitySettings.java @@ -18,6 +18,7 @@ import org.chromium.chrome.browser.preferences.Pref; - import org.chromium.chrome.browser.settings.SettingsLauncherImpl; + import org.chromium.chrome.browser.settings.SettingsLauncherFactory; import org.chromium.chrome.browser.settings.ChromeBaseSettingsFragment; import org.chromium.components.browser_ui.accessibility.AccessibilitySettingsDelegate; +import org.chromium.components.browser_ui.accessibility.AccessibilitySettingsDelegate.BooleanPreferenceDelegate; @@ -172,7 +149,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/s Preference captions = findPreference(PREF_CAPTIONS); captions.setOnPreferenceClickListener( preference -> { -@@ -215,6 +225,9 @@ public class AccessibilitySettings extends ChromeBaseSettingsFragment +@@ -216,6 +226,9 @@ public class AccessibilitySettings extends ChromeBaseSettingsFragment mFontSizePrefs.setUserFontScaleFactor((Float) newValue); } else if (PREF_FORCE_ENABLE_ZOOM.equals(preference.getKey())) { mFontSizePrefs.setForceEnableZoomFromUser((Boolean) newValue); @@ -214,7 +191,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/s diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java -@@ -859,7 +859,9 @@ public abstract class ChromeActivity +@@ -869,7 +869,9 @@ public abstract class ChromeActivity // Inflate the correct toolbar layout for the device. int toolbarLayoutId = getToolbarLayoutId(); if (toolbarLayoutId != ActivityUtils.NO_RESOURCE_ID && controlContainer != null) { @@ -228,7 +205,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java -@@ -87,6 +87,7 @@ import org.chromium.components.prefs.PrefService; +@@ -89,6 +89,7 @@ import org.chromium.components.prefs.PrefService; import org.chromium.components.tab_groups.TabGroupColorId; import org.chromium.components.user_prefs.UserPrefs; import org.chromium.ui.MotionEventUtils; @@ -236,7 +213,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over import org.chromium.ui.base.LocalizationUtils; import org.chromium.ui.base.WindowAndroid; import org.chromium.ui.interpolators.Interpolators; -@@ -5190,8 +5191,13 @@ public class StripLayoutHelper implements StripLayoutTabDelegate, StripLayoutGro +@@ -5176,8 +5177,13 @@ public class StripLayoutHelper implements StripLayoutTabDelegate, StripLayoutGro mTabMenu.setAnchorView(tabView); // 3. Set the vertical offset to align the tab menu with bottom of the tab strip int tabHeight = mManagerHost.getHeight(); @@ -255,7 +232,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManager.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManager.java --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManager.java -@@ -87,6 +87,7 @@ import org.chromium.chrome.browser.ui.system.StatusBarColorController; +@@ -90,6 +90,7 @@ import org.chromium.chrome.browser.ui.system.StatusBarColorController; import org.chromium.components.browser_ui.styles.SemanticColorUtils; import org.chromium.components.browser_ui.widget.scrim.ScrimProperties; import org.chromium.content_public.browser.LoadUrlParams; @@ -263,7 +240,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over import org.chromium.ui.base.LocalizationUtils; import org.chromium.ui.base.PageTransition; import org.chromium.ui.base.WindowAndroid; -@@ -446,11 +447,15 @@ public class StripLayoutHelperManager +@@ -455,11 +456,15 @@ public class StripLayoutHelperManager mIsLayoutOptimizationsEnabled = ToolbarFeatures.isTabStripWindowLayoutOptimizationEnabled(true); @@ -283,7 +260,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java -@@ -535,7 +535,9 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { +@@ -531,7 +531,9 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { @Override public int getControlContainerHeightResource() { @@ -297,7 +274,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/Tab diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java --- a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java -@@ -100,6 +100,7 @@ import org.chromium.chrome.browser.password_manager.ManagePasswordsReferrer; +@@ -103,6 +103,7 @@ import org.chromium.chrome.browser.password_manager.ManagePasswordsReferrer; import org.chromium.chrome.browser.password_manager.PasswordManagerLauncher; import org.chromium.chrome.browser.pdf.PdfPage; import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; @@ -305,7 +282,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordi import org.chromium.chrome.browser.price_insights.PriceInsightsButtonController; import org.chromium.chrome.browser.price_tracking.CurrentTabPriceTrackingStateSupplier; import org.chromium.chrome.browser.price_tracking.PriceTrackingButtonController; -@@ -1724,7 +1725,9 @@ public class RootUiCoordinator +@@ -1740,7 +1741,9 @@ public class RootUiCoordinator if (!mSupportsFindInPageSupplier.getAsBoolean()) return; int stubId = R.id.find_toolbar_stub; @@ -400,7 +377,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd -@@ -1667,6 +1667,13 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1664,6 +1664,13 @@ Your Google account may have other forms of browsing history like searches and a Hide your IP address @@ -500,8 +477,8 @@ diff --git a/chrome/browser/ui/android/toolbar/java/res/values/dimens.xml b/chro + 40dp + 0dp - -@@ -3240,6 +3246,9 @@ To change this setting, BEGIN_LINKdelete the Chrome d +@@ -3192,6 +3198,9 @@ To change this setting, BEGIN_LINKdelete the Chrome d Open in new Chrome tab @@ -352,7 +352,7 @@ diff --git a/third_party/blink/renderer/core/html/html_anchor_element.cc b/third #include "third_party/blink/renderer/core/page/page.h" #include "third_party/blink/renderer/core/speculation_rules/document_speculation_rules.h" #include "third_party/blink/renderer/platform/heap/garbage_collected.h" -@@ -515,6 +516,17 @@ void HTMLAnchorElement::NavigateToHyperlink(ResourceRequest request, +@@ -519,6 +520,17 @@ void HTMLAnchorElement::NavigateToHyperlink(ResourceRequest request, bool is_trusted, base::TimeTicks platform_time_stamp, KURL completed_url) { @@ -370,7 +370,7 @@ diff --git a/third_party/blink/renderer/core/html/html_anchor_element.cc b/third LocalDOMWindow* window = GetDocument().domWindow(); if (!window) { return; -@@ -581,6 +593,15 @@ void HTMLAnchorElement::NavigateToHyperlink(ResourceRequest request, +@@ -585,6 +597,15 @@ void HTMLAnchorElement::NavigateToHyperlink(ResourceRequest request, request.GetReferrerPolicy())); } @@ -386,7 +386,7 @@ diff --git a/third_party/blink/renderer/core/html/html_anchor_element.cc b/third Frame* target_frame = frame->Tree().FindOrCreateFrameForNavigation(frame_request, target).frame; -@@ -634,7 +655,7 @@ AtomicString HTMLAnchorElement::interestAction() const { +@@ -639,7 +660,7 @@ AtomicString HTMLAnchorElement::interestAction() const { return g_empty_atom; } @@ -395,7 +395,7 @@ diff --git a/third_party/blink/renderer/core/html/html_anchor_element.cc b/third event.SetDefaultHandled(); LocalDOMWindow* window = GetDocument().domWindow(); -@@ -730,13 +751,12 @@ void HTMLAnchorElement::HandleClick(MouseEvent& event) { +@@ -735,13 +756,12 @@ void HTMLAnchorElement::HandleClick(MouseEvent& event) { return; } @@ -413,7 +413,7 @@ diff --git a/third_party/blink/renderer/core/html/html_anchor_element.cc b/third // We distinguish single/double click with some modifiers. // See the comment of `EventHandler.delayed_navigation_task_handle_`. auto task_handle = PostDelayedCancellableTask( -@@ -746,7 +766,9 @@ void HTMLAnchorElement::HandleClick(MouseEvent& event) { +@@ -751,7 +771,9 @@ void HTMLAnchorElement::HandleClick(MouseEvent& event) { frame->GetEventHandler().SetDelayedNavigationTaskHandle( std::move(task_handle)); } else { @@ -541,7 +541,7 @@ diff --git a/third_party/blink/renderer/core/page/context_menu_controller.cc b/t + if (!do_not_show_context_menu && + base::FeatureList::IsEnabled(features::kShowAlwaysContextMenuOnLinks)) { + if (auto* anchor_element = DynamicTo(result.URLElement())) { -+ MouseEvent event; ++ MouseEvent& event = *MouseEvent::Create(); + event.SetTarget(mouse_event->target()); + anchor_element->HandleClick(event, /*do_not_show_context_menu*/true); + return true; diff --git a/build/patches/Add-site-engagement-flag.patch b/build/patches/Add-site-engagement-flag.patch index b481a94ad..c24725a8b 100644 --- a/build/patches/Add-site-engagement-flag.patch +++ b/build/patches/Add-site-engagement-flag.patch @@ -24,8 +24,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -153,6 +153,7 @@ - #include "components/send_tab_to_self/features.h" +@@ -160,6 +160,7 @@ + #include "components/sensitive_content/features.h" #include "components/services/heap_profiling/public/cpp/switches.h" #include "components/services/storage/public/cpp/buckets/bucket_info.h" +#include "components/site_engagement/core/features.h" @@ -43,7 +43,7 @@ diff --git a/chrome/browser/engagement/important_sites_util.cc b/chrome/browser/ #include "components/site_engagement/core/mojom/site_engagement_details.mojom.h" #include "components/webapps/browser/banners/app_banner_settings_helper.h" #include "net/base/registry_controlled_domains/registry_controlled_domain.h" -@@ -386,6 +387,10 @@ void ImportantSitesUtil::RegisterProfilePrefs( +@@ -350,6 +351,10 @@ void ImportantSitesUtil::RegisterProfilePrefs( // static std::set ImportantSitesUtil::GetInstalledRegisterableDomains( Profile* profile) { @@ -54,7 +54,7 @@ diff --git a/chrome/browser/engagement/important_sites_util.cc b/chrome/browser/ std::set installed_origins = GetOriginsWithInstalledWebApps(profile); std::set registerable_domains; -@@ -400,6 +405,10 @@ std::vector +@@ -364,6 +369,10 @@ std::vector ImportantSitesUtil::GetImportantRegisterableDomains(Profile* profile, size_t max_results) { SCOPED_UMA_HISTOGRAM_TIMER("Storage.ImportantSites.GenerationTime"); @@ -96,7 +96,7 @@ diff --git a/components/feature_engagement/public/feature_configurations.cc b/co #include "components/feature_engagement/public/configuration.h" #include "components/feature_engagement/public/event_constants.h" #include "components/feature_engagement/public/feature_constants.h" -@@ -117,6 +118,12 @@ std::optional GetClientSideFeatureConfig( +@@ -112,6 +113,12 @@ std::optional GetClientSideFeatureConfig( } #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) @@ -112,7 +112,7 @@ diff --git a/components/feature_engagement/public/feature_configurations.cc b/co diff --git a/components/site_engagement/content/site_engagement_score.cc b/components/site_engagement/content/site_engagement_score.cc --- a/components/site_engagement/content/site_engagement_score.cc +++ b/components/site_engagement/content/site_engagement_score.cc -@@ -18,6 +18,7 @@ +@@ -23,6 +23,7 @@ #include "components/content_settings/core/common/content_settings.h" #include "components/content_settings/core/common/content_settings_types.h" #include "components/content_settings/core/common/content_settings_utils.h" @@ -120,7 +120,7 @@ diff --git a/components/site_engagement/content/site_engagement_score.cc b/compo #include "components/site_engagement/content/engagement_type.h" #include "components/site_engagement/content/site_engagement_metrics.h" #include "third_party/blink/public/mojom/site_engagement/site_engagement.mojom.h" -@@ -275,6 +276,10 @@ void SiteEngagementScore::Commit() { +@@ -280,6 +281,10 @@ void SiteEngagementScore::Commit() { if (!UpdateScoreDict(*score_dict_)) return; diff --git a/build/patches/Add-support-for-ISupportHelpAndFeedback.patch b/build/patches/Add-support-for-ISupportHelpAndFeedback.patch index c23470f16..08351af4b 100644 --- a/build/patches/Add-support-for-ISupportHelpAndFeedback.patch +++ b/build/patches/Add-support-for-ISupportHelpAndFeedback.patch @@ -12,15 +12,15 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java -@@ -98,6 +98,7 @@ import org.chromium.components.browser_ui.settings.CustomDividerFragment; +@@ -96,6 +96,7 @@ import org.chromium.components.browser_ui.modaldialog.AppModalPresenter; + import org.chromium.components.browser_ui.settings.CustomDividerFragment; import org.chromium.components.browser_ui.settings.FragmentSettingsLauncher; import org.chromium.components.browser_ui.settings.PaddedItemDecorationWithDivider; - import org.chromium.components.browser_ui.settings.SettingsLauncher; +import org.chromium.components.browser_ui.settings.SettingsUtils; import org.chromium.components.browser_ui.site_settings.BaseSiteSettingsFragment; import org.chromium.components.browser_ui.site_settings.SiteSettingsCategory; import org.chromium.components.browser_ui.util.TraceEventVectorDrawableCompat; -@@ -515,8 +516,12 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity +@@ -510,8 +511,12 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity finish(); return true; } else if (item.getItemId() == R.id.menu_id_general_help) { diff --git a/build/patches/Add-support-for-writing-URIs.patch b/build/patches/Add-support-for-writing-URIs.patch index 531576134..ecea32d16 100644 --- a/build/patches/Add-support-for-writing-URIs.patch +++ b/build/patches/Add-support-for-writing-URIs.patch @@ -15,7 +15,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/base/android/content_uri_utils.cc b/base/android/content_uri_utils.cc --- a/base/android/content_uri_utils.cc +++ b/base/android/content_uri_utils.cc -@@ -39,6 +39,16 @@ int64_t GetContentUriFileSize(const FilePath& content_uri) { +@@ -68,6 +68,16 @@ int64_t GetContentUriFileSize(const FilePath& content_uri) { return Java_ContentUriUtils_getContentUriFileSize(env, j_uri); } @@ -35,9 +35,9 @@ diff --git a/base/android/content_uri_utils.cc b/base/android/content_uri_utils. diff --git a/base/android/content_uri_utils.h b/base/android/content_uri_utils.h --- a/base/android/content_uri_utils.h +++ b/base/android/content_uri_utils.h -@@ -18,6 +18,10 @@ namespace base { - // Returns -1 if the URI is invalid. - BASE_EXPORT File OpenContentUriForRead(const FilePath& content_uri); +@@ -27,6 +27,10 @@ BASE_EXPORT std::optional TranslateOpenFlagsToJavaMode( + BASE_EXPORT File OpenContentUri(const FilePath& content_uri, + uint32_t open_flags); +// Opens a content URI for write and returns the file descriptor to the caller. +// Returns -1 if the URI is invalid. @@ -67,7 +67,7 @@ diff --git a/base/android/java/src/org/chromium/base/ContentUriUtils.java b/base /** This class provides methods to access content URI schemes. */ public abstract class ContentUriUtils { private static final String TAG = "ContentUriUtils"; -@@ -86,6 +90,36 @@ public abstract class ContentUriUtils { +@@ -89,6 +93,36 @@ public abstract class ContentUriUtils { return -1; } diff --git a/build/patches/Add-support-to-jxl.patch b/build/patches/Add-support-to-jxl.patch index a29a4f96d..588fe3b7b 100644 --- a/build/patches/Add-support-to-jxl.patch +++ b/build/patches/Add-support-to-jxl.patch @@ -84,7 +84,7 @@ Enabled by default diff --git a/DEPS b/DEPS --- a/DEPS +++ b/DEPS -@@ -494,6 +494,10 @@ vars = { +@@ -498,6 +498,10 @@ vars = { # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. @@ -95,7 +95,7 @@ diff --git a/DEPS b/DEPS 'highway_revision': '8295336dd70f1201d42c22ab5b0861de38cf8fbf', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling ffmpeg -@@ -1633,6 +1637,9 @@ deps = { +@@ -1664,6 +1668,9 @@ deps = { 'src/third_party/dawn': Var('dawn_git') + '/dawn.git' + '@' + Var('dawn_revision'), @@ -190,8 +190,8 @@ diff --git a/cc/paint/paint_image.h b/cc/paint/paint_image.h -enum class ImageType { kPNG, kJPEG, kWEBP, kGIF, kICO, kBMP, kAVIF, kInvalid }; +enum class ImageType { kPNG, kJPEG, kWEBP, kGIF, kICO, kBMP, kAVIF, kJXL, kInvalid }; - enum class AuxImage : size_t { kDefault = 0, kGainmap = 1 }; - static constexpr std::array kAllAuxImages = {AuxImage::kDefault, + // An encoded image may include several auxiliary images within it. This enum + // is used to index those images. Auxiliary images can have different sizes and diff --git a/cc/tiles/image_decode_cache.h b/cc/tiles/image_decode_cache.h --- a/cc/tiles/image_decode_cache.h +++ b/cc/tiles/image_decode_cache.h @@ -329,7 +329,7 @@ diff --git a/media/media_options.gni b/media/media_options.gni diff --git a/net/base/mime_util.cc b/net/base/mime_util.cc --- a/net/base/mime_util.cc +++ b/net/base/mime_util.cc -@@ -169,6 +169,7 @@ static const MimeInfo kPrimaryMappings[] = { +@@ -165,6 +165,7 @@ static const MimeInfo kPrimaryMappings[] = { {"image/avif", "avif"}, {"image/gif", "gif"}, {"image/jpeg", "jpeg,jpg"}, @@ -337,7 +337,7 @@ diff --git a/net/base/mime_util.cc b/net/base/mime_util.cc {"image/png", "png"}, {"image/apng", "png,apng"}, {"image/svg+xml", "svg,svgz"}, -@@ -672,6 +673,7 @@ static const char* const kStandardImageTypes[] = {"image/avif", +@@ -660,6 +661,7 @@ static const char* const kStandardImageTypes[] = {"image/avif", "image/gif", "image/ief", "image/jpeg", @@ -348,7 +348,7 @@ diff --git a/net/base/mime_util.cc b/net/base/mime_util.cc diff --git a/net/base/mime_util_unittest.cc b/net/base/mime_util_unittest.cc --- a/net/base/mime_util_unittest.cc +++ b/net/base/mime_util_unittest.cc -@@ -44,6 +44,7 @@ TEST(MimeUtilTest, GetWellKnownMimeTypeFromExtension) { +@@ -40,6 +40,7 @@ TEST(MimeUtilTest, GetWellKnownMimeTypeFromExtension) { {FILE_PATH_LITERAL("webm"), "video/webm"}, {FILE_PATH_LITERAL("weba"), "audio/webm"}, {FILE_PATH_LITERAL("avif"), "image/avif"}, @@ -356,7 +356,7 @@ diff --git a/net/base/mime_util_unittest.cc b/net/base/mime_util_unittest.cc {FILE_PATH_LITERAL("epub"), "application/epub+zip"}, {FILE_PATH_LITERAL("apk"), "application/vnd.android.package-archive"}, {FILE_PATH_LITERAL("cer"), "application/x-x509-ca-cert"}, -@@ -85,6 +86,7 @@ TEST(MimeUtilTest, ExtensionTest) { +@@ -81,6 +82,7 @@ TEST(MimeUtilTest, ExtensionTest) { {FILE_PATH_LITERAL("webm"), {"video/webm"}}, {FILE_PATH_LITERAL("weba"), {"audio/webm"}}, {FILE_PATH_LITERAL("avif"), {"image/avif"}}, @@ -364,7 +364,7 @@ diff --git a/net/base/mime_util_unittest.cc b/net/base/mime_util_unittest.cc #if BUILDFLAG(IS_CHROMEOS_ASH) // These are test cases for testing platform mime types on ChromeOS. {FILE_PATH_LITERAL("epub"), {"application/epub+zip"}}, -@@ -501,6 +503,7 @@ TEST(MimeUtilTest, TestGetExtensionsForMimeType) { +@@ -497,6 +499,7 @@ TEST(MimeUtilTest, TestGetExtensionsForMimeType) { {"MeSsAge/*", 1, "eml"}, {"message/", 0, nullptr, true}, {"image/avif", 1, "avif"}, @@ -375,7 +375,7 @@ diff --git a/net/base/mime_util_unittest.cc b/net/base/mime_util_unittest.cc diff --git a/third_party/.gitignore b/third_party/.gitignore --- a/third_party/.gitignore +++ b/third_party/.gitignore -@@ -89,6 +89,7 @@ +@@ -86,6 +86,7 @@ /libgifcodec /libjingle/source /libupnp @@ -467,7 +467,7 @@ diff --git a/third_party/blink/common/mime_util/mime_util_unittest.cc b/third_pa diff --git a/third_party/blink/public/devtools_protocol/browser_protocol.pdl b/third_party/blink/public/devtools_protocol/browser_protocol.pdl --- a/third_party/blink/public/devtools_protocol/browser_protocol.pdl +++ b/third_party/blink/public/devtools_protocol/browser_protocol.pdl -@@ -4473,6 +4473,7 @@ domain Emulation +@@ -4523,6 +4523,7 @@ domain Emulation experimental type DisabledImageType extends string enum avif @@ -608,7 +608,7 @@ diff --git a/third_party/blink/renderer/modules/webcodecs/image_decoder_fuzzer.c diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn --- a/third_party/blink/renderer/platform/BUILD.gn +++ b/third_party/blink/renderer/platform/BUILD.gn -@@ -2365,6 +2365,10 @@ source_set("blink_platform_unittests_sources") { +@@ -2369,6 +2369,10 @@ source_set("blink_platform_unittests_sources") { sources += [ "text/locale_icu_test.cc" ] } @@ -619,7 +619,7 @@ diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/re sources += [ "testing/run_all_tests.cc" ] configs += [ -@@ -2411,6 +2415,7 @@ source_set("blink_platform_unittests_sources") { +@@ -2415,6 +2419,7 @@ source_set("blink_platform_unittests_sources") { "//third_party/blink/renderer/platform/wtf", "//third_party/dawn/src/dawn/native", "//third_party/dawn/src/dawn/wire", @@ -740,7 +740,7 @@ diff --git a/third_party/blink/renderer/platform/image-decoders/image_decoder.cc return String(); } -@@ -314,6 +330,13 @@ std::unique_ptr ImageDecoder::CreateByMimeType( +@@ -318,6 +334,13 @@ std::unique_ptr ImageDecoder::CreateByMimeType( alpha_option, high_bit_depth_decoding_option, color_behavior, max_decoded_bytes, animation_option); } @@ -2218,7 +2218,7 @@ diff --git a/third_party/blink/tools/commit_stats/git-dirs.txt b/third_party/bli diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations --- a/third_party/blink/web_tests/TestExpectations +++ b/third_party/blink/web_tests/TestExpectations -@@ -4713,6 +4713,12 @@ crbug.com/1199522 http/tests/devtools/layers/layers-3d-view-hit-testing.js [ Fai +@@ -4872,6 +4872,12 @@ crbug.com/1199522 http/tests/devtools/layers/layers-3d-view-hit-testing.js [ Fai # Started failing after rolling new version of check-layout-th.js css3/flexbox/perpendicular-writing-modes-inside-flex-item.html [ Failure ] @@ -2234,7 +2234,7 @@ diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/we diff --git a/third_party/blink/web_tests/VirtualTestSuites b/third_party/blink/web_tests/VirtualTestSuites --- a/third_party/blink/web_tests/VirtualTestSuites +++ b/third_party/blink/web_tests/VirtualTestSuites -@@ -437,6 +437,15 @@ +@@ -431,6 +431,15 @@ "args": ["--enable-blink-features=FractionalScrollOffsets"], "expires": "Jun 1, 2025" }, @@ -2649,7 +2649,7 @@ new file mode 100644 diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml -@@ -21311,6 +21311,7 @@ from previous Chrome versions. +@@ -20938,6 +20938,7 @@ from previous Chrome versions. @@ -2660,7 +2660,7 @@ diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums diff --git a/tools/metrics/histograms/metadata/blink/enums.xml b/tools/metrics/histograms/metadata/blink/enums.xml --- a/tools/metrics/histograms/metadata/blink/enums.xml +++ b/tools/metrics/histograms/metadata/blink/enums.xml -@@ -227,7 +227,7 @@ chromium-metrics-reviews@google.com. +@@ -214,7 +214,7 @@ chromium-metrics-reviews@google.com. diff --git a/build/patches/Add-webGL-site-setting.patch b/build/patches/Add-webGL-site-setting.patch index 30d2a0ad2..eecbd4967 100644 --- a/build/patches/Add-webGL-site-setting.patch +++ b/build/patches/Add-webGL-site-setting.patch @@ -218,7 +218,7 @@ diff --git a/third_party/blink/renderer/core/execution_context/execution_context diff --git a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc --- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc +++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc -@@ -294,6 +294,13 @@ void WebGLRenderingContextBase::InitializeWebGLContextLimits( +@@ -295,6 +295,13 @@ void WebGLRenderingContextBase::InitializeWebGLContextLimits( } } @@ -232,7 +232,7 @@ diff --git a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_ba unsigned WebGLRenderingContextBase::CurrentMaxGLContexts() { base::AutoLock locker(WebGLContextLimitLock()); DCHECK(webgl_context_limits_initialized_); -@@ -563,25 +570,6 @@ static String ExtractWebGLContextCreationError( +@@ -564,25 +571,6 @@ static String ExtractWebGLContextCreationError( const Platform::GraphicsInfo& info) { StringBuilder builder; builder.Append("Could not create a WebGL context"); @@ -258,7 +258,7 @@ diff --git a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_ba FormatWebGLStatusString("ErrorMessage", info.error_message.Utf8().c_str(), builder); builder.Append('.'); -@@ -641,6 +629,12 @@ WebGLRenderingContextBase::CreateWebGraphicsContext3DProvider( +@@ -642,6 +630,12 @@ WebGLRenderingContextBase::CreateWebGraphicsContext3DProvider( const CanvasContextCreationAttributesCore& attributes, Platform::ContextType context_type, Platform::GraphicsInfo* graphics_info) { diff --git a/build/patches/Add-webRTC-site-settings.patch b/build/patches/Add-webRTC-site-settings.patch index 8d57657de..7d48121da 100644 --- a/build/patches/Add-webRTC-site-settings.patch +++ b/build/patches/Add-webRTC-site-settings.patch @@ -195,7 +195,7 @@ diff --git a/third_party/blink/renderer/modules/peerconnection/peer_connection_d #include "third_party/blink/public/platform/web_url.h" #include "third_party/blink/public/web/modules/mediastream/media_stream_video_source.h" #include "third_party/blink/public/web/web_document.h" -@@ -871,6 +872,11 @@ PeerConnectionDependencyFactory::CreatePortAllocator( +@@ -889,6 +890,11 @@ PeerConnectionDependencyFactory::CreatePortAllocator( // origin. WebRTCIPHandlingPolicy policy = GetWebRTCIPHandlingPolicy(webrtc_ip_handling_policy); @@ -219,7 +219,7 @@ diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_rtp_receiver. #include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_rtc_insertable_streams.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_rtc_rtcp_parameters.h" -@@ -267,6 +269,14 @@ RTCRtpCapabilities* RTCRtpReceiver::getCapabilities(ScriptState* state, +@@ -282,6 +284,14 @@ RTCRtpCapabilities* RTCRtpReceiver::getCapabilities(ScriptState* state, if (kind != "audio" && kind != "video") return nullptr; @@ -246,7 +246,7 @@ diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_rtp_sender.cc #include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_rtc_encoding_options.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_rtc_insertable_streams.h" -@@ -1024,6 +1026,14 @@ RTCRtpCapabilities* RTCRtpSender::getCapabilities(ScriptState* state, +@@ -1013,6 +1015,14 @@ RTCRtpCapabilities* RTCRtpSender::getCapabilities(ScriptState* state, if (kind != "audio" && kind != "video") return nullptr; diff --git a/build/patches/Allow-DocumentPiP-if-PopupsAndRedirects-are-active.patch b/build/patches/Allow-DocumentPiP-if-PopupsAndRedirects-are-active.patch index e70ee91ed..4835c3995 100644 --- a/build/patches/Allow-DocumentPiP-if-PopupsAndRedirects-are-active.patch +++ b/build/patches/Allow-DocumentPiP-if-PopupsAndRedirects-are-active.patch @@ -6,8 +6,8 @@ Allow documentPiP api use only with content setting popup allowed License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - .../picture_in_picture_controller_impl.cc | 8 ++++++++ - 1 file changed, 8 insertions(+) + .../picture_in_picture_controller_impl.cc | 7 +++++++ + 1 file changed, 7 insertions(+) diff --git a/third_party/blink/renderer/modules/document_picture_in_picture/picture_in_picture_controller_impl.cc b/third_party/blink/renderer/modules/document_picture_in_picture/picture_in_picture_controller_impl.cc --- a/third_party/blink/renderer/modules/document_picture_in_picture/picture_in_picture_controller_impl.cc @@ -20,14 +20,13 @@ diff --git a/third_party/blink/renderer/modules/document_picture_in_picture/pict #include "third_party/blink/renderer/modules/picture_in_picture/picture_in_picture_event.h" #include "third_party/blink/renderer/platform/heap/garbage_collected.h" #include "third_party/blink/renderer/platform/runtime_enabled_features.h" -@@ -383,6 +384,13 @@ void PictureInPictureControllerImpl::CreateDocumentPictureInPictureWindow( +@@ -377,6 +378,12 @@ void PictureInPictureControllerImpl::CreateDocumentPictureInPictureWindow( return; } + if (!opener.GetFrame()->Loader().GetDocumentLoader()->GetContentSettings()->allow_popup) { -+ exception_state.ThrowDOMException(DOMExceptionCode::kNotAllowedError, -+ "Document PiP requires user popup permission"); -+ resolver->Reject(exception_state); ++ resolver->RejectWithDOMException(DOMExceptionCode::kNotAllowedError, ++ "Document PiP requires user popup permission"); + return; + } + diff --git a/build/patches/Allow-building-without-enable_reporting.patch b/build/patches/Allow-building-without-enable_reporting.patch index 82e6386a6..e82becb5f 100644 --- a/build/patches/Allow-building-without-enable_reporting.patch +++ b/build/patches/Allow-building-without-enable_reporting.patch @@ -124,7 +124,7 @@ diff --git a/content/browser/network/reporting_service_proxy.cc b/content/browse diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -14675,12 +14675,6 @@ void RenderFrameHostImpl::MaybeGenerateCrashReport( +@@ -14727,12 +14727,6 @@ void RenderFrameHostImpl::MaybeGenerateCrashReport( } } } @@ -254,7 +254,7 @@ new file mode 100644 diff --git a/net/base/features.cc b/net/base/features.cc --- a/net/base/features.cc +++ b/net/base/features.cc -@@ -201,6 +201,7 @@ extern const base::FeatureParam kTimeoutTcpConnectAttemptMax( +@@ -217,6 +217,7 @@ extern const base::FeatureParam kTimeoutTcpConnectAttemptMax( base::Seconds(30)); #if BUILDFLAG(ENABLE_REPORTING) @@ -265,7 +265,7 @@ diff --git a/net/base/features.cc b/net/base/features.cc diff --git a/net/reporting/reporting_service.cc b/net/reporting/reporting_service.cc --- a/net/reporting/reporting_service.cc +++ b/net/reporting/reporting_service.cc -@@ -216,6 +216,12 @@ class ReportingServiceImpl : public ReportingService { +@@ -225,6 +225,12 @@ class ReportingServiceImpl : public ReportingService { int depth, base::TimeTicks queued_ticks, ReportingTargetType target_type) { @@ -281,7 +281,7 @@ diff --git a/net/reporting/reporting_service.cc b/net/reporting/reporting_servic diff --git a/services/network/network_context.h b/services/network/network_context.h --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -463,14 +463,14 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -467,14 +467,14 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext const GURL& url, const std::optional& reporting_source, const net::NetworkAnonymizationKey& network_anonymization_key, @@ -313,15 +313,15 @@ diff --git a/services/network/public/mojom/BUILD.gn b/services/network/public/mo diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1241,6 +1241,7 @@ interface NetworkContext { - // provided |network_isolation_key|. +@@ -1257,6 +1257,7 @@ interface NetworkContext { + // provided `network_anonymization_key`. // // Spec: https://w3c.github.io/reporting/#concept-reports + [EnableIf=enable_reporting] QueueReport(string type, string group, url.mojom.Url url, -@@ -1248,6 +1249,7 @@ interface NetworkContext { +@@ -1264,6 +1265,7 @@ interface NetworkContext { NetworkAnonymizationKey network_anonymization_key, mojo_base.mojom.DictionaryValue body); @@ -329,10 +329,10 @@ diff --git a/services/network/public/mojom/network_context.mojom b/services/netw QueueEnterpriseReport(string type, string group, url.mojom.Url url, -@@ -1258,6 +1260,7 @@ interface NetworkContext { +@@ -1274,6 +1276,7 @@ interface NetworkContext { // Note that this queued report will never be delivered if no reporting // endpoint matching is registered for with the provided - // |network_isolation_key|. + // `network_anonymization_key`. + [EnableIf=enable_reporting] QueueSignedExchangeReport(SignedExchangeReport report, NetworkAnonymizationKey network_anonymization_key); @@ -375,7 +375,7 @@ diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/ #include "services/network/public/cpp/features.h" #include "services/network/public/mojom/content_security_policy.mojom-blink.h" #include "services/network/public/mojom/source_location.mojom-blink.h" -@@ -2769,9 +2770,11 @@ void LocalFrame::MainFrameFirstMeaningfulPaint() { +@@ -2771,9 +2772,11 @@ void LocalFrame::MainFrameFirstMeaningfulPaint() { v8_local_compile_hints_producer_->GenerateData(kIsFinalData); } @@ -398,7 +398,7 @@ diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/b #include "mojo/public/cpp/bindings/pending_associated_receiver.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "services/metrics/public/cpp/ukm_source_id.h" -@@ -662,8 +663,9 @@ class CORE_EXPORT LocalFrame final +@@ -658,8 +659,9 @@ class CORE_EXPORT LocalFrame final void FinishedScrollSequence(); SmoothScrollSequencer* GetSmoothScrollSequencer() const; diff --git a/build/patches/Allow-building-without-supervised-users.patch b/build/patches/Allow-building-without-supervised-users.patch index a03e049ba..44dd14258 100644 --- a/build/patches/Allow-building-without-supervised-users.patch +++ b/build/patches/Allow-building-without-supervised-users.patch @@ -4,61 +4,37 @@ Subject: Allow building without supervised users License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/android/BUILD.gn | 1 - - .../browser/feed/FeedSurfaceCoordinator.java | 5 +---- - .../feedback/ChromeFeedbackCollector.java | 1 - - chrome/browser/BUILD.gn | 2 -- - chrome/browser/feedback/android/BUILD.gn | 2 -- - .../prefs/chrome_pref_service_factory.cc | 2 +- - .../profiles/profile_attributes_entry.cc | 2 +- - chrome/browser/profiles/profile_impl.cc | 5 +---- - chrome/browser/profiles/profile_manager.cc | 20 ------------------- - chrome/browser/ui/webui/managed_ui_handler.cc | 4 ---- - .../webui/management/management_ui_handler.cc | 4 ---- - .../browser/supervised_user_pref_store.cc | 1 + - .../browser/supervised_user_preferences.cc | 6 +++++- - .../core/browser/supervised_user_service.cc | 5 +---- - .../core/browser/supervised_user_utils.cc | 1 + - .../supervised_user/core/common/features.cc | 6 ++++++ - 16 files changed, 18 insertions(+), 49 deletions(-) + chrome/android/BUILD.gn | 1 - + .../chrome/browser/feedback/ChromeFeedbackCollector.java | 1 - + chrome/browser/feedback/android/BUILD.gn | 2 -- + chrome/browser/prefs/chrome_pref_service_factory.cc | 2 +- + chrome/browser/profiles/profile_attributes_entry.cc | 2 +- + chrome/browser/profiles/profile_impl.cc | 5 +---- + chrome/browser/profiles/profile_manager.cc | 7 ------- + chrome/browser/ui/webui/managed_ui_handler.cc | 4 ---- + .../browser/ui/webui/management/management_ui_handler.cc | 4 ---- + .../core/browser/supervised_user_pref_store.cc | 1 + + .../core/browser/supervised_user_preferences.cc | 6 +++++- + .../core/browser/supervised_user_service.cc | 5 +---- + .../supervised_user/core/browser/supervised_user_utils.cc | 1 + + components/supervised_user/core/common/features.cc | 6 ++++++ + 14 files changed, 17 insertions(+), 30 deletions(-) diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -780,7 +780,6 @@ if (current_toolchain == default_toolchain) { - "//components/dom_distiller/core:distiller_type_java", - "//components/ntp_tiles:ntp_tiles_enums_java", +@@ -783,7 +783,6 @@ if (current_toolchain == default_toolchain) { "//components/offline_pages/core:offline_page_model_enums_java", + "//components/sharing_message:sharing_dialog_type_generated_enum", + "//components/sharing_message:sharing_send_message_result_generated_enum", - "//components/supervised_user/core/browser:supervised_user_utils_enum_javagen", ] # From java_sources.gni. -diff --git a/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceCoordinator.java b/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceCoordinator.java ---- a/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceCoordinator.java -+++ b/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceCoordinator.java -@@ -67,7 +67,6 @@ import org.chromium.components.browser_ui.widget.displaystyle.UiConfig; - import org.chromium.components.feature_engagement.EventConstants; - import org.chromium.components.feature_engagement.Tracker; - import org.chromium.components.prefs.PrefService; --import org.chromium.components.supervised_user.SupervisedUserPreferences; - import org.chromium.components.user_prefs.UserPrefs; - import org.chromium.third_party.android.swiperefresh.SwipeRefreshLayout; - import org.chromium.ui.base.DeviceFormFactor; -@@ -784,9 +783,7 @@ public class FeedSurfaceCoordinator - * Returns true if the supervised user feed should be displayed. - */ - public boolean shouldDisplaySupervisedFeed() { -- PrefService prefService = UserPrefs.get(mProfile); -- return SupervisedUserPreferences.isSubjectToParentalControls(prefService) -- && ChromeFeatureList.isEnabled(ChromeFeatureList.KID_FRIENDLY_CONTENT_FEED); -+ return false; - } - - /** diff --git a/chrome/android/java/src/org/chromium/chrome/browser/feedback/ChromeFeedbackCollector.java b/chrome/android/java/src/org/chromium/chrome/browser/feedback/ChromeFeedbackCollector.java --- a/chrome/android/java/src/org/chromium/chrome/browser/feedback/ChromeFeedbackCollector.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/feedback/ChromeFeedbackCollector.java -@@ -85,7 +85,6 @@ public class ChromeFeedbackCollector extends FeedbackCollectorSetManagedPolicies(policy_service, policy_connector); factory->SetRecommendedPolicies(policy_service, policy_connector); @@ -112,7 +76,7 @@ diff --git a/chrome/browser/prefs/chrome_pref_service_factory.cc b/chrome/browse diff --git a/chrome/browser/profiles/profile_attributes_entry.cc b/chrome/browser/profiles/profile_attributes_entry.cc --- a/chrome/browser/profiles/profile_attributes_entry.cc +++ b/chrome/browser/profiles/profile_attributes_entry.cc -@@ -459,7 +459,7 @@ bool ProfileAttributesEntry::IsSigninRequired() const { +@@ -454,7 +454,7 @@ bool ProfileAttributesEntry::IsSigninRequired() const { } std::string ProfileAttributesEntry::GetSupervisedUserId() const { @@ -135,7 +99,7 @@ diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/p // Changes in the profile avatar. pref_change_registrar_.Add( -@@ -1629,6 +1625,7 @@ GURL ProfileImpl::GetHomePage() { +@@ -1631,6 +1627,7 @@ GURL ProfileImpl::GetHomePage() { } void ProfileImpl::UpdateSupervisedUserIdInStorage() { @@ -146,31 +110,18 @@ diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/p diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc --- a/chrome/browser/profiles/profile_manager.cc +++ b/chrome/browser/profiles/profile_manager.cc -@@ -1212,23 +1212,6 @@ void ProfileManager::InitProfileUserPrefs(Profile* profile) { +@@ -1213,10 +1213,6 @@ void ProfileManager::InitProfileUserPrefs(Profile* profile) { profile->GetPrefs()->SetString(prefs::kProfileName, profile_name); } -- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); -- bool force_supervised_user_id = --#if BUILDFLAG(IS_CHROMEOS_ASH) -- !ash::IsSigninBrowserContext(profile) && -- !ash::IsLockScreenAppBrowserContext(profile) && --#endif -- command_line->HasSwitch(switches::kSupervisedUserId); -- -- if (force_supervised_user_id) { -- supervised_user_id = -- command_line->GetSwitchValueASCII(switches::kSupervisedUserId); -- } -- if (force_supervised_user_id || -- !profile->GetPrefs()->HasPrefPath(prefs::kSupervisedUserId)) { +- if (!profile->GetPrefs()->HasPrefPath(prefs::kSupervisedUserId)) { - profile->GetPrefs()->SetString(prefs::kSupervisedUserId, - supervised_user_id); - } #if !BUILDFLAG(IS_ANDROID) if (profile->IsNewProfile()) { profile->GetPrefs()->SetBoolean(prefs::kHasSeenWelcomePage, false); -@@ -2041,9 +2024,6 @@ void ProfileManager::AddProfileToStorage(Profile* profile) { +@@ -2029,9 +2025,6 @@ void ProfileManager::AddProfileToStorage(Profile* profile) { init_params.icon_index = profile->GetPrefs()->GetInteger(prefs::kProfileAvatarIndex); @@ -222,7 +173,7 @@ diff --git a/components/supervised_user/core/browser/supervised_user_pref_store. diff --git a/components/supervised_user/core/browser/supervised_user_preferences.cc b/components/supervised_user/core/browser/supervised_user_preferences.cc --- a/components/supervised_user/core/browser/supervised_user_preferences.cc +++ b/components/supervised_user/core/browser/supervised_user_preferences.cc -@@ -165,6 +165,10 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) { +@@ -158,6 +158,10 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) { } void EnableParentalControls(PrefService& pref_service) { @@ -233,7 +184,7 @@ diff --git a/components/supervised_user/core/browser/supervised_user_preferences pref_service.SetString(prefs::kSupervisedUserId, supervised_user::kChildAccountSUID); SetIsChildAccountStatusKnown(pref_service); -@@ -187,7 +191,7 @@ bool IsSafeSitesEnabled(const PrefService& pref_service) { +@@ -180,7 +184,7 @@ bool IsSafeSitesEnabled(const PrefService& pref_service) { } bool IsSubjectToParentalControls(const PrefService& pref_service) { @@ -241,7 +192,7 @@ diff --git a/components/supervised_user/core/browser/supervised_user_preferences + return false; } - bool AreExtensionsPermissionsEnabled(const PrefService& pref_service) { + } // namespace supervised_user diff --git a/components/supervised_user/core/browser/supervised_user_service.cc b/components/supervised_user/core/browser/supervised_user_service.cc --- a/components/supervised_user/core/browser/supervised_user_service.cc +++ b/components/supervised_user/core/browser/supervised_user_service.cc @@ -256,7 +207,7 @@ diff --git a/components/supervised_user/core/browser/supervised_user_service.cc FirstTimeInterstitialBannerState banner_state = static_cast( user_prefs_->GetInteger(prefs::kFirstTimeInterstitialBannerState)); -@@ -190,6 +186,7 @@ FirstTimeInterstitialBannerState SupervisedUserService::GetUpdatedBannerState( +@@ -187,6 +183,7 @@ FirstTimeInterstitialBannerState SupervisedUserService::GetUpdatedBannerState( } void SupervisedUserService::SetActive(bool active) { @@ -278,7 +229,7 @@ diff --git a/components/supervised_user/core/browser/supervised_user_utils.cc b/ diff --git a/components/supervised_user/core/common/features.cc b/components/supervised_user/core/common/features.cc --- a/components/supervised_user/core/common/features.cc +++ b/components/supervised_user/core/common/features.cc -@@ -179,4 +179,10 @@ bool IsKidFriendlyContentFeedAvailable() { +@@ -177,4 +177,10 @@ bool IsKidFriendlyContentFeedAvailable() { return base::FeatureList::IsEnabled(kKidFriendlyContentFeed); } diff --git a/build/patches/Allow-playing-audio-in-background.patch b/build/patches/Allow-playing-audio-in-background.patch index e200abf39..f56ac3af6 100644 --- a/build/patches/Allow-playing-audio-in-background.patch +++ b/build/patches/Allow-playing-audio-in-background.patch @@ -11,7 +11,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/third_party/blink/renderer/platform/media/web_media_player_impl.cc b/third_party/blink/renderer/platform/media/web_media_player_impl.cc --- a/third_party/blink/renderer/platform/media/web_media_player_impl.cc +++ b/third_party/blink/renderer/platform/media/web_media_player_impl.cc -@@ -1240,6 +1240,12 @@ bool WebMediaPlayerImpl::HasAudio() const { +@@ -1249,6 +1249,12 @@ bool WebMediaPlayerImpl::HasAudio() const { return pipeline_metadata_.has_audio; } @@ -24,7 +24,7 @@ diff --git a/third_party/blink/renderer/platform/media/web_media_player_impl.cc void WebMediaPlayerImpl::EnabledAudioTracksChanged( const WebVector& enabledTrackIds) { DCHECK(main_task_runner_->BelongsToCurrentThread()); -@@ -3591,7 +3597,10 @@ bool WebMediaPlayerImpl::ShouldPausePlaybackWhenHidden() const { +@@ -3656,7 +3662,10 @@ bool WebMediaPlayerImpl::ShouldPausePlaybackWhenHidden() const { : HasAudio(); // Audio only stream is allowed to play when in background. diff --git a/build/patches/Always-use-new-tab-page-for-default-home-page.patch b/build/patches/Always-use-new-tab-page-for-default-home-page.patch index df874db6c..0d1c9dfc9 100644 --- a/build/patches/Always-use-new-tab-page-for-default-home-page.patch +++ b/build/patches/Always-use-new-tab-page-for-default-home-page.patch @@ -6,18 +6,18 @@ Ignore any partner-provided home page. License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - .../chromium/chrome/browser/homepage/HomepageManager.java | 4 ---- - .../partnercustomizations/PartnerBrowserCustomizations.java | 2 +- - .../org/chromium/components/search_engines/TemplateUrl.java | 1 + - .../search_engines/android/template_url_service_android.cc | 5 +---- - .../always-use-new-tab-page-for-default-home-page.inc | 2 ++ - 5 files changed, 5 insertions(+), 9 deletions(-) + .../org/chromium/chrome/browser/homepage/HomepageManager.java | 4 ---- + .../partnercustomizations/PartnerBrowserCustomizations.java | 2 +- + .../org/chromium/components/search_engines/TemplateUrl.java | 1 + + .../search_engines/android/template_url_service_android.cc | 1 + + .../always-use-new-tab-page-for-default-home-page.inc | 2 ++ + 5 files changed, 5 insertions(+), 5 deletions(-) create mode 100755 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/always-use-new-tab-page-for-default-home-page.inc diff --git a/chrome/android/java/src/org/chromium/chrome/browser/homepage/HomepageManager.java b/chrome/android/java/src/org/chromium/chrome/browser/homepage/HomepageManager.java --- a/chrome/android/java/src/org/chromium/chrome/browser/homepage/HomepageManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/homepage/HomepageManager.java -@@ -156,10 +156,6 @@ public class HomepageManager +@@ -155,10 +155,6 @@ public class HomepageManager * tab page if the homepage button is force enabled via flag. */ public GURL getDefaultHomepageGurl() { @@ -54,18 +54,14 @@ diff --git a/components/search_engines/android/java/src/org/chromium/components/ diff --git a/components/search_engines/android/template_url_service_android.cc b/components/search_engines/android/template_url_service_android.cc --- a/components/search_engines/android/template_url_service_android.cc +++ b/components/search_engines/android/template_url_service_android.cc -@@ -405,10 +405,7 @@ jboolean TemplateUrlServiceAndroid::SetPlayAPISearchEngine( +@@ -404,6 +404,7 @@ jboolean TemplateUrlServiceAndroid::SetPlayAPISearchEngine( + jimage_translate_source_language_param_key, const base::android::JavaParamRef& - jimage_translate_target_language_param_key, - jboolean set_as_default) { -- // The function is scheduled to run only when the service is loaded, see -- // `TemplateUrlService#runWhenLoaded()`. -- CHECK(template_url_service_->loaded(), base::NotFatalUntil::M128); -- + jimage_translate_target_language_param_key) { + if ((true)) return false; - // Check if there is already a search engine created from Play API. - TemplateURLService::TemplateURLVector template_urls = - template_url_service_->GetTemplateURLs(); + // The function is scheduled to run only when the service is loaded, see + // `TemplateUrlService#runWhenLoaded()`. + CHECK(template_url_service_->loaded(), base::NotFatalUntil::M128); diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/always-use-new-tab-page-for-default-home-page.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/always-use-new-tab-page-for-default-home-page.inc new file mode 100755 --- /dev/null diff --git a/build/patches/Ask-for-restart-on-connection-change.patch b/build/patches/Ask-for-restart-on-connection-change.patch index b2419e15d..66ead39c8 100644 --- a/build/patches/Ask-for-restart-on-connection-change.patch +++ b/build/patches/Ask-for-restart-on-connection-change.patch @@ -281,7 +281,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/in diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java -@@ -1189,7 +1189,10 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { +@@ -1128,7 +1128,10 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { mActivity, mStatusIndicatorCoordinator, isUrlBarFocusedSupplier, @@ -377,7 +377,7 @@ diff --git a/chrome/browser/tabmodel/android/java/src/org/chromium/chrome/browse /** * A set of convenience methods used for interacting with {@link TabList}s and {@link TabModel}s. -@@ -78,6 +82,20 @@ public class TabModelUtils { +@@ -79,6 +83,20 @@ public class TabModelUtils { return TabModel.INVALID_TAB_INDEX; } @@ -505,7 +505,7 @@ diff --git a/chrome/browser/ui/messages/android/java/src/org/chromium/chrome/bro diff --git a/chrome/browser/ui/messages/android/java/src/org/chromium/chrome/browser/ui/messages/snackbar/SnackbarManager.java b/chrome/browser/ui/messages/android/java/src/org/chromium/chrome/browser/ui/messages/snackbar/SnackbarManager.java --- a/chrome/browser/ui/messages/android/java/src/org/chromium/chrome/browser/ui/messages/snackbar/SnackbarManager.java +++ b/chrome/browser/ui/messages/android/java/src/org/chromium/chrome/browser/ui/messages/snackbar/SnackbarManager.java -@@ -287,6 +287,12 @@ public class SnackbarManager +@@ -318,6 +318,12 @@ public class SnackbarManager new SnackbarView( mActivity, this, @@ -516,12 +516,12 @@ diff --git a/chrome/browser/ui/messages/android/java/src/org/chromium/chrome/bro + } + }, currentSnackbar, - mSnackbarParentView, + mOriginalParentView, mWindowAndroid, diff --git a/chrome/browser/ui/messages/android/java/src/org/chromium/chrome/browser/ui/messages/snackbar/SnackbarView.java b/chrome/browser/ui/messages/android/java/src/org/chromium/chrome/browser/ui/messages/snackbar/SnackbarView.java --- a/chrome/browser/ui/messages/android/java/src/org/chromium/chrome/browser/ui/messages/snackbar/SnackbarView.java +++ b/chrome/browser/ui/messages/android/java/src/org/chromium/chrome/browser/ui/messages/snackbar/SnackbarView.java -@@ -52,6 +52,7 @@ public class SnackbarView implements InsetObserver.WindowInsetObserver { +@@ -51,6 +51,7 @@ public class SnackbarView implements InsetObserver.WindowInsetObserver { protected final ViewGroup mSnackbarView; protected final TemplatePreservingTextView mMessageView; private final TextView mActionButtonView; @@ -529,7 +529,7 @@ diff --git a/chrome/browser/ui/messages/android/java/src/org/chromium/chrome/bro private final ImageView mProfileImageView; private final int mAnimationDuration; private final boolean mIsTablet; -@@ -98,11 +99,12 @@ public class SnackbarView implements InsetObserver.WindowInsetObserver { +@@ -97,11 +98,12 @@ public class SnackbarView implements InsetObserver.WindowInsetObserver { public SnackbarView( Activity activity, OnClickListener listener, @@ -543,7 +543,7 @@ diff --git a/chrome/browser/ui/messages/android/java/src/org/chromium/chrome/bro } /** -@@ -121,6 +123,7 @@ public class SnackbarView implements InsetObserver.WindowInsetObserver { +@@ -120,6 +122,7 @@ public class SnackbarView implements InsetObserver.WindowInsetObserver { public SnackbarView( Activity activity, OnClickListener listener, @@ -551,7 +551,7 @@ diff --git a/chrome/browser/ui/messages/android/java/src/org/chromium/chrome/bro Snackbar snackbar, ViewGroup parentView, @Nullable WindowAndroid windowAndroid, -@@ -142,6 +145,8 @@ public class SnackbarView implements InsetObserver.WindowInsetObserver { +@@ -141,6 +144,8 @@ public class SnackbarView implements InsetObserver.WindowInsetObserver { (TemplatePreservingTextView) mContainerView.findViewById(R.id.snackbar_message); mActionButtonView = (TextView) mContainerView.findViewById(R.id.snackbar_button); mActionButtonView.setOnClickListener(listener); @@ -560,7 +560,7 @@ diff --git a/chrome/browser/ui/messages/android/java/src/org/chromium/chrome/bro mProfileImageView = (ImageView) mContainerView.findViewById(R.id.snackbar_profile_image); mEdgeToEdgeSupplier = edgeToEdgeSupplier; mEdgeToEdgePadAdjuster = -@@ -374,6 +379,12 @@ public class SnackbarView implements InsetObserver.WindowInsetObserver { +@@ -372,6 +377,12 @@ public class SnackbarView implements InsetObserver.WindowInsetObserver { mActionButtonView.setVisibility(View.VISIBLE); mActionButtonView.setContentDescription(snackbar.getActionText()); setViewText(mActionButtonView, snackbar.getActionText(), animate); @@ -576,7 +576,7 @@ diff --git a/chrome/browser/ui/messages/android/java/src/org/chromium/chrome/bro diff --git a/content/browser/web_contents/web_contents_android.cc b/content/browser/web_contents/web_contents_android.cc --- a/content/browser/web_contents/web_contents_android.cc +++ b/content/browser/web_contents/web_contents_android.cc -@@ -883,6 +883,22 @@ void WebContentsAndroid::SetFocus(JNIEnv* env, jboolean focused) { +@@ -907,6 +907,22 @@ void WebContentsAndroid::SetFocus(JNIEnv* env, jboolean focused) { view->SetFocus(focused); } @@ -613,7 +613,7 @@ diff --git a/content/browser/web_contents/web_contents_android.h b/content/brows 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 -@@ -3539,8 +3539,10 @@ void WebContentsImpl::Stop() { +@@ -3554,8 +3554,10 @@ void WebContentsImpl::Stop() { void WebContentsImpl::SetPageFrozen(bool frozen) { TRACE_EVENT1("content", "WebContentsImpl::SetPageFrozen", "frozen", frozen); @@ -627,7 +627,7 @@ diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser diff --git a/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java b/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java --- a/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java +++ b/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java -@@ -1161,6 +1161,12 @@ public class WebContentsImpl implements WebContents, RenderFrameHostDelegate, Wi +@@ -1162,6 +1162,12 @@ public class WebContentsImpl implements WebContents, RenderFrameHostDelegate, Wi WebContentsImplJni.get().setFocus(mNativeWebContentsAndroid, hasFocus); } @@ -640,7 +640,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/webcon @Override public void setDisplayCutoutSafeArea(Rect insets) { if (mNativeWebContentsAndroid == 0) return; -@@ -1440,6 +1446,8 @@ public class WebContentsImpl implements WebContents, RenderFrameHostDelegate, Wi +@@ -1448,6 +1454,8 @@ public class WebContentsImpl implements WebContents, RenderFrameHostDelegate, Wi void setFocus(long nativeWebContentsAndroid, boolean focused); @@ -652,7 +652,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/webcon diff --git a/content/public/android/java/src/org/chromium/content_public/browser/WebContents.java b/content/public/android/java/src/org/chromium/content_public/browser/WebContents.java --- a/content/public/android/java/src/org/chromium/content_public/browser/WebContents.java +++ b/content/public/android/java/src/org/chromium/content_public/browser/WebContents.java -@@ -286,6 +286,8 @@ public interface WebContents extends Parcelable { +@@ -288,6 +288,8 @@ public interface WebContents extends Parcelable { */ void setFocus(boolean hasFocus); @@ -664,7 +664,7 @@ diff --git a/content/public/android/java/src/org/chromium/content_public/browser diff --git a/content/public/test/android/javatests/src/org/chromium/content_public/browser/test/mock/MockWebContents.java b/content/public/test/android/javatests/src/org/chromium/content_public/browser/test/mock/MockWebContents.java --- a/content/public/test/android/javatests/src/org/chromium/content_public/browser/test/mock/MockWebContents.java +++ b/content/public/test/android/javatests/src/org/chromium/content_public/browser/test/mock/MockWebContents.java -@@ -191,6 +191,9 @@ public class MockWebContents implements WebContents { +@@ -193,6 +193,9 @@ public class MockWebContents implements WebContents { @Override public void setFocus(boolean hasFocus) {} @@ -709,7 +709,7 @@ new file mode 100644 diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc --- a/third_party/blink/renderer/core/dom/document.cc +++ b/third_party/blink/renderer/core/dom/document.cc -@@ -4338,6 +4338,7 @@ void Document::DispatchUnloadEvents(UnloadEventTimingInfo* unload_timing_info) { +@@ -4319,6 +4319,7 @@ void Document::DispatchUnloadEvents(UnloadEventTimingInfo* unload_timing_info) { } void Document::DispatchFreezeEvent() { @@ -720,7 +720,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -3206,6 +3206,7 @@ void LocalFrame::DidFreeze() { +@@ -3211,6 +3211,7 @@ void LocalFrame::DidFreeze() { LoaderFreezeMode freeze_mode = GetLoaderFreezeMode(); GetDocument()->Fetcher()->SetDefersLoading(freeze_mode); Loader().SetDefersLoading(freeze_mode); @@ -728,7 +728,7 @@ diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/ } void LocalFrame::DidResume() { -@@ -3220,6 +3221,7 @@ void LocalFrame::DidResume() { +@@ -3225,6 +3226,7 @@ void LocalFrame::DidResume() { GetDocument()->Fetcher()->SetDefersLoading(LoaderFreezeMode::kNone); Loader().SetDefersLoading(LoaderFreezeMode::kNone); @@ -739,7 +739,7 @@ diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/ diff --git a/third_party/blink/renderer/platform/scheduler/main_thread/frame_scheduler_impl.cc b/third_party/blink/renderer/platform/scheduler/main_thread/frame_scheduler_impl.cc --- a/third_party/blink/renderer/platform/scheduler/main_thread/frame_scheduler_impl.cc +++ b/third_party/blink/renderer/platform/scheduler/main_thread/frame_scheduler_impl.cc -@@ -967,7 +967,9 @@ SchedulingLifecycleState FrameSchedulerImpl::CalculateLifecycleState( +@@ -969,7 +969,9 @@ SchedulingLifecycleState FrameSchedulerImpl::CalculateLifecycleState( if (!parent_page_scheduler_) return SchedulingLifecycleState::kNotThrottled; if (parent_page_scheduler_->IsFrozen()) { diff --git a/build/patches/AudioBuffer-AnalyserNode-fp-mitigations.patch b/build/patches/AudioBuffer-AnalyserNode-fp-mitigations.patch index 750ffd57d..d14dd5e4e 100644 --- a/build/patches/AudioBuffer-AnalyserNode-fp-mitigations.patch +++ b/build/patches/AudioBuffer-AnalyserNode-fp-mitigations.patch @@ -96,7 +96,7 @@ diff --git a/third_party/blink/renderer/modules/webaudio/audio_context.cc b/thir #include "third_party/blink/public/platform/modules/webrtc/webrtc_logging.h" #include "third_party/blink/public/platform/web_audio_latency_hint.h" #include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h" -@@ -585,7 +586,9 @@ double AudioContext::baseLatency() const { +@@ -592,7 +593,9 @@ double AudioContext::baseLatency() const { DCHECK(IsMainThread()); DCHECK(destination()); @@ -118,7 +118,7 @@ diff --git a/third_party/blink/renderer/modules/webaudio/base_audio_context.cc b #include "third_party/blink/public/mojom/devtools/console_message.mojom-blink.h" #include "third_party/blink/public/mojom/frame/lifecycle.mojom-shared.h" #include "third_party/blink/public/platform/platform.h" -@@ -721,6 +722,17 @@ LocalDOMWindow* BaseAudioContext::GetWindow() const { +@@ -722,6 +723,17 @@ LocalDOMWindow* BaseAudioContext::GetWindow() const { return To(GetExecutionContext()); } @@ -207,7 +207,7 @@ diff --git a/third_party/blink/renderer/modules/webaudio/realtime_analyser.cc b/ 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 -@@ -396,8 +396,8 @@ +@@ -416,8 +416,8 @@ { // AudioContext.playoutStats interface. // https://chromestatus.com/feature/5172818344148992 diff --git a/build/patches/Block-gateway-attacks-via-websockets.patch b/build/patches/Block-gateway-attacks-via-websockets.patch index d58511075..31c5f57ea 100644 --- a/build/patches/Block-gateway-attacks-via-websockets.patch +++ b/build/patches/Block-gateway-attacks-via-websockets.patch @@ -60,7 +60,7 @@ diff --git a/third_party/blink/renderer/core/execution_context/execution_context diff --git a/third_party/blink/renderer/core/loader/base_fetch_context.h b/third_party/blink/renderer/core/loader/base_fetch_context.h --- a/third_party/blink/renderer/core/loader/base_fetch_context.h +++ b/third_party/blink/renderer/core/loader/base_fetch_context.h -@@ -94,6 +94,7 @@ class CORE_EXPORT BaseFetchContext : public FetchContext { +@@ -84,6 +84,7 @@ class CORE_EXPORT BaseFetchContext : public FetchContext { virtual SubresourceFilter* GetSubresourceFilter() const = 0; virtual bool ShouldBlockWebSocketByMixedContentCheck(const KURL&) const = 0; @@ -71,7 +71,7 @@ diff --git a/third_party/blink/renderer/core/loader/base_fetch_context.h b/third diff --git a/third_party/blink/renderer/core/loader/frame_fetch_context.cc b/third_party/blink/renderer/core/loader/frame_fetch_context.cc --- a/third_party/blink/renderer/core/loader/frame_fetch_context.cc +++ b/third_party/blink/renderer/core/loader/frame_fetch_context.cc -@@ -611,6 +611,26 @@ bool FrameFetchContext::ShouldBlockRequestByInspector(const KURL& url) const { +@@ -885,6 +885,26 @@ bool FrameFetchContext::ShouldBlockRequestByInspector(const KURL& url) const { return should_block_request; } diff --git a/build/patches/Block-qjz9zk-or-trk-requests.patch b/build/patches/Block-qjz9zk-or-trk-requests.patch index 5ed137413..194bc0934 100644 --- a/build/patches/Block-qjz9zk-or-trk-requests.patch +++ b/build/patches/Block-qjz9zk-or-trk-requests.patch @@ -64,7 +64,7 @@ diff --git a/chrome/browser/ui/singleton_tabs.cc b/chrome/browser/ui/singleton_t diff --git a/components/omnibox/browser/autocomplete_input.cc b/components/omnibox/browser/autocomplete_input.cc --- a/components/omnibox/browser/autocomplete_input.cc +++ b/components/omnibox/browser/autocomplete_input.cc -@@ -92,10 +92,15 @@ void OffsetComponentsExcludingScheme(url::Parsed* parts, int offset) { +@@ -97,10 +97,15 @@ void OffsetComponentsExcludingScheme(url::Parsed* parts, int offset) { bool HasScheme(const std::u16string& input, const char* scheme) { std::string utf8_input(base::UTF16ToUTF8(input)); url::Component view_source_scheme; @@ -80,7 +80,7 @@ diff --git a/components/omnibox/browser/autocomplete_input.cc b/components/omnib return url::FindAndCompareScheme(utf8_input, scheme, nullptr); } -@@ -592,7 +597,8 @@ void AutocompleteInput::ParseForEmphasizeComponents( +@@ -597,7 +602,8 @@ void AutocompleteInput::ParseForEmphasizeComponents( // For the view-source and blob schemes, we should emphasize the host of the // URL qualified by the view-source or blob prefix. if ((base::EqualsCaseInsensitiveASCII(scheme_str, kViewSourceScheme) || @@ -93,7 +93,7 @@ diff --git a/components/omnibox/browser/autocomplete_input.cc b/components/omnib diff --git a/components/url_formatter/url_fixer.cc b/components/url_formatter/url_fixer.cc --- a/components/url_formatter/url_fixer.cc +++ b/components/url_formatter/url_fixer.cc -@@ -575,6 +575,10 @@ GURL FixupURLInternal(const std::string& text, +@@ -580,6 +580,10 @@ GURL FixupURLInternal(const std::string& text, } } @@ -118,7 +118,7 @@ diff --git a/content/browser/child_process_security_policy_impl.cc b/content/bro diff --git a/net/BUILD.gn b/net/BUILD.gn --- a/net/BUILD.gn +++ b/net/BUILD.gn -@@ -1044,6 +1044,8 @@ component("net") { +@@ -1048,6 +1048,8 @@ component("net") { "url_request/url_request_http_job.cc", "url_request/url_request_http_job.h", "url_request/url_request_interceptor.cc", @@ -235,7 +235,7 @@ diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/ur #include "net/url_request/url_request_context.h" #include "net/url_request/url_request_job_factory.h" #include "url/url_constants.h" -@@ -590,6 +591,8 @@ std::unique_ptr URLRequestContextBuilder::Build() { +@@ -596,6 +597,8 @@ std::unique_ptr URLRequestContextBuilder::Build() { job_factory->SetProtocolHandler(scheme_handler.first, std::move(scheme_handler.second)); } diff --git a/build/patches/Bromite-auto-updater.patch b/build/patches/Bromite-auto-updater.patch index 5c0c577ac..a88f1df6d 100644 --- a/build/patches/Bromite-auto-updater.patch +++ b/build/patches/Bromite-auto-updater.patch @@ -35,11 +35,11 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../omaha/inline/InlineUpdateController.java | 57 ++++ .../safety_hub/SafetyHubFetchService.java | 5 - .../strings/android_chrome_strings.grd | 23 +- - .../endpoint_fetcher/endpoint_fetcher.cc | 101 ++++++- + .../endpoint_fetcher/endpoint_fetcher.cc | 122 ++++++-- .../endpoint_fetcher/endpoint_fetcher.h | 23 +- .../Bromite-auto-updater.inc | 3 + .../Bromite-auto-updater.inc | 1 + - 31 files changed, 1225 insertions(+), 75 deletions(-) + 31 files changed, 1226 insertions(+), 95 deletions(-) create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/omaha/CromiteUpdateStatusProvider.java create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/omaha/inline/BromiteInlineUpdateController.java create mode 100644 chrome/browser/endpoint_fetcher/BUILD.gn @@ -68,7 +68,7 @@ diff --git a/build/android/java/templates/BuildConfig.template b/build/android/j diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni --- a/build/config/android/rules.gni +++ b/build/config/android/rules.gni -@@ -1899,6 +1899,9 @@ if (!is_robolectric && enable_java_templates) { +@@ -1900,6 +1900,9 @@ if (!is_robolectric && enable_java_templates) { sources = [ "//build/android/java/templates/BuildConfig.template" ] defines = [] @@ -81,7 +81,7 @@ diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni --- a/chrome/android/chrome_java_sources.gni +++ b/chrome/android/chrome_java_sources.gni -@@ -865,6 +865,8 @@ chrome_java_sources = [ +@@ -864,6 +864,8 @@ chrome_java_sources = [ "java/src/org/chromium/chrome/browser/omaha/OmahaBase.java", "java/src/org/chromium/chrome/browser/omaha/OmahaDelegate.java", "java/src/org/chromium/chrome/browser/omaha/OmahaDelegateBase.java", @@ -672,7 +672,7 @@ new file mode 100644 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -2766,6 +2766,12 @@ static_library("browser") { +@@ -2509,6 +2509,12 @@ static_library("browser") { } if (is_android) { @@ -1085,7 +1085,7 @@ new file mode 100644 diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc --- a/chrome/browser/flags/android/chrome_feature_list.cc +++ b/chrome/browser/flags/android/chrome_feature_list.cc -@@ -264,6 +264,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { +@@ -271,6 +271,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { &kPriceChangeModule, &kPwaRestoreUi, &kPwaRestoreUiAtStartup, @@ -1096,14 +1096,14 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java -@@ -345,6 +345,7 @@ public abstract class ChromeFeatureList { +@@ -342,6 +342,7 @@ public abstract class ChromeFeatureList { public static final String INCOGNITO_REAUTHENTICATION_FOR_ANDROID = "IncognitoReauthenticationForAndroid"; public static final String INCOGNITO_SCREENSHOT = "IncognitoScreenshot"; + public static final String INLINE_UPDATE_FLOW = "InlineUpdateFlow"; public static final String INTEREST_FEED_V2_HEARTS = "InterestFeedV2Hearts"; public static final String IP_PROTECTION_V1 = "IpProtectionV1"; - public static final String KID_FRIENDLY_CONTENT_FEED = "KidFriendlyContentFeed"; + public static final String IP_PROTECTION_UX = "IpProtectionUx"; diff --git a/chrome/browser/omaha/android/BUILD.gn b/chrome/browser/omaha/android/BUILD.gn --- a/chrome/browser/omaha/android/BUILD.gn +++ b/chrome/browser/omaha/android/BUILD.gn @@ -1650,7 +1650,7 @@ new file mode 100644 diff --git a/chrome/browser/safety_hub/android/java/src/org/chromium/chrome/browser/safety_hub/SafetyHubFetchService.java b/chrome/browser/safety_hub/android/java/src/org/chromium/chrome/browser/safety_hub/SafetyHubFetchService.java --- a/chrome/browser/safety_hub/android/java/src/org/chromium/chrome/browser/safety_hub/SafetyHubFetchService.java +++ b/chrome/browser/safety_hub/android/java/src/org/chromium/chrome/browser/safety_hub/SafetyHubFetchService.java -@@ -65,9 +65,6 @@ public class SafetyHubFetchService implements SigninManager.SignInStateObserver, +@@ -62,9 +62,6 @@ public class SafetyHubFetchService implements SigninManager.SignInStateObserver, if (mSigninManager != null) { mSigninManager.addSignInStateObserver(this); } @@ -1660,7 +1660,7 @@ diff --git a/chrome/browser/safety_hub/android/java/src/org/chromium/chrome/brow } void addObserver(Observer observer) { -@@ -83,8 +80,6 @@ public class SafetyHubFetchService implements SigninManager.SignInStateObserver, +@@ -80,8 +77,6 @@ public class SafetyHubFetchService implements SigninManager.SignInStateObserver, if (mSigninManager != null) { mSigninManager.removeSignInStateObserver(this); } @@ -1672,7 +1672,7 @@ diff --git a/chrome/browser/safety_hub/android/java/src/org/chromium/chrome/brow diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd -@@ -2373,6 +2373,12 @@ Your Google account may have other forms of browsing history like searches and a +@@ -2328,6 +2328,12 @@ Your Google account may have other forms of browsing history like searches and a Chrome updates are no longer supported for this version of Android @@ -1685,7 +1685,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro -@@ -4274,7 +4280,10 @@ To change this setting, BEGIN_LINKdelete the Chrome d +@@ -4226,7 +4232,10 @@ To change this setting, BEGIN_LINKdelete the Chrome d @@ -1697,7 +1697,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro Newer version is available -@@ -4285,6 +4294,18 @@ To change this setting, BEGIN_LINKdelete the Chrome d +@@ -4237,6 +4246,18 @@ To change this setting, BEGIN_LINKdelete the Chrome d Android version is unsupported @@ -1719,7 +1719,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro diff --git a/components/endpoint_fetcher/endpoint_fetcher.cc b/components/endpoint_fetcher/endpoint_fetcher.cc --- a/components/endpoint_fetcher/endpoint_fetcher.cc +++ b/components/endpoint_fetcher/endpoint_fetcher.cc -@@ -19,6 +19,11 @@ +@@ -20,6 +20,11 @@ #include "services/network/public/cpp/simple_url_loader.h" #include "services/network/public/mojom/url_response_head.mojom.h" @@ -1731,7 +1731,7 @@ diff --git a/components/endpoint_fetcher/endpoint_fetcher.cc b/components/endpoi namespace { const char kContentTypeKey[] = "Content-Type"; const char kDeveloperKey[] = "X-Developer-Key"; -@@ -66,6 +71,7 @@ EndpointFetcher::EndpointFetcher( +@@ -78,6 +83,7 @@ EndpointFetcher::EndpointFetcher( http_method_(http_method), content_type_(content_type), timeout_(timeout), @@ -1739,7 +1739,7 @@ diff --git a/components/endpoint_fetcher/endpoint_fetcher.cc b/components/endpoi post_data_(post_data), headers_(headers), cors_exempt_headers_(cors_exempt_headers), -@@ -85,6 +91,7 @@ EndpointFetcher::EndpointFetcher( +@@ -98,6 +104,7 @@ EndpointFetcher::EndpointFetcher( http_method_("GET"), content_type_(std::string()), timeout_(base::Milliseconds(0)), @@ -1747,7 +1747,7 @@ diff --git a/components/endpoint_fetcher/endpoint_fetcher.cc b/components/endpoi post_data_(std::string()), annotation_tag_(annotation_tag), url_loader_factory_(url_loader_factory), -@@ -110,6 +117,7 @@ EndpointFetcher::EndpointFetcher( +@@ -123,6 +130,7 @@ EndpointFetcher::EndpointFetcher( http_method_(http_method), content_type_(content_type), timeout_(timeout), @@ -1755,7 +1755,7 @@ diff --git a/components/endpoint_fetcher/endpoint_fetcher.cc b/components/endpoi post_data_(post_data), annotation_tag_(annotation_tag), url_loader_factory_(url_loader_factory), -@@ -137,6 +145,7 @@ EndpointFetcher::EndpointFetcher( +@@ -150,6 +158,7 @@ EndpointFetcher::EndpointFetcher( http_method_(http_method), content_type_(content_type), timeout_(timeout), @@ -1763,7 +1763,7 @@ diff --git a/components/endpoint_fetcher/endpoint_fetcher.cc b/components/endpoi post_data_(post_data), headers_(headers), cors_exempt_headers_(cors_exempt_headers), -@@ -149,11 +158,29 @@ EndpointFetcher::EndpointFetcher( +@@ -162,11 +171,29 @@ EndpointFetcher::EndpointFetcher( EndpointFetcher::EndpointFetcher( const net::NetworkTrafficAnnotationTag& annotation_tag) : timeout_(kDefaultTimeOut), @@ -1793,16 +1793,19 @@ diff --git a/components/endpoint_fetcher/endpoint_fetcher.cc b/components/endpoi EndpointFetcher::~EndpointFetcher() = default; void EndpointFetcher::Fetch(EndpointFetcherCallback endpoint_fetcher_callback) { -@@ -212,6 +239,8 @@ void EndpointFetcher::PerformRequest( +@@ -224,8 +251,9 @@ void EndpointFetcher::PerformRequest( + auto resource_request = std::make_unique(); resource_request->method = http_method_; resource_request->url = url_; - resource_request->credentials_mode = network::mojom::CredentialsMode::kOmit; +- resource_request->credentials_mode = GetCredentialsMode(); +- ++ resource_request->credentials_mode = network::mojom::CredentialsMode::kOmit; + resource_request->load_flags = net::LOAD_BYPASS_CACHE | net::LOAD_DISABLE_CACHE + | net::LOAD_DO_NOT_SAVE_COOKIES; if (base::EqualsCaseInsensitiveASCII(http_method_, "POST")) { resource_request->headers.SetHeader(kContentTypeKey, content_type_); } -@@ -242,25 +271,50 @@ void EndpointFetcher::PerformRequest( +@@ -253,25 +281,50 @@ void EndpointFetcher::PerformRequest( default: break; } @@ -1831,7 +1834,7 @@ diff --git a/components/endpoint_fetcher/endpoint_fetcher.cc b/components/endpoi if (base::EqualsCaseInsensitiveASCII(http_method_, "POST")) { simple_url_loader_->AttachStringForUpload(post_data_, content_type_); } - simple_url_loader_->SetRetryOptions(kNumRetries, + simple_url_loader_->SetRetryOptions(GetMaxRetries(), network::SimpleURLLoader::RETRY_ON_5XX); - simple_url_loader_->SetTimeoutDuration(timeout_); - simple_url_loader_->SetAllowHttpErrorResults(true); @@ -1859,7 +1862,32 @@ diff --git a/components/endpoint_fetcher/endpoint_fetcher.cc b/components/endpoi } void EndpointFetcher::OnResponseFetched( -@@ -341,3 +395,38 @@ void EndpointFetcher::OnSanitizationResult( +@@ -349,24 +402,6 @@ void EndpointFetcher::OnSanitizationResult( + std::move(endpoint_fetcher_callback).Run(std::move(response)); + } + +-network::mojom::CredentialsMode EndpointFetcher::GetCredentialsMode() { +- if (!request_params_.has_value()) { +- return network::mojom::CredentialsMode::kOmit; +- } +- if (!request_params_.value().credentials_mode.has_value()) { +- return network::mojom::CredentialsMode::kOmit; +- } +- switch (request_params_.value().credentials_mode.value()) { +- case CredentialsMode::kOmit: +- return network::mojom::CredentialsMode::kOmit; +- case CredentialsMode::kInclude: +- return network::mojom::CredentialsMode::kInclude; +- } +- DCHECK(0) << base::StringPrintf( +- "Credentials mode %d not currently supported by EndpointFetcher\n", +- static_cast(request_params_.value().credentials_mode.value())); +-} +- + int EndpointFetcher::GetMaxRetries() { + if (!request_params_.has_value()) { + return kNumRetries; +@@ -380,3 +415,38 @@ int EndpointFetcher::GetMaxRetries() { std::string EndpointFetcher::GetUrlForTesting() { return url_.spec(); } @@ -1901,7 +1929,7 @@ diff --git a/components/endpoint_fetcher/endpoint_fetcher.cc b/components/endpoi diff --git a/components/endpoint_fetcher/endpoint_fetcher.h b/components/endpoint_fetcher/endpoint_fetcher.h --- a/components/endpoint_fetcher/endpoint_fetcher.h +++ b/components/endpoint_fetcher/endpoint_fetcher.h -@@ -21,6 +21,8 @@ +@@ -32,6 +32,8 @@ class EndpointFetcherTest; namespace base { class TimeDelta; } // namespace base @@ -1910,7 +1938,7 @@ diff --git a/components/endpoint_fetcher/endpoint_fetcher.h b/components/endpoin namespace network { struct ResourceRequest; -@@ -43,6 +45,8 @@ enum class FetchErrorType { +@@ -58,6 +60,8 @@ enum class FetchErrorType { struct EndpointResponse { std::string response; @@ -1919,7 +1947,7 @@ diff --git a/components/endpoint_fetcher/endpoint_fetcher.h b/components/endpoin int http_status_code{-1}; std::optional error_type; }; -@@ -99,6 +103,14 @@ class EndpointFetcher { +@@ -153,6 +157,14 @@ class EndpointFetcher { const GURL& url, const net::NetworkTrafficAnnotationTag& annotation_tag); @@ -1934,7 +1962,7 @@ diff --git a/components/endpoint_fetcher/endpoint_fetcher.h b/components/endpoin // Used for tests. Can be used if caller constructs their own // url_loader_factory and identity_manager. EndpointFetcher( -@@ -154,6 +166,11 @@ class EndpointFetcher { +@@ -209,6 +221,11 @@ class EndpointFetcher { void OnSanitizationResult(std::unique_ptr response, EndpointFetcherCallback endpoint_fetcher_callback, data_decoder::JsonSanitizer::Result result); @@ -1944,9 +1972,9 @@ diff --git a/components/endpoint_fetcher/endpoint_fetcher.h b/components/endpoin + const network::mojom::URLResponseHead& response_head, + std::vector* removed_headers); - enum AuthType { CHROME_API_KEY, OAUTH, NO_AUTH }; - AuthType auth_type_; -@@ -161,10 +178,11 @@ class EndpointFetcher { + network::mojom::CredentialsMode GetCredentialsMode(); + int GetMaxRetries(); +@@ -219,10 +236,11 @@ class EndpointFetcher { // Members set in constructor to be passed to network::ResourceRequest or // network::SimpleURLLoader. const std::string oauth_consumer_name_; @@ -1959,7 +1987,7 @@ diff --git a/components/endpoint_fetcher/endpoint_fetcher.h b/components/endpoin const std::string post_data_; const std::vector headers_; const std::vector cors_exempt_headers_; -@@ -188,6 +206,9 @@ class EndpointFetcher { +@@ -248,6 +266,9 @@ class EndpointFetcher { access_token_fetcher_; std::unique_ptr simple_url_loader_; diff --git a/build/patches/Bromite-subresource-adblocker.patch b/build/patches/Bromite-subresource-adblocker.patch index 8eea9e25c..42dfad584 100644 --- a/build/patches/Bromite-subresource-adblocker.patch +++ b/build/patches/Bromite-subresource-adblocker.patch @@ -22,7 +22,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../android/java/res/xml/main_preferences.xml | 5 + .../browser/settings/AdBlockEditor.java | 91 ++++++ .../browser/settings/AdBlockPreferences.java | 58 ++++ - .../chrome/browser/tabmodel/TabModelImpl.java | 2 +- + .../chrome/browser/tabmodel/TabModelImpl.java | 4 +- chrome/app/generated_resources.grd | 10 + chrome/browser/after_startup_task_utils.cc | 4 + chrome/browser/browser_process.h | 6 + @@ -33,7 +33,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../flags/android/adblock_native_gateway.cc | 31 ++ .../browser/flags/AdBlockNativeGateway.java | 30 ++ .../net/system_network_context_manager.cc | 4 + - .../sessions/session_restore_android.cc | 6 +- + .../sessions/session_restore_android.cc | 7 +- .../strings/android_chrome_strings.grd | 14 + chrome/common/pref_names.h | 5 + .../strings/android/site_settings.grdp | 3 + @@ -51,8 +51,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../browser/subresource_filter_features.cc | 116 +------- .../core/browser/verified_ruleset_dealer.cc | 4 + .../core/common/indexed_ruleset.cc | 5 +- - .../Bromite-subresource-adblocker.inc | 3 + - 40 files changed, 1256 insertions(+), 127 deletions(-) + 39 files changed, 1254 insertions(+), 129 deletions(-) create mode 100644 chrome/android/java/res/layout/adblock_editor.xml create mode 100644 chrome/android/java/res/xml/adblock_preferences.xml create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/settings/AdBlockEditor.java @@ -63,12 +62,11 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html create mode 100644 components/component_updater/adblock_updater_service.h create mode 100644 components/component_updater/download_filters_task.cc create mode 100644 components/component_updater/download_filters_task.h - create mode 100644 cromite_flags/third_party/blink/common/features_cc/Bromite-subresource-adblocker.inc diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -353,6 +353,7 @@ if (current_toolchain == default_toolchain) { +@@ -357,6 +357,7 @@ if (current_toolchain == default_toolchain) { "//chrome/android/modules/cablev2_authenticator/public:java", "//chrome/android/modules/stack_unwinder/provider:java", "//chrome/android/webapk/libs/client:client_java", @@ -79,7 +77,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_java_resources.gni --- a/chrome/android/chrome_java_resources.gni +++ b/chrome/android/chrome_java_resources.gni -@@ -428,6 +428,7 @@ chrome_java_resources = [ +@@ -433,6 +433,7 @@ chrome_java_resources = [ "java/res/layout/account_divider_preference.xml", "java/res/layout/account_management_account_row.xml", "java/res/layout/app_history_filter.xml", @@ -87,7 +85,7 @@ diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_ja "java/res/layout/auto_sign_in_first_run_dialog.xml", "java/res/layout/autofill_billing_address_dropdown.xml", "java/res/layout/autofill_card_name_and_number.xml", -@@ -620,6 +621,7 @@ chrome_java_resources = [ +@@ -623,6 +624,7 @@ chrome_java_resources = [ "java/res/xml/about_chrome_preferences.xml", "java/res/xml/account_management_preferences.xml", "java/res/xml/ad_services_config.xml", @@ -98,7 +96,7 @@ diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_ja diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni --- a/chrome/android/chrome_java_sources.gni +++ b/chrome/android/chrome_java_sources.gni -@@ -950,6 +950,8 @@ chrome_java_sources = [ +@@ -941,6 +941,8 @@ chrome_java_sources = [ "java/src/org/chromium/chrome/browser/permissions/PermissionSettingsBridge.java", "java/src/org/chromium/chrome/browser/permissions/PermissionUpdateRequester.java", "java/src/org/chromium/chrome/browser/photo_picker/DecoderServiceImpl.java", @@ -428,19 +426,21 @@ new file mode 100644 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelImpl.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelImpl.java -@@ -860,7 +860,7 @@ public class TabModelImpl extends TabModelJniBridge { - protected boolean createTabWithWebContents( - Tab parent, Profile profile, WebContents webContents) { - return getTabCreator(profile.isOffTheRecord()) -- .createTabWithWebContents(parent, webContents, TabLaunchType.FROM_RECENT_TABS); -+ .createTabWithWebContents(parent, webContents, TabLaunchType.FROM_LINK); +@@ -853,9 +853,7 @@ public class TabModelImpl extends TabModelJniBridge { + .createTabWithWebContents( + parent, + webContents, +- select +- ? TabLaunchType.FROM_RECENT_TABS_FOREGROUND +- : TabLaunchType.FROM_RECENT_TABS); ++ TabLaunchType.FROM_LINK); } @Override diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd -@@ -15805,6 +15805,16 @@ Please help our engineers fix this problem. Tell us what happened right before y +@@ -15905,6 +15905,16 @@ Please help our engineers fix this problem. Tell us what happened right before y Never show this again. @@ -481,7 +481,7 @@ diff --git a/chrome/browser/after_startup_task_utils.cc b/chrome/browser/after_s diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h --- a/chrome/browser/browser_process.h +++ b/chrome/browser/browser_process.h -@@ -21,6 +21,7 @@ +@@ -31,6 +31,7 @@ #include "build/chromeos_buildflags.h" #include "chrome/common/buildflags.h" #include "media/media_buildflags.h" @@ -489,7 +489,7 @@ diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h class BackgroundModeManager; class BrowserProcessPlatformPart; -@@ -72,6 +73,10 @@ namespace component_updater { +@@ -86,6 +87,10 @@ namespace component_updater { class ComponentUpdateService; } @@ -497,10 +497,10 @@ diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h +class AdBlockUpdaterService; +} + - namespace extensions { - class EventRouterForwarder; + namespace gcm { + class GCMDriver; } -@@ -255,6 +260,7 @@ class BrowserProcess { +@@ -264,6 +269,7 @@ class BrowserProcess { #endif virtual component_updater::ComponentUpdateService* component_updater() = 0; @@ -550,7 +550,7 @@ diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_proc MediaFileSystemRegistry* media_file_system_registry() override; WebRtcLogUploader* webrtc_log_uploader() override; network_time::NetworkTimeTracker* network_time_tracker() override; -@@ -420,6 +421,7 @@ class BrowserProcessImpl : public BrowserProcess, +@@ -419,6 +420,7 @@ class BrowserProcessImpl : public BrowserProcess, // to concerns over integrity of data shared between profiles, // but some users of component updater only install per-user. std::unique_ptr component_updater_; @@ -561,7 +561,7 @@ diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_proc diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc --- a/chrome/browser/chrome_browser_main.cc +++ b/chrome/browser/chrome_browser_main.cc -@@ -474,6 +474,9 @@ StartupProfileInfo CreateInitialProfile( +@@ -470,6 +470,9 @@ StartupProfileInfo CreateInitialProfile( // missing code in the above test. CHECK(profile_info.profile) << "Cannot get default profile."; @@ -672,7 +672,7 @@ new file mode 100755 diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc --- a/chrome/browser/net/system_network_context_manager.cc +++ b/chrome/browser/net/system_network_context_manager.cc -@@ -630,6 +630,10 @@ SystemNetworkContextManager::~SystemNetworkContextManager() { +@@ -635,6 +635,10 @@ SystemNetworkContextManager::~SystemNetworkContextManager() { void SystemNetworkContextManager::RegisterPrefs(PrefRegistrySimple* registry) { StubResolverConfigReader::RegisterPrefs(registry); @@ -686,14 +686,15 @@ diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/brows diff --git a/chrome/browser/sessions/session_restore_android.cc b/chrome/browser/sessions/session_restore_android.cc --- a/chrome/browser/sessions/session_restore_android.cc +++ b/chrome/browser/sessions/session_restore_android.cc -@@ -56,8 +56,10 @@ content::WebContents* SessionRestore::RestoreForeignSessionTab( +@@ -57,8 +57,11 @@ content::WebContents* SessionRestore::RestoreForeignSessionTab( DCHECK(current_tab); // If swapped, return the current tab's most up-to-date web contents. if (disposition == WindowOpenDisposition::CURRENT_TAB) { - current_tab->SwapWebContents(std::move(new_web_contents), false, false); - return current_tab->web_contents(); + int active_tab_index = tab_model->GetActiveIndex(); -+ tab_model->CreateTab(current_tab, new_web_contents.release()); ++ tab_model->CreateTab(current_tab, new_web_contents.release(), ++ disposition == WindowOpenDisposition::NEW_BACKGROUND_TAB); + tab_model->CloseTabAt(active_tab_index); + return raw_new_web_contents; } @@ -726,7 +727,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h --- a/chrome/common/pref_names.h +++ b/chrome/common/pref_names.h -@@ -2779,6 +2779,11 @@ inline constexpr char kAudioCaptureAllowed[] = "hardware.audio_capture_enabled"; +@@ -2824,6 +2824,11 @@ inline constexpr char kAudioCaptureAllowed[] = "hardware.audio_capture_enabled"; inline constexpr char kAudioCaptureAllowedUrls[] = "hardware.audio_capture_allowed_urls"; @@ -1568,7 +1569,7 @@ diff --git a/components/subresource_filter/content/browser/content_subresource_f web_contents_helper_(web_contents_helper) {} ContentSubresourceFilterThrottleManager:: -@@ -668,6 +672,17 @@ ContentSubresourceFilterThrottleManager:: +@@ -667,6 +671,17 @@ ContentSubresourceFilterThrottleManager:: throttle->NotifyPageActivationWithRuleset(EnsureRulesetHandle(), ad_tagging_state); } @@ -1984,12 +1985,4 @@ diff --git a/components/subresource_filter/core/common/indexed_ruleset.cc b/comp return flat::VerifyIndexedRulesetBuffer(verifier) ? VerifyStatus::kChecksumFailVerifierPass : VerifyStatus::kChecksumFailVerifierFail; -diff --git a/cromite_flags/third_party/blink/common/features_cc/Bromite-subresource-adblocker.inc b/cromite_flags/third_party/blink/common/features_cc/Bromite-subresource-adblocker.inc -new file mode 100644 ---- /dev/null -+++ b/cromite_flags/third_party/blink/common/features_cc/Bromite-subresource-adblocker.inc -@@ -0,0 +1,3 @@ -+SET_CROMITE_FEATURE_ENABLED(kAutomaticLazyFrameLoadingToAds); -+SET_CROMITE_FEATURE_DISABLED(kAutomaticLazyFrameLoadingToEmbeds); -+SET_CROMITE_FEATURE_DISABLED(kAutomaticLazyFrameLoadingToEmbedUrls); -- diff --git a/build/patches/Bubble-Locking-on-UI-DevTools.patch b/build/patches/Bubble-Locking-on-UI-DevTools.patch index c8d5a2027..0ed081efa 100644 --- a/build/patches/Bubble-Locking-on-UI-DevTools.patch +++ b/build/patches/Bubble-Locking-on-UI-DevTools.patch @@ -33,7 +33,7 @@ diff --git a/chrome/browser/ui/views/toolbar/reload_button.cc b/chrome/browser/u diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h --- a/ui/views/widget/widget.h +++ b/ui/views/widget/widget.h -@@ -1239,6 +1239,19 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, +@@ -1235,6 +1235,19 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, void SetAllowScreenshots(bool allow); bool AreScreenshotsAllowed(); @@ -53,7 +53,7 @@ diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h protected: // Creates the RootView to be used within this Widget. Subclasses may override // to create custom RootViews that do specialized event processing. -@@ -1278,13 +1291,6 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, +@@ -1274,13 +1287,6 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, ui::ColorProviderKey GetColorProviderKey() const override; private: @@ -67,7 +67,7 @@ diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h class PaintAsActiveLockImpl; friend class ButtonTest; -@@ -1295,11 +1301,6 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, +@@ -1291,11 +1297,6 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, friend class ui_devtools::PageAgentViews; friend void DisableActivationChangeHandlingForTests(); diff --git a/build/patches/Chrome-web-store-protection.patch b/build/patches/Chrome-web-store-protection.patch index da1d3ddc1..bf1a83d37 100644 --- a/build/patches/Chrome-web-store-protection.patch +++ b/build/patches/Chrome-web-store-protection.patch @@ -65,7 +65,7 @@ diff --git a/chrome/app/extensions_strings.grdp b/chrome/app/extensions_strings. diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.cc b/chrome/browser/extensions/api/developer_private/developer_private_api.cc --- a/chrome/browser/extensions/api/developer_private/developer_private_api.cc +++ b/chrome/browser/extensions/api/developer_private/developer_private_api.cc -@@ -130,6 +130,12 @@ +@@ -131,6 +131,12 @@ #include "url/gurl.h" #include "url/origin.h" @@ -78,7 +78,7 @@ diff --git a/chrome/browser/extensions/api/developer_private/developer_private_a namespace extensions { namespace developer = api::developer_private; -@@ -475,10 +481,32 @@ std::unique_ptr DeveloperPrivateAPI::CreateProfileInfo( +@@ -476,10 +482,32 @@ std::unique_ptr DeveloperPrivateAPI::CreateProfileInfo( info->is_mv2_deprecation_notice_dismissed = ManifestV2ExperimentManager::Get(profile) ->DidUserAcknowledgeNoticeGlobally(); @@ -112,7 +112,7 @@ diff --git a/chrome/browser/extensions/api/developer_private/developer_private_a template <> void BrowserContextKeyedAPIFactory< DeveloperPrivateAPI>::DeclareFactoryDependencies() { -@@ -916,6 +944,7 @@ ExtensionFunction::ResponseAction DeveloperPrivateAutoUpdateFunction::Run() { +@@ -917,6 +945,7 @@ ExtensionFunction::ResponseAction DeveloperPrivateAutoUpdateFunction::Run() { ExtensionUpdater::CheckParams params; params.fetch_priority = DownloadFetchPriority::kForeground; params.install_immediately = true; @@ -120,7 +120,7 @@ diff --git a/chrome/browser/extensions/api/developer_private/developer_private_a params.callback = base::BindOnce(&DeveloperPrivateAutoUpdateFunction::OnComplete, this); updater->CheckNow(std::move(params)); -@@ -1056,7 +1085,7 @@ DeveloperPrivateUpdateProfileConfigurationFunction::Run() { +@@ -1057,7 +1086,7 @@ DeveloperPrivateUpdateProfileConfigurationFunction::Run() { const developer::ProfileConfigurationUpdate& update = params->update; @@ -128,7 +128,7 @@ diff --git a/chrome/browser/extensions/api/developer_private/developer_private_a + if (update.in_developer_mode.has_value() && update.in_developer_mode) { Profile* profile = Profile::FromBrowserContext(browser_context()); CHECK(profile); - if (supervised_user::AreExtensionsPermissionsEnabled( + if (supervised_user::AreExtensionsPermissionsEnabled(profile)) { @@ -1071,6 +1100,11 @@ DeveloperPrivateUpdateProfileConfigurationFunction::Run() { ->MarkNoticeAsAcknowledgedGlobally(); } @@ -165,15 +165,16 @@ diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api #include "extensions/common/manifest.h" #include "extensions/common/manifest_constants.h" #include "extensions/common/manifest_handlers/permissions_parser.h" -@@ -225,12 +226,16 @@ WebstorePrivateApi::Delegate* test_delegate = nullptr; +@@ -227,6 +228,8 @@ WebstorePrivateApi::Delegate* test_delegate = nullptr; // there was previously stored data, or an empty string otherwise. The Set will // overwrite any previous login. std::string GetWebstoreLogin(Profile* profile) { + if (!base::FeatureList::IsEnabled(extensions_features::kEnableExtensionManagementToChromeStore)) + return std::string(); - if (profile->GetPrefs()->HasPrefPath(kWebstoreLogin)) + if (profile->GetPrefs()->HasPrefPath(kWebstoreLogin)) { return profile->GetPrefs()->GetString(kWebstoreLogin); - return std::string(); + } +@@ -234,6 +237,8 @@ std::string GetWebstoreLogin(Profile* profile) { } void SetWebstoreLogin(Profile* profile, const std::string& login) { @@ -182,7 +183,7 @@ diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api profile->GetPrefs()->SetString(kWebstoreLogin, login); } -@@ -240,6 +245,8 @@ void RecordWebstoreExtensionInstallResult(bool success) { +@@ -243,6 +248,8 @@ void RecordWebstoreExtensionInstallResult(bool success) { api::webstore_private::ExtensionInstallStatus ConvertExtensionInstallStatusForAPI(ExtensionInstallStatus status) { @@ -191,7 +192,7 @@ diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api switch (status) { case kCanRequest: return api::webstore_private::ExtensionInstallStatus::kCanRequest; -@@ -1168,7 +1175,8 @@ ExtensionFunction::ResponseAction +@@ -1174,7 +1181,8 @@ ExtensionFunction::ResponseAction WebstorePrivateIsInIncognitoModeFunction::Run() { Profile* profile = Profile::FromBrowserContext(browser_context()); return RespondNow(ArgumentList(IsInIncognitoMode::Results::Create( @@ -201,7 +202,7 @@ diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api } WebstorePrivateIsPendingCustodianApprovalFunction:: -@@ -1263,11 +1271,14 @@ WebstorePrivateGetReferrerChainFunction::Run() { +@@ -1269,11 +1277,14 @@ WebstorePrivateGetReferrerChainFunction::Run() { request.mutable_referrer_chain_options()->set_recent_navigations_to_collect( recent_navigations_to_collect); @@ -220,7 +221,7 @@ diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api diff --git a/chrome/browser/extensions/cws_info_service.cc b/chrome/browser/extensions/cws_info_service.cc --- a/chrome/browser/extensions/cws_info_service.cc +++ b/chrome/browser/extensions/cws_info_service.cc -@@ -162,6 +162,7 @@ namespace extensions { +@@ -163,6 +163,7 @@ namespace extensions { BASE_FEATURE(kCWSInfoService, "CWSInfoService", base::FEATURE_ENABLED_BY_DEFAULT); @@ -250,7 +251,7 @@ diff --git a/chrome/browser/extensions/extension_system_impl.cc b/chrome/browser diff --git a/chrome/browser/extensions/updater/chrome_extension_downloader_factory.cc b/chrome/browser/extensions/updater/chrome_extension_downloader_factory.cc --- a/chrome/browser/extensions/updater/chrome_extension_downloader_factory.cc +++ b/chrome/browser/extensions/updater/chrome_extension_downloader_factory.cc -@@ -49,7 +49,6 @@ ChromeExtensionDownloaderFactory::CreateForURLLoaderFactory( +@@ -50,7 +50,6 @@ ChromeExtensionDownloaderFactory::CreateForURLLoaderFactory( manifest_query_params += "&testrequest=1"; } downloader->set_manifest_query_params(manifest_query_params); @@ -465,7 +466,7 @@ diff --git a/chrome/browser/resources/extensions/manager.html b/chrome/browser/r diff --git a/chrome/browser/resources/extensions/manager.ts b/chrome/browser/resources/extensions/manager.ts --- a/chrome/browser/resources/extensions/manager.ts +++ b/chrome/browser/resources/extensions/manager.ts -@@ -127,6 +127,11 @@ export class ExtensionsManagerElement extends ExtensionsManagerElementBase { +@@ -120,6 +120,11 @@ export class ExtensionsManagerElement extends ExtensionsManagerElementBase { value: () => loadTimeData.getBoolean('MV2DeprecationNoticeDismissed'), }, @@ -477,7 +478,7 @@ diff --git a/chrome/browser/resources/extensions/manager.ts b/chrome/browser/res showActivityLog: { type: Boolean, value: () => loadTimeData.getBoolean('showActivityLog'), -@@ -229,6 +234,7 @@ export class ExtensionsManagerElement extends ExtensionsManagerElementBase { +@@ -210,6 +215,7 @@ export class ExtensionsManagerElement extends ExtensionsManagerElementBase { delegate: Service; inDevMode: boolean; isMv2DeprecationNoticeDismissed: boolean; @@ -485,7 +486,7 @@ diff --git a/chrome/browser/resources/extensions/manager.ts b/chrome/browser/res showActivityLog: boolean; enableEnhancedSiteControls: boolean; devModeControlledByPolicy: boolean; -@@ -301,6 +307,7 @@ export class ExtensionsManagerElement extends ExtensionsManagerElementBase { +@@ -277,6 +283,7 @@ export class ExtensionsManagerElement extends ExtensionsManagerElementBase { this.canLoadUnpacked = profileInfo.canLoadUnpacked; this.isMv2DeprecationNoticeDismissed = profileInfo.isMv2DeprecationNoticeDismissed; @@ -549,7 +550,7 @@ diff --git a/chrome/browser/resources/extensions/toolbar.ts b/chrome/browser/res /** Opens the dialog to load unpacked extensions. */ loadUnpacked(): Promise; -@@ -71,6 +73,13 @@ export class ExtensionsToolbarElement extends ExtensionsToolbarElementBase { +@@ -67,6 +69,13 @@ export class ExtensionsToolbarElement extends ExtensionsToolbarElementBase { reflectToAttribute: true, }, @@ -563,7 +564,7 @@ diff --git a/chrome/browser/resources/extensions/toolbar.ts b/chrome/browser/res devModeControlledByPolicy: Boolean, isChildAccount: Boolean, -@@ -87,6 +96,7 @@ export class ExtensionsToolbarElement extends ExtensionsToolbarElementBase { +@@ -79,6 +88,7 @@ export class ExtensionsToolbarElement extends ExtensionsToolbarElementBase { expanded_: Boolean, showPackDialog_: Boolean, @@ -571,7 +572,7 @@ diff --git a/chrome/browser/resources/extensions/toolbar.ts b/chrome/browser/res /** * Prevents initiating update while update is in progress. -@@ -98,6 +108,8 @@ export class ExtensionsToolbarElement extends ExtensionsToolbarElementBase { +@@ -90,6 +100,8 @@ export class ExtensionsToolbarElement extends ExtensionsToolbarElementBase { extensions: chrome.developerPrivate.ExtensionInfo[]; delegate: ToolbarDelegate; inDevMode: boolean; @@ -580,7 +581,7 @@ diff --git a/chrome/browser/resources/extensions/toolbar.ts b/chrome/browser/res devModeControlledByPolicy: boolean; isChildAccount: boolean; -@@ -150,6 +162,14 @@ export class ExtensionsToolbarElement extends ExtensionsToolbarElementBase { +@@ -138,6 +150,14 @@ export class ExtensionsToolbarElement extends ExtensionsToolbarElementBase { 'Options_ToggleDeveloperMode_' + (e.detail ? 'Enabled' : 'Disabled')); } @@ -614,8 +615,8 @@ diff --git a/chrome/browser/resources/webstore_app/manifest.json b/chrome/browse diff --git a/chrome/browser/ui/webui/extensions/extensions_ui.cc b/chrome/browser/ui/webui/extensions/extensions_ui.cc --- a/chrome/browser/ui/webui/extensions/extensions_ui.cc +++ b/chrome/browser/ui/webui/extensions/extensions_ui.cc -@@ -61,6 +61,8 @@ - #include "chrome/browser/ui/webui/extensions/ash/kiosk_apps_handler.h" +@@ -63,6 +63,8 @@ + #include "chrome/browser/ash/crosapi/browser_util.h" #endif +#include "chrome/browser/extensions/api/developer_private/developer_private_api.h" @@ -623,7 +624,7 @@ diff --git a/chrome/browser/ui/webui/extensions/extensions_ui.cc b/chrome/browse namespace extensions { namespace { -@@ -374,6 +376,8 @@ content::WebUIDataSource* CreateAndAddExtensionsSource(Profile* profile, +@@ -376,6 +378,8 @@ content::WebUIDataSource* CreateAndAddExtensionsSource(Profile* profile, {"itemSuspiciousInstallLearnMore", IDS_EXTENSIONS_ADDED_WITHOUT_KNOWLEDGE_LEARN_MORE}, {"toolbarDevMode", IDS_EXTENSIONS_DEVELOPER_MODE}, @@ -632,7 +633,7 @@ diff --git a/chrome/browser/ui/webui/extensions/extensions_ui.cc b/chrome/browse {"toolbarLoadUnpacked", IDS_EXTENSIONS_TOOLBAR_LOAD_UNPACKED}, {"toolbarLoadUnpackedDone", IDS_EXTENSIONS_TOOLBAR_LOAD_UNPACKED_DONE}, {"toolbarPack", IDS_EXTENSIONS_TOOLBAR_PACK}, -@@ -446,6 +450,10 @@ content::WebUIDataSource* CreateAndAddExtensionsSource(Profile* profile, +@@ -448,6 +452,10 @@ content::WebUIDataSource* CreateAndAddExtensionsSource(Profile* profile, source->AddString("hostPermissionsLearnMoreLink", chrome_extension_constants::kRuntimeHostPermissionsHelpURL); source->AddBoolean(kInDevModeKey, in_dev_mode); @@ -688,7 +689,7 @@ diff --git a/chrome/common/extensions/api/developer_private.idl b/chrome/common/ diff --git a/components/update_client/update_query_params.cc b/components/update_client/update_query_params.cc --- a/components/update_client/update_query_params.cc +++ b/components/update_client/update_query_params.cc -@@ -88,9 +88,8 @@ UpdateQueryParamsDelegate* g_delegate = nullptr; +@@ -86,9 +86,8 @@ UpdateQueryParamsDelegate* g_delegate = nullptr; // static std::string UpdateQueryParams::Get(ProdId prod) { return base::StringPrintf( @@ -700,7 +701,7 @@ diff --git a/components/update_client/update_query_params.cc b/components/update g_delegate ? g_delegate->GetExtraParams().c_str() : ""); } -@@ -151,7 +150,7 @@ const char* UpdateQueryParams::GetNaclArch() { +@@ -149,7 +148,7 @@ const char* UpdateQueryParams::GetNaclArch() { // static std::string UpdateQueryParams::GetProdVersion() { @@ -1135,7 +1136,7 @@ diff --git a/extensions/browser/updater/safe_manifest_parser.cc b/extensions/bro diff --git a/extensions/common/extension_features.cc b/extensions/common/extension_features.cc --- a/extensions/common/extension_features.cc +++ b/extensions/common/extension_features.cc -@@ -183,4 +183,19 @@ BASE_FEATURE(kUseNewServiceWorkerTaskQueue, +@@ -190,4 +190,19 @@ BASE_FEATURE(kUseNewServiceWorkerTaskQueue, "UseNewServiceWorkerTaskQueue", base::FEATURE_DISABLED_BY_DEFAULT); @@ -1158,7 +1159,7 @@ diff --git a/extensions/common/extension_features.cc b/extensions/common/extensi diff --git a/extensions/common/extension_features.h b/extensions/common/extension_features.h --- a/extensions/common/extension_features.h +++ b/extensions/common/extension_features.h -@@ -217,6 +217,10 @@ BASE_DECLARE_FEATURE(kUseItemSnippetsAPI); +@@ -224,6 +224,10 @@ BASE_DECLARE_FEATURE(kUseItemSnippetsAPI); // If enabled, use the new simpler, more efficient service worker task queue. BASE_DECLARE_FEATURE(kUseNewServiceWorkerTaskQueue); diff --git a/build/patches/Clear-CORS-Preflight-Cache-on-clearing-data.patch b/build/patches/Clear-CORS-Preflight-Cache-on-clearing-data.patch index c728f2fad..4d6fc0f5d 100644 --- a/build/patches/Clear-CORS-Preflight-Cache-on-clearing-data.patch +++ b/build/patches/Clear-CORS-Preflight-Cache-on-clearing-data.patch @@ -79,7 +79,7 @@ diff --git a/services/network/cors/preflight_result.cc b/services/network/cors/p diff --git a/services/network/network_context.cc b/services/network/network_context.cc --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1255,6 +1255,7 @@ void NetworkContext::ClearHttpCache(base::Time start_time, +@@ -1275,6 +1275,7 @@ void NetworkContext::ClearHttpCache(base::Time start_time, base::Time end_time, mojom::ClearDataFilterPtr filter, ClearHttpCacheCallback callback) { diff --git a/build/patches/Client-hints-overrides.patch b/build/patches/Client-hints-overrides.patch index 45f4b0507..f5479ed8a 100644 --- a/build/patches/Client-hints-overrides.patch +++ b/build/patches/Client-hints-overrides.patch @@ -20,9 +20,9 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../blink/renderer/core/frame/navigator_ua.idl | 4 +++- .../renderer/core/frame/navigator_ua_data.cc | 1 + .../renderer/core/frame/navigator_ua_data.idl | 5 ++++- - .../renderer/core/loader/base_fetch_context.cc | 6 ++++-- + .../renderer/core/loader/frame_fetch_context.cc | 4 +++- .../platform/runtime_enabled_features.json5 | 5 +++++ - 15 files changed, 56 insertions(+), 14 deletions(-) + 15 files changed, 55 insertions(+), 13 deletions(-) create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Client-hints-overrides.inc create mode 100644 cromite_flags/content/common/features_cc/Client-hints-overrides.inc create mode 100644 cromite_flags/services/network/public/cpp/features_cc/Client-hints-overrides.inc @@ -90,7 +90,7 @@ diff --git a/content/browser/client_hints/client_hints.cc b/content/browser/clie diff --git a/content/browser/loader/navigation_url_loader_impl.cc b/content/browser/loader/navigation_url_loader_impl.cc --- a/content/browser/loader/navigation_url_loader_impl.cc +++ b/content/browser/loader/navigation_url_loader_impl.cc -@@ -1206,6 +1206,11 @@ void NavigationURLLoaderImpl::OnAcceptCHFrameReceived( +@@ -1208,6 +1208,11 @@ void NavigationURLLoaderImpl::OnAcceptCHFrameReceived( return; } @@ -131,7 +131,7 @@ new file mode 100644 diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc -@@ -107,6 +107,7 @@ const size_t kMaxRestarts = 32; +@@ -108,6 +108,7 @@ const size_t kMaxRestarts = 32; // Returns true when Early Hints are allowed on the given protocol. bool EarlyHintsAreAllowedOn(HttpConnectionInfo connection_info) { @@ -157,7 +157,7 @@ diff --git a/third_party/blink/common/client_hints/client_hints.cc b/third_party #include "base/strings/string_util.h" #include "services/network/public/cpp/client_hints.h" #include "third_party/blink/public/common/features.h" -+#include "third_party/blink/renderer/platform/runtime_enabled_features.h" ++#include "third_party/blink/public/common/features_generated.h" #include "third_party/blink/public/common/permissions_policy/permissions_policy.h" #include "url/origin.h" @@ -170,7 +170,7 @@ diff --git a/third_party/blink/common/client_hints/client_hints.cc b/third_party case network::mojom::WebClientHintsType::kUAMobile: case network::mojom::WebClientHintsType::kUAPlatform: - return true; -+ return RuntimeEnabledFeatures::UserAgentClientHintEnabled(); ++ return base::FeatureList::IsEnabled(blink::features::kUserAgentClientHint); + case network::mojom::WebClientHintsType::kSaveData: + return false; default: @@ -231,40 +231,31 @@ diff --git a/third_party/blink/renderer/core/frame/navigator_ua_data.idl b/third [HighEntropy, MeasureAs=NavigatorUAData_Brands] readonly attribute FrozenArray brands; [HighEntropy=Direct, MeasureAs=NavigatorUAData_Mobile] readonly attribute boolean mobile; [HighEntropy=Direct, MeasureAs=NavigatorUAData_Platform] readonly attribute DOMString platform; -diff --git a/third_party/blink/renderer/core/loader/base_fetch_context.cc b/third_party/blink/renderer/core/loader/base_fetch_context.cc ---- a/third_party/blink/renderer/core/loader/base_fetch_context.cc -+++ b/third_party/blink/renderer/core/loader/base_fetch_context.cc -@@ -167,7 +167,7 @@ void BaseFetchContext::AddClientHintsIfNecessary( - // specifying accomponying client hints, in which case we disable sending - // them. - using network::mojom::blink::WebClientHintsType; -- if (ua) { -+ if (RuntimeEnabledFeatures::UserAgentClientHintEnabled() && ua) { - // ShouldSendClientHint is called to make sure UA is controlled by - // Permissions Policy. - if (ShouldSendClientHint(policy, resource_origin, is_1p_origin, -@@ -329,7 +329,7 @@ void BaseFetchContext::AddClientHintsIfNecessary( +diff --git a/third_party/blink/renderer/core/loader/frame_fetch_context.cc b/third_party/blink/renderer/core/loader/frame_fetch_context.cc +--- a/third_party/blink/renderer/core/loader/frame_fetch_context.cc ++++ b/third_party/blink/renderer/core/loader/frame_fetch_context.cc +@@ -216,6 +216,8 @@ bool ShouldSendClientHint(const PermissionsPolicy& policy, + bool is_1p_origin, + network::mojom::blink::WebClientHintsType type, + const ClientHintsPreferences& hints_preferences) { ++ if (!RuntimeEnabledFeatures::UserAgentClientHintEnabled()) ++ return false; + // For subresource requests, sending the hint in the fetch request based on + // the permissions policy. + if (!policy.IsFeatureEnabledForOrigin( +@@ -600,7 +602,7 @@ void FrameFetchContext::AddClientHintsIfNecessary( } // Only send User Agent hints if the info is available - if (ua) { + if (RuntimeEnabledFeatures::UserAgentClientHintEnabled() && ua) { - if (ShouldSendClientHint(policy, resource_origin, is_1p_origin, - WebClientHintsType::kUAArch, hints_preferences)) { - SetHttpHeader(WebClientHintsType::kUAArch, -@@ -682,6 +682,8 @@ bool BaseFetchContext::ShouldSendClientHint( - bool is_1p_origin, - network::mojom::blink::WebClientHintsType type, - const ClientHintsPreferences& hints_preferences) const { -+ if (!RuntimeEnabledFeatures::UserAgentClientHintEnabled()) -+ return false; - // For subresource requests, sending the hint in the fetch request based on - // the permissions policy. - if ((!policy || + // ShouldSendClientHint is called to make sure UA is controlled by + // Permissions Policy. + if (ShouldSendClientHint(*policy, resource_origin, is_1p_origin, 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 -@@ -361,6 +361,11 @@ +@@ -381,6 +381,11 @@ name: "AtomicMoveAPI", status: "test", }, diff --git a/build/patches/Close-Sessions-On-Ip-Change.patch b/build/patches/Close-Sessions-On-Ip-Change.patch index 7db9bfc68..71bc9ec6c 100644 --- a/build/patches/Close-Sessions-On-Ip-Change.patch +++ b/build/patches/Close-Sessions-On-Ip-Change.patch @@ -87,7 +87,7 @@ new file mode 100644 diff --git a/net/base/features.cc b/net/base/features.cc --- a/net/base/features.cc +++ b/net/base/features.cc -@@ -437,7 +437,7 @@ const base::FeatureParam kIpPrivacyDebugExperimentArm{ +@@ -455,7 +455,7 @@ const base::FeatureParam kIpPrivacyCacheTokensByGeo{ // NetworkChangeNotifier::AreNetworkHandlesSupported). #if BUILDFLAG(IS_ANDROID) inline constexpr auto kMigrateSessionsOnNetworkChangeV2Default = diff --git a/build/patches/Compress-libchrome-to-free-up-some-space.patch b/build/patches/Compress-libchrome-to-free-up-some-space.patch index 0d71ad520..5a60722cd 100644 --- a/build/patches/Compress-libchrome-to-free-up-some-space.patch +++ b/build/patches/Compress-libchrome-to-free-up-some-space.patch @@ -13,7 +13,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/chrome/android/chrome_public_apk_tmpl.gni b/chrome/android/chrome_public_apk_tmpl.gni --- a/chrome/android/chrome_public_apk_tmpl.gni +++ b/chrome/android/chrome_public_apk_tmpl.gni -@@ -669,6 +669,7 @@ template("chrome_common_apk_or_module_tmpl") { +@@ -676,6 +676,7 @@ template("chrome_common_apk_or_module_tmpl") { [ "//components/crash/core/app:chrome_crashpad_handler_named_as_so" ] loadable_modules += [ "$root_out_dir/libchrome_crashpad_handler.so" ] library_always_compress += [ "libchrome_crashpad_handler.so" ] diff --git a/build/patches/Content-settings-infrastructure.patch b/build/patches/Content-settings-infrastructure.patch index 4ecd533b7..e5ffba294 100644 --- a/build/patches/Content-settings-infrastructure.patch +++ b/build/patches/Content-settings-infrastructure.patch @@ -64,7 +64,7 @@ Require: bromite-build-utils.patch .../core/browser/website_settings_info.h | 38 ++ .../core/browser/website_settings_registry.cc | 6 + .../core/browser/website_settings_registry.h | 1 + - .../content_settings/core/common/BUILD.gn | 7 + + .../content_settings/core/common/BUILD.gn | 8 + .../bromite_content_settings/placeholder.txt | 1 + .../core/common/content_settings.cc | 30 +- .../core/common/content_settings.h | 12 + @@ -83,7 +83,7 @@ Require: bromite-build-utils.patch .../platform/web_content_settings_client.h | 9 + .../execution_context/execution_context.cc | 16 + .../execution_context/execution_context.h | 5 + - 72 files changed, 1867 insertions(+), 95 deletions(-) + 72 files changed, 1868 insertions(+), 95 deletions(-) create mode 100644 components/browser_ui/settings/android/java/res/layout/preference_spinner_single_widget.xml create mode 100644 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSetting.java create mode 100644 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSettingImpl.java @@ -97,7 +97,7 @@ Require: bromite-build-utils.patch diff --git a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java --- a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java -@@ -58,6 +58,10 @@ import org.chromium.url.GURL; +@@ -59,6 +59,10 @@ import org.chromium.url.GURL; import java.util.Set; @@ -108,7 +108,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/C /** A SiteSettingsDelegate instance that contains Chrome-specific Site Settings logic. */ public class ChromeSiteSettingsDelegate implements SiteSettingsDelegate { public static final String EMBEDDED_CONTENT_HELP_CENTER_URL = -@@ -215,7 +219,7 @@ public class ChromeSiteSettingsDelegate implements SiteSettingsDelegate { +@@ -217,7 +221,7 @@ public class ChromeSiteSettingsDelegate implements SiteSettingsDelegate { @Override public boolean isHelpAndFeedbackEnabled() { @@ -117,7 +117,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/C } @Override -@@ -336,6 +340,17 @@ public class ChromeSiteSettingsDelegate implements SiteSettingsDelegate { +@@ -349,6 +353,17 @@ public class ChromeSiteSettingsDelegate implements SiteSettingsDelegate { return mPrivacySandboxBridge.getFirstPartySetOwner(memberOrigin); } @@ -138,7 +138,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/C diff --git a/chrome/browser/content_settings/page_specific_content_settings_delegate.cc b/chrome/browser/content_settings/page_specific_content_settings_delegate.cc --- a/chrome/browser/content_settings/page_specific_content_settings_delegate.cc +++ b/chrome/browser/content_settings/page_specific_content_settings_delegate.cc -@@ -168,7 +168,7 @@ namespace { +@@ -166,7 +166,7 @@ namespace { void GetGuestViewDefaultContentSettingRules( bool incognito, RendererContentSettingRules* rules) { @@ -159,7 +159,7 @@ diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.html b/ diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.ts b/chrome/browser/resources/settings/privacy_page/privacy_page.ts --- a/chrome/browser/resources/settings/privacy_page/privacy_page.ts +++ b/chrome/browser/resources/settings/privacy_page/privacy_page.ts -@@ -52,6 +52,7 @@ import {SiteSettingsPrefsBrowserProxyImpl} from '../site_settings/site_settings_ +@@ -53,6 +53,7 @@ import {SiteSettingsPrefsBrowserProxyImpl} from '../site_settings/site_settings_ import {PrivacyGuideAvailabilityMixin} from './privacy_guide/privacy_guide_availability_mixin.js'; import {getTemplate} from './privacy_page.html.js'; @@ -167,7 +167,7 @@ diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.ts b/ch interface BlockAutoplayStatus { enabled: boolean; -@@ -75,8 +76,82 @@ export class SettingsPrivacyPageElement extends SettingsPrivacyPageElementBase { +@@ -76,8 +77,82 @@ export class SettingsPrivacyPageElement extends SettingsPrivacyPageElementBase { return 'settings-privacy-page'; } @@ -262,7 +262,7 @@ diff --git a/chrome/browser/resources/settings/route.ts b/chrome/browser/resourc /** * Add all of the child routes that originate from the privacy route, -@@ -158,6 +159,7 @@ function addPrivacyChildRoutes(r: Partial) { +@@ -154,6 +155,7 @@ function addPrivacyChildRoutes(r: Partial) { r.SITE_SETTINGS_AUTOMATIC_FULLSCREEN = r.SITE_SETTINGS.createChild('automaticFullScreen'); } @@ -378,7 +378,7 @@ diff --git a/chrome/browser/resources/settings/site_settings/site_details.html b diff --git a/chrome/browser/resources/settings/site_settings/site_details.ts b/chrome/browser/resources/settings/site_settings/site_details.ts --- a/chrome/browser/resources/settings/site_settings/site_details.ts +++ b/chrome/browser/resources/settings/site_settings/site_details.ts -@@ -62,8 +62,39 @@ export class SiteDetailsElement extends SiteDetailsElementBase { +@@ -63,8 +63,39 @@ export class SiteDetailsElement extends SiteDetailsElementBase { return 'site-details'; } @@ -422,7 +422,7 @@ diff --git a/chrome/browser/resources/settings/site_settings/site_details.ts b/c diff --git a/chrome/browser/resources/settings/site_settings/site_details_permission.html b/chrome/browser/resources/settings/site_settings/site_details_permission.html --- a/chrome/browser/resources/settings/site_settings/site_details_permission.html +++ b/chrome/browser/resources/settings/site_settings/site_details_permission.html -@@ -49,7 +49,9 @@ +@@ -57,7 +57,9 @@ @@ -18920,7 +18920,7 @@ diff --git a/components/version_ui/resources/about_version_mobile.css b/componen diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc --- a/content/child/runtime_features.cc +++ b/content/child/runtime_features.cc -@@ -617,7 +617,7 @@ void ResolveInvalidConfigurations() { +@@ -622,7 +622,7 @@ void ResolveInvalidConfigurations() { base::FeatureList::IsEnabled( features::kPrivacySandboxAdsAPIsM1Override)) && !base::FeatureList::IsEnabled(blink::features::kFencedFrames)) { @@ -18929,7 +18929,7 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features. << "Fenced frames cannot be enabled in this configuration. Use --" << switches::kEnableFeatures << "=" << blink::features::kFencedFrames.name << " instead."; -@@ -627,9 +627,8 @@ void ResolveInvalidConfigurations() { +@@ -632,9 +632,8 @@ void ResolveInvalidConfigurations() { if (!base::FeatureList::IsEnabled(blink::features::kFencedFrames) && base::FeatureList::IsEnabled( blink::features::kFencedFramesLocalUnpartitionedDataAccess)) { @@ -18941,7 +18941,7 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features. << "Fenced frames must be enabled in order to enable local " "unpartitioned " << "data access. Use --" << switches::kEnableFeatures << "=" -@@ -642,7 +641,7 @@ void ResolveInvalidConfigurations() { +@@ -647,7 +646,7 @@ void ResolveInvalidConfigurations() { // The Document API should be additionally gated by the // `kBrowsingTopicsDocumentAPI` feature. if (!base::FeatureList::IsEnabled(blink::features::kBrowsingTopics)) { @@ -18950,7 +18950,7 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features. << "Topics cannot be enabled in this configuration. Use --" << switches::kEnableFeatures << "=" << blink::features::kBrowsingTopics.name << " in addition."; -@@ -662,7 +661,7 @@ void ResolveInvalidConfigurations() { +@@ -667,7 +666,7 @@ void ResolveInvalidConfigurations() { } if (!base::FeatureList::IsEnabled(blink::features::kSharedStorageAPI)) { @@ -18959,7 +18959,7 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features. << "SharedStorage cannot be enabled in this " "configuration. Use --" << switches::kEnableFeatures << "=" -@@ -672,7 +671,7 @@ void ResolveInvalidConfigurations() { +@@ -677,7 +676,7 @@ void ResolveInvalidConfigurations() { if (!base::FeatureList::IsEnabled(blink::features::kSharedStorageAPIM118) || !base::FeatureList::IsEnabled(blink::features::kSharedStorageAPI)) { @@ -18968,7 +18968,7 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features. << "SharedStorage for M118+ cannot be enabled in this " "configuration. Use --" << switches::kEnableFeatures << "=" -@@ -683,7 +682,7 @@ void ResolveInvalidConfigurations() { +@@ -688,7 +687,7 @@ void ResolveInvalidConfigurations() { if (!base::FeatureList::IsEnabled(blink::features::kSharedStorageAPIM125) || !base::FeatureList::IsEnabled(blink::features::kSharedStorageAPI)) { @@ -18977,7 +18977,7 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features. << "SharedStorage for M125+ cannot be enabled in this " "configuration. Use --" << switches::kEnableFeatures << "=" -@@ -694,7 +693,7 @@ void ResolveInvalidConfigurations() { +@@ -699,7 +698,7 @@ void ResolveInvalidConfigurations() { if (!base::FeatureList::IsEnabled( attribution_reporting::features::kConversionMeasurement)) { @@ -18986,7 +18986,7 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features. << "AttributionReporting cannot be enabled in this " "configuration. Use --" << switches::kEnableFeatures << "=" -@@ -707,8 +706,8 @@ void ResolveInvalidConfigurations() { +@@ -712,8 +711,8 @@ void ResolveInvalidConfigurations() { attribution_reporting::features::kConversionMeasurement) || !base::FeatureList::IsEnabled( network::features::kAttributionReportingCrossAppWeb)) { @@ -18997,7 +18997,7 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features. << "AttributionReportingCrossAppWeb cannot be enabled in this " "configuration. Use --" << switches::kEnableFeatures << "=" -@@ -719,7 +718,7 @@ void ResolveInvalidConfigurations() { +@@ -724,7 +723,7 @@ void ResolveInvalidConfigurations() { } if (!base::FeatureList::IsEnabled(blink::features::kInterestGroupStorage)) { diff --git a/build/patches/Customize-selection-popup.patch b/build/patches/Customize-selection-popup.patch index b9de21e3a..5a342051b 100644 --- a/build/patches/Customize-selection-popup.patch +++ b/build/patches/Customize-selection-popup.patch @@ -37,7 +37,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActionMod diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java -@@ -739,10 +739,17 @@ public class ChromeTabbedActivity extends ChromeActivity menuItemBuilders = new ArrayList<>(); menuItemBuilders.add(cut(delegate.canCut())); menuItemBuilders.add(copy(delegate.canCopy())); -@@ -257,7 +304,7 @@ public class SelectActionMenuHelper { +@@ -256,7 +303,7 @@ public class SelectActionMenuHelper { // menu items if there is selected text. @IdRes int groupId = selectedText.isEmpty() ? Menu.NONE : android.R.id.textAssist; SelectionMenuGroup secondaryAssistItems = @@ -380,7 +380,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/select if (selectedText.isEmpty() && selectionActionMenuDelegate != null) { List additionalMenuItems = -@@ -319,7 +366,7 @@ public class SelectActionMenuHelper { +@@ -318,7 +365,7 @@ public class SelectActionMenuHelper { SelectionMenuGroup textProcessingItems = new SelectionMenuGroup( R.id.select_action_menu_text_processing_items, @@ -389,7 +389,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/select if (isSelectionPassword || intentHandler == null) { addAdditionalTextProcessingItems(textProcessingItems, selectionActionMenuDelegate); return textProcessingItems; -@@ -426,7 +473,7 @@ public class SelectActionMenuHelper { +@@ -425,7 +472,7 @@ public class SelectActionMenuHelper { .setId(R.id.select_action_menu_cut) .setIconAttr(android.R.attr.actionModeCutDrawable) .setAlphabeticShortcut(ItemKeyShortcuts.CUT) @@ -398,7 +398,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/select .setShowAsActionFlags( MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT) .setIsEnabled(isEnabled) -@@ -438,7 +485,7 @@ public class SelectActionMenuHelper { +@@ -437,7 +484,7 @@ public class SelectActionMenuHelper { .setId(R.id.select_action_menu_copy) .setIconAttr(android.R.attr.actionModeCopyDrawable) .setAlphabeticShortcut(ItemKeyShortcuts.COPY) @@ -407,7 +407,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/select .setShowAsActionFlags( MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT) .setIsEnabled(isEnabled) -@@ -450,7 +497,7 @@ public class SelectActionMenuHelper { +@@ -449,7 +496,7 @@ public class SelectActionMenuHelper { .setId(R.id.select_action_menu_paste) .setIconAttr(android.R.attr.actionModePasteDrawable) .setAlphabeticShortcut(ItemKeyShortcuts.PASTE) @@ -416,7 +416,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/select .setShowAsActionFlags( MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT) .setIsEnabled(isEnabled) -@@ -464,7 +511,7 @@ public class SelectActionMenuHelper { +@@ -463,7 +510,7 @@ public class SelectActionMenuHelper { return new SelectionMenuItem.Builder(context.getString(R.string.actionbar_share)) .setId(R.id.select_action_menu_share) .setIconAttr(android.R.attr.actionModeShareDrawable) @@ -425,7 +425,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/select .setShowAsActionFlags( MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT) .setIsEnabled(isEnabled) -@@ -476,7 +523,7 @@ public class SelectActionMenuHelper { +@@ -475,7 +522,7 @@ public class SelectActionMenuHelper { .setId(R.id.select_action_menu_select_all) .setIconAttr(android.R.attr.actionModeSelectAllDrawable) .setAlphabeticShortcut(ItemKeyShortcuts.SELECT_ALL) @@ -434,7 +434,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/select .setShowAsActionFlags( MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT) .setIsEnabled(isEnabled) -@@ -489,7 +536,7 @@ public class SelectActionMenuHelper { +@@ -488,7 +535,7 @@ public class SelectActionMenuHelper { SelectionMenuItem.Builder builder = new SelectionMenuItem.Builder(android.R.string.paste_as_plain_text) .setId(R.id.select_action_menu_paste_as_plain_text) @@ -443,7 +443,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/select .setShowAsActionFlags( MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT) .setIsEnabled(isEnabled); -@@ -509,7 +556,7 @@ public class SelectActionMenuHelper { +@@ -508,7 +555,7 @@ public class SelectActionMenuHelper { return new SelectionMenuItem.Builder(context.getString(R.string.actionbar_web_search)) .setId(R.id.select_action_menu_web_search) .setIconAttr(android.R.attr.actionModeWebSearchDrawable) @@ -460,17 +460,17 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/select import org.jni_zero.NativeMethods; +import org.chromium.base.ContextUtils; - import org.chromium.content_public.browser.SelectAroundCaretResult; - import org.chromium.content_public.browser.SelectionClient; - import org.chromium.content_public.browser.SelectionEventProcessor; -@@ -69,6 +70,9 @@ public class SmartSelectionClient implements SelectionClient { + import org.chromium.base.ObserverList; + import org.chromium.base.UserData; + import org.chromium.content.browser.webcontents.WebContentsImpl; +@@ -77,6 +78,9 @@ public class SmartSelectionClient implements SelectionClient, UserData { return null; } + if (!ContextUtils.getAppSharedPreferences().getBoolean( + "selection_popup_smart_text", false)) return null; + - return new SmartSelectionClient(callback, webContents); - } - + SmartSelectionClient client = + ((WebContentsImpl) webContents) + .getOrSetUserData(SmartSelectionClient.class, SmartSelectionClient::new); -- diff --git a/build/patches/Deprecate-Data-URL-in-SVGUseElement.patch b/build/patches/Deprecate-Data-URL-in-SVGUseElement.patch index 6e96e9397..b5cc3bd82 100644 --- a/build/patches/Deprecate-Data-URL-in-SVGUseElement.patch +++ b/build/patches/Deprecate-Data-URL-in-SVGUseElement.patch @@ -10,7 +10,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html 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 -@@ -3395,8 +3395,8 @@ +@@ -3534,8 +3534,8 @@ status: "stable", }, { diff --git a/build/patches/Disable-Component-Updates.patch b/build/patches/Disable-Component-Updates.patch index 42547d697..64b1b106c 100644 --- a/build/patches/Disable-Component-Updates.patch +++ b/build/patches/Disable-Component-Updates.patch @@ -12,7 +12,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/chrome/browser/component_updater/registration.cc b/chrome/browser/component_updater/registration.cc --- a/chrome/browser/component_updater/registration.cc +++ b/chrome/browser/component_updater/registration.cc -@@ -100,6 +100,7 @@ +@@ -98,6 +98,7 @@ namespace component_updater { void RegisterComponentsForUpdate() { diff --git a/build/patches/Disable-Compression-Dictionary-Transport.patch b/build/patches/Disable-Compression-Dictionary-Transport.patch index b67ecaffd..bf8007ead 100644 --- a/build/patches/Disable-Compression-Dictionary-Transport.patch +++ b/build/patches/Disable-Compression-Dictionary-Transport.patch @@ -10,7 +10,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html 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 -@@ -738,14 +738,16 @@ +@@ -774,14 +774,16 @@ } }, { diff --git a/build/patches/Disable-FedCm.patch b/build/patches/Disable-FedCm.patch index 2d240da24..272855bec 100644 --- a/build/patches/Disable-FedCm.patch +++ b/build/patches/Disable-FedCm.patch @@ -26,7 +26,7 @@ new file mode 100644 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 -@@ -1641,7 +1641,7 @@ +@@ -1739,7 +1739,7 @@ { name: "FedCm", public: true, diff --git a/build/patches/Disable-Feeback-Collector.patch b/build/patches/Disable-Feeback-Collector.patch index 32941739a..c4dfdb08f 100644 --- a/build/patches/Disable-Feeback-Collector.patch +++ b/build/patches/Disable-Feeback-Collector.patch @@ -4,9 +4,28 @@ Subject: Disable Feeback Collector License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- + chrome/browser/feedback/BUILD.gn | 8 +++--- .../browser/feedback/FeedbackCollector.java | 28 ++----------------- - 1 file changed, 3 insertions(+), 25 deletions(-) + 2 files changed, 7 insertions(+), 29 deletions(-) +diff --git a/chrome/browser/feedback/BUILD.gn b/chrome/browser/feedback/BUILD.gn +--- a/chrome/browser/feedback/BUILD.gn ++++ b/chrome/browser/feedback/BUILD.gn +@@ -15,10 +15,10 @@ source_set("feedback") { + public_deps = [] + deps = [] + if (is_android) { +- sources += [ +- "android/family_info_feedback_source.cc", +- "android/family_info_feedback_source.h", +- ] ++ # sources += [ ++ # "android/family_info_feedback_source.cc", ++ # "android/family_info_feedback_source.h", ++ # ] + public_deps += [ + "//components/supervised_user/core/browser", + "//components/supervised_user/core/browser:fetcher", diff --git a/chrome/browser/feedback/android/java/src/org/chromium/chrome/browser/feedback/FeedbackCollector.java b/chrome/browser/feedback/android/java/src/org/chromium/chrome/browser/feedback/FeedbackCollector.java --- a/chrome/browser/feedback/android/java/src/org/chromium/chrome/browser/feedback/FeedbackCollector.java +++ b/chrome/browser/feedback/android/java/src/org/chromium/chrome/browser/feedback/FeedbackCollector.java diff --git a/build/patches/Disable-GetInstalledRelatedApps-API.patch b/build/patches/Disable-GetInstalledRelatedApps-API.patch index be18dbb0c..975869794 100644 --- a/build/patches/Disable-GetInstalledRelatedApps-API.patch +++ b/build/patches/Disable-GetInstalledRelatedApps-API.patch @@ -58,7 +58,7 @@ new file mode 100644 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 -@@ -2336,9 +2336,9 @@ +@@ -2424,9 +2424,9 @@ status: {"Android": "test", "default": "stable"}, }, { diff --git a/build/patches/Disable-PrivacyGuide.patch b/build/patches/Disable-PrivacyGuide.patch index 53b6e403f..4a038f302 100644 --- a/build/patches/Disable-PrivacyGuide.patch +++ b/build/patches/Disable-PrivacyGuide.patch @@ -24,7 +24,7 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi diff --git a/chrome/browser/ui/webui/settings/settings_ui.cc b/chrome/browser/ui/webui/settings/settings_ui.cc --- a/chrome/browser/ui/webui/settings/settings_ui.cc +++ b/chrome/browser/ui/webui/settings/settings_ui.cc -@@ -359,8 +359,7 @@ SettingsUI::SettingsUI(content::WebUI* web_ui) +@@ -365,8 +365,7 @@ SettingsUI::SettingsUI(content::WebUI* web_ui) #endif // !BUILDFLAG(IS_CHROMEOS_LACROS) bool show_privacy_guide = diff --git a/build/patches/Disable-Real-Box.patch b/build/patches/Disable-Real-Box.patch index a47667128..7e59f0dc1 100644 --- a/build/patches/Disable-Real-Box.patch +++ b/build/patches/Disable-Real-Box.patch @@ -5,15 +5,15 @@ Subject: Disable Real Box Real-box is search box in ntp --- chrome/browser/prefs/browser_prefs.cc | 2 +- - chrome/browser/resources/new_tab_page/app.html | 7 ------- + chrome/browser/resources/new_tab_page/app.html | 8 -------- chrome/browser/ui/webui/searchbox/searchbox_handler.cc | 1 + components/search/ntp_features.cc | 6 +++--- - 4 files changed, 5 insertions(+), 11 deletions(-) + 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc -@@ -2135,7 +2135,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -2170,7 +2170,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, registry->RegisterBooleanPref( prefs::kLensRegionSearchEnabled, true, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); @@ -25,20 +25,21 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browse diff --git a/chrome/browser/resources/new_tab_page/app.html b/chrome/browser/resources/new_tab_page/app.html --- a/chrome/browser/resources/new_tab_page/app.html +++ b/chrome/browser/resources/new_tab_page/app.html -@@ -429,13 +429,6 @@ - hidden$="[[!logoEnabled_]]"> +@@ -16,14 +16,6 @@ + ?hidden="${!this.logoEnabled_}">
-- -- -