diff --git a/build/RELEASE b/build/RELEASE index 7a0e4a164..b44802c32 100644 --- a/build/RELEASE +++ b/build/RELEASE @@ -1 +1 @@ -130.0.6723.117 \ No newline at end of file +131.0.6778.70 \ No newline at end of file diff --git a/build/patches/AImageReader-CFI-crash-mitigations.patch b/build/patches/AImageReader-CFI-crash-mitigations.patch index 33f76f526..40a0ef0a9 100644 --- a/build/patches/AImageReader-CFI-crash-mitigations.patch +++ b/build/patches/AImageReader-CFI-crash-mitigations.patch @@ -22,7 +22,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- base/android/android_image_reader_compat.cc | 16 ++++++++++++++++ base/android/android_image_reader_compat.h | 14 ++++++++++++++ - chrome/browser/flag-metadata.json | 6 +++--- + chrome/browser/flag-metadata.json | 4 ++++ .../AImageReader-CFI-crash-mitigations.inc | 4 ++++ .../AImageReader-CFI-crash-mitigations.inc | 1 + gpu/config/gpu_driver_bug_list.json | 16 ++++++++++++++++ @@ -31,8 +31,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html gpu/config/gpu_util.cc | 8 ++++++++ gpu/config/gpu_workaround_list.txt | 1 + gpu/ipc/service/gpu_init.cc | 8 ++++++++ - gpu/ipc/service/stream_texture_android.cc | 11 ++++++++++- - 12 files changed, 87 insertions(+), 4 deletions(-) + gpu/ipc/service/stream_texture_android.cc | 10 +++++++++- + 12 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 cromite_flags/media/base/media_switches_cc/AImageReader-CFI-crash-mitigations.inc create mode 100644 cromite_flags/media/base/media_switches_h/AImageReader-CFI-crash-mitigations.inc @@ -90,13 +90,11 @@ 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 -@@ -3430,9 +3430,9 @@ +@@ -3408,6 +3408,10 @@ + "name": "enable-identity-in-auth-error", + "owners": [ "jlebel@chromium.org", "chrome-signin-team@google.com" ], "expiry_milestone": 135 - }, - { -- "name": "enable-image-reader", -- "owners": [ "vikassoni@chromium.org", "liberato@chromium.org" ], -- "expiry_milestone": 125 ++ },{ + "name": "enable-image-reader", // Bromite: do not expire + "owners": [ "vikassoni@chromium.org", "liberato@chromium.org" ], // flag + "expiry_milestone": -1 @@ -234,19 +232,11 @@ diff --git a/gpu/ipc/service/gpu_init.cc b/gpu/ipc/service/gpu_init.cc diff --git a/gpu/ipc/service/stream_texture_android.cc b/gpu/ipc/service/stream_texture_android.cc --- a/gpu/ipc/service/stream_texture_android.cc +++ b/gpu/ipc/service/stream_texture_android.cc -@@ -6,6 +6,7 @@ - - #include - -+#include "base/android/android_image_reader_compat.h" - #include "base/android/scoped_hardware_buffer_fence_sync.h" - #include "base/feature_list.h" - #include "base/functional/bind.h" -@@ -49,7 +50,15 @@ std::unique_ptr MakeCurrent( +@@ -50,7 +50,15 @@ std::unique_ptr MakeCurrent( } TextureOwner::Mode GetTextureOwnerMode() { -- return features::IsAImageReaderEnabled() +- return base::android::EnableAndroidImageReader() + const bool a_image_reader_supported = + base::android::AndroidImageReader::GetInstance().IsSupported(); + @@ -254,7 +244,7 @@ diff --git a/gpu/ipc/service/stream_texture_android.cc b/gpu/ipc/service/stream_ + // AImageReader - one for MCVD and other for MediaPlayer here. Merge those 2 + // flags into a single flag. Keeping the 2 flags separate for now since finch + // experiment using this flag is in progress. -+ return a_image_reader_supported && features::IsAImageReaderEnabled() && ++ return a_image_reader_supported && base::android::EnableAndroidImageReader() && + base::FeatureList::IsEnabled(features::kAImageReaderMediaPlayer) ? TextureOwner::Mode::kAImageReaderInsecure : TextureOwner::Mode::kSurfaceTextureInsecure; diff --git a/build/patches/Add-AllowUserCertificates-flag.patch b/build/patches/Add-AllowUserCertificates-flag.patch index 758c398d8..f2584db7d 100644 --- a/build/patches/Add-AllowUserCertificates-flag.patch +++ b/build/patches/Add-AllowUserCertificates-flag.patch @@ -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; -@@ -1045,6 +1046,8 @@ public abstract class ChromeActivity +@@ -1044,6 +1045,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 -@@ -157,6 +157,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { +@@ -160,6 +160,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 -@@ -159,6 +159,7 @@ public abstract class ChromeFeatureList { +@@ -161,6 +161,7 @@ public abstract class ChromeFeatureList { /* Alphabetical: */ public static final String ACCOUNT_REAUTHENTICATION_RECENT_TIME_WINDOW = "AccountReauthenticationRecentTimeWindow"; @@ -59,7 +59,7 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f public static final String ADAPTIVE_BUTTON_IN_TOP_TOOLBAR_PAGE_SUMMARY = "AdaptiveButtonInTopToolbarPageSummary"; public static final String ADAPTIVE_BUTTON_IN_TOP_TOOLBAR_CUSTOMIZATION_V2 = -@@ -583,6 +584,8 @@ public abstract class ChromeFeatureList { +@@ -608,6 +609,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); @@ -68,14 +68,14 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f public static final CachedFlag sAsyncNotificationManager = newCachedFlag(ASYNC_NOTIFICATION_MANAGER, false); public static final CachedFlag sBackGestureActivityTabProvider = -@@ -746,6 +749,7 @@ public abstract class ChromeFeatureList { +@@ -779,6 +782,7 @@ public abstract class ChromeFeatureList { public static final List sFlagsCachedFullBrowserChromium = List.of( sAccountReauthenticationRecentTimeWindow, + sAllowUserCertificates, sAndroidAppIntegration, + sAndroidAppIntegrationWithFavicon, sAndroidBottomToolbar, - sAndroidElegantTextHeight, diff --git a/cromite_flags/chrome/browser/about_flags_cc/Add-AllowUserCertificates-flag.inc b/cromite_flags/chrome/browser/about_flags_cc/Add-AllowUserCertificates-flag.inc new file mode 100644 --- /dev/null diff --git a/build/patches/Add-IsCleartextPermitted-flag.patch b/build/patches/Add-IsCleartextPermitted-flag.patch index 7f8c467b3..f93fcb5da 100644 --- a/build/patches/Add-IsCleartextPermitted-flag.patch +++ b/build/patches/Add-IsCleartextPermitted-flag.patch @@ -44,7 +44,7 @@ new file mode 100644 diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc --- a/net/url_request/url_request_http_job.cc +++ b/net/url_request/url_request_http_job.cc -@@ -391,6 +391,11 @@ std::unique_ptr URLRequestHttpJob::Create(URLRequest* request) { +@@ -383,6 +383,11 @@ std::unique_ptr URLRequestHttpJob::Create(URLRequest* request) { } } diff --git a/build/patches/Add-PartialLowEndModeOnMidRangeDevices-flag.patch b/build/patches/Add-PartialLowEndModeOnMidRangeDevices-flag.patch index 2186a7251..a02dac8cd 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 -@@ -108,6 +108,10 @@ BASE_FEATURE(kPostGetMyMemoryStateToBackground, +@@ -121,6 +121,10 @@ BASE_FEATURE(kPostGetMyMemoryStateToBackground, FEATURE_DISABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_ANDROID) 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 02612aa93..fb01fe034 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 -@@ -7884,9 +7884,9 @@ +@@ -7807,9 +7807,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 -@@ -3329,7 +3329,7 @@ const char kResetShortcutCustomizationsDescription[] = +@@ -3331,7 +3331,7 @@ const char kResetShortcutCustomizationsDescription[] = const char kRestrictGamepadAccessName[] = "Restrict gamepad access"; const char kRestrictGamepadAccessDescription[] = @@ -50,7 +50,7 @@ diff --git a/device/gamepad/public/cpp/gamepad_features.cc b/device/gamepad/publ diff --git a/third_party/blink/renderer/modules/gamepad/navigator_gamepad.cc b/third_party/blink/renderer/modules/gamepad/navigator_gamepad.cc --- a/third_party/blink/renderer/modules/gamepad/navigator_gamepad.cc +++ b/third_party/blink/renderer/modules/gamepad/navigator_gamepad.cc -@@ -118,6 +118,10 @@ void RecordGamepadsForIdentifiabilityStudy( +@@ -120,6 +120,10 @@ void RecordGamepadsForIdentifiabilityStudy( HeapVector> NavigatorGamepad::getGamepads( Navigator& navigator, ExceptionState& exception_state) { @@ -61,7 +61,7 @@ diff --git a/third_party/blink/renderer/modules/gamepad/navigator_gamepad.cc b/t if (!navigator.DomWindow()) { // Using an existing NavigatorGamepad if one exists, but don't create one // for a detached window, as its subclasses depend on a non-null window. -@@ -440,6 +444,8 @@ void NavigatorGamepad::SampleAndCompareGamepadState() { +@@ -442,6 +446,8 @@ void NavigatorGamepad::SampleAndCompareGamepadState() { void NavigatorGamepad::DispatchGamepadEvent(const AtomicString& event_name, Gamepad* gamepad) { diff --git a/build/patches/Add-a-proxy-configuration-page.patch b/build/patches/Add-a-proxy-configuration-page.patch index 207369ede..0675e3bc4 100644 --- a/build/patches/Add-a-proxy-configuration-page.patch +++ b/build/patches/Add-a-proxy-configuration-page.patch @@ -29,7 +29,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html chrome/browser/resources/proxy_config.html | 77 ++++ chrome/browser/resources/proxy_config.js | 278 +++++++++++++ chrome/browser/ui/BUILD.gn | 2 + - .../webui/chrome_web_ui_controller_factory.cc | 3 + + .../webui/chrome_web_ui_controller_factory.cc | 5 +- chrome/browser/ui/webui/proxy_config_ui.cc | 389 ++++++++++++++++++ chrome/browser/ui/webui/proxy_config_ui.h | 31 ++ chrome/common/webui_url_constants.cc | 2 + @@ -40,7 +40,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../proxy_config/proxy_policy_handler.cc | 2 +- net/proxy_resolution/proxy_config.cc | 51 ++- net/proxy_resolution/proxy_config.h | 3 + - 25 files changed, 973 insertions(+), 17 deletions(-) + 25 files changed, 974 insertions(+), 18 deletions(-) create mode 100644 chrome/browser/resources/proxy_config.css create mode 100644 chrome/browser/resources/proxy_config.html create mode 100644 chrome/browser/resources/proxy_config.js @@ -84,7 +84,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting + private static final String PREF_PROXY_OPTIONS = "proxy"; private static final String PREF_PRIVACY_GUIDE = "privacy_guide"; private static final String PREF_INCOGNITO_LOCK = "incognito_lock"; - private static final String PREF_THIRD_PARTY_COOKIES = "third_party_cookies"; + @VisibleForTesting static final String PREF_CLEAR_BROWSING_DATA = "clear_browsing_data"; diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc --- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc +++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc @@ -196,7 +196,7 @@ 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 -@@ -203,6 +203,8 @@ +@@ -202,6 +202,8 @@ #include "printing/buildflags/buildflags.h" #include "rlz/buildflags/buildflags.h" @@ -205,7 +205,7 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browse #if BUILDFLAG(ENABLE_BACKGROUND_MODE) #include "chrome/browser/background/background_mode_manager.h" #endif -@@ -1577,6 +1579,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) { +@@ -1652,6 +1654,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 -@@ -281,6 +281,8 @@ static_library("ui") { +@@ -238,6 +238,8 @@ static_library("ui") { "webui/metrics_internals/metrics_internals_ui.h", "webui/net_export_ui.cc", "webui/net_export_ui.h", @@ -672,23 +672,25 @@ 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 -@@ -46,6 +46,7 @@ - #include "chrome/browser/ui/webui/media/media_engagement_ui.h" - #include "chrome/browser/ui/webui/media/webrtc_logs_ui.h" - #include "chrome/browser/ui/webui/policy/policy_ui.h" +@@ -32,6 +32,7 @@ + #include "chrome/browser/ui/webui/about/about_ui.h" + #include "chrome/browser/ui/webui/components/components_ui.h" + #include "chrome/browser/ui/webui/crashes_ui.h" +#include "chrome/browser/ui/webui/proxy_config_ui.h" - #include "chrome/browser/ui/webui/privacy_sandbox/privacy_sandbox_internals_ui.h" - #include "chrome/browser/ui/webui/suggest_internals/suggest_internals_ui.h" + #include "chrome/browser/ui/webui/download_internals/download_internals_ui.h" + #include "chrome/browser/ui/webui/flags/flags_ui.h" #include "chrome/browser/ui/webui/webui_util.h" -@@ -532,6 +533,8 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, - return &NewWebUI; +@@ -261,7 +262,9 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, + history_clusters_internals::kChromeUIHistoryClustersInternalsHost) { + return &NewWebUI; } - #endif // BUILDFLAG(IS_ANDROID) -+ if (url.host_piece() == chrome::kChromeUIProxyConfigHost) +- ++ if (url.host_piece() == chrome::kChromeUIProxyConfigHost) { + return &NewWebUI; - #if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_ANDROID) - if (url.host_piece() == chrome::kChromeUIManagedUserProfileNoticeHost) { - return &NewWebUI; ++ } + #if !BUILDFLAG(IS_ANDROID) + if (url.host_piece() == chrome::kChromeUINewTabHost) { + // The URL chrome://newtab/ can be either a virtual or a real URL, diff --git a/chrome/browser/ui/webui/proxy_config_ui.cc b/chrome/browser/ui/webui/proxy_config_ui.cc new file mode 100644 --- /dev/null @@ -1141,7 +1143,7 @@ diff --git a/chrome/common/webui_url_constants.cc b/chrome/common/webui_url_cons diff --git a/chrome/common/webui_url_constants.h b/chrome/common/webui_url_constants.h --- a/chrome/common/webui_url_constants.h +++ b/chrome/common/webui_url_constants.h -@@ -176,6 +176,8 @@ inline constexpr char kChromeUINetExportURL[] = "chrome://net-export"; +@@ -173,6 +173,8 @@ inline constexpr char kChromeUINetExportURL[] = "chrome://net-export"; inline constexpr char kChromeUINetInternalsHost[] = "net-internals"; inline constexpr char kChromeUINetInternalsURL[] = "chrome://net-internals/"; inline constexpr char kChromeUINewTabHost[] = "newtab"; @@ -1153,7 +1155,7 @@ diff --git a/chrome/common/webui_url_constants.h b/chrome/common/webui_url_const diff --git a/components/proxy_config/pref_proxy_config_tracker_impl.cc b/components/proxy_config/pref_proxy_config_tracker_impl.cc --- a/components/proxy_config/pref_proxy_config_tracker_impl.cc +++ b/components/proxy_config/pref_proxy_config_tracker_impl.cc -@@ -244,14 +244,14 @@ PrefProxyConfigTrackerImpl::GetEffectiveProxyConfig( +@@ -253,14 +253,14 @@ PrefProxyConfigTrackerImpl::GetEffectiveProxyConfig( // static void PrefProxyConfigTrackerImpl::RegisterPrefs(PrefRegistrySimple* registry) { registry->RegisterDictionaryPref(proxy_config::prefs::kProxy, @@ -1170,7 +1172,7 @@ diff --git a/components/proxy_config/pref_proxy_config_tracker_impl.cc b/compone registry->RegisterBooleanPref(proxy_config::prefs::kUseSharedProxies, false); } -@@ -388,6 +388,7 @@ bool PrefProxyConfigTrackerImpl::PrefConfigToNetConfig( +@@ -412,6 +412,7 @@ bool PrefProxyConfigTrackerImpl::PrefConfigToNetConfig( if (proxy_dict.GetBypassList(&proxy_bypass)) { proxy_config.proxy_rules().bypass_rules.ParseFromString(proxy_bypass); } @@ -1319,16 +1321,16 @@ diff --git a/components/proxy_config/proxy_policy_handler.cc b/components/proxy_ diff --git a/net/proxy_resolution/proxy_config.cc b/net/proxy_resolution/proxy_config.cc --- a/net/proxy_resolution/proxy_config.cc +++ b/net/proxy_resolution/proxy_config.cc -@@ -124,7 +124,7 @@ void ProxyConfig::ProxyRules::ParseFromString( - ProxyServer::SCHEME_HTTP, - allow_bracketed_proxy_chains); +@@ -131,7 +131,7 @@ void ProxyConfig::ProxyRules::ParseFromString(const std::string& proxy_rules, + url_scheme, &single_proxies, ProxyServer::SCHEME_HTTP, + allow_bracketed_proxy_chains, is_quic_allowed); type = Type::PROXY_LIST; - return; + continue; } // Trim whitespace off the url scheme. -@@ -155,6 +155,55 @@ void ProxyConfig::ProxyRules::ParseFromString( +@@ -162,6 +162,55 @@ void ProxyConfig::ProxyRules::ParseFromString(const std::string& proxy_rules, } } @@ -1387,10 +1389,10 @@ diff --git a/net/proxy_resolution/proxy_config.cc b/net/proxy_resolution/proxy_c diff --git a/net/proxy_resolution/proxy_config.h b/net/proxy_resolution/proxy_config.h --- a/net/proxy_resolution/proxy_config.h +++ b/net/proxy_resolution/proxy_config.h -@@ -108,6 +108,9 @@ class NET_EXPORT ProxyConfig { - // URLs. +@@ -107,6 +107,9 @@ class NET_EXPORT ProxyConfig { void ParseFromString(const std::string& proxy_rules, - bool allow_bracketed_proxy_chains = false); + bool allow_bracketed_proxy_chains = false, + bool is_quic_allowed = false); + // Returns the proxy rules in a format that can be parsed by ParseFromString; + // all information except bypass rules is used. + std::string ToString() const; diff --git a/build/patches/Add-an-always-incognito-mode.patch b/build/patches/Add-an-always-incognito-mode.patch index c0de729c7..47a7183d4 100644 --- a/build/patches/Add-an-always-incognito-mode.patch +++ b/build/patches/Add-an-always-incognito-mode.patch @@ -24,7 +24,7 @@ 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 | 26 ++- + .../chrome/browser/ChromeTabbedActivity.java | 28 ++- .../chrome/browser/app/ChromeActivity.java | 4 + .../AppMenuPropertiesDelegateImpl.java | 28 ++- .../ChromeContextMenuPopulator.java | 7 +- @@ -79,12 +79,12 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../browser/autocomplete_provider_client.cc | 4 + .../browser/autocomplete_provider_client.h | 1 + .../omnibox/browser/base_search_provider.cc | 2 +- - components/omnibox/browser/search_provider.cc | 4 +- + components/omnibox/browser/search_provider.cc | 7 +- .../add-an-always-incognito-mode.inc | 13 ++ .../add-an-always-incognito-mode.inc | 1 + .../add-an-always-incognito-mode.inc | 3 + .../add-an-always-incognito-mode.inc | 1 + - 65 files changed, 784 insertions(+), 111 deletions(-) + 65 files changed, 787 insertions(+), 113 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 @@ -97,10 +97,10 @@ 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 -@@ -636,6 +636,7 @@ chrome_java_resources = [ +@@ -626,6 +626,7 @@ chrome_java_resources = [ + "java/res/xml/main_preferences_legacy.xml", "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", + "java/res/xml/incognito_preferences.xml", "java/res/xml/privacy_preferences.xml", "java/res/xml/search_widget_info.xml", @@ -116,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", -@@ -947,6 +948,7 @@ chrome_java_sources = [ +@@ -952,6 +953,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/TrackingProtectionSnackbarController.java", + "java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxSurveyController.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 @@ -243,7 +243,7 @@ new file mode 100644 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 -@@ -70,6 +70,10 @@ import org.chromium.base.task.TaskTraits; +@@ -72,6 +72,10 @@ import org.chromium.base.task.TaskTraits; import org.chromium.build.annotations.UsedByReflection; import org.chromium.cc.input.BrowserControlsState; import org.chromium.chrome.R; @@ -254,16 +254,13 @@ 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; -@@ -689,12 +693,17 @@ public class ChromeTabbedActivity extends ChromeActivity +@@ -1981,6 +1982,9 @@ public abstract class ChromeActivity throw new IllegalStateException( "Attempting to access TabCreator before initialization"); } @@ -322,7 +325,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/App +import org.chromium.chrome.browser.profiles.ProfileManager; import org.chromium.chrome.browser.bookmarks.BookmarkModel; import org.chromium.chrome.browser.bookmarks.PowerBookmarkUtils; - import org.chromium.chrome.browser.commerce.ShoppingFeatures; + import org.chromium.chrome.browser.commerce.ShoppingServiceFactory; @@ -100,6 +102,10 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -365,7 +368,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); -@@ -860,8 +881,9 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate +@@ -861,8 +882,9 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate && !isNativePage && !isFileScheme && !isContentScheme @@ -388,7 +391,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/Chr import org.chromium.chrome.browser.contextmenu.ChromeContextMenuItem.Item; import org.chromium.chrome.browser.contextmenu.ContextMenuCoordinator.ListItemType; import org.chromium.chrome.browser.download.DownloadUtils; -@@ -267,6 +268,9 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { +@@ -271,6 +272,9 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { public List> buildContextMenu() { mShowEphemeralTabNewLabel = null; @@ -398,7 +401,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/Chr List> groupedItems = new ArrayList<>(); if (mParams.isAnchor()) { -@@ -277,6 +281,7 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { +@@ -281,6 +285,7 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { if (mMode == ContextMenuMode.NORMAL) { linkGroup.add(createListItem(Item.OPEN_IN_NEW_TAB_IN_GROUP)); linkGroup.add(createListItem(Item.OPEN_IN_NEW_TAB)); @@ -406,7 +409,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/Chr if (!mItemDelegate.isIncognito() && mItemDelegate.isIncognitoSupported()) { linkGroup.add(createListItem(Item.OPEN_IN_INCOGNITO_TAB)); } -@@ -301,7 +306,7 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { +@@ -305,7 +310,7 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { } } if (FirstRunStatus.getFirstRunFlowComplete()) { @@ -475,7 +478,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; -@@ -222,6 +223,9 @@ public class CustomTabAppMenuPropertiesDelegate extends AppMenuPropertiesDelegat +@@ -211,6 +212,9 @@ public class CustomTabAppMenuPropertiesDelegate extends AppMenuPropertiesDelegat openInChromeItemVisible = false; tryAddingReadAloud = false; } @@ -498,7 +501,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; -@@ -1207,6 +1210,13 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid +@@ -1222,6 +1225,13 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid return getInitialActivityWidth() > 0; } @@ -523,7 +526,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/Downlo import org.chromium.chrome.browser.ChromeTabbedActivity; import org.chromium.chrome.browser.IntentHandler; import org.chromium.chrome.browser.app.download.home.DownloadActivityLauncher; -@@ -77,6 +78,10 @@ import org.chromium.url.GURL; +@@ -76,6 +77,10 @@ import org.chromium.url.GURL; import java.io.File; @@ -534,7 +537,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/Downlo /** A class containing some utility static methods. */ public class DownloadUtils { private static final String TAG = "download"; -@@ -298,7 +303,16 @@ public class DownloadUtils { +@@ -297,7 +302,16 @@ public class DownloadUtils { // Offline pages isn't supported in Incognito. This should be checked before calling // OfflinePageBridge.getForProfile because OfflinePageBridge instance will not be found // for incognito profile. @@ -579,7 +582,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/History diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryManager.java b/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryManager.java --- a/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryManager.java -@@ -57,6 +57,14 @@ import org.chromium.ui.base.Clipboard; +@@ -55,6 +55,14 @@ import org.chromium.ui.base.Clipboard; import java.util.List; @@ -594,7 +597,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/History /** Combines and manages the different UI components of browsing history. */ public class HistoryManager implements OnMenuItemClickListener, -@@ -169,7 +177,7 @@ public class HistoryManager +@@ -154,7 +162,7 @@ public class HistoryManager mUmaRecorder.recordOpenHistory(); // If incognito placeholder is shown, we don't need to create History UI elements. @@ -603,7 +606,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/History mSelectableListLayout = null; mRootView = getIncognitoHistoryPlaceholderView(); return; -@@ -436,9 +444,22 @@ public class HistoryManager +@@ -421,9 +429,22 @@ public class HistoryManager onBackPressStateChanged(); } @@ -627,7 +630,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/History // If Incognito placeholder is shown no need to call any destroy method. return; } -@@ -498,7 +519,7 @@ public class HistoryManager +@@ -483,7 +504,7 @@ public class HistoryManager * @return True if manager handles this event, false if it decides to ignore. */ private boolean onBackPressed() { @@ -680,7 +683,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/Nat import org.chromium.chrome.browser.app.ChromeActivity; import org.chromium.chrome.browser.app.download.home.DownloadPage; import org.chromium.chrome.browser.bookmarks.BookmarkPage; -@@ -319,7 +320,8 @@ public class NativePageFactory { +@@ -316,7 +317,8 @@ public class NativePageFactory { String url, NativePage candidatePage, Tab tab, boolean isIncognito, PdfInfo pdfInfo) { NativePage page; @@ -918,9 +921,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Fragme import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager; +import org.chromium.chrome.browser.ui.messages.snackbar.INeedSnackbarManager; import org.chromium.components.browser_ui.bottomsheet.BottomSheetController; - import org.chromium.components.browser_ui.settings.FragmentSettingsLauncher; + import org.chromium.components.browser_ui.settings.FragmentSettingsNavigation; import org.chromium.components.browser_ui.site_settings.BaseSiteSettingsFragment; -@@ -270,6 +271,9 @@ public class FragmentDependencyProvider extends FragmentManager.FragmentLifecycl +@@ -271,6 +272,9 @@ public class FragmentDependencyProvider extends FragmentManager.FragmentLifecycl safetyHubFragment.setCustomTabIntentHelper( LaunchIntentDispatcher::createCustomTabActivityIntent); } @@ -933,7 +936,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Fragme 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 -@@ -24,6 +24,8 @@ import java.util.HashMap; +@@ -23,6 +23,8 @@ import java.util.HashMap; import java.util.List; import java.util.Set; @@ -942,7 +945,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; -@@ -72,9 +74,10 @@ public class HistoricalTabModelObserver implements TabModelObserver { +@@ -71,9 +73,10 @@ public class HistoricalTabModelObserver implements TabModelObserver { if (tabs.isEmpty() || !canRestore) return; if (tabs.size() == 1) { @@ -1039,7 +1042,7 @@ 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; +@@ -158,6 +158,8 @@ import org.chromium.ui.InsetObserver; import org.chromium.ui.UiUtils; import org.chromium.ui.base.ActivityWindowAndroid; import org.chromium.ui.base.DeviceFormFactor; @@ -1048,7 +1051,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/Tab import org.chromium.ui.base.IntentRequestTracker; import org.chromium.ui.base.LocalizationUtils; import org.chromium.ui.dragdrop.DragDropGlobalState; -@@ -988,7 +990,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { +@@ -1017,7 +1019,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { () -> { mTabCreatorManagerSupplier .get() @@ -1071,7 +1074,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; -@@ -502,7 +506,6 @@ public class ChromeTabCreator extends TabCreator { +@@ -507,7 +511,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) { @@ -1090,7 +1093,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabMod import org.chromium.chrome.browser.flags.ActivityType; import org.chromium.chrome.browser.ntp.RecentlyClosedBridge; import org.chromium.chrome.browser.profiles.ProfileProvider; -@@ -108,6 +109,8 @@ public class TabModelSelectorImpl extends TabModelSelectorBase implements TabMod +@@ -106,6 +107,8 @@ public class TabModelSelectorImpl extends TabModelSelectorBase implements TabMod ProfileProvider profileProvider = mProfileProviderSupplier.get(); assert profileProvider != null; @@ -1111,7 +1114,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPer import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.ByteArrayInputStream; -@@ -794,6 +796,13 @@ public class TabPersistentStore { +@@ -815,6 +817,13 @@ public class TabPersistentStore { } } } @@ -1128,7 +1131,7 @@ 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 -@@ -43,6 +43,7 @@ import org.chromium.base.supplier.Supplier; +@@ -44,6 +44,7 @@ import org.chromium.base.supplier.Supplier; import org.chromium.cc.input.BrowserControlsState; import org.chromium.chrome.R; import org.chromium.chrome.browser.ActivityTabProvider; @@ -1136,7 +1139,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar import org.chromium.chrome.browser.IntentHandler; import org.chromium.chrome.browser.app.tabmodel.TabWindowManagerSingleton; import org.chromium.chrome.browser.back_press.BackPressManager; -@@ -640,7 +641,7 @@ public class ToolbarManager +@@ -669,7 +670,7 @@ public class ToolbarManager TraceEvent.end("isOfflinePage"); return ret; } @@ -1298,18 +1301,20 @@ diff --git a/chrome/browser/autocomplete/remote_suggestions_service_factory.cc b #include "base/no_destructor.h" #include "chrome/browser/autocomplete/document_suggestions_service_factory.h" #include "chrome/browser/profiles/profile.h" -@@ -40,7 +41,11 @@ RemoteSuggestionsServiceFactory::RemoteSuggestionsServiceFactory() +@@ -40,9 +41,13 @@ RemoteSuggestionsServiceFactory::RemoteSuggestionsServiceFactory() : ProfileKeyedServiceFactory( "RemoteSuggestionsService", ProfileSelections::Builder() +#if BUILDFLAG(IS_ANDROID) + .WithRegular(ProfileSelection::kOriginalOnlyAndAlwaysIncognito) +#else - .WithRegular(ProfileSelection::kOriginalOnly) + // Service is needed in OTR profiles (Incognito and Guest). + .WithRegular(ProfileSelection::kOwnInstance) + .WithGuest(ProfileSelection::kOwnInstance) +#endif - // TODO(crbug.com/40257657): Check if this service is needed in - // Guest mode. - .WithGuest(ProfileSelection::kOriginalOnly) + // TODO(crbug.com/41488885): Check if this service is needed for + // Ash Internals. + .WithAshInternals(ProfileSelection::kOriginalOnly) diff --git a/chrome/browser/content_settings/host_content_settings_map_factory.cc b/chrome/browser/content_settings/host_content_settings_map_factory.cc --- a/chrome/browser/content_settings/host_content_settings_map_factory.cc +++ b/chrome/browser/content_settings/host_content_settings_map_factory.cc @@ -1585,7 +1590,7 @@ diff --git a/chrome/browser/offline_pages/android/request_coordinator_factory.cc + return BrowserContextKeyedServiceFactory::GetBrowserContextToUse(context); + } + -+ return chrome::GetBrowserContextRedirectedInIncognito(context); ++ return GetBrowserContextRedirectedInIncognito(context); +} + + @@ -1734,7 +1739,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 -@@ -252,6 +252,7 @@ +@@ -251,6 +251,7 @@ #if BUILDFLAG(IS_ANDROID) #include "chrome/browser/accessibility/accessibility_prefs/android/accessibility_prefs_controller.h" @@ -1742,7 +1747,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" -@@ -2034,6 +2035,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -2105,6 +2106,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, usage_stats::UsageStatsBridge::RegisterProfilePrefs(registry); variations::VariationsService::RegisterProfilePrefs(registry); webapps::InstallPromptPrefs::RegisterProfilePrefs(registry); @@ -1903,7 +1908,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 -@@ -1398,6 +1398,31 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1419,6 +1419,31 @@ Your Google account may have other forms of browsing history like searches and a Deletes history from all synced devices @@ -2004,7 +2009,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 -@@ -4202,6 +4202,12 @@ inline constexpr char kOutOfProcessSystemDnsResolutionEnabled[] = +@@ -4211,6 +4211,12 @@ inline constexpr char kOutOfProcessSystemDnsResolutionEnabled[] = "net.out_of_process_system_dns_resolution_enabled"; #endif // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) @@ -2070,7 +2075,7 @@ diff --git a/components/content_settings/core/browser/content_settings_pref_prov diff --git a/components/content_settings/core/browser/host_content_settings_map.cc b/components/content_settings/core/browser/host_content_settings_map.cc --- a/components/content_settings/core/browser/host_content_settings_map.cc +++ b/components/content_settings/core/browser/host_content_settings_map.cc -@@ -264,6 +264,7 @@ struct ContentSettingEntry { +@@ -263,6 +263,7 @@ struct ContentSettingEntry { HostContentSettingsMap::HostContentSettingsMap(PrefService* prefs, bool is_off_the_record, @@ -2078,7 +2083,7 @@ diff --git a/components/content_settings/core/browser/host_content_settings_map. bool store_last_modified, bool restore_session, bool should_record_metrics) -@@ -273,6 +274,7 @@ HostContentSettingsMap::HostContentSettingsMap(PrefService* prefs, +@@ -272,6 +273,7 @@ HostContentSettingsMap::HostContentSettingsMap(PrefService* prefs, #endif prefs_(prefs), is_off_the_record_(is_off_the_record), @@ -2086,7 +2091,7 @@ diff --git a/components/content_settings/core/browser/host_content_settings_map. store_last_modified_(store_last_modified), allow_invalid_secondary_pattern_for_testing_(false), clock_(base::DefaultClock::GetInstance()) { -@@ -286,7 +288,7 @@ HostContentSettingsMap::HostContentSettingsMap(PrefService* prefs, +@@ -285,7 +287,7 @@ HostContentSettingsMap::HostContentSettingsMap(PrefService* prefs, policy_provider->AddObserver(this); auto pref_provider_ptr = std::make_unique( @@ -2163,6 +2168,16 @@ diff --git a/components/omnibox/browser/search_provider.cc b/components/omnibox/ ((default_url && !default_url->suggestions_url().empty() && !*query_is_private) || (keyword_url && !keyword_url->suggestions_url().empty())); +@@ -937,7 +939,8 @@ std::unique_ptr SearchProvider::CreateSuggestLoader( + // purpose of such a request is to signal the server to warm up; no info + // is required. + // Request for suggestions in OTR contexts is not allowed. +- DCHECK(!client()->IsOffTheRecord()); ++ if (!client()->IsAlwaysIncognitoEnabled()) ++ DCHECK(!client()->IsOffTheRecord()); + return client() + ->GetRemoteSuggestionsService(/*create_if_necessary=*/true) + ->StartSuggestionsRequest( diff --git a/cromite_flags/chrome/browser/about_flags_cc/add-an-always-incognito-mode.inc b/cromite_flags/chrome/browser/about_flags_cc/add-an-always-incognito-mode.inc new file mode 100644 --- /dev/null diff --git a/build/patches/Add-bookmark-import-export-actions.patch b/build/patches/Add-bookmark-import-export-actions.patch index d38477cf8..da84b32c3 100644 --- a/build/patches/Add-bookmark-import-export-actions.patch +++ b/build/patches/Add-bookmark-import-export-actions.patch @@ -26,9 +26,9 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../bookmarks/BookmarkToolbarViewBinder.java | 6 + .../native_page/NativePageFactory.java | 11 +- chrome/browser/BUILD.gn | 11 +- - .../bookmarks/android/bookmark_bridge.cc | 282 +++++++++++++++++ + .../bookmarks/android/bookmark_bridge.cc | 277 +++++++++++++++++ .../bookmarks/android/bookmark_bridge.h | 29 +- - .../browser/bookmarks/bookmark_html_writer.cc | 11 + + .../browser/bookmarks/bookmark_html_writer.cc | 3 + .../dialogs/DownloadLocationCustomView.java | 8 +- .../DownloadLocationDialogCoordinator.java | 10 +- .../flags/android/chrome_feature_list.cc | 1 + @@ -53,7 +53,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html ui/shell_dialogs/select_file_dialog_linux.cc | 4 + ui/shell_dialogs/select_file_dialog_linux.h | 2 + ui/shell_dialogs/select_file_dialog_win.cc | 5 + - 42 files changed, 913 insertions(+), 30 deletions(-) + 42 files changed, 900 insertions(+), 30 deletions(-) create mode 100644 cromite_flags/chrome/browser/about_flags_cc/add-bookmark-import-export-actions.inc create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/add-bookmark-import-export-actions.inc create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/add-bookmark-import-export-actions.inc @@ -113,7 +113,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/TabbedModeTabDe private final BrowserControlsVisibilityDelegate mAppBrowserControlsVisibilityDelegate; private final Supplier mShareDelegateSupplier; private final Supplier mEphemeralTabCoordinatorSupplier; -@@ -85,7 +86,7 @@ public class TabbedModeTabDelegateFactory implements TabDelegateFactory { +@@ -84,7 +85,7 @@ public class TabbedModeTabDelegateFactory implements TabDelegateFactory { private NativePageFactory mNativePageFactory; public TabbedModeTabDelegateFactory( @@ -513,7 +513,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkDelegate.java --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkDelegate.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkDelegate.java -@@ -66,6 +66,16 @@ public interface BookmarkDelegate { +@@ -65,6 +65,16 @@ public interface BookmarkDelegate { /** Shows the search UI. */ void openSearchUi(); @@ -542,7 +542,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm import org.chromium.ui.modaldialog.ModalDialogManager; import org.chromium.ui.modaldialog.ModalDialogManager.ModalDialogType; import org.chromium.ui.modelutil.MVCListAdapter.ModelList; -@@ -302,6 +304,13 @@ public class BookmarkManagerCoordinator +@@ -296,6 +298,13 @@ public class BookmarkManagerCoordinator // Public API implementation. @@ -559,8 +559,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerMediator.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerMediator.java --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerMediator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerMediator.java -@@ -57,6 +57,8 @@ import org.chromium.components.embedder_support.util.UrlConstants; - import org.chromium.components.favicon.LargeIconBridge; +@@ -55,6 +55,8 @@ import org.chromium.components.commerce.core.SubscriptionsObserver; + import org.chromium.components.embedder_support.util.UrlConstants; import org.chromium.components.power_bookmarks.PowerBookmarkMeta; import org.chromium.components.power_bookmarks.PowerBookmarkType; +import org.chromium.ui.base.ActivityWindowAndroid; @@ -568,7 +568,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm import org.chromium.ui.accessibility.AccessibilityState; import org.chromium.ui.listmenu.ListMenu; import org.chromium.ui.listmenu.ListMenuItemProperties; -@@ -82,6 +84,9 @@ class BookmarkManagerMediator +@@ -79,6 +81,9 @@ class BookmarkManagerMediator private static boolean sPreventLoadingForTesting; @@ -578,7 +578,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm /** Keeps track of whether drag is enabled / active for bookmark lists. */ private class BookmarkDragStateDelegate implements DragStateDelegate { private BookmarkDelegate mBookmarkDelegate; -@@ -545,6 +550,14 @@ class BookmarkManagerMediator +@@ -534,6 +539,14 @@ class BookmarkManagerMediator mNativePage = nativePage; } @@ -593,7 +593,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm /** See BookmarkManager(Coordinator)#updateForUrl */ void updateForUrl(String url) { // Bookmark model is null if the manager has been destroyed. -@@ -725,6 +738,16 @@ class BookmarkManagerMediator +@@ -714,6 +727,16 @@ class BookmarkManagerMediator } } @@ -645,7 +645,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbar.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbar.java --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbar.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbar.java -@@ -101,6 +101,17 @@ public class BookmarkToolbar extends SelectableListToolbar +@@ -98,6 +98,17 @@ public class BookmarkToolbar extends SelectableListToolbar setOnMenuItemClickListener(dragEnabled ? null : this); } @@ -663,7 +663,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm void setEditButtonVisible(boolean visible) { mEditButtonVisible = visible; getMenu().findItem(R.id.edit_menu_id).setVisible(visible); -@@ -177,6 +188,13 @@ public class BookmarkToolbar extends SelectableListToolbar +@@ -174,6 +185,13 @@ public class BookmarkToolbar extends SelectableListToolbar void setCurrentFolder(BookmarkId folder) { mCurrentFolder = mBookmarkModel.getBookmarkById(folder); @@ -677,7 +677,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm } void setNavigateBackRunnable(Runnable navigateBackRunnable) { -@@ -196,6 +214,13 @@ public class BookmarkToolbar extends SelectableListToolbar +@@ -193,6 +211,13 @@ public class BookmarkToolbar extends SelectableListToolbar @Override public boolean onMenuItemClick(MenuItem menuItem) { hideOverflowMenu(); @@ -691,7 +691,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm return mMenuIdClickedFunction.apply(menuItem.getItemId()); } -@@ -211,6 +236,9 @@ public class BookmarkToolbar extends SelectableListToolbar +@@ -208,6 +233,9 @@ public class BookmarkToolbar extends SelectableListToolbar protected void showNormalView() { super.showNormalView(); @@ -718,7 +718,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarProperties.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarProperties.java --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarProperties.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarProperties.java -@@ -81,6 +81,10 @@ class BookmarkToolbarProperties { +@@ -78,6 +78,10 @@ class BookmarkToolbarProperties { static final WritableObjectPropertyKey NAVIGATE_BACK_RUNNABLE = new WritableObjectPropertyKey<>(); @@ -728,8 +728,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm + new WritableObjectPropertyKey<>(); static final PropertyKey[] ALL_KEYS = { - BOOKMARK_OPENER, -@@ -109,6 +113,8 @@ class BookmarkToolbarProperties { + SELECTION_DELEGATE, +@@ -105,6 +109,8 @@ class BookmarkToolbarProperties { SELECTION_MODE_SHOW_OPEN_IN_INCOGNITO, SELECTION_MODE_SHOW_MOVE, SELECTION_MODE_SHOW_MARK_READ, @@ -742,7 +742,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarViewBinder.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarViewBinder.java --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarViewBinder.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarViewBinder.java -@@ -56,6 +56,12 @@ class BookmarkToolbarViewBinder { +@@ -54,6 +54,12 @@ class BookmarkToolbarViewBinder { model.get(BookmarkToolbarProperties.CHECKED_VIEW_MENU_ID)); } else if (key == BookmarkToolbarProperties.CURRENT_FOLDER) { bookmarkToolbar.setCurrentFolder(model.get(BookmarkToolbarProperties.CURRENT_FOLDER)); @@ -802,7 +802,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/Nat Supplier uma, BottomSheetController sheetController, BrowserControlsManager browserControlsManager, -@@ -242,7 +243,7 @@ public class NativePageFactory { +@@ -243,7 +244,7 @@ public class NativePageFactory { mActivity.getComponentName(), mSnackbarManagerSupplier.get(), tab.getProfile(), @@ -823,7 +823,7 @@ 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", -@@ -1749,6 +1751,13 @@ static_library("browser") { +@@ -1707,6 +1709,13 @@ static_library("browser") { "webid/identity_provider_permission_request.h", ] @@ -837,15 +837,15 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn configs += [ "//build/config/compiler:wexit_time_destructors", "//build/config:precompiled_headers", -@@ -3498,8 +3507,6 @@ static_library("browser") { +@@ -3508,8 +3517,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", - "cart/cart_db.cc", - "cart/cart_db.h", + "bookmarks/bookmark_merged_surface_service.cc", + "bookmarks/bookmark_merged_surface_service.h", + "bookmarks/bookmark_merged_surface_service_factory.cc", 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 @@ -987,7 +987,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse } void BookmarkBridge::Destroy(JNIEnv* env) { -@@ -767,6 +878,177 @@ jint BookmarkBridge::GetTotalBookmarkCount( +@@ -767,6 +878,172 @@ jint BookmarkBridge::GetTotalBookmarkCount( return count; } @@ -1078,12 +1078,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::OpenContentUri(path, base::File::FLAG_OPEN | base::File::FLAG_READ); -+ } else { -+ file.Initialize(path, base::File::FLAG_OPEN | base::File::FLAG_READ); -+ } ++ base::File file(path, base::File::FLAG_OPEN | base::File::FLAG_READ); + if (!file.IsValid()) { + select_file_dialog_->ShowToast("Cannot open bookmarks file for import"); + return ""; @@ -1256,7 +1251,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.h b/chrome/browser diff --git a/chrome/browser/bookmarks/bookmark_html_writer.cc b/chrome/browser/bookmarks/bookmark_html_writer.cc --- a/chrome/browser/bookmarks/bookmark_html_writer.cc +++ b/chrome/browser/bookmarks/bookmark_html_writer.cc -@@ -32,6 +32,9 @@ +@@ -33,6 +33,9 @@ #include "base/task/thread_pool.h" #include "base/time/time.h" #include "base/values.h" @@ -1266,22 +1261,6 @@ diff --git a/chrome/browser/bookmarks/bookmark_html_writer.cc b/chrome/browser/b #include "chrome/browser/bookmarks/bookmark_model_factory.h" #include "chrome/browser/favicon/favicon_service_factory.h" #include "chrome/browser/profiles/profile.h" -@@ -239,7 +242,15 @@ class Writer : public base::RefCountedThreadSafe { - // Opens the file, returning true on success. - bool OpenFile() { - int flags = base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE; -+#if BUILDFLAG(IS_ANDROID) -+ if (path_.IsContentUri()) { -+ file_ = std::make_unique(base::OpenContentUriForWrite(path_)); -+ } else { -+ file_ = std::make_unique(path_, flags); -+ } -+#else - file_ = std::make_unique(path_, flags); -+#endif - if (!file_->IsValid()) { - PLOG(ERROR) << "Could not create " << path_; - return false; diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationCustomView.java b/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationCustomView.java --- a/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationCustomView.java +++ b/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationCustomView.java @@ -1359,10 +1338,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 -@@ -200,6 +200,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { - &kCacheActivityTaskID, +@@ -205,6 +205,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { &kCastDeviceFilter, &kCCTAuthTab, + &kCCTAuthTabDisableAllExternalIntents, + &kBookmarksExportUseSaf, &kCCTBeforeUnload, &kCCTClientDataHeader, @@ -1370,9 +1349,9 @@ 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 -@@ -536,6 +536,7 @@ public abstract class ChromeFeatureList { - public static final String VERTICAL_AUTOMOTIVE_BACK_BUTTON_TOOLBAR = - "VerticalAutomotiveBackButtonToolbar"; +@@ -559,6 +559,7 @@ public abstract class ChromeFeatureList { + public static final String USE_LIBUNWINDSTACK_NATIVE_UNWINDER_ANDROID = + "UseLibunwindstackNativeUnwinderAndroid"; public static final String VISITED_URL_RANKING_SERVICE = "VisitedURLRankingService"; + public static final String BOOKMARKS_EXPORT_USESAF = "BookmarksExportUseSaf"; public static final String VOICE_SEARCH_AUDIO_CAPTURE_POLICY = "VoiceSearchAudioCapturePolicy"; @@ -1433,7 +1412,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"; -@@ -923,6 +925,7 @@ public final class ChromePreferenceKeys { +@@ -922,6 +924,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 +1451,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 -@@ -358,6 +358,9 @@ static_library("common_lib") { +@@ -359,6 +359,9 @@ static_library("common_lib") { sources += [ "media/chrome_media_drm_bridge_client.cc", "media/chrome_media_drm_bridge_client.h", @@ -1719,7 +1698,7 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java b/ui return mimeTypes; } -@@ -1108,6 +1116,10 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick +@@ -1120,6 +1128,10 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick return countAcceptTypesFor(superType) == mMimeTypes.size(); } diff --git a/build/patches/Add-cromite-flags-support.patch b/build/patches/Add-cromite-flags-support.patch index 1e2e0e64c..c647b6fa0 100644 --- a/build/patches/Add-cromite-flags-support.patch +++ b/build/patches/Add-cromite-flags-support.patch @@ -15,7 +15,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- base/BUILD.gn | 4 +- base/android/feature_map.cc | 5 + - .../base/cached_flags/CachedFlag.java | 8 +- + .../base/cached_flags/ValuesReturned.java | 2 +- base/feature_list.cc | 76 ++++++++ base/feature_list.h | 72 +++++++- build/android/gyp/java_cpp_features.py | 17 ++ @@ -44,20 +44,25 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../res/xml/accessibility_preferences.xml | 3 +- .../android/java/res/values/attrs.xml | 4 + .../settings/ChromeSwitchPreference.java | 20 +++ + .../components/cached_flags/CachedFlag.java | 8 +- components/components_strings.grd | 1 + .../content_settings/core/common/features.cc | 1 + .../placeholder.txt | 1 + components/flags_ui/flags_state.cc | 54 ++++++ - components/flags_ui/resources/app.html | 40 +++++ - components/flags_ui/resources/app.ts | 41 ++++- - components/flags_ui/resources/experiment.html | 7 +- - components/flags_ui/resources/experiment.ts | 16 ++ + components/flags_ui/resources/app.css | 24 +++ + components/flags_ui/resources/app.html.ts | 28 +++ + components/flags_ui/resources/app.ts | 23 +++ + components/flags_ui/resources/experiment.css | 7 +- + .../flags_ui/resources/experiment.html.ts | 7 +- + components/flags_ui/resources/experiment.ts | 14 +- .../flags_ui/resources/flags_browser_proxy.ts | 5 + .../core/offline_page_feature.cc | 1 + .../offline_pages/core/offline_page_feature.h | 1 + .../browser/features/password_features.cc | 1 + components/permissions/features.cc | 1 + - .../version_ui/version_handler_helper.cc | 2 +- + ...nthetic_trials_active_group_id_provider.cc | 4 +- + ...ynthetic_trials_active_group_id_provider.h | 4 +- + .../version_ui/version_handler_helper.cc | 4 +- content/common/features.cc | 1 + content/public/common/content_features.cc | 1 + content/public/common/content_features.h | 1 + @@ -97,7 +102,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 + - 84 files changed, 787 insertions(+), 22 deletions(-) + 89 files changed, 792 insertions(+), 28 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 @@ -142,7 +147,7 @@ diff --git a/base/BUILD.gn b/base/BUILD.gn sources = [ "allocator/allocator_check.cc", "allocator/allocator_check.h", -@@ -1029,7 +1031,7 @@ component("base") { +@@ -1025,7 +1027,7 @@ component("base") { "//build/config/compiler:wglobal_constructors", ] @@ -154,7 +159,7 @@ diff --git a/base/BUILD.gn b/base/BUILD.gn diff --git a/base/android/feature_map.cc b/base/android/feature_map.cc --- a/base/android/feature_map.cc +++ b/base/android/feature_map.cc -@@ -45,6 +45,11 @@ const Feature* FeatureMap::FindFeatureExposedToJava( +@@ -46,6 +46,11 @@ const Feature* FeatureMap::FindFeatureExposedToJava( static jboolean JNI_FeatureMap_IsEnabled(JNIEnv* env, jlong jfeature_map, std::string& feature_name) { @@ -166,35 +171,22 @@ diff --git a/base/android/feature_map.cc b/base/android/feature_map.cc FeatureMap* feature_map = reinterpret_cast(jfeature_map); const base::Feature* feature = feature_map->FindFeatureExposedToJava(feature_name); -diff --git a/base/android/java/src/org/chromium/base/cached_flags/CachedFlag.java b/base/android/java/src/org/chromium/base/cached_flags/CachedFlag.java ---- a/base/android/java/src/org/chromium/base/cached_flags/CachedFlag.java -+++ b/base/android/java/src/org/chromium/base/cached_flags/CachedFlag.java -@@ -142,7 +142,7 @@ public class CachedFlag extends Flag { - editor.putBoolean(getSharedPreferenceKey(), isEnabledInNative); - } - -- String getSharedPreferenceKey() { -+ public String getSharedPreferenceKey() { - // Create the key only once to avoid String concatenation every flag check. - if (mPreferenceKey == null) { - mPreferenceKey = CachedFlagsSharedPreferences.FLAGS_CACHED.createKey(mFeatureName); -@@ -169,6 +169,12 @@ public class CachedFlag extends Flag { - } - } - -+ public void setValueReturnedOverride(@Nullable Boolean value) { -+ synchronized (ValuesReturned.sBoolValues) { -+ ValuesReturned.sBoolValues.put(getSharedPreferenceKey(), value); -+ } -+ } -+ - /** Create a Map of feature names -> {@link CachedFlag} from multiple lists of CachedFlags. */ - public static Map createCachedFlagMap( - List> allCachedFlagsLists) { +diff --git a/base/android/java/src/org/chromium/base/cached_flags/ValuesReturned.java b/base/android/java/src/org/chromium/base/cached_flags/ValuesReturned.java +--- a/base/android/java/src/org/chromium/base/cached_flags/ValuesReturned.java ++++ b/base/android/java/src/org/chromium/base/cached_flags/ValuesReturned.java +@@ -16,7 +16,7 @@ import java.util.Map; + /** Keeps track of values returned for cached flags and field trial parameters. */ + public abstract class ValuesReturned { + @GuardedBy("sBoolValues") +- private static final Map sBoolValues = new HashMap<>(); ++ public static final Map sBoolValues = new HashMap<>(); + + @GuardedBy("sStringValues") + private static final Map sStringValues = new HashMap<>(); diff --git a/base/feature_list.cc b/base/feature_list.cc --- a/base/feature_list.cc +++ b/base/feature_list.cc -@@ -43,6 +43,31 @@ +@@ -42,6 +42,31 @@ namespace base { @@ -226,7 +218,7 @@ diff --git a/base/feature_list.cc b/base/feature_list.cc namespace { // Pointer to the FeatureList instance singleton that was set via -@@ -470,6 +495,46 @@ bool FeatureList::IsEnabled(const Feature& feature) { +@@ -469,6 +494,46 @@ bool FeatureList::IsEnabled(const Feature& feature) { return g_feature_list_instance->IsFeatureEnabled(feature); } @@ -273,7 +265,7 @@ diff --git a/base/feature_list.cc b/base/feature_list.cc // static bool FeatureList::IsValidFeatureOrFieldTrialName(std::string_view name) { return IsStringASCII(name) && name.find_first_of(",<*") == std::string::npos; -@@ -716,6 +781,17 @@ void FeatureList::VisitFeaturesAndParams(FeatureVisitor& visitor) { +@@ -739,6 +804,17 @@ void FeatureList::VisitFeaturesAndParams(FeatureVisitor& visitor, void FeatureList::FinalizeInitialization() { DCHECK(!initialized_); @@ -294,7 +286,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 -@@ -170,8 +170,10 @@ enum class FeatureMacroHandshake { kSecret }; +@@ -166,8 +166,10 @@ enum class FeatureMacroHandshake { kSecret }; struct BASE_EXPORT LOGICALLY_CONST Feature { constexpr Feature(const char* name, FeatureState default_state, @@ -307,7 +299,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) { -@@ -198,6 +200,9 @@ struct BASE_EXPORT LOGICALLY_CONST Feature { +@@ -194,6 +196,9 @@ struct BASE_EXPORT LOGICALLY_CONST Feature { // command line switch. const FeatureState default_state; @@ -317,7 +309,7 @@ diff --git a/base/feature_list.h b/base/feature_list.h private: friend class FeatureList; -@@ -473,6 +478,11 @@ class BASE_EXPORT FeatureList { +@@ -469,6 +474,11 @@ class BASE_EXPORT FeatureList { // instance, which is checked in builds with DCHECKs enabled. static bool IsEnabled(const Feature& feature); @@ -329,7 +321,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 -@@ -738,4 +748,62 @@ class BASE_EXPORT FeatureList { +@@ -734,4 +744,62 @@ class BASE_EXPORT FeatureList { } // namespace base @@ -456,21 +448,21 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/s @@ -18,6 +18,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.SettingsLauncherFactory; + import org.chromium.chrome.browser.settings.SettingsNavigationFactory; +import org.chromium.chrome.browser.settings.ChromeBaseSettingsFragment; import org.chromium.components.browser_ui.accessibility.AccessibilitySettingsDelegate; import org.chromium.components.browser_ui.accessibility.FontSizePrefs; import org.chromium.components.browser_ui.accessibility.FontSizePrefs.FontSizePrefsObserver; -@@ -36,7 +37,7 @@ import org.chromium.content_public.browser.ContentFeatureList; +@@ -37,7 +38,7 @@ import org.chromium.content_public.browser.ContentFeatureList; import org.chromium.content_public.browser.ContentFeatureMap; /** Fragment to keep track of all the accessibility related preferences. */ -public class AccessibilitySettings extends PreferenceFragmentCompat +public class AccessibilitySettings extends ChromeBaseSettingsFragment - implements SettingsPage, Preference.OnPreferenceChangeListener { + implements EmbeddableSettingsPage, Preference.OnPreferenceChangeListener { public static final String PREF_TEXT_SCALE = "text_scale"; public static final String PREF_PAGE_ZOOM_DEFAULT_ZOOM = "page_zoom_default_zoom"; -@@ -99,7 +100,7 @@ public class AccessibilitySettings extends PreferenceFragmentCompat +@@ -101,7 +102,7 @@ public class AccessibilitySettings extends PreferenceFragmentCompat } @Override @@ -494,7 +486,7 @@ 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 -@@ -79,7 +79,7 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -80,7 +80,7 @@ public class PrivacySettings extends ChromeBaseSettingsFragment private final ObservableSupplierImpl mPageTitle = new ObservableSupplierImpl<>(); @Override @@ -559,8 +551,8 @@ 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; -@@ -31,7 +32,9 @@ import org.chromium.base.BuildInfo; - import org.chromium.base.Callback; +@@ -32,7 +33,9 @@ import org.chromium.base.Callback; + import org.chromium.base.CallbackUtils; import org.chromium.base.Log; import org.chromium.base.metrics.RecordHistogram; +import org.chromium.base.supplier.Supplier; @@ -569,7 +561,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin import org.chromium.base.supplier.OneshotSupplierImpl; import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeBaseAppCompatActivity; -@@ -40,12 +43,14 @@ import org.chromium.chrome.browser.back_press.SecondaryActivityBackPressUma.Seco +@@ -41,12 +44,14 @@ import org.chromium.chrome.browser.back_press.SecondaryActivityBackPressUma.Seco import org.chromium.chrome.browser.feedback.HelpAndFeedbackLauncherImpl; import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.chrome.browser.init.ChromeBrowserInitializer; @@ -584,7 +576,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; -@@ -82,6 +87,40 @@ import java.util.Locale; +@@ -83,6 +88,40 @@ import java.util.Locale; */ public class SettingsActivity extends ChromeBaseAppCompatActivity implements PreferenceFragmentCompat.OnPreferenceStartFragmentCallback, SnackbarManageable { @@ -625,7 +617,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"; -@@ -135,7 +174,8 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity +@@ -141,7 +180,8 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity mProfile, mSnackbarManagerSupplier, mBottomSheetControllerSupplier, @@ -638,7 +630,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 -@@ -380,6 +380,10 @@ using flags_ui::kOsLinux; +@@ -388,6 +388,10 @@ using flags_ui::kOsLinux; using flags_ui::kOsMac; using flags_ui::kOsWin; @@ -649,7 +641,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc namespace about_flags { namespace { -@@ -4207,6 +4211,10 @@ const FeatureEntry::FeatureVariation +@@ -4210,6 +4214,10 @@ const FeatureEntry::FeatureVariation 1, nullptr}, }; @@ -660,7 +652,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. -@@ -4233,6 +4241,9 @@ const FeatureEntry::FeatureVariation +@@ -4236,6 +4244,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. @@ -673,7 +665,7 @@ 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 -@@ -450,4 +450,5 @@ BASE_FEATURE(kRemovalOfIWAsFromTabCapture, +@@ -392,4 +392,5 @@ BASE_FEATURE(kRemovalOfIWAsFromTabCapture, "RemovalOfIWAsFromTabCapture", base::FEATURE_ENABLED_BY_DEFAULT); @@ -689,7 +681,7 @@ diff --git a/chrome/browser/flags/BUILD.gn b/chrome/browser/flags/BUILD.gn + sources += [ + "android/java/src/org/chromium/chrome/browser/flags/cromite/include_all_directory.java", + ] - public_deps = [ "//base:base_cached_flags_java" ] + public_deps = [ "//components/cached_flags:java" ] deps = [ + ":java_cromite_cached_flags", "//base:base_java", @@ -721,7 +713,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 -@@ -1074,5 +1074,6 @@ BASE_FEATURE(kWebApkAllowIconUpdate, +@@ -1095,5 +1095,6 @@ BASE_FEATURE(kWebApkAllowIconUpdate, "WebApkAllowIconUpdate", base::FEATURE_DISABLED_BY_DEFAULT); @@ -731,7 +723,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 -@@ -214,6 +214,7 @@ constexpr base::FeatureParam kQuickDeleteAndroidSurveyTriggerId( +@@ -222,6 +222,7 @@ constexpr base::FeatureParam kQuickDeleteAndroidSurveyTriggerId( "trigger_id", /*default_value=*/""); @@ -742,9 +734,9 @@ 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 -@@ -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; +@@ -18,6 +18,10 @@ import org.chromium.components.cached_flags.DoubleCachedFieldTrialParameter; + import org.chromium.components.cached_flags.IntCachedFieldTrialParameter; + import org.chromium.components.cached_flags.StringCachedFieldTrialParameter; +import org.chromium.chrome.browser.flags.cromite.CromiteCachedFlagImplBase; +import java.util.Arrays; @@ -753,7 +745,7 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f import java.util.List; import java.util.Map; -@@ -732,7 +736,7 @@ public abstract class ChromeFeatureList { +@@ -765,7 +769,7 @@ public abstract class ChromeFeatureList { public static final CachedFlag sWebApkMinShellApkVersion = newCachedFlag(WEB_APK_MIN_SHELL_APK_VERSION, true); @@ -762,8 +754,8 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f List.of( sAccountReauthenticationRecentTimeWindow, sAndroidAppIntegration, -@@ -828,6 +832,13 @@ public abstract class ChromeFeatureList { - sVerticalAutomotiveBackButtonToolbar, +@@ -866,6 +870,13 @@ public abstract class ChromeFeatureList { + sUseLibunwindstackNativeUnwinderAndroid, sWebApkMinShellApkVersion); + private static List concatenateLists(List... collections) { @@ -812,7 +804,7 @@ new file mode 100644 +import java.util.ArrayList; +import java.util.List; + -+import org.chromium.base.cached_flags.CachedFlag; ++import org.chromium.components.cached_flags.CachedFlag; + +{IMPORT_CLAUSE} + @@ -856,7 +848,7 @@ diff --git a/chrome/browser/settings/android/java/src/org/chromium/chrome/browse import org.chromium.chrome.browser.feedback.HelpAndFeedbackLauncher; import org.chromium.chrome.browser.feedback.HelpAndFeedbackLauncherFactory; import org.chromium.chrome.browser.profiles.Profile; - import org.chromium.components.browser_ui.settings.SettingsPage; + import org.chromium.components.browser_ui.settings.EmbeddableSettingsPage; +import android.os.Bundle; +import androidx.preference.Preference; @@ -868,7 +860,7 @@ diff --git a/chrome/browser/settings/android/java/src/org/chromium/chrome/browse * Base class for settings in Chrome. * @@ -22,6 +29,49 @@ public abstract class ChromeBaseSettingsFragment extends PreferenceFragmentCompa - implements SettingsPage, ProfileDependentSetting { + implements EmbeddableSettingsPage, ProfileDependentSetting { private Profile mProfile; + private Supplier mRequireRestartDelegateSupplier; @@ -951,7 +943,7 @@ 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 -@@ -486,4 +486,5 @@ BASE_FEATURE(kPageSpecificDataDialogRelatedInstalledAppsSection, +@@ -458,4 +458,5 @@ BASE_FEATURE(kPageSpecificDataDialogRelatedInstalledAppsSection, "PageSpecificDataDialogRelatedInstalledAppsSection", base::FEATURE_DISABLED_BY_DEFAULT); @@ -960,7 +952,7 @@ diff --git a/chrome/browser/ui/ui_features.cc b/chrome/browser/ui/ui_features.cc 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 -@@ -1756,4 +1756,5 @@ BASE_FEATURE(kPeriodicLogUploadMigration, +@@ -1737,4 +1737,5 @@ BASE_FEATURE(kPeriodicLogUploadMigration, base::FEATURE_DISABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_CHROMEOS_ASH) @@ -1037,6 +1029,31 @@ diff --git a/components/browser_ui/settings/android/widget/java/src/org/chromium } /** +diff --git a/components/cached_flags/android/java/src/org/chromium/components/cached_flags/CachedFlag.java b/components/cached_flags/android/java/src/org/chromium/components/cached_flags/CachedFlag.java +--- a/components/cached_flags/android/java/src/org/chromium/components/cached_flags/CachedFlag.java ++++ b/components/cached_flags/android/java/src/org/chromium/components/cached_flags/CachedFlag.java +@@ -147,7 +147,7 @@ public class CachedFlag extends Flag { + editor.putBoolean(getSharedPreferenceKey(), isEnabledInNative); + } + +- String getSharedPreferenceKey() { ++ public String getSharedPreferenceKey() { + // Create the key only once to avoid String concatenation every flag check. + if (mPreferenceKey == null) { + mPreferenceKey = CachedFlagsSharedPreferences.FLAGS_CACHED.createKey(mFeatureName); +@@ -155,6 +155,12 @@ public class CachedFlag extends Flag { + return mPreferenceKey; + } + ++ public void setValueReturnedOverride(@Nullable Boolean value) { ++ synchronized (ValuesReturned.sBoolValues) { ++ ValuesReturned.sBoolValues.put(getSharedPreferenceKey(), value); ++ } ++ } ++ + /** Create a Map of feature names -> {@link CachedFlag} from multiple lists of CachedFlags. */ + public static Map createCachedFlagMap( + List> allCachedFlagsLists) { diff --git a/components/components_strings.grd b/components/components_strings.grd --- a/components/components_strings.grd +++ b/components/components_strings.grd @@ -1051,7 +1068,7 @@ diff --git a/components/components_strings.grd b/components/components_strings.g diff --git a/components/content_settings/core/common/features.cc b/components/content_settings/core/common/features.cc --- a/components/content_settings/core/common/features.cc +++ b/components/content_settings/core/common/features.cc -@@ -109,5 +109,6 @@ BASE_FEATURE(kContentSettingsPartitioning, +@@ -113,5 +113,6 @@ BASE_FEATURE(kContentSettingsPartitioning, "ContentSettingsPartitioning", base::FEATURE_DISABLED_BY_DEFAULT); @@ -1149,101 +1166,141 @@ diff --git a/components/flags_ui/flags_state.cc b/components/flags_ui/flags_stat for (const auto& entry : feature_entries_) { DCHECK(entry.IsValid()); if (!(entry.supported_platforms & platform_mask)) -diff --git a/components/flags_ui/resources/app.html b/components/flags_ui/resources/app.html ---- a/components/flags_ui/resources/app.html -+++ b/components/flags_ui/resources/app.html -@@ -473,7 +473,32 @@ - padding-top: 1.5rem; - } +diff --git a/components/flags_ui/resources/app.css b/components/flags_ui/resources/app.css +--- a/components/flags_ui/resources/app.css ++++ b/components/flags_ui/resources/app.css +@@ -383,3 +383,27 @@ cr-tabs { + padding-top: 1.5rem; } -+ #appcontainer { -+ overflow-y: scroll; -+ } -+ .cromite #header { -+ display: none; -+ } -+ .cromite .blurb-container { -+ display: none; -+ } -+ .cromite #tabs { -+ display: none; -+ } -+ .cromite #tab-content-available { -+ display: none; -+ } -+ .cromite #tab-content-unavailable { -+ display: none; -+ } -+ .cromite #tab-content-cromite { -+ display: block !important; -+ } -+ .cromite .section-header-title { -+ display: none; -+ } - + } ++#appcontainer { ++ overflow-y: scroll; ++} ++.cromite #header { ++ display: none; ++} ++.cromite .blurb-container { ++ display: none; ++} ++.cromite #tabs { ++ display: none; ++} ++.cromite #tab-content-available { ++ display: none; ++} ++.cromite #tab-content-unavailable { ++ display: none; ++} ++.cromite #tab-content-cromite { ++ display: block !important; ++} ++.cromite .section-header-title { ++ display: none; ++} +diff --git a/components/flags_ui/resources/app.html.ts b/components/flags_ui/resources/app.html.ts +--- a/components/flags_ui/resources/app.html.ts ++++ b/components/flags_ui/resources/app.html.ts +@@ -9,6 +9,7 @@ import type {AppElement} from './app.js'; + export function getHtml(this: AppElement) { + // clang-format off + return html` +
+ `; + // clang-format on + } diff --git a/components/flags_ui/resources/app.ts b/components/flags_ui/resources/app.ts --- a/components/flags_ui/resources/app.ts +++ b/components/flags_ui/resources/app.ts -@@ -194,6 +194,7 @@ export class FlagsAppElement extends CustomElement { - return getTemplate(); - } +@@ -128,6 +128,7 @@ export class FlagsAppElement extends CrLitElement { + // + loadTimeData.getString('unavailable'), + // ++ "Cromite", + ]; + protected selectedTabIndex_: number = 0; + +@@ -149,8 +150,11 @@ export class FlagsAppElement extends CrLitElement { + + protected defaultFeatures: Feature[] = []; + protected nonDefaultFeatures: Feature[] = []; ++ protected defaultCromiteFeatures: Feature[] = []; ++ protected nonDefaultCromiteFeatures: Feature[] = []; + protected searching: boolean = false; + private onlyCromiteFlags: boolean = false; private announceStatusDelayMs: number = 100; private featuresResolver: PromiseResolver = new PromiseResolver(); - private flagSearch: FlagSearch = new FlagSearch(this); -@@ -209,6 +210,10 @@ export class FlagsAppElement extends CustomElement { - // - - tabs: Tab[] = [ -+ { -+ tabEl: this.getRequiredElement('#tab-cromite')!, -+ panelEl: this.getRequiredElement('#tab-content-cromite')!, -+ }, - { - tabEl: this.getRequiredElement('#tab-available'), - panelEl: this.getRequiredElement('#tab-content-available'), -@@ -222,6 +227,11 @@ export class FlagsAppElement extends CustomElement { - ]; + private flagSearch: FlagSearch|null = null; +@@ -184,10 +188,24 @@ export class FlagsAppElement extends CrLitElement { + if (changedPrivateProperties.has('data')) { + const defaultFeatures: Feature[] = []; + const nonDefaultFeatures: Feature[] = []; ++ const defaultCromiteFeatures: Feature[] = []; ++ const nonDefaultCromiteFeatures: Feature[] = []; + ++ if (this.onlyCromiteFlags) { ++ this.data.supportedFeatures = ++ this.data.supportedFeatures.filter(item => item.is_new); ++ } ++ this.data.supportedFeatures.forEach( ++ f => (f.is_cromite ++ ? (f.is_default ? defaultCromiteFeatures : nonDefaultCromiteFeatures).push(f) ++ : undefined)); ++ this.data.supportedFeatures.sort( ++ (a,b) => (a.internal_name.localeCompare(b.internal_name))); + this.data.supportedFeatures.forEach( + f => (f.is_default ? defaultFeatures : nonDefaultFeatures).push(f)); + ++ this.defaultCromiteFeatures = defaultCromiteFeatures; ++ this.nonDefaultCromiteFeatures = nonDefaultCromiteFeatures; + this.defaultFeatures = defaultFeatures; + this.nonDefaultFeatures = nonDefaultFeatures; + } +@@ -228,6 +246,11 @@ export class FlagsAppElement extends CrLitElement { + override connectedCallback() { + super.connectedCallback(); - connectedCallback() { + if (location.pathname == '/cromite') { + this.onlyCromiteFlags = true; + this.getRequiredElement("#appcontainer").classList.add('cromite'); @@ -1252,169 +1309,95 @@ diff --git a/components/flags_ui/resources/app.ts b/components/flags_ui/resource // const pathname = new URL(window.location.href).pathname; this.isFlagsDeprecatedUrl_ = -@@ -306,20 +316,29 @@ export class FlagsAppElement extends CustomElement { - const defaultFeatures: Feature[] = []; - const nonDefaultFeatures: Feature[] = []; - -+ if (this.onlyCromiteFlags) { -+ experimentalFeaturesData.supportedFeatures = -+ experimentalFeaturesData.supportedFeatures.filter(item => item.is_new); -+ } -+ experimentalFeaturesData.supportedFeatures.sort( -+ (a,b) => (a.internal_name.localeCompare(b.internal_name))); - experimentalFeaturesData.supportedFeatures.forEach( - f => (f.is_default ? defaultFeatures : nonDefaultFeatures).push(f)); - - this.renderExperiments( - nonDefaultFeatures, -- this.getRequiredElement('#non-default-experiments')); -+ this.getRequiredElement('#non-default-experiments'), -+ this.getRequiredElement('#non-default-cromite-experiments'), false); - - this.renderExperiments( -- defaultFeatures, this.getRequiredElement('#default-experiments')); -+ defaultFeatures, this.getRequiredElement('#default-experiments'), -+ this.getRequiredElement('#cromite-experiments'), false); - - // - this.renderExperiments( - experimentalFeaturesData.unsupportedFeatures, -- this.getRequiredElement('#unavailable-experiments'), true); -+ this.getRequiredElement('#unavailable-experiments'), -+ undefined, true); - // - - this.showRestartToast(experimentalFeaturesData.needsRestart); -@@ -438,16 +457,23 @@ export class FlagsAppElement extends CustomElement { - } +diff --git a/components/flags_ui/resources/experiment.css b/components/flags_ui/resources/experiment.css +--- a/components/flags_ui/resources/experiment.css ++++ b/components/flags_ui/resources/experiment.css +@@ -79,6 +79,11 @@ + resize: none; + } - private renderExperiments( -- features: Feature[], container: HTMLElement, unsupported = false) { -+ features: Feature[], container: HTMLElement, -+ cromiteContainer: HTMLElement | undefined, unsupported: boolean = false) { - const fragment = document.createDocumentFragment(); -+ const fragmentCromite = document.createDocumentFragment(); -+ const show_permalink = !document.body.classList.contains('cromite'); - for (const feature of features) { - const experiment = document.createElement('flags-experiment'); - - experiment.toggleAttribute('unsupported', unsupported); -+ experiment.permalink = show_permalink; - experiment.data = feature; - experiment.id = feature.internal_name; - - const select = experiment.getSelect(); -+ // if (select && feature.is_cromite && !feature.is_new) { -+ // select.disabled = true; -+ // } - if (select) { - experiment.addEventListener('select-change', e => { - e.preventDefault(); -@@ -471,9 +497,14 @@ export class FlagsAppElement extends CustomElement { - this.showRestartToast(true); - }); - } -- fragment.appendChild(experiment); -+ if (feature.is_cromite) -+ fragmentCromite.appendChild(experiment); -+ else -+ fragment.appendChild(experiment); - } - container.replaceChildren(fragment); -+ if (!!cromiteContainer) -+ cromiteContainer.replaceChildren(fragmentCromite); ++.experiment-on select { ++ background: #dddddd; ++ color: var(--link-color); ++} ++ + select { + background: white; + border: 1px solid var(--link-color); +@@ -172,7 +177,6 @@ input { + .experiment .experiment-actions { + max-width: 100%; + padding-top: 12px; +- text-align: left; /* csschecker-disable-line left-right */ + width: 100%; } - /** -diff --git a/components/flags_ui/resources/experiment.html b/components/flags_ui/resources/experiment.html ---- a/components/flags_ui/resources/experiment.html -+++ b/components/flags_ui/resources/experiment.html -@@ -119,6 +119,11 @@ - color: white; +@@ -180,7 +184,6 @@ input { + .body { + overflow: hidden; + text-overflow: ellipsis; +- white-space: nowrap; + width: 100%; } -+ .experiment-on select { -+ background: #dddddd; -+ color: var(--link-color); -+ } -+ - .experiment-switched option { - background: white; - color: var(--link-color); -@@ -164,7 +169,6 @@ - .experiment .experiment-actions { - max-width: 100%; - padding-top: 12px; -- text-align: left; /* csschecker-disable-line left-right */ - width: 100%; - } - -@@ -172,7 +176,6 @@ - .body { - overflow: hidden; - text-overflow: ellipsis; -- white-space: nowrap; - width: 100%; - } - +diff --git a/components/flags_ui/resources/experiment.html.ts b/components/flags_ui/resources/experiment.html.ts +--- a/components/flags_ui/resources/experiment.html.ts ++++ b/components/flags_ui/resources/experiment.html.ts +@@ -10,7 +10,8 @@ export function getHtml(this: ExperimentElement) { + // clang-format off + return html` +
+-
++
+
+ ${this.showingSearchHit_? html` +

+ ${this.feature_.options!.map(option => html` + + `)} + diff --git a/components/flags_ui/resources/experiment.ts b/components/flags_ui/resources/experiment.ts --- a/components/flags_ui/resources/experiment.ts +++ b/components/flags_ui/resources/experiment.ts -@@ -61,11 +61,16 @@ function resetHighlights(element: HTMLElement) { +@@ -81,6 +81,11 @@ export class ExperimentElement extends CrLitElement { + enabled: false, + is_default: false, + supported_platforms: [], ++ is_default_value_on: false, ++ default_value: '', ++ is_cromite: false, ++ is_new: false, ++ permalink: true, + }; + + // Whether the controls to change the experiment state should be hidden. +@@ -127,12 +132,15 @@ export class ExperimentElement extends CrLitElement { + } - export class FlagsExperimentElement extends CustomElement { - private feature_: Feature|null = null; -+ private permalink_: boolean = true; + protected getExperimentTitle_(): string { ++ const suffix = ++ this.feature_.is_cromite && this.feature_.is_new ++ ? " (Cromite flag)" : ""; + if (this.showEnableDisableSelect_()) { +- return this.isDefault_ ? '' : +- loadTimeData.getString('experiment-enabled'); ++ return (this.isDefault_ ? '' : ++ loadTimeData.getString('experiment-enabled')) + suffix; + } - static override get template() { - return getTemplate(); +- return ''; ++ return suffix; } -+ set permalink(visible: boolean) { -+ this.permalink_ = visible; -+ } -+ - set data(feature: Feature) { - this.feature_ = feature; - -@@ -77,12 +82,18 @@ export class FlagsExperimentElement extends CustomElement { - 'experiment-default', feature.is_default); - experimentDefault.classList.toggle( - 'experiment-switched', !feature.is_default); -+ experimentDefault.classList.toggle( -+ 'cromite', feature.is_cromite && feature.is_new); -+ experimentDefault.classList.toggle( -+ 'experiment-on', !!feature.is_default_value_on); - - const experimentName = this.getRequiredElement('.experiment-name'); - experimentName.id = `${feature.internal_name}_name`; - experimentName.title = - feature.is_default ? '' : loadTimeData.getString('experiment-enabled'); - experimentName.textContent = feature.name; -+ if (feature.is_cromite && feature.is_new) -+ experimentName.textContent += " (Cromite flag)" - - const description = this.getRequiredElement('.description'); - description.textContent = feature.description; -@@ -134,6 +145,7 @@ export class FlagsExperimentElement extends CustomElement { - const permalink = this.getRequiredElement('.permalink'); - permalink.href = `#${feature.internal_name}`; - permalink.textContent = `#${feature.internal_name}`; -+ if (!this.permalink_) permalink.hidden = true; - - const smallScreenCheck = window.matchMedia('(max-width: 480px)'); - // Toggling of experiment description overflow content on smaller screens. -@@ -162,6 +174,10 @@ export class FlagsExperimentElement extends CustomElement { - const optionEl = document.createElement('option'); - optionEl.selected = option.selected; - optionEl.textContent = option.description; -+ if (option.description == "Default" && -+ feature.default_value !== undefined) { -+ optionEl.textContent += " (" + feature.default_value + ")"; -+ } - experimentSelect.appendChild(optionEl); - } - + protected getPlatforms_(): string { diff --git a/components/flags_ui/resources/flags_browser_proxy.ts b/components/flags_ui/resources/flags_browser_proxy.ts --- a/components/flags_ui/resources/flags_browser_proxy.ts +++ b/components/flags_ui/resources/flags_browser_proxy.ts @@ -1453,7 +1436,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 -@@ -169,4 +169,5 @@ BASE_FEATURE(kEncryptAllPasswordsWithOSCryptAsync, +@@ -181,4 +181,5 @@ BASE_FEATURE(kEncryptAllPasswordsWithOSCryptAsync, "EncryptAllPasswordsWithOSCryptAsync", base::FEATURE_DISABLED_BY_DEFAULT); @@ -1462,30 +1445,81 @@ diff --git a/components/password_manager/core/browser/features/password_features diff --git a/components/permissions/features.cc b/components/permissions/features.cc --- a/components/permissions/features.cc +++ b/components/permissions/features.cc -@@ -154,6 +154,7 @@ BASE_FEATURE(kCpssQuietChipTextUpdate, - "CpssQuietChipTextUpdate", +@@ -153,6 +153,7 @@ BASE_FEATURE(kCpssQuietChipTextUpdate, + BASE_FEATURE(kCpssUseTfliteSignatureRunner, + "CpssUseTfliteSignatureRunner", base::FEATURE_DISABLED_BY_DEFAULT); - +#include "cromite_flags/components_permissions_features_cc.inc" } // namespace features namespace feature_params { +diff --git a/components/variations/synthetic_trials_active_group_id_provider.cc b/components/variations/synthetic_trials_active_group_id_provider.cc +--- a/components/variations/synthetic_trials_active_group_id_provider.cc ++++ b/components/variations/synthetic_trials_active_group_id_provider.cc +@@ -27,7 +27,7 @@ SyntheticTrialsActiveGroupIdProvider::GetActiveGroupIds() { + return group_ids_; + } + +-#if !defined(NDEBUG) ++#if true + std::vector + SyntheticTrialsActiveGroupIdProvider::GetGroups() { + base::AutoLock scoped_lock(lock_); +@@ -53,7 +53,7 @@ void SyntheticTrialsActiveGroupIdProvider::OnSyntheticTrialsChanged( + for (const auto& group : groups) { + group_ids_.push_back(group.id()); + } +-#if !defined(NDEBUG) ++#if true + groups_ = groups; + #endif // !defined(NDEBUG) + } +diff --git a/components/variations/synthetic_trials_active_group_id_provider.h b/components/variations/synthetic_trials_active_group_id_provider.h +--- a/components/variations/synthetic_trials_active_group_id_provider.h ++++ b/components/variations/synthetic_trials_active_group_id_provider.h +@@ -36,7 +36,7 @@ class COMPONENT_EXPORT(VARIATIONS) SyntheticTrialsActiveGroupIdProvider + // Returns currently active synthetic trial group IDs. + std::vector GetActiveGroupIds(); + +-#if !defined(NDEBUG) ++#if true + // In debug mode, not only the group IDs are tracked but also the full group + // info, to display the names unhashed in chrome://version. + std::vector GetGroups(); +@@ -60,7 +60,7 @@ class COMPONENT_EXPORT(VARIATIONS) SyntheticTrialsActiveGroupIdProvider + + base::Lock lock_; + std::vector group_ids_; // GUARDED_BY(lock_); +-#if !defined(NDEBUG) ++#if true + // In debug builds, keep the full group information to be able to display it + // in chrome://version. + std::vector groups_; // GUARDED_BY(lock_); diff --git a/components/version_ui/version_handler_helper.cc b/components/version_ui/version_handler_helper.cc --- a/components/version_ui/version_handler_helper.cc +++ b/components/version_ui/version_handler_helper.cc -@@ -37,7 +37,7 @@ base::Value::List GetVariationsList() { - // displayed locally (and is useful for diagnostics purposes). +@@ -20,7 +20,7 @@ + namespace version_ui { + namespace { + +-#if !defined(NDEBUG) ++#if true + std::string GetActiveGroupNameAsString( + const base::FieldTrial::ActiveGroup& group) { + static const unsigned char kNonBreakingHyphenUTF8[] = {0xE2, 0x80, 0x91, +@@ -56,7 +56,7 @@ base::Value::List GetVariationsList() { base::FieldTrialListIncludingLowAnonymity::GetActiveFieldTrialGroups( &active_groups); + -#if !defined(NDEBUG) +#if true - const unsigned char kNonBreakingHyphenUTF8[] = {0xE2, 0x80, 0x91, '\0'}; - const std::string kNonBreakingHyphenUTF8String( - reinterpret_cast(kNonBreakingHyphenUTF8)); + for (const auto& group : active_groups) { + variations.push_back(GetActiveGroupNameAsString(group)); + } diff --git a/content/common/features.cc b/content/common/features.cc --- a/content/common/features.cc +++ b/content/common/features.cc -@@ -614,4 +614,5 @@ BASE_FEATURE(kScrollBubblingFix, +@@ -615,4 +615,5 @@ BASE_FEATURE(kLimitCrossOriginNonActivatedPaintHolding, // Please keep features in alphabetical order. @@ -1494,7 +1528,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 -@@ -1422,4 +1422,5 @@ bool IsVideoCaptureServiceEnabledForBrowserProcess() { +@@ -1442,4 +1442,5 @@ bool IsVideoCaptureServiceEnabledForBrowserProcess() { VideoCaptureServiceConfiguration::kEnabledForBrowserProcess; } @@ -1503,7 +1537,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 -@@ -329,6 +329,7 @@ CONTENT_EXPORT extern const base::FeatureParam +@@ -334,6 +334,7 @@ CONTENT_EXPORT extern const base::FeatureParam CONTENT_EXPORT bool IsVideoCaptureServiceEnabledForOutOfProcess(); CONTENT_EXPORT bool IsVideoCaptureServiceEnabledForBrowserProcess(); @@ -1837,7 +1871,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 -@@ -1927,5 +1927,5 @@ uint32_t GetPassthroughAudioFormats() { +@@ -1906,5 +1906,5 @@ uint32_t GetPassthroughAudioFormats() { return 0; #endif // BUILDFLAG(ENABLE_PASSTHROUGH_AUDIO_CODECS) } @@ -1847,7 +1881,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(); +@@ -585,5 +585,5 @@ MEDIA_EXPORT OOPVDMode GetOutOfProcessVideoDecodingMode(); MEDIA_EXPORT uint32_t GetPassthroughAudioFormats(); } // namespace media @@ -1857,18 +1891,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 -@@ -596,4 +596,5 @@ BASE_FEATURE(kNoVarySearchIgnoreUnrecognizedKeys, - "NoVarySearchIgnoreUnrecognizedKeys", - base::FEATURE_ENABLED_BY_DEFAULT); +@@ -616,4 +616,5 @@ const base::FeatureParam kDiskCacheBackendParam{ + &kDiskCacheBackendExperiment, "backend", DiskCacheBackend::kBlockfile, + &kDiskCacheBackendOptions}; +#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 -@@ -608,6 +608,7 @@ NET_EXPORT BASE_DECLARE_FEATURE(kKeepWhitespaceForDataUrls); - // Otherwise, unrecognized keys are treated as if the header was invalid. - NET_EXPORT BASE_DECLARE_FEATURE(kNoVarySearchIgnoreUnrecognizedKeys); +@@ -628,6 +628,7 @@ NET_EXPORT BASE_DECLARE_FEATURE(kDiskCacheBackendExperiment); + NET_EXPORT extern const base::FeatureParam + kDiskCacheBackendParam; +#include "cromite_flags/net_base_features_h.inc" } // namespace net::features @@ -1877,7 +1911,7 @@ 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 -@@ -489,4 +489,5 @@ BASE_FEATURE(kStorageAccessHeadersTrial, +@@ -515,4 +515,5 @@ BASE_FEATURE(kStorageAccessHeadersTrial, "StorageAccessHeadersTrial", base::FEATURE_ENABLED_BY_DEFAULT); @@ -1886,7 +1920,7 @@ diff --git a/services/network/public/cpp/features.cc b/services/network/public/c 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 -@@ -195,6 +195,7 @@ COMPONENT_EXPORT(NETWORK_CPP) BASE_DECLARE_FEATURE(kStorageAccessHeaders); +@@ -204,6 +204,7 @@ COMPONENT_EXPORT(NETWORK_CPP) BASE_DECLARE_FEATURE(kStorageAccessHeaders); // Enables the Storage Access Headers Origin Trial. COMPONENT_EXPORT(NETWORK_CPP) BASE_DECLARE_FEATURE(kStorageAccessHeadersTrial); @@ -1897,18 +1931,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 -@@ -2735,4 +2735,5 @@ bool IsCanvasSharedBitmapConversionEnabled() { - features::kCanvasSharedBitmapToSharedImage); - } +@@ -2801,4 +2801,5 @@ bool IsCanvasSharedBitmapConversionEnabled() { + // + // DO NOT ADD NEW FEATURES HERE. +#include "cromite_flags/third_party_blink_common_features_cc.inc" } // 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 -@@ -1840,6 +1840,7 @@ BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kOptimizeLoadingDataUrls); - BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kCanvasSharedBitmapToSharedImage); - BLINK_COMMON_EXPORT bool IsCanvasSharedBitmapConversionEnabled(); +@@ -1879,6 +1879,7 @@ BLINK_COMMON_EXPORT bool IsCanvasSharedBitmapConversionEnabled(); + // + // DO NOT ADD NEW FEATURES HERE. +#include "cromite_flags/third_party_blink_common_features_h.inc" } // namespace features @@ -1917,7 +1951,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 -@@ -536,4 +536,5 @@ BASE_FEATURE(kAsyncFullscreenWindowState, +@@ -554,4 +554,5 @@ BASE_FEATURE(kAsyncFullscreenWindowState, "AsyncFullscreenWindowState", base::FEATURE_DISABLED_BY_DEFAULT); @@ -1926,7 +1960,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 -@@ -262,6 +262,7 @@ BASE_DECLARE_FEATURE(kUseUtf8EncodingForSvgImage); +@@ -273,6 +273,7 @@ BASE_DECLARE_FEATURE(kWriteBookmarkWithoutTitle); 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 363cd8e17..b76f4a133 100644 --- a/build/patches/Add-custom-tab-intents-privacy-option.patch +++ b/build/patches/Add-custom-tab-intents-privacy-option.patch @@ -108,7 +108,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/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 -@@ -1214,7 +1214,9 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid +@@ -1229,7 +1229,9 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid public @CustomTabProfileType int getCustomTabMode() { return AlwaysIncognitoLinkInterceptor.isAlwaysIncognito() ? CustomTabProfileType.INCOGNITO @@ -122,7 +122,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/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 -@@ -929,6 +929,7 @@ public class CustomTabsConnection { +@@ -958,6 +958,7 @@ public class CustomTabsConnection { PostTask.postTask( TaskTraits.UI_DEFAULT, () -> { @@ -178,8 +178,8 @@ 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 -@@ -55,6 +55,15 @@ import org.chromium.components.user_prefs.UserPrefs; - import org.chromium.ui.text.NoUnderlineClickableSpan; +@@ -56,6 +56,15 @@ import org.chromium.components.signin.identitymanager.ConsentLevel; + import org.chromium.components.user_prefs.UserPrefs; import org.chromium.ui.text.SpanApplier; +import android.app.role.RoleManager; @@ -194,7 +194,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting import androidx.annotation.Nullable; import androidx.preference.PreferenceCategory; import org.chromium.chrome.browser.contextualsearch.ContextualSearchManager; -@@ -102,6 +111,9 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -103,6 +112,9 @@ public class PrivacySettings extends ChromeBaseSettingsFragment private IncognitoLockSettings mIncognitoLockSettings; private final ObservableSupplierImpl mPageTitle = new ObservableSupplierImpl<>(); @@ -204,7 +204,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting @Override public void onCreatePreferencesCromite(Bundle savedInstanceState, String rootKey) { mPageTitle.set(getString(R.string.prefs_privacy_security)); -@@ -320,6 +332,9 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -326,6 +338,9 @@ public class PrivacySettings extends ChromeBaseSettingsFragment new SpanApplier.SpanInfo("", "", servicesLink)); } @@ -214,7 +214,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(); -@@ -336,6 +351,31 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -342,6 +357,31 @@ public class PrivacySettings extends ChromeBaseSettingsFragment } else if (PREF_SEARCH_SUGGESTIONS.equals(key)) { UserPrefs.get(getProfile()) .setBoolean(Pref.SEARCH_SUGGEST_ENABLED, (boolean) newValue); @@ -246,7 +246,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting } return true; } -@@ -358,6 +398,16 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -364,6 +404,16 @@ public class PrivacySettings extends ChromeBaseSettingsFragment UserPrefs.get(getProfile()).getBoolean(Pref.CAN_MAKE_PAYMENT_ENABLED)); } @@ -266,7 +266,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting 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 -@@ -656,6 +656,7 @@ public abstract class ChromeFeatureList { +@@ -691,6 +691,7 @@ public abstract class ChromeFeatureList { public static final CachedFlag sLogoPolishAnimationKillSwitch = newCachedFlag(LOGO_POLISH_ANIMATION_KILL_SWITCH, true); public static final CachedFlag sMagicStackAndroid = newCachedFlag(MAGIC_STACK_ANDROID, true); @@ -274,9 +274,9 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f public static final CachedFlag sMostVisitedTilesReselect = newCachedFlag(MOST_VISITED_TILES_RESELECT, false); public static final CachedFlag sMultiInstanceApplicationStatusCleanup = -@@ -792,6 +793,7 @@ public abstract class ChromeFeatureList { - sLogoPolish, +@@ -832,6 +833,7 @@ public abstract class ChromeFeatureList { sLogoPolishAnimationKillSwitch, + sNotificationTrampoline, sMagicStackAndroid, + sMayLaunchurlUsesSeparateStoragePartition, sMostVisitedTilesReselect, @@ -331,7 +331,7 @@ new file mode 100644 diff --git a/components/content_relationship_verification/android/java/src/org/chromium/components/content_relationship_verification/OriginVerifier.java b/components/content_relationship_verification/android/java/src/org/chromium/components/content_relationship_verification/OriginVerifier.java --- a/components/content_relationship_verification/android/java/src/org/chromium/components/content_relationship_verification/OriginVerifier.java +++ b/components/content_relationship_verification/android/java/src/org/chromium/components/content_relationship_verification/OriginVerifier.java -@@ -180,6 +180,11 @@ public abstract class OriginVerifier { +@@ -176,6 +176,11 @@ public abstract class OriginVerifier { assert mNativeOriginVerifier != 0 : "Either provide a browserContextHandle to " + "OriginVerifier#ctor or call initNativeOriginVerifier."; diff --git a/build/patches/Add-exit-menu-item.patch b/build/patches/Add-exit-menu-item.patch index 5ea8e34ba..6fb3a743f 100644 --- a/build/patches/Add-exit-menu-item.patch +++ b/build/patches/Add-exit-menu-item.patch @@ -39,7 +39,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 -@@ -273,6 +273,8 @@ import java.util.Set; +@@ -277,6 +277,8 @@ import java.util.Set; import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.DoubleConsumer; @@ -48,7 +48,7 @@ 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. -@@ -2825,6 +2827,8 @@ public class ChromeTabbedActivity extends ChromeActivity +@@ -2505,6 +2506,11 @@ public abstract class ChromeActivity return true; } @@ -102,7 +102,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeLife 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 -@@ -4334,6 +4334,9 @@ To change this setting, BEGIN_LINKdelete the Chrome d +@@ -4379,6 +4379,9 @@ To change this setting, BEGIN_LINKdelete the Chrome d Dark theme diff --git a/build/patches/Add-flag-to-disable-IPv6-probes.patch b/build/patches/Add-flag-to-disable-IPv6-probes.patch index 4dd58944b..6ea30ba60 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 -@@ -1096,6 +1096,7 @@ component("net") { +@@ -1101,6 +1101,7 @@ component("net") { "//components/miracle_parameter/common", "//components/network_time/time_tracker", "//net/http:transport_security_state_generated_files", diff --git a/build/patches/Add-flag-to-disable-external-intent-requests.patch b/build/patches/Add-flag-to-disable-external-intent-requests.patch index 9fda0a81c..defd6307e 100644 --- a/build/patches/Add-flag-to-disable-external-intent-requests.patch +++ b/build/patches/Add-flag-to-disable-external-intent-requests.patch @@ -54,9 +54,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/externalnav/Ext import org.chromium.chrome.browser.ChromeTabbedActivity2; +import org.chromium.chrome.browser.flags.cromite.sAllowExternalIntentRequests; import org.chromium.chrome.browser.IntentHandler; - import org.chromium.chrome.browser.tab.EmptyTabObserver; - import org.chromium.chrome.browser.tab.Tab; -@@ -103,7 +104,8 @@ public class ExternalNavigationDelegateImpl implements ExternalNavigationDelegat + import org.chromium.chrome.browser.password_manager.CctPasswordSavingMetricsRecorderBridge; + import org.chromium.chrome.browser.safe_browsing.SafeBrowsingBridge; +@@ -105,7 +106,8 @@ public class ExternalNavigationDelegateImpl implements ExternalNavigationDelegat @Override public boolean shouldDisableExternalIntentRequestsForUrl(GURL url) { @@ -90,7 +90,7 @@ new file mode 100644 + +package org.chromium.chrome.browser.flags.cromite; + -+import org.chromium.base.cached_flags.CachedFlag; ++import org.chromium.components.cached_flags.CachedFlag; +import org.chromium.chrome.browser.flags.ChromeFeatureMap; + +public class sAllowExternalIntentRequests { diff --git a/build/patches/Add-flag-to-disable-vibration.patch b/build/patches/Add-flag-to-disable-vibration.patch index 2815f1cdb..ed36bcd34 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 -@@ -797,6 +797,10 @@ +@@ -791,6 +791,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 42d0ac6dd..280ba01dc 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 -@@ -1967,7 +1967,6 @@ config("default_warnings") { +@@ -1964,7 +1964,6 @@ config("default_warnings") { # TODO(crbug.com/40284799): Fix and re-enable. "-Wno-thread-safety-reference-return", ] @@ -22,9 +22,9 @@ 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", -@@ -1985,6 +1984,16 @@ config("default_warnings") { - # TODO(crbug.com/356172342): Fix and re-enable. - cflags_cc += [ "-Wno-dangling-assignment-gsl" ] +@@ -1987,6 +1986,16 @@ config("default_warnings") { + cflags_cc += [ "-Wno-deprecated-literal-operator" ] + } } + if (skip_clangd_unsupported_options) { + cflags -= [ diff --git a/build/patches/Add-lifetime-options-for-permissions.patch b/build/patches/Add-lifetime-options-for-permissions.patch index b3f4df8ac..6dd29f9f0 100644 --- a/build/patches/Add-lifetime-options-for-permissions.patch +++ b/build/patches/Add-lifetime-options-for-permissions.patch @@ -266,7 +266,7 @@ diff --git a/chrome/browser/ui/views/permissions/exclusive_access_permission_pro diff --git a/chrome/browser/ui/views/permissions/permission_prompt_bubble_base_view.cc b/chrome/browser/ui/views/permissions/permission_prompt_bubble_base_view.cc --- a/chrome/browser/ui/views/permissions/permission_prompt_bubble_base_view.cc +++ b/chrome/browser/ui/views/permissions/permission_prompt_bubble_base_view.cc -@@ -266,7 +266,7 @@ void PermissionPromptBubbleBaseView::RunButtonCallback(int button_id) { +@@ -269,7 +269,7 @@ void PermissionPromptBubbleBaseView::RunButtonCallback(int button_id) { delegate_->Accept(); return; case PermissionDialogButton::kAcceptOnce: @@ -289,7 +289,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java -@@ -574,6 +574,11 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -568,6 +568,11 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment } } @@ -301,7 +301,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(); -@@ -1108,6 +1113,10 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -1102,6 +1107,10 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment AppCompatResources.getColorStateList(getContext(), mHighlightColor) .getDefaultColor()); } @@ -327,7 +327,7 @@ diff --git a/components/browser_ui/site_settings/android/website_preference_brid diff --git a/components/browser_ui/strings/android/browser_ui_strings.grd b/components/browser_ui/strings/android/browser_ui_strings.grd --- a/components/browser_ui/strings/android/browser_ui_strings.grd +++ b/components/browser_ui/strings/android/browser_ui_strings.grd -@@ -651,6 +651,11 @@ +@@ -654,6 +654,11 @@ URL truncated @@ -423,7 +423,7 @@ diff --git a/components/content_settings/core/common/content_settings_enums.mojo diff --git a/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoController.java b/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoController.java --- a/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoController.java +++ b/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoController.java -@@ -421,9 +421,9 @@ public class PageInfoController +@@ -424,9 +424,9 @@ public class PageInfoController String name, String nameMidSentence, int type, @@ -522,7 +522,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 -@@ -1181,6 +1181,8 @@ void PageInfo::PopulatePermissionInfo(PermissionInfo& permission_info, +@@ -1188,6 +1188,8 @@ void PageInfo::PopulatePermissionInfo(PermissionInfo& permission_info, permission_info.is_one_time = (info.metadata.session_model() == content_settings::mojom::SessionModel::ONE_TIME); @@ -1120,7 +1120,7 @@ diff --git a/components/permissions/permission_request.cc b/components/permissio PermissionRequest::~PermissionRequest() { DCHECK(delete_callback_.is_null()); } -@@ -412,19 +420,37 @@ bool PermissionRequest::ShouldUseTwoOriginPrompt() const { +@@ -406,19 +414,37 @@ bool PermissionRequest::ShouldUseTwoOriginPrompt() const { return request_type() == RequestType::kStorageAccess; } 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 abff9f3fb..427ab0570 100644 --- a/build/patches/Add-menu-item-to-bookmark-all-tabs.patch +++ b/build/patches/Add-menu-item-to-bookmark-all-tabs.patch @@ -10,8 +10,10 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../bookmarks/android/bookmark_bridge.cc | 44 +++++++++++- .../bookmarks/android/bookmark_bridge.h | 8 +++ .../browser/bookmarks/bookmark_html_writer.cc | 11 ++- + .../bookmark_merged_surface_service.cc | 2 + .../dialogs/DownloadLocationCustomView.java | 4 +- .../strings/android_chrome_strings.grd | 3 + + .../views/bookmarks/bookmark_menu_delegate.cc | 2 + components/bookmark_bar_strings.grdp | 6 ++ .../bookmarks/browser/bookmark_codec.cc | 20 +++++- components/bookmarks/browser/bookmark_codec.h | 7 +- @@ -26,7 +28,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html components/bookmarks/browser/bookmark_uuids.h | 1 + components/bookmarks/browser/model_loader.cc | 8 ++- .../bookmark_specifics_conversions.cc | 1 + - 22 files changed, 241 insertions(+), 15 deletions(-) + 24 files changed, 245 insertions(+), 15 deletions(-) diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/res/menu/main_menu.xml --- a/chrome/android/java/res/menu/main_menu.xml @@ -55,7 +57,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 -@@ -95,6 +95,7 @@ import org.chromium.chrome.browser.base.ColdStartTracker; +@@ -97,6 +97,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 +65,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; -@@ -2857,6 +2858,8 @@ public class ChromeTabbedActivity extends ChromeActivityGetRoot(); if (IsPermanentFolderVisible(ignore_visibility, reading_list_node)) { -@@ -1266,6 +1297,17 @@ void BookmarkBridge::GetBookmarksOfType( +@@ -1261,6 +1292,17 @@ void BookmarkBridge::GetBookmarksOfType( AddBookmarkNodesToBookmarkIdList(env, j_list, results); } @@ -327,7 +329,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.h b/chrome/browser diff --git a/chrome/browser/bookmarks/bookmark_html_writer.cc b/chrome/browser/bookmarks/bookmark_html_writer.cc --- a/chrome/browser/bookmarks/bookmark_html_writer.cc +++ b/chrome/browser/bookmarks/bookmark_html_writer.cc -@@ -173,7 +173,8 @@ class Writer : public base::RefCountedThreadSafe { +@@ -174,7 +174,8 @@ class Writer : public base::RefCountedThreadSafe { BookmarkCodec codec; bookmarks_ = codec.Encode(model->bookmark_bar_node(), model->other_node(), @@ -337,7 +339,7 @@ diff --git a/chrome/browser/bookmarks/bookmark_html_writer.cc b/chrome/browser/b } Writer(const Writer&) = delete; -@@ -200,15 +201,19 @@ class Writer : public base::RefCountedThreadSafe { +@@ -201,15 +202,19 @@ class Writer : public base::RefCountedThreadSafe { roots->FindDict(BookmarkCodec::kOtherBookmarkFolderNameKey); base::Value::Dict* mobile_folder_value = roots->FindDict(BookmarkCodec::kMobileBookmarkFolderNameKey); @@ -358,7 +360,7 @@ diff --git a/chrome/browser/bookmarks/bookmark_html_writer.cc b/chrome/browser/b NotifyOnFinish(BookmarksExportObserver::Result::kCouldNotWriteNodes); return; } -@@ -472,6 +477,8 @@ void BookmarkFaviconFetcher::ExportBookmarks() { +@@ -464,6 +469,8 @@ void BookmarkFaviconFetcher::ExportBookmarks() { BookmarkModelFactory::GetForBrowserContext(profile_)->other_node()); ExtractUrls( BookmarkModelFactory::GetForBrowserContext(profile_)->mobile_node()); @@ -367,6 +369,18 @@ diff --git a/chrome/browser/bookmarks/bookmark_html_writer.cc b/chrome/browser/b if (!bookmark_urls_.empty()) FetchNextFavicon(); else +diff --git a/chrome/browser/bookmarks/bookmark_merged_surface_service.cc b/chrome/browser/bookmarks/bookmark_merged_surface_service.cc +--- a/chrome/browser/bookmarks/bookmark_merged_surface_service.cc ++++ b/chrome/browser/bookmarks/bookmark_merged_surface_service.cc +@@ -42,6 +42,8 @@ std::optional GetIfPermanentFolderType( + + case BookmarkNode::Type::URL: + NOTREACHED(); ++ case BookmarkNode::Type::TABS_COLLECTION: ++ NOTREACHED(); + } + NOTREACHED(); + } diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationCustomView.java b/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationCustomView.java --- a/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationCustomView.java +++ b/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationCustomView.java @@ -391,7 +405,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 -@@ -4461,6 +4461,9 @@ To change this setting, BEGIN_LINKdelete the Chrome d +@@ -4506,6 +4506,9 @@ To change this setting, BEGIN_LINKdelete the Chrome d Select tabs @@ -401,6 +415,18 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro Get image descriptions +diff --git a/chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc b/chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc +--- a/chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc ++++ b/chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc +@@ -157,6 +157,8 @@ BookmarkParentFolder GetBookmarkParentFolderForNode( + return BookmarkParentFolder::OtherFolder(); + case bookmarks::BookmarkNode::MOBILE: + return BookmarkParentFolder::MobileFolder(); ++ case bookmarks::BookmarkNode::TABS_COLLECTION: ++ NOTREACHED(); + } + NOTREACHED(); + } diff --git a/components/bookmark_bar_strings.grdp b/components/bookmark_bar_strings.grdp --- a/components/bookmark_bar_strings.grdp +++ b/components/bookmark_bar_strings.grdp @@ -576,16 +602,16 @@ diff --git a/components/bookmarks/browser/bookmark_codec.h b/components/bookmark diff --git a/components/bookmarks/browser/bookmark_load_details.cc b/components/bookmarks/browser/bookmark_load_details.cc --- a/components/bookmarks/browser/bookmark_load_details.cc +++ b/components/bookmarks/browser/bookmark_load_details.cc -@@ -15,7 +15,7 @@ namespace { +@@ -16,7 +16,7 @@ namespace { // Number of top-level permanent folders excluding the managed node and account // bookmarks. -constexpr size_t kNumDefaultTopLevelPermanentFolders = 3u; +constexpr size_t kNumDefaultTopLevelPermanentFolders = 4u; - } // namespace - -@@ -40,6 +40,8 @@ BookmarkLoadDetails::BookmarkLoadDetails() + void UpdateUserFolderStatsRecursively(const BookmarkNode& node, + bool top_level, +@@ -60,6 +60,8 @@ BookmarkLoadDetails::BookmarkLoadDetails() root_node_->Add(BookmarkPermanentNode::CreateOtherBookmarks(/*id=*/0))); mobile_folder_node_ = static_cast( root_node_->Add(BookmarkPermanentNode::CreateMobileBookmarks(/*id=*/0))); @@ -594,7 +620,7 @@ diff --git a/components/bookmarks/browser/bookmark_load_details.cc b/components/ CHECK_EQ(kNumDefaultTopLevelPermanentFolders, root_node_->children().size()); } -@@ -86,6 +88,10 @@ void BookmarkLoadDetails::PopulateNodeIdsForLocalOrSyncablePermanentNodes() { +@@ -106,6 +108,10 @@ void BookmarkLoadDetails::PopulateNodeIdsForLocalOrSyncablePermanentNodes() { if (mobile_folder_node_->id() == 0) { mobile_folder_node_->set_id(max_id_++); } @@ -605,7 +631,7 @@ diff --git a/components/bookmarks/browser/bookmark_load_details.cc b/components/ } void BookmarkLoadDetails::AddManagedNode( -@@ -98,6 +104,7 @@ void BookmarkLoadDetails::AddManagedNode( +@@ -118,6 +124,7 @@ void BookmarkLoadDetails::AddManagedNode( CHECK_NE(bb_node_->id(), 0); CHECK_NE(other_folder_node_->id(), 0); CHECK_NE(mobile_folder_node_->id(), 0); @@ -613,7 +639,7 @@ diff --git a/components/bookmarks/browser/bookmark_load_details.cc b/components/ has_managed_node_ = true; root_node_->Add(std::move(managed_node)); -@@ -105,8 +112,8 @@ void BookmarkLoadDetails::AddManagedNode( +@@ -125,8 +132,8 @@ void BookmarkLoadDetails::AddManagedNode( void BookmarkLoadDetails::CreateIndices() { local_or_syncable_uuid_index_.insert(root_node_.get()); @@ -624,7 +650,7 @@ diff --git a/components/bookmarks/browser/bookmark_load_details.cc b/components/ for (const auto& child : root_node_->children()) { if (child.get() == account_bb_node_ || child.get() == account_other_folder_node_ || -@@ -125,6 +132,7 @@ void BookmarkLoadDetails::ResetPermanentNodePointers() { +@@ -145,6 +152,7 @@ void BookmarkLoadDetails::ResetPermanentNodePointers() { bb_node_ = nullptr; other_folder_node_ = nullptr; mobile_folder_node_ = nullptr; @@ -635,7 +661,7 @@ diff --git a/components/bookmarks/browser/bookmark_load_details.cc b/components/ diff --git a/components/bookmarks/browser/bookmark_load_details.h b/components/bookmarks/browser/bookmark_load_details.h --- a/components/bookmarks/browser/bookmark_load_details.h +++ b/components/bookmarks/browser/bookmark_load_details.h -@@ -40,6 +40,7 @@ class BookmarkLoadDetails { +@@ -41,6 +41,7 @@ class BookmarkLoadDetails { BookmarkPermanentNode* bb_node() { return bb_node_; } BookmarkPermanentNode* mobile_folder_node() { return mobile_folder_node_; } BookmarkPermanentNode* other_folder_node() { return other_folder_node_; } @@ -643,7 +669,7 @@ diff --git a/components/bookmarks/browser/bookmark_load_details.h b/components/b // Account permanent nodes (null unless `AddAccountPermanentNodes()` is // called). -@@ -151,6 +152,7 @@ class BookmarkLoadDetails { +@@ -156,6 +157,7 @@ class BookmarkLoadDetails { raw_ptr bb_node_; raw_ptr other_folder_node_; raw_ptr mobile_folder_node_; @@ -654,7 +680,7 @@ diff --git a/components/bookmarks/browser/bookmark_load_details.h b/components/b diff --git a/components/bookmarks/browser/bookmark_model.cc b/components/bookmarks/browser/bookmark_model.cc --- a/components/bookmarks/browser/bookmark_model.cc +++ b/components/bookmarks/browser/bookmark_model.cc -@@ -802,7 +802,7 @@ bool BookmarkModel::HasBookmarks() const { +@@ -825,7 +825,7 @@ bool BookmarkModel::HasBookmarks() const { bool BookmarkModel::HasNoUserCreatedBookmarksOrFolders() const { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); return bookmark_bar_node_->children().empty() && @@ -663,7 +689,7 @@ diff --git a/components/bookmarks/browser/bookmark_model.cc b/components/bookmar } bool BookmarkModel::IsBookmarked(const GURL& url) const { -@@ -1110,6 +1110,7 @@ void BookmarkModel::DoneLoading(std::unique_ptr details) { +@@ -1134,6 +1134,7 @@ void BookmarkModel::DoneLoading(std::unique_ptr details) { bookmark_bar_node_ = details->bb_node(); other_node_ = details->other_folder_node(); mobile_node_ = details->mobile_folder_node(); @@ -789,7 +815,7 @@ diff --git a/components/bookmarks/browser/bookmark_uuids.h b/components/bookmark diff --git a/components/bookmarks/browser/model_loader.cc b/components/bookmarks/browser/model_loader.cc --- a/components/bookmarks/browser/model_loader.cc +++ b/components/bookmarks/browser/model_loader.cc -@@ -70,6 +70,8 @@ std::unique_ptr LoadBookmarks( +@@ -71,6 +71,8 @@ std::unique_ptr LoadBookmarks( BookmarkPermanentNode::CreateOtherBookmarks(0); std::unique_ptr account_mobile_folder_node = BookmarkPermanentNode::CreateMobileBookmarks(0); @@ -798,7 +824,7 @@ diff --git a/components/bookmarks/browser/model_loader.cc b/components/bookmarks std::optional root_dict = LoadFileToDict(account_file_path); -@@ -77,7 +79,8 @@ std::unique_ptr LoadBookmarks( +@@ -78,7 +80,8 @@ std::unique_ptr LoadBookmarks( if (root_dict.has_value() && codec.Decode(*root_dict, /*already_assigned_ids=*/{}, account_bb_node.get(), account_other_folder_node.get(), @@ -808,7 +834,7 @@ diff --git a/components/bookmarks/browser/model_loader.cc b/components/bookmarks &sync_metadata_str)) { ids_assigned_to_account_nodes = codec.release_assigned_ids(); -@@ -119,7 +122,8 @@ std::unique_ptr LoadBookmarks( +@@ -120,7 +123,8 @@ std::unique_ptr LoadBookmarks( if (root_dict.has_value() && codec.Decode(*root_dict, std::move(ids_assigned_to_account_nodes), details->bb_node(), details->other_folder_node(), diff --git a/build/patches/Add-menu-item-to-view-source.patch b/build/patches/Add-menu-item-to-view-source.patch index b5a9ed589..d444fef54 100644 --- a/build/patches/Add-menu-item-to-view-source.patch +++ b/build/patches/Add-menu-item-to-view-source.patch @@ -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 -@@ -2890,6 +2890,8 @@ public class ChromeTabbedActivity extends ChromeActivity +@@ -2649,6 +2649,11 @@ public abstract class ChromeActivity return doOpenWebApk(currentTab); } @@ -77,7 +77,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/App updateAutoDarkMenuItem(menu, currentTab, isNativePage); -@@ -1276,6 +1277,23 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate +@@ -1277,6 +1278,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 -@@ -296,6 +296,7 @@ public class CustomTabAppMenuPropertiesDelegate extends AppMenuPropertiesDelegat +@@ -285,6 +285,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 0d37f652a..c214adecb 100644 --- a/build/patches/Add-option-to-disable-snapshots.patch +++ b/build/patches/Add-option-to-disable-snapshots.patch @@ -15,7 +15,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html 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 -@@ -346,7 +346,12 @@ class TabGridViewBinder { +@@ -397,7 +397,12 @@ class TabGridViewBinder { if (result != null) { TabUtils.setDrawableAndUpdateImageMatrix(thumbnail, result, thumbnailSize); } else { @@ -29,18 +29,18 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser } }; if (sThumbnailFetcherForTesting != null) { -@@ -385,6 +390,7 @@ class TabGridViewBinder { - ViewLookupCachingFrameLayout rootView, - PropertyModel model, - TabListFaviconProvider.TabFavicon favicon) { +@@ -438,6 +443,7 @@ class TabGridViewBinder { + */ + private static void setFavicon( + ImageView faviconView, PropertyModel model, TabListFaviconProvider.TabFavicon favicon) { + model.set(TabProperties.FAVICON, favicon); - ImageView faviconView = (ImageView) rootView.fastFindViewById(R.id.tab_favicon); if (favicon == null) { faviconView.setImageDrawable(null); + return; 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 -@@ -76,6 +76,9 @@ public class TabProperties { +@@ -72,6 +72,9 @@ public class TabProperties { public static final WritableBooleanPropertyKey FAVICON_FETCHED = new WritableBooleanPropertyKey(); @@ -84,7 +84,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/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 -@@ -141,6 +141,7 @@ import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; +@@ -142,6 +142,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; @@ -92,7 +92,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.profiles.ProfileManager; import org.chromium.chrome.browser.profiles.ProfileProvider; -@@ -716,7 +717,7 @@ public abstract class ChromeActivity +@@ -715,7 +716,7 @@ public abstract class ChromeActivity new TabContentManager( this, mBrowserControlsManagerSupplier.get(), @@ -104,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 -@@ -19,6 +19,7 @@ import androidx.preference.Preference; +@@ -21,6 +21,7 @@ import androidx.preference.Preference; import org.chromium.base.metrics.RecordHistogram; import org.chromium.base.metrics.RecordUserAction; @@ -112,7 +112,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting import org.chromium.base.supplier.ObservableSupplier; import org.chromium.base.supplier.ObservableSupplierImpl; import org.chromium.base.ContextUtils; -@@ -74,12 +75,26 @@ import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; +@@ -75,12 +76,26 @@ import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; import org.chromium.components.browser_ui.settings.ChromeSwitchPreference; import org.chromium.components.browser_ui.settings.ManagedPreferenceDelegate; @@ -140,7 +140,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"; -@@ -165,6 +180,21 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -166,6 +181,21 @@ public class PrivacySettings extends ChromeBaseSettingsFragment } } @@ -162,7 +162,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( -@@ -376,6 +406,7 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -382,6 +412,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"; @@ -170,7 +170,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting @Override public boolean onPreferenceChange(Preference preference, Object newValue) { -@@ -418,6 +449,13 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -424,6 +455,13 @@ public class PrivacySettings extends ChromeBaseSettingsFragment SharedPreferences.Editor sharedPreferencesEditor = ContextUtils.getAppSharedPreferences().edit(); sharedPreferencesEditor.putBoolean(PREF_OPEN_EXTERNAL_LINKS_INCOGNITO, (boolean)newValue); sharedPreferencesEditor.apply(); @@ -184,7 +184,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting } return true; } -@@ -474,6 +512,10 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -480,6 +518,10 @@ public class PrivacySettings extends ChromeBaseSettingsFragment : R.string.text_off); } @@ -198,7 +198,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 -@@ -5979,6 +5979,14 @@ To change this setting, BEGIN_LINKdelete the Chrome d +@@ -6027,6 +6027,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 ba9601715..c15844f25 100644 --- a/build/patches/Add-option-to-force-tablet-UI.patch +++ b/build/patches/Add-option-to-force-tablet-UI.patch @@ -17,7 +17,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../strip/StripLayoutHelperManager.java | 5 +++- .../init/ChromeBrowserInitializer.java | 2 ++ .../tabbed_mode/TabbedRootUiCoordinator.java | 4 +++- - .../chrome/browser/ui/RootUiCoordinator.java | 5 +++- + .../chrome/browser/ui/RootUiCoordinator.java | 6 ++++- chrome/browser/preferences/BUILD.gn | 1 + .../preferences/ChromePreferenceKeys.java | 1 + .../preferences/ChromeSharedPreferences.java | 12 ++++++++++ @@ -37,7 +37,7 @@ 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 | 14 +++++++++++ - 33 files changed, 175 insertions(+), 27 deletions(-) + 33 files changed, 176 insertions(+), 27 deletions(-) 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 @@ -94,19 +94,19 @@ diff --git a/chrome/android/java/res/values/dimens.xml b/chrome/android/java/res + 375dp - 60dp + 64dp diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeBaseAppCompatActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeBaseAppCompatActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeBaseAppCompatActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeBaseAppCompatActivity.java -@@ -51,6 +51,7 @@ import org.chromium.chrome.browser.metrics.UmaSessionStats; +@@ -50,6 +50,7 @@ import org.chromium.chrome.browser.metrics.UmaSessionStats; import org.chromium.chrome.browser.night_mode.GlobalNightModeStateProviderHolder; import org.chromium.chrome.browser.night_mode.NightModeStateProvider; import org.chromium.chrome.browser.night_mode.NightModeUtils; +import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; + import org.chromium.components.browser_ui.edge_to_edge.EdgeToEdgeStateProvider; import org.chromium.components.browser_ui.util.AutomotiveUtils; - import org.chromium.ui.display.DisplaySwitches; - import org.chromium.ui.display.DisplayUtil; -@@ -123,6 +124,8 @@ public class ChromeBaseAppCompatActivity extends AppCompatActivity + import org.chromium.components.cached_flags.BooleanCachedFieldTrialParameter; +@@ -115,6 +116,8 @@ public class ChromeBaseAppCompatActivity extends AppCompatActivity protected void attachBaseContext(Context newBase) { super.attachBaseContext(newBase); @@ -118,7 +118,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeBaseAppCo 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 -@@ -61,6 +61,7 @@ import org.chromium.content_public.browser.WebContents; +@@ -62,6 +62,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; @@ -126,7 +126,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/WarmupManager.j import org.chromium.ui.base.WindowAndroid; import org.chromium.ui.display.DisplayUtil; import org.chromium.url.GURL; -@@ -454,7 +455,9 @@ public class WarmupManager { +@@ -463,7 +464,9 @@ public class WarmupManager { ControlContainer controlContainer = mainView.findViewById(R.id.control_container); if (toolbarId != ActivityUtils.NO_RESOURCE_ID && controlContainer != null) { @@ -141,14 +141,14 @@ 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 @@ -20,6 +20,7 @@ import org.chromium.chrome.browser.preferences.Pref; - import org.chromium.chrome.browser.settings.SettingsLauncherFactory; + import org.chromium.chrome.browser.settings.SettingsNavigationFactory; import org.chromium.chrome.browser.settings.ChromeBaseSettingsFragment; import org.chromium.components.browser_ui.accessibility.AccessibilitySettingsDelegate; +import org.chromium.components.browser_ui.accessibility.AccessibilitySettingsDelegate.BooleanPreferenceDelegate; import org.chromium.components.browser_ui.accessibility.FontSizePrefs; import org.chromium.components.browser_ui.accessibility.FontSizePrefs.FontSizePrefsObserver; import org.chromium.components.browser_ui.accessibility.PageZoomPreference; -@@ -50,6 +51,9 @@ public class AccessibilitySettings extends ChromeBaseSettingsFragment +@@ -51,6 +52,9 @@ public class AccessibilitySettings extends ChromeBaseSettingsFragment public static final String PREF_ZOOM_INFO = "zoom_info"; public static final String PREF_IMAGE_DESCRIPTIONS = "image_descriptions"; @@ -158,7 +158,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/s private TextScalePreference mTextScalePref; private PageZoomPreference mPageZoomDefaultZoomPref; private ChromeSwitchPreference mPageZoomIncludeOSAdjustment; -@@ -151,6 +155,12 @@ public class AccessibilitySettings extends ChromeBaseSettingsFragment +@@ -153,6 +157,12 @@ public class AccessibilitySettings extends ChromeBaseSettingsFragment mPrefService.getBoolean(Pref.READER_FOR_ACCESSIBILITY)); readerForAccessibilityPref.setOnPreferenceChangeListener(this); @@ -171,7 +171,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/s Preference captions = findPreference(PREF_CAPTIONS); captions.setOnPreferenceClickListener( preference -> { -@@ -223,6 +233,9 @@ public class AccessibilitySettings extends ChromeBaseSettingsFragment +@@ -231,6 +241,9 @@ public class AccessibilitySettings extends ChromeBaseSettingsFragment mFontSizePrefs.setUserFontScaleFactor((Float) newValue); } else if (PREF_FORCE_ENABLE_ZOOM.equals(preference.getKey())) { mFontSizePrefs.setForceEnableZoomFromUser((Boolean) newValue); @@ -213,7 +213,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 -@@ -861,7 +861,9 @@ public abstract class ChromeActivity +@@ -860,7 +860,9 @@ public abstract class ChromeActivity // Inflate the correct toolbar layout for the device. int toolbarLayoutId = getToolbarLayoutId(); if (toolbarLayoutId != ActivityUtils.NO_RESOURCE_ID && controlContainer != null) { @@ -227,15 +227,15 @@ 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 -@@ -90,6 +90,7 @@ import org.chromium.components.prefs.PrefService; +@@ -93,6 +93,7 @@ import org.chromium.components.feature_engagement.Tracker; + 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; +import org.chromium.ui.base.DeviceFormFactor; import org.chromium.ui.base.LocalizationUtils; import org.chromium.ui.base.WindowAndroid; import org.chromium.ui.interpolators.Interpolators; -@@ -5273,8 +5274,13 @@ public class StripLayoutHelper +@@ -4655,8 +4656,13 @@ public class StripLayoutHelper mTabMenu.setAnchorView(tabView); // 3. Set the vertical offset to align the tab menu with bottom of the tab strip int tabHeight = mManagerHost.getHeight(); @@ -254,7 +254,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 -@@ -455,7 +455,10 @@ public class StripLayoutHelperManager +@@ -457,7 +457,10 @@ public class StripLayoutHelperManager mIsLayoutOptimizationsEnabled = ToolbarFeatures.isTabStripWindowLayoutOptimizationEnabled(true); @@ -288,7 +288,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeBrow 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 -@@ -556,7 +556,9 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { +@@ -570,7 +570,9 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { @Override public int getControlContainerHeightResource() { @@ -302,15 +302,16 @@ 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 -@@ -104,6 +104,7 @@ import org.chromium.chrome.browser.password_manager.ManagePasswordsReferrer; +@@ -102,6 +102,8 @@ import org.chromium.chrome.browser.paint_preview.DemoPaintPreview; + 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; +import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; ++import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; import org.chromium.chrome.browser.price_insights.PriceInsightsButtonController; import org.chromium.chrome.browser.price_tracking.CurrentTabPriceTrackingStateSupplier; import org.chromium.chrome.browser.price_tracking.PriceTrackingButtonController; -@@ -1775,7 +1776,9 @@ public class RootUiCoordinator +@@ -1758,7 +1760,9 @@ public class RootUiCoordinator if (!mSupportsFindInPageSupplier.getAsBoolean()) return; int stubId = R.id.find_toolbar_stub; @@ -386,15 +387,15 @@ diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/bro diff --git a/chrome/browser/ui/android/desktop_windowing/java/src/org/chromium/chrome/browser/ui/desktop_windowing/AppHeaderCoordinator.java b/chrome/browser/ui/android/desktop_windowing/java/src/org/chromium/chrome/browser/ui/desktop_windowing/AppHeaderCoordinator.java --- a/chrome/browser/ui/android/desktop_windowing/java/src/org/chromium/chrome/browser/ui/desktop_windowing/AppHeaderCoordinator.java +++ b/chrome/browser/ui/android/desktop_windowing/java/src/org/chromium/chrome/browser/ui/desktop_windowing/AppHeaderCoordinator.java -@@ -30,6 +30,7 @@ import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher; - import org.chromium.chrome.browser.lifecycle.SaveInstanceStateObserver; - import org.chromium.chrome.browser.lifecycle.TopResumedActivityChangedObserver; - import org.chromium.chrome.browser.ui.desktop_windowing.AppHeaderUtils.DesktopWindowHeuristicResult; +@@ -34,6 +34,7 @@ import org.chromium.chrome.browser.ui.desktop_windowing.AppHeaderUtils.DesktopWi + import org.chromium.components.browser_ui.desktop_windowing.AppHeaderState; + import org.chromium.components.browser_ui.desktop_windowing.DesktopWindowStateProvider; + import org.chromium.components.browser_ui.edge_to_edge.EdgeToEdgeStateProvider; +import org.chromium.ui.base.DeviceFormFactor; import org.chromium.ui.InsetObserver; + import org.chromium.ui.InsetObserver.WindowInsetObserver; import org.chromium.ui.InsetsRectProvider; - import org.chromium.ui.util.ColorUtils; -@@ -238,6 +239,7 @@ public class AppHeaderCoordinator +@@ -273,6 +274,7 @@ public class AppHeaderCoordinator InsetObserver insetObserver, InsetsRectProvider insetsRectProvider, @DesktopWindowHeuristicResult int currentResult) { @@ -405,7 +406,7 @@ diff --git a/chrome/browser/ui/android/desktop_windowing/java/src/org/chromium/c diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarCoordinator.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarCoordinator.java --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarCoordinator.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarCoordinator.java -@@ -765,7 +765,7 @@ public class LocationBarCoordinator +@@ -782,7 +782,7 @@ public class LocationBarCoordinator } private boolean isTabletWindow() { @@ -417,7 +418,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 -@@ -1721,6 +1721,13 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1742,6 +1742,13 @@ Your Google account may have other forms of browsing history like searches and a Hide your IP address @@ -523,7 +524,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/res/values/dimens.xml b/chro diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/ControlContainer.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/ControlContainer.java --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/ControlContainer.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/ControlContainer.java -@@ -20,7 +20,7 @@ public interface ControlContainer { +@@ -22,7 +22,7 @@ public interface ControlContainer { * Initialize the control container with the specified toolbar. * @param toolbarLayoutId The ID of the toolbar layout to use. */ @@ -543,7 +544,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow import android.graphics.Canvas; import android.graphics.PorterDuff; import android.graphics.Rect; -@@ -119,8 +120,29 @@ public class ToolbarControlContainer extends OptimizedFrameLayout +@@ -128,8 +129,29 @@ public class ToolbarControlContainer extends OptimizedFrameLayout } @Override @@ -618,10 +619,10 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/tab_strip/TabStripTransitionCoordinator.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/tab_strip/TabStripTransitionCoordinator.java --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/tab_strip/TabStripTransitionCoordinator.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/tab_strip/TabStripTransitionCoordinator.java -@@ -27,6 +27,7 @@ import org.chromium.chrome.browser.ui.desktop_windowing.AppHeaderState; - import org.chromium.chrome.browser.ui.desktop_windowing.AppHeaderUtils; - import org.chromium.chrome.browser.ui.desktop_windowing.DesktopWindowStateProvider; - import org.chromium.chrome.browser.ui.desktop_windowing.DesktopWindowStateProvider.AppHeaderObserver; +@@ -27,6 +27,7 @@ import org.chromium.chrome.browser.ui.desktop_windowing.AppHeaderUtils; + import org.chromium.components.browser_ui.desktop_windowing.AppHeaderState; + import org.chromium.components.browser_ui.desktop_windowing.DesktopWindowStateProvider; + import org.chromium.components.browser_ui.desktop_windowing.DesktopWindowStateProvider.AppHeaderObserver; +import org.chromium.ui.base.DeviceFormFactor; import org.chromium.ui.util.TokenHolder; @@ -641,9 +642,9 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow diff --git a/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml b/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml --- a/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml +++ b/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml -@@ -41,6 +41,11 @@ found in the LICENSE file. - android:summary="@string/reader_for_accessibility_summary" - android:title="@string/reader_for_accessibility_title" /> +@@ -46,6 +46,11 @@ found in the LICENSE file. + android:summary="@string/jump_start_omnibox_summary" + android:title="@string/jump_start_omnibox_title" /> + = SCREEN_BUCKET_TABLET; } -@@ -108,6 +118,7 @@ public class DeviceFormFactor { +@@ -122,6 +132,7 @@ public class DeviceFormFactor { * @return The screen width bucket the device is in (see constants at the top of this class). */ private static int detectScreenWidthBucket(Context context) { @@ -723,7 +724,7 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/DeviceFormFactor.java b/ui return context.getResources().getInteger(R.integer.min_screen_width_bucket); } -@@ -115,6 +126,7 @@ public class DeviceFormFactor { +@@ -129,6 +140,7 @@ public class DeviceFormFactor { ThreadUtils.assertOnUiThread(); Context context = windowAndroid.getContext().get(); if (context == null) return 0; @@ -731,7 +732,7 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/DeviceFormFactor.java b/ui return context.getResources().getInteger(R.integer.min_screen_width_bucket); } -@@ -124,6 +136,7 @@ public class DeviceFormFactor { +@@ -138,6 +150,7 @@ public class DeviceFormFactor { */ @UiThread public static int getNonMultiDisplayMinimumTabletWidthPx(Context context) { @@ -739,7 +740,7 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/DeviceFormFactor.java b/ui return getMinimumTabletWidthPx(DisplayAndroid.getNonMultiDisplay(context)); } -@@ -132,6 +145,7 @@ public class DeviceFormFactor { +@@ -146,6 +159,7 @@ public class DeviceFormFactor { * layout. */ public static int getMinimumTabletWidthPx(DisplayAndroid display) { diff --git a/build/patches/Add-option-to-not-persist-tabs-across-sessions.patch b/build/patches/Add-option-to-not-persist-tabs-across-sessions.patch index 41571325f..9b20dedfc 100644 --- a/build/patches/Add-option-to-not-persist-tabs-across-sessions.patch +++ b/build/patches/Add-option-to-not-persist-tabs-across-sessions.patch @@ -28,15 +28,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/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 -@@ -43,6 +43,7 @@ import org.chromium.base.BuildInfo; - import org.chromium.base.Callback; +@@ -44,6 +44,7 @@ import org.chromium.base.Callback; import org.chromium.base.CallbackController; + import org.chromium.base.CallbackUtils; import org.chromium.base.CommandLine; +import org.chromium.base.ContextUtils; import org.chromium.base.IntentUtils; import org.chromium.base.Log; import org.chromium.base.MemoryPressureListener; -@@ -1543,8 +1544,10 @@ public class ChromeTabbedActivity extends ChromeActivityBEGIN_LINKdelete the Chrome d +@@ -5536,6 +5536,12 @@ To change this setting, BEGIN_LINKdelete the Chrome d IMAGE diff --git a/build/patches/Add-option-to-use-home-page-as-NTP.patch b/build/patches/Add-option-to-use-home-page-as-NTP.patch index 30bf001f0..3b9036266 100644 --- a/build/patches/Add-option-to-use-home-page-as-NTP.patch +++ b/build/patches/Add-option-to-use-home-page-as-NTP.patch @@ -23,18 +23,18 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java -@@ -22,6 +22,7 @@ import org.chromium.base.supplier.OneshotSupplier; - import org.chromium.chrome.R; +@@ -23,6 +23,7 @@ import org.chromium.chrome.R; + import org.chromium.chrome.browser.data_sharing.DataSharingServiceFactory; import org.chromium.chrome.browser.data_sharing.ui.shared_image_tiles.SharedImageTilesCoordinator; import org.chromium.chrome.browser.flags.ChromeFeatureList; +import org.chromium.chrome.browser.homepage.HomepageManager; import org.chromium.chrome.browser.layouts.LayoutStateProvider; import org.chromium.chrome.browser.layouts.LayoutStateProvider.LayoutStateObserver; import org.chromium.chrome.browser.layouts.LayoutType; -@@ -392,10 +393,15 @@ public class TabGroupUiMediator implements BackPressHandler { +@@ -408,10 +409,15 @@ public class TabGroupUiMediator implements BackPressHandler { assert relatedTabs.size() > 0; - parentTabToAttach = relatedTabs.get(relatedTabs.size() - 1); + Tab parentTabToAttach = relatedTabs.get(relatedTabs.size() - 1); + String url = UrlConstants.NTP_URL; + if (HomepageManager.getInstance().getPrefNTPIsHomepageEnabled()) { + GURL gurl = HomepageManager.getInstance().getHomepageGurl(); @@ -51,16 +51,16 @@ 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/TabUiUtils.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabUiUtils.java --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabUiUtils.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabUiUtils.java -@@ -35,6 +35,8 @@ import org.chromium.components.tab_group_sync.SavedTabGroup; - import org.chromium.components.tab_group_sync.TabGroupSyncService; - import org.chromium.components.tab_groups.TabGroupColorId; +@@ -43,6 +43,8 @@ import org.chromium.components.tab_groups.TabGroupColorId; import org.chromium.content_public.browser.LoadUrlParams; + import org.chromium.ui.modaldialog.ModalDialogManager; + import org.chromium.ui.modaldialog.ModalDialogUtils; +import org.chromium.chrome.browser.homepage.HomepageManager; +import org.chromium.url.GURL; import java.util.List; import java.util.Objects; -@@ -195,8 +197,13 @@ public class TabUiUtils { +@@ -204,8 +206,13 @@ public class TabUiUtils { List relatedTabs = filter.getRelatedTabList(tabId); assert relatedTabs.size() > 0; @@ -155,7 +155,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/homepage/settin diff --git a/chrome/android/java/src/org/chromium/chrome/browser/metrics/LaunchMetrics.java b/chrome/android/java/src/org/chromium/chrome/browser/metrics/LaunchMetrics.java --- a/chrome/android/java/src/org/chromium/chrome/browser/metrics/LaunchMetrics.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/metrics/LaunchMetrics.java -@@ -111,7 +111,6 @@ public class LaunchMetrics { +@@ -112,7 +112,6 @@ public class LaunchMetrics { public static void recordHomePageLaunchMetrics( boolean showHomeButton, boolean homepageIsNtp, GURL homepageGurl) { if (homepageGurl.isEmpty()) { @@ -174,7 +174,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/Chrome import org.chromium.chrome.browser.prefetch.settings.PreloadPagesSettingsBridge; import org.chromium.chrome.browser.prefetch.settings.PreloadPagesState; import org.chromium.chrome.browser.profiles.Profile; -@@ -486,6 +487,13 @@ public class ChromeTabCreator extends TabCreator { +@@ -492,6 +493,13 @@ public class ChromeTabCreator extends TabCreator { * @return the created tab. */ public Tab launchUrl(String url, @TabLaunchType int type, Intent intent, long intentTimestamp) { @@ -213,7 +213,7 @@ diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/bro 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 -@@ -1507,6 +1507,9 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1528,6 +1528,9 @@ Your Google account may have other forms of browsing history like searches and a Last hour @@ -226,7 +226,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_ui_prefs.cc --- a/chrome/browser/ui/browser_ui_prefs.cc +++ b/chrome/browser/ui/browser_ui_prefs.cc -@@ -91,6 +91,8 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { +@@ -89,6 +89,8 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref( prefs::kShowForwardButton, true, GetHomeAndForwardButtonAndHomePageIsNewTabPageFlags()); @@ -238,7 +238,7 @@ diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_u 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 -@@ -1365,6 +1365,10 @@ inline constexpr char kShowHomeButton[] = "browser.show_home_button"; +@@ -1373,6 +1373,10 @@ inline constexpr char kShowHomeButton[] = "browser.show_home_button"; // toolbar. inline constexpr char kShowForwardButton[] = "browser.show_forward_button"; diff --git a/build/patches/Add-search-engine.patch b/build/patches/Add-search-engine.patch index 08b52dfe1..c06d56cd7 100644 --- a/build/patches/Add-search-engine.patch +++ b/build/patches/Add-search-engine.patch @@ -131,7 +131,7 @@ diff --git a/components/search_engines/search_engine_countries-inc.cc b/componen {SearchEngineTier::kTopEngines, &google}, {SearchEngineTier::kTopEngines, &bing}, {SearchEngineTier::kTopEngines, &yahoo}, -@@ -1454,5 +1455,7 @@ const std::vector GetPrepopulationSetFromCountryID( +@@ -1452,5 +1453,7 @@ const std::vector GetPrepopulationSetFromCountryID( for (size_t i = 0; i < num_engines; i++) { t_url.push_back(engines[i]); } @@ -161,7 +161,7 @@ diff --git a/components/search_engines/search_engine_type.h b/components/search_ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/components/search_engines/template_url_prepopulate_data.cc --- a/components/search_engines/template_url_prepopulate_data.cc +++ b/components/search_engines/template_url_prepopulate_data.cc -@@ -83,7 +83,6 @@ GetPrepopulatedEnginesForEeaRegionCountries(int country_id, +@@ -78,7 +78,6 @@ GetPrepopulatedEnginesForEeaRegionCountries(int country_id, generator.seed(profile_seed); std::shuffle(t_urls.begin(), t_urls.end(), generator); @@ -172,7 +172,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon diff --git a/components/search_engines/template_url_prepopulate_data.h b/components/search_engines/template_url_prepopulate_data.h --- a/components/search_engines/template_url_prepopulate_data.h +++ b/components/search_engines/template_url_prepopulate_data.h -@@ -31,13 +31,6 @@ struct PrepopulatedEngine; +@@ -32,13 +32,6 @@ struct PrepopulatedEngine; extern const int kMaxPrepopulatedEngineID; diff --git a/build/patches/Add-setting-to-clear-data-on-exit.patch b/build/patches/Add-setting-to-clear-data-on-exit.patch index 1d2a2bf4a..c78ca4a5c 100644 --- a/build/patches/Add-setting-to-clear-data-on-exit.patch +++ b/build/patches/Add-setting-to-clear-data-on-exit.patch @@ -14,7 +14,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../chrome_browsing_data_lifetime_manager.cc | 22 +++++- .../chrome_browsing_data_remover_constants.h | 3 +- .../chrome_browsing_data_remover_delegate.cc | 14 ++++ - chrome/browser/dips/dips_service.cc | 2 +- + chrome/browser/dips/dips_service_impl.cc | 2 +- .../api/settings_private/prefs_util.cc | 17 +++++ .../browser/profiles/ProfileManagerUtils.java | 5 ++ .../profiles/android/profile_manager_utils.cc | 5 ++ @@ -50,7 +50,7 @@ diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java 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 -@@ -178,6 +178,7 @@ import org.chromium.chrome.browser.profiles.ProfileProvider; +@@ -182,6 +182,7 @@ import org.chromium.chrome.browser.profiles.ProfileProvider; import org.chromium.chrome.browser.quick_delete.QuickDeleteController; import org.chromium.chrome.browser.quick_delete.QuickDeleteDelegateImpl; import org.chromium.chrome.browser.quick_delete.QuickDeleteMetricsDelegate; @@ -58,7 +58,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct import org.chromium.chrome.browser.read_later.ReadingListBackPressHandler; import org.chromium.chrome.browser.recent_tabs.CrossDevicePaneFactory; import org.chromium.chrome.browser.reengagement.ReengagementNotificationController; -@@ -1543,7 +1544,11 @@ public class ChromeTabbedActivity extends ChromeActivity Delete browsing data @@ -298,7 +298,7 @@ diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_constants diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc --- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc +++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc -@@ -458,6 +458,9 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( +@@ -460,6 +460,9 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( CreateTaskCompletionClosure(TracingDataType::kHistory), &history_task_tracker_); } @@ -308,7 +308,7 @@ diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate. if (ClipboardRecentContent::GetInstance()) ClipboardRecentContent::GetInstance()->SuppressClipboardContent(); -@@ -555,6 +558,11 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( +@@ -557,6 +560,11 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( // and SSL host state are scoped to hosts and represent them as std::string. // Rename the method to indicate its more general usage. if (profile_->GetSSLHostStateDelegate()) { @@ -320,7 +320,7 @@ diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate. profile_->GetSSLHostStateDelegate()->Clear( filter_builder->MatchesAllOriginsAndDomains() ? base::RepeatingCallback() -@@ -583,9 +591,13 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( +@@ -585,9 +593,13 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( } device_event_log::Clear(delete_begin_, delete_end_); @@ -334,7 +334,7 @@ diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate. content::BackgroundTracingManager::GetInstance().DeleteTracesInDateRange( delete_begin_, delete_end_); -@@ -1279,6 +1291,8 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( +@@ -1282,6 +1294,8 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( if (should_clear_zero_suggest_and_session_token && template_url_service) template_url_service->ClearSessionToken(); @@ -343,10 +343,10 @@ diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate. } ////////////////////////////////////////////////////////////////////////////// -diff --git a/chrome/browser/dips/dips_service.cc b/chrome/browser/dips/dips_service.cc ---- a/chrome/browser/dips/dips_service.cc -+++ b/chrome/browser/dips/dips_service.cc -@@ -188,7 +188,7 @@ class StateClearer : public content::BrowsingDataRemover::Observer { +diff --git a/chrome/browser/dips/dips_service_impl.cc b/chrome/browser/dips/dips_service_impl.cc +--- a/chrome/browser/dips/dips_service_impl.cc ++++ b/chrome/browser/dips/dips_service_impl.cc +@@ -200,7 +200,7 @@ class StateClearer : public content::BrowsingDataRemover::Observer { } remover->RemoveWithFilterAndReply( base::Time::Min(), base::Time::Max(), @@ -358,7 +358,7 @@ diff --git a/chrome/browser/dips/dips_service.cc b/chrome/browser/dips/dips_serv diff --git a/chrome/browser/extensions/api/settings_private/prefs_util.cc b/chrome/browser/extensions/api/settings_private/prefs_util.cc --- a/chrome/browser/extensions/api/settings_private/prefs_util.cc +++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc -@@ -536,6 +536,23 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlistedKeys() { +@@ -539,6 +539,23 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlistedKeys() { (*s_allowlist)[browsing_data::prefs::kLastClearBrowsingDataTab] = settings_api::PrefType::kNumber; @@ -416,7 +416,7 @@ diff --git a/chrome/browser/profiles/android/profile_manager_utils.cc b/chrome/b 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 -@@ -1475,6 +1475,19 @@ void ProfileManager::DoFinalInit(ProfileInfo* profile_info, +@@ -1428,6 +1428,19 @@ void ProfileManager::DoFinalInit(ProfileInfo* profile_info, } } @@ -436,7 +436,7 @@ diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profile void ProfileManager::DoFinalInitForServices(Profile* profile, bool go_off_the_record) { if (!do_final_services_init_ || -@@ -2178,7 +2191,7 @@ void ProfileManager::OnBrowserClosed(Browser* browser) { +@@ -2115,7 +2128,7 @@ void ProfileManager::OnBrowserClosed(Browser* browser) { Profile* original_profile = profile->GetOriginalProfile(); // Do nothing if the closed window is not the last window of the same profile. for (Browser* browser_iter : *BrowserList::GetInstance()) { @@ -448,7 +448,7 @@ diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profile diff --git a/chrome/browser/profiles/profile_manager.h b/chrome/browser/profiles/profile_manager.h --- a/chrome/browser/profiles/profile_manager.h +++ b/chrome/browser/profiles/profile_manager.h -@@ -199,6 +199,8 @@ class ProfileManager : public Profile::Delegate { +@@ -195,6 +195,8 @@ class ProfileManager : public Profile::Delegate { // profiles. std::vector GetLoadedProfiles() const; @@ -533,7 +533,7 @@ diff --git a/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_ 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 -@@ -1441,7 +1441,7 @@ For example, some websites may respond to this request by showing you ads that a +@@ -1462,7 +1462,7 @@ For example, some websites may respond to this request by showing you ads that a Delete browsing data @@ -542,7 +542,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro Deleted Chrome data -@@ -1602,6 +1602,9 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1623,6 +1623,9 @@ Your Google account may have other forms of browsing history like searches and a Some of your history might not show up here. To see all your Chrome history, open full Chrome history. Also, your Google Account may have other forms of browsing history at <link>myactivity.google.com</link>. @@ -555,7 +555,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc --- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc +++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc -@@ -1735,6 +1735,7 @@ void AddPrivacyStrings(content::WebUIDataSource* html_source, +@@ -1860,6 +1860,7 @@ void AddPrivacyStrings(content::WebUIDataSource* html_source, {"clearedData", IDS_SETTINGS_CLEARED_DATA}, {"clearBrowsingData", IDS_SETTINGS_CLEAR_BROWSING_DATA}, {"clearBrowsingDataDescription", IDS_SETTINGS_CLEAR_DATA_DESCRIPTION}, @@ -641,7 +641,7 @@ diff --git a/components/browsing_data/core/browsing_data_policies_utils.h b/comp diff --git a/components/browsing_data/core/browsing_data_utils.cc b/components/browsing_data/core/browsing_data_utils.cc --- a/components/browsing_data/core/browsing_data_utils.cc +++ b/components/browsing_data/core/browsing_data_utils.cc -@@ -343,6 +343,37 @@ bool GetDeletionPreferenceFromDataType( +@@ -346,6 +346,37 @@ bool GetDeletionPreferenceFromDataType( BrowsingDataType data_type, ClearBrowsingDataTab clear_browsing_data_tab, std::string* out_pref) { @@ -752,7 +752,7 @@ diff --git a/components/search_engines/template_url_service.cc b/components/sear diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc --- a/content/browser/storage_partition_impl.cc +++ b/content/browser/storage_partition_impl.cc -@@ -1494,6 +1494,7 @@ void StoragePartitionImpl::Initialize( +@@ -1499,6 +1499,7 @@ void StoragePartitionImpl::Initialize( .AppendASCII("Code Cache"); } DCHECK_GE(settings.size_in_bytes(), 0); diff --git a/build/patches/Add-setting-to-invert-tap-and-long-tap.patch b/build/patches/Add-setting-to-invert-tap-and-long-tap.patch index 548798c04..ff5d6c183 100644 --- a/build/patches/Add-setting-to-invert-tap-and-long-tap.patch +++ b/build/patches/Add-setting-to-invert-tap-and-long-tap.patch @@ -46,7 +46,7 @@ diff --git a/android_webview/java/src/org/chromium/android_webview/contextmenu/A import org.chromium.content_public.browser.WebContents; import org.chromium.ui.base.Clipboard; import org.chromium.url.GURL; -@@ -54,6 +55,9 @@ public class AwContextMenuItemDelegate implements ContextMenuItemDelegate { +@@ -52,6 +53,9 @@ public class AwContextMenuItemDelegate implements ContextMenuItemDelegate { IntentUtils.safeStartActivity(mActivity, intent); } @@ -70,7 +70,7 @@ diff --git a/chrome/android/java/res/values/ids.xml b/chrome/android/java/res/va diff --git 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 --- 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 -@@ -59,6 +59,9 @@ public class AccessibilitySettings extends ChromeBaseSettingsFragment +@@ -60,6 +60,9 @@ public class AccessibilitySettings extends ChromeBaseSettingsFragment private BooleanPreferenceDelegate mMoveTopToolbarToBottomDelegate; private BooleanPreferenceDelegate mDisableToolbarSwipeUpDelegate; @@ -80,7 +80,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/s private TextScalePreference mTextScalePref; private PageZoomPreference mPageZoomDefaultZoomPref; private ChromeSwitchPreference mPageZoomIncludeOSAdjustment; -@@ -182,6 +185,12 @@ public class AccessibilitySettings extends ChromeBaseSettingsFragment +@@ -184,6 +187,12 @@ public class AccessibilitySettings extends ChromeBaseSettingsFragment mDisableToolbarSwipeUpPref.setChecked(mDisableToolbarSwipeUpDelegate.isEnabled()); mDisableToolbarSwipeUpPref.setOnPreferenceChangeListener(this); @@ -93,7 +93,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/s Preference captions = findPreference(PREF_CAPTIONS); captions.setOnPreferenceClickListener( preference -> { -@@ -271,6 +280,9 @@ public class AccessibilitySettings extends ChromeBaseSettingsFragment +@@ -279,6 +288,9 @@ public class AccessibilitySettings extends ChromeBaseSettingsFragment mDelegate.requestRestart(getActivity()); } else if (PREF_DISABLE_TOOLBAR_SWIPE_UP.equals(preference.getKey())) { mDisableToolbarSwipeUpDelegate.setEnabled((Boolean) newValue); @@ -102,7 +102,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/s + mDelegate.requestRestart(getActivity()); } else if (PREF_PAGE_ZOOM_INCLUDE_OS_ADJUSTMENT.equals(preference.getKey())) { // TODO(mschillaci): Implement the override behavior for OS level. - } + } else if (OmniboxFeatures.KEY_JUMP_START_OMNIBOX.equals(preference.getKey())) { diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/ChromeAccessibilitySettingsDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/ChromeAccessibilitySettingsDelegate.java --- a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/ChromeAccessibilitySettingsDelegate.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/ChromeAccessibilitySettingsDelegate.java @@ -164,7 +164,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/Chr diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java --- a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java -@@ -275,6 +275,9 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { +@@ -279,6 +279,9 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { if (mParams.isAnchor()) { ModelList linkGroup = new ModelList(); @@ -174,7 +174,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/Chr if (FirstRunStatus.getFirstRunFlowComplete() && !isEmptyUrl(mParams.getUrl()) && UrlUtilities.isAcceptedScheme(mParams.getUrl())) { -@@ -652,6 +655,8 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { +@@ -661,6 +664,8 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { getProfile(), false); }); @@ -186,7 +186,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/Chr diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java -@@ -328,6 +328,14 @@ public class TabContextMenuItemDelegate implements ContextMenuItemDelegate { +@@ -327,6 +327,14 @@ public class TabContextMenuItemDelegate implements ContextMenuItemDelegate { mTab.loadUrl(loadUrlParams); } @@ -204,7 +204,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextM 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 -@@ -317,6 +317,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { +@@ -325,6 +325,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { &kTabGroupCreationDialogAndroid, &kTabGroupParityAndroid, &kTabletTabSwitcherLongPressMenu, @@ -215,7 +215,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 -@@ -384,6 +384,8 @@ public abstract class ChromeFeatureList { +@@ -402,6 +402,8 @@ public abstract class ChromeFeatureList { "DisableToolbarSwipeUp"; public static final String MOVE_TOP_TOOLBAR_TO_BOTTOM = "MoveTopToolbarToBottom"; @@ -224,7 +224,7 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f public static final String NOTIFICATION_PERMISSION_VARIANT = "NotificationPermissionVariant"; public static final String NOTIFICATION_PERMISSION_BOTTOM_SHEET = "NotificationPermissionBottomSheet"; -@@ -688,6 +690,8 @@ public abstract class ChromeFeatureList { +@@ -725,6 +727,8 @@ public abstract class ChromeFeatureList { newCachedFlag(DISABLE_TOOLBAR_SWIPE_UP, false); public static final CachedFlag sMoveTopToolbarToBottom = newCachedFlag(MOVE_TOP_TOOLBAR_TO_BOTTOM, false); @@ -233,18 +233,18 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f public static final CachedFlag sPrivacyGuidePreloadAndroid = newCachedFlag(PRIVACY_GUIDE_PRELOAD_ANDROID, false); public static final CachedFlag sOptimizationGuidePushNotifications = -@@ -853,6 +857,7 @@ public abstract class ChromeFeatureList { +@@ -892,6 +896,7 @@ public abstract class ChromeFeatureList { sTabWindowManagerReportIndicesMismatch, sTraceBinderIpc, sUseChimeAndroidSdk, + sShowAlwaysContextMenuOnLinks, sUseLibunwindstackNativeUnwinderAndroid, - sVerticalAutomotiveBackButtonToolbar, sWebApkMinShellApkVersion); + 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 -@@ -1786,6 +1786,12 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1807,6 +1807,12 @@ Your Google account may have other forms of browsing history like searches and a Disable toolbar swipe up @@ -257,7 +257,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro -@@ -3257,6 +3263,9 @@ To change this setting, BEGIN_LINKdelete the Chrome d +@@ -3293,6 +3299,9 @@ To change this setting, BEGIN_LINKdelete the Chrome d Open in new Chrome tab @@ -285,7 +285,7 @@ diff --git a/components/browser_ui/accessibility/android/java/res/xml/accessibil diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettingsDelegate.java b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettingsDelegate.java --- a/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettingsDelegate.java +++ b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettingsDelegate.java -@@ -39,6 +39,8 @@ public interface AccessibilitySettingsDelegate { +@@ -38,6 +38,8 @@ public interface AccessibilitySettingsDelegate { BooleanPreferenceDelegate getMoveTopToolbarToBottomDelegate(); BooleanPreferenceDelegate getDisableToolbarSwipeUpDelegate(); @@ -352,16 +352,16 @@ 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" -@@ -502,6 +503,17 @@ void HTMLAnchorElement::NavigateToHyperlink(ResourceRequest request, - bool is_trusted, - base::TimeTicks platform_time_stamp, - KURL completed_url) { +@@ -502,6 +503,17 @@ void HTMLAnchorElementBase::NavigateToHyperlink( + bool is_trusted, + base::TimeTicks platform_time_stamp, + KURL completed_url) { + UIEvent& event = *UIEvent::Create(); + NavigateToHyperlink2(std::move(request), navigation_policy, is_trusted, platform_time_stamp, + std::move(completed_url), event, true); +} + -+void HTMLAnchorElement::NavigateToHyperlink2(ResourceRequest request, ++void HTMLAnchorElementBase::NavigateToHyperlink2(ResourceRequest request, + NavigationPolicy navigation_policy, + bool is_trusted, + base::TimeTicks platform_time_stamp, @@ -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; -@@ -568,6 +580,15 @@ void HTMLAnchorElement::NavigateToHyperlink(ResourceRequest request, +@@ -568,6 +580,15 @@ void HTMLAnchorElementBase::NavigateToHyperlink( request.GetReferrerPolicy())); } @@ -386,39 +386,39 @@ 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; -@@ -622,7 +643,7 @@ AtomicString HTMLAnchorElement::interestAction() const { +@@ -622,7 +643,7 @@ AtomicString HTMLAnchorElementBase::interestAction() const { return g_empty_atom; } --void HTMLAnchorElement::HandleClick(MouseEvent& event) { -+void HTMLAnchorElement::HandleClick(MouseEvent& event, bool do_not_show_context_menu) { +-void HTMLAnchorElementBase::HandleClick(MouseEvent& event) { ++void HTMLAnchorElementBase::HandleClick(MouseEvent& event, bool do_not_show_context_menu) { event.SetDefaultHandled(); LocalDOMWindow* window = GetDocument().domWindow(); -@@ -718,13 +739,12 @@ void HTMLAnchorElement::HandleClick(MouseEvent& event) { +@@ -718,13 +739,12 @@ void HTMLAnchorElementBase::HandleClick(MouseEvent& event) { return; } - base::OnceClosure navigate_closure = WTF::BindOnce( -- &HTMLAnchorElement::NavigateToHyperlink, WrapWeakPersistent(this), +- &HTMLAnchorElementBase::NavigateToHyperlink, WrapWeakPersistent(this), - std::move(request), navigation_policy, event.isTrusted(), - event.PlatformTimeStamp(), std::move(completed_url)); - if (navigation_policy == kNavigationPolicyDownload || navigation_policy == kNavigationPolicyLinkPreview) { + base::OnceClosure navigate_closure = WTF::BindOnce( -+ &HTMLAnchorElement::NavigateToHyperlink, WrapWeakPersistent(this), ++ &HTMLAnchorElementBase::NavigateToHyperlink, WrapWeakPersistent(this), + std::move(request), navigation_policy, event.isTrusted(), + event.PlatformTimeStamp(), std::move(completed_url)); // We distinguish single/double click with some modifiers. // See the comment of `EventHandler.delayed_navigation_task_handle_`. auto task_handle = PostDelayedCancellableTask( -@@ -734,7 +754,9 @@ void HTMLAnchorElement::HandleClick(MouseEvent& event) { +@@ -734,7 +754,9 @@ void HTMLAnchorElementBase::HandleClick(MouseEvent& event) { frame->GetEventHandler().SetDelayedNavigationTaskHandle( std::move(task_handle)); } else { - std::move(navigate_closure).Run(); -+ HTMLAnchorElement::NavigateToHyperlink2(std::move(request), navigation_policy, ++ HTMLAnchorElementBase::NavigateToHyperlink2(std::move(request), navigation_policy, + event.isTrusted(), event.PlatformTimeStamp(), std::move(completed_url), + event, do_not_show_context_menu); } @@ -427,15 +427,15 @@ diff --git a/third_party/blink/renderer/core/html/html_anchor_element.cc b/third diff --git a/third_party/blink/renderer/core/html/html_anchor_element.h b/third_party/blink/renderer/core/html/html_anchor_element.h --- a/third_party/blink/renderer/core/html/html_anchor_element.h +++ b/third_party/blink/renderer/core/html/html_anchor_element.h -@@ -116,6 +116,7 @@ class CORE_EXPORT HTMLAnchorElement : public HTMLElement, public DOMURLUtils { +@@ -117,6 +117,7 @@ class CORE_EXPORT HTMLAnchorElementBase : public HTMLElement, AtomicString interestAction() const override; void Trace(Visitor*) const override; + void HandleClick(MouseEvent&, bool do_not_show_context_menu = false); protected: - void ParseAttribute(const AttributeModificationParams&) override; -@@ -146,7 +147,11 @@ class CORE_EXPORT HTMLAnchorElement : public HTMLElement, public DOMURLUtils { + HTMLAnchorElementBase(const QualifiedName& tag_name, Document&); +@@ -148,7 +149,11 @@ class CORE_EXPORT HTMLAnchorElementBase : public HTMLElement, bool is_trusted, base::TimeTicks platform_time_stamp, KURL); @@ -551,7 +551,7 @@ diff --git a/third_party/blink/renderer/core/page/context_menu_controller.cc b/t // Clear any previously set cached results if we are resetting the hit test // result. image_selection_cached_result_ = nullptr; -@@ -835,11 +848,13 @@ bool ContextMenuController::ShowContextMenu(LocalFrame* frame, +@@ -836,11 +849,13 @@ bool ContextMenuController::ShowContextMenu(LocalFrame* frame, SetAutofillData(result.InnerNode(), data); SetPasswordManagerData(result.InnerElement(), data); diff --git a/build/patches/Add-site-engagement-flag.patch b/build/patches/Add-site-engagement-flag.patch index 2a00fae85..3f9d94113 100644 --- a/build/patches/Add-site-engagement-flag.patch +++ b/build/patches/Add-site-engagement-flag.patch @@ -24,7 +24,7 @@ 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 -@@ -159,6 +159,7 @@ +@@ -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" diff --git a/build/patches/Add-support-for-ISupportHelpAndFeedback.patch b/build/patches/Add-support-for-ISupportHelpAndFeedback.patch index 9d4f1b72d..f9085359a 100644 --- a/build/patches/Add-support-for-ISupportHelpAndFeedback.patch +++ b/build/patches/Add-support-for-ISupportHelpAndFeedback.patch @@ -12,16 +12,16 @@ 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 -@@ -54,6 +54,7 @@ import org.chromium.chrome.browser.ui.messages.snackbar.Snackbar; +@@ -55,6 +55,7 @@ import org.chromium.chrome.browser.ui.messages.snackbar.Snackbar; import org.chromium.components.browser_ui.bottomsheet.BottomSheetController; import org.chromium.components.browser_ui.bottomsheet.BottomSheetControllerFactory; import org.chromium.components.browser_ui.bottomsheet.ManagedBottomSheetController; +import org.chromium.components.browser_ui.settings.SettingsUtils; import org.chromium.components.browser_ui.modaldialog.AppModalPresenter; - import org.chromium.components.browser_ui.settings.SettingsPage; + import org.chromium.components.browser_ui.settings.EmbeddableSettingsPage; import org.chromium.components.browser_ui.util.TraceEventVectorDrawableCompat; -@@ -419,8 +420,12 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity - } +@@ -436,8 +437,12 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity + finishCurrentSettings(mainFragment); return true; } else if (item.getItemId() == R.id.menu_id_general_help) { - HelpAndFeedbackLauncherImpl.getForProfile(mProfile) diff --git a/build/patches/Add-support-for-writing-URIs.patch b/build/patches/Add-support-for-writing-URIs.patch index c4a1b8a09..ce39006af 100644 --- a/build/patches/Add-support-for-writing-URIs.patch +++ b/build/patches/Add-support-for-writing-URIs.patch @@ -15,8 +15,8 @@ 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 -@@ -68,6 +68,16 @@ int64_t GetContentUriFileSize(const FilePath& content_uri) { - return Java_ContentUriUtils_getContentUriFileSize(env, j_uri); +@@ -125,6 +125,16 @@ void JNI_ContentUriUtils_AddFileInfoToVector( + Time::FromMillisecondsSinceUnixEpoch(last_modified)); } +File OpenContentUriForWrite(const FilePath& content_uri) { @@ -30,22 +30,22 @@ diff --git a/base/android/content_uri_utils.cc b/base/android/content_uri_utils. +} + std::string GetContentUriMimeType(const FilePath& content_uri) { - JNIEnv* env = base::android::AttachCurrentThread(); - ScopedJavaLocalRef j_uri = + JNIEnv* env = android::AttachCurrentThread(); + ScopedJavaLocalRef j_mime = 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 -@@ -27,6 +27,10 @@ BASE_EXPORT std::optional TranslateOpenFlagsToJavaMode( - BASE_EXPORT File OpenContentUri(const FilePath& content_uri, - uint32_t open_flags); +@@ -33,6 +33,10 @@ BASE_EXPORT std::optional TranslateOpenFlagsToJavaMode( + // Returns -1 if the URI is invalid. + int 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. +BASE_EXPORT File OpenContentUriForWrite(const FilePath& content_uri); + - // Gets file size, or -1 if file is unknown length. - BASE_EXPORT int64_t GetContentUriFileSize(const FilePath& content_uri); - + // Returns true if file exists and results are populated, else returns false. + // Java code requires a Content-URI to look up file info such as is-dir, size, + // and last-mod, so code that needs to support Content-URI should use diff --git a/base/android/java/src/org/chromium/base/ContentUriUtils.java b/base/android/java/src/org/chromium/base/ContentUriUtils.java --- a/base/android/java/src/org/chromium/base/ContentUriUtils.java +++ b/base/android/java/src/org/chromium/base/ContentUriUtils.java @@ -57,7 +57,7 @@ diff --git a/base/android/java/src/org/chromium/base/ContentUriUtils.java b/base import android.provider.DocumentsContract; import android.provider.MediaStore; import android.text.TextUtils; -@@ -21,6 +22,9 @@ import org.jni_zero.CalledByNative; +@@ -25,6 +26,9 @@ import org.jni_zero.NativeMethods; import java.io.IOException; @@ -65,9 +65,9 @@ diff --git a/base/android/java/src/org/chromium/base/ContentUriUtils.java b/base +import android.content.ContentProviderClient; + /** This class provides methods to access content URI schemes. */ + @JNINamespace("base") public abstract class ContentUriUtils { - private static final String TAG = "ContentUriUtils"; -@@ -47,6 +51,36 @@ public abstract class ContentUriUtils { +@@ -53,6 +57,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 24e7240a3..6033c0f79 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 -@@ -488,6 +488,10 @@ vars = { +@@ -482,6 +482,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 -@@ -1654,6 +1658,9 @@ deps = { +@@ -1659,6 +1663,9 @@ deps = { 'src/third_party/dawn': Var('dawn_git') + '/dawn.git' + '@' + Var('dawn_revision'), @@ -183,7 +183,7 @@ diff --git a/cc/base/devtools_instrumentation.h b/cc/base/devtools_instrumentati diff --git a/cc/paint/paint_image.h b/cc/paint/paint_image.h --- a/cc/paint/paint_image.h +++ b/cc/paint/paint_image.h -@@ -40,7 +40,7 @@ class PaintImageGenerator; +@@ -41,7 +41,7 @@ class PaintImageGenerator; class PaintWorkletInput; class TextureBacking; @@ -195,7 +195,7 @@ diff --git a/cc/paint/paint_image.h b/cc/paint/paint_image.h 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 -@@ -79,6 +79,8 @@ class CC_EXPORT ImageDecodeCache { +@@ -78,6 +78,8 @@ class CC_EXPORT ImageDecodeCache { using ScopedImageType = devtools_instrumentation::ScopedImageDecodeTask::ImageType; switch (image_type) { @@ -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"}, -@@ -660,6 +661,7 @@ static const char* const kStandardImageTypes[] = {"image/avif", +@@ -661,6 +662,7 @@ static const char* const kStandardImageTypes[] = {"image/avif", "image/gif", "image/ief", "image/jpeg", @@ -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 -@@ -80,6 +80,7 @@ +@@ -82,6 +82,7 @@ /libgifcodec /libjingle/source /libupnp @@ -464,7 +464,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 -@@ -4541,6 +4541,7 @@ domain Emulation +@@ -4542,6 +4542,7 @@ domain Emulation experimental type DisabledImageType extends string enum avif @@ -605,7 +605,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 -@@ -2377,6 +2377,10 @@ source_set("blink_platform_unittests_sources") { +@@ -2380,6 +2380,10 @@ source_set("blink_platform_unittests_sources") { sources += [ "text/locale_icu_test.cc" ] } @@ -616,7 +616,7 @@ diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/re sources += [ "testing/run_all_tests.cc" ] configs += [ -@@ -2423,6 +2427,7 @@ source_set("blink_platform_unittests_sources") { +@@ -2426,6 +2430,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", @@ -2215,7 +2215,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 -@@ -4766,6 +4766,12 @@ crbug.com/1199522 http/tests/devtools/layers/layers-3d-view-hit-testing.js [ Fai +@@ -4851,6 +4851,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 ] @@ -2231,7 +2231,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 -@@ -481,6 +481,15 @@ +@@ -489,6 +489,15 @@ "args": ["--enable-blink-features=FractionalScrollOffsets"], "expires": "Jun 1, 2025" }, @@ -2646,7 +2646,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 -@@ -20696,6 +20696,7 @@ from previous Chrome versions. +@@ -20745,6 +20745,7 @@ from previous Chrome versions. diff --git a/build/patches/Add-webGL-site-setting.patch b/build/patches/Add-webGL-site-setting.patch index eecbd4967..e16eca762 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 -@@ -295,6 +295,13 @@ void WebGLRenderingContextBase::InitializeWebGLContextLimits( +@@ -290,6 +290,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_); -@@ -564,25 +571,6 @@ static String ExtractWebGLContextCreationError( +@@ -559,25 +566,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('.'); -@@ -642,6 +630,12 @@ WebGLRenderingContextBase::CreateWebGraphicsContext3DProvider( +@@ -637,6 +625,12 @@ WebGLRenderingContextBase::CreateWebGraphicsContext3DProvider( const CanvasContextCreationAttributesCore& attributes, Platform::ContextType context_type, Platform::GraphicsInfo* graphics_info) { @@ -274,7 +274,7 @@ diff --git a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_ba diff --git a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h --- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h +++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h -@@ -1933,6 +1933,8 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext, +@@ -1929,6 +1929,8 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext, DOMArrayBufferView* pixels, int64_t offset); diff --git a/build/patches/Add-webRTC-site-settings.patch b/build/patches/Add-webRTC-site-settings.patch index 8d26c555b..977e1c2e2 100644 --- a/build/patches/Add-webRTC-site-settings.patch +++ b/build/patches/Add-webRTC-site-settings.patch @@ -187,7 +187,7 @@ new file mode 100644 diff --git a/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc b/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc --- a/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc +++ b/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc -@@ -41,6 +41,7 @@ +@@ -40,6 +40,7 @@ #include "third_party/blink/public/platform/modules/webrtc/webrtc_logging.h" #include "third_party/blink/public/platform/platform.h" #include "third_party/blink/public/platform/task_type.h" @@ -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" -@@ -887,6 +888,11 @@ PeerConnectionDependencyFactory::CreatePortAllocator( +@@ -881,6 +882,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" -@@ -282,6 +284,14 @@ RTCRtpCapabilities* RTCRtpReceiver::getCapabilities(ScriptState* state, +@@ -283,6 +285,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" -@@ -1027,6 +1029,14 @@ RTCRtpCapabilities* RTCRtpSender::getCapabilities(ScriptState* state, +@@ -1031,6 +1033,14 @@ RTCRtpCapabilities* RTCRtpSender::getCapabilities(ScriptState* state, if (kind != "audio" && kind != "video") return nullptr; diff --git a/build/patches/Allow-building-without-enable_reporting.patch b/build/patches/Allow-building-without-enable_reporting.patch index 99dd74252..8f32f8685 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 -@@ -14982,12 +14982,6 @@ void RenderFrameHostImpl::MaybeGenerateCrashReport( +@@ -15091,12 +15091,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 -@@ -219,6 +219,7 @@ extern const base::FeatureParam kTimeoutTcpConnectAttemptMax( +@@ -215,6 +215,7 @@ extern const base::FeatureParam kTimeoutTcpConnectAttemptMax( base::Seconds(30)); #if BUILDFLAG(ENABLE_REPORTING) @@ -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 -@@ -467,14 +467,14 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -466,14 +466,14 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext const GURL& url, const std::optional& reporting_source, const net::NetworkAnonymizationKey& network_anonymization_key, @@ -302,7 +302,7 @@ diff --git a/services/network/network_context.h b/services/network/network_conte diff --git a/services/network/public/mojom/BUILD.gn b/services/network/public/mojom/BUILD.gn --- a/services/network/public/mojom/BUILD.gn +++ b/services/network/public/mojom/BUILD.gn -@@ -1486,7 +1486,6 @@ mojom("mojom") { +@@ -1489,7 +1489,6 @@ mojom("mojom") { export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1" export_header_blink = "third_party/blink/public/platform/web_common.h" if (enable_reporting) { @@ -313,7 +313,7 @@ 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 -@@ -1257,6 +1257,7 @@ interface NetworkContext { +@@ -1240,6 +1240,7 @@ interface NetworkContext { // provided `network_anonymization_key`. // // Spec: https://w3c.github.io/reporting/#concept-reports @@ -321,7 +321,7 @@ diff --git a/services/network/public/mojom/network_context.mojom b/services/netw QueueReport(string type, string group, url.mojom.Url url, -@@ -1264,6 +1265,7 @@ interface NetworkContext { +@@ -1247,6 +1248,7 @@ interface NetworkContext { NetworkAnonymizationKey network_anonymization_key, mojo_base.mojom.DictionaryValue body); @@ -329,7 +329,7 @@ diff --git a/services/network/public/mojom/network_context.mojom b/services/netw QueueEnterpriseReport(string type, string group, url.mojom.Url url, -@@ -1274,6 +1276,7 @@ interface NetworkContext { +@@ -1257,6 +1259,7 @@ interface NetworkContext { // Note that this queued report will never be delivered if no reporting // endpoint matching is registered for with the provided // `network_anonymization_key`. @@ -348,7 +348,7 @@ diff --git a/third_party/blink/renderer/core/frame/csp/content_security_policy.c #include "base/containers/contains.h" #include "base/debug/dump_without_crashing.h" #include "base/ranges/algorithm.h" -@@ -1241,6 +1242,7 @@ void ContentSecurityPolicy::ReportViolation( +@@ -1247,6 +1248,7 @@ void ContentSecurityPolicy::ReportViolation( return; } @@ -356,7 +356,7 @@ diff --git a/third_party/blink/renderer/core/frame/csp/content_security_policy.c PostViolationReport(violation_data, context_frame, report_endpoints, use_reporting_api); -@@ -1248,6 +1250,7 @@ void ContentSecurityPolicy::ReportViolation( +@@ -1254,6 +1256,7 @@ void ContentSecurityPolicy::ReportViolation( // `context_frame` (i.e. we're not processing 'frame-ancestors'). if (delegate_ && !context_frame) delegate_->DispatchViolationEvent(*violation_data, element); @@ -430,7 +430,7 @@ diff --git a/third_party/blink/renderer/core/frame/reporting_context.cc b/third_ receiver_(this, &context) {} // static -@@ -117,7 +120,9 @@ void ReportingContext::Trace(Visitor* visitor) const { +@@ -121,7 +124,9 @@ void ReportingContext::Trace(Visitor* visitor) const { visitor->Trace(observers_); visitor->Trace(report_buffer_); visitor->Trace(execution_context_); @@ -440,7 +440,7 @@ diff --git a/third_party/blink/renderer/core/frame/reporting_context.cc b/third_ visitor->Trace(receiver_); Supplement::Trace(visitor); } -@@ -139,6 +144,7 @@ void ReportingContext::CountReport(Report* report) { +@@ -143,6 +148,7 @@ void ReportingContext::CountReport(Report* report) { UseCounter::Count(execution_context_, feature); } @@ -448,7 +448,7 @@ diff --git a/third_party/blink/renderer/core/frame/reporting_context.cc b/third_ const HeapMojoRemote& ReportingContext::GetReportingService() const { if (!reporting_service_.is_bound()) { -@@ -148,6 +154,7 @@ ReportingContext::GetReportingService() const { +@@ -152,6 +158,7 @@ ReportingContext::GetReportingService() const { } return reporting_service_; } @@ -456,7 +456,7 @@ diff --git a/third_party/blink/renderer/core/frame/reporting_context.cc b/third_ void ReportingContext::NotifyInternal(Report* report) { // Buffer the report. -@@ -170,6 +177,7 @@ void ReportingContext::NotifyInternal(Report* report) { +@@ -174,6 +181,7 @@ void ReportingContext::NotifyInternal(Report* report) { void ReportingContext::SendToReportingAPI(Report* report, const String& endpoint) const { @@ -464,7 +464,7 @@ diff --git a/third_party/blink/renderer/core/frame/reporting_context.cc b/third_ const String& type = report->type(); if (!(type == ReportType::kCSPViolation || type == ReportType::kDeprecation || type == ReportType::kPermissionsPolicyViolation || -@@ -227,6 +235,7 @@ void ReportingContext::SendToReportingAPI(Report* report, +@@ -230,6 +238,7 @@ void ReportingContext::SendToReportingAPI(Report* report, url, endpoint, body->featureId(), body->disposition(), body->message(), body->sourceFile(), line_number, column_number); } diff --git a/build/patches/Allow-building-without-supervised-users.patch b/build/patches/Allow-building-without-supervised-users.patch index 776b4d3d8..0cb2b7b4b 100644 --- a/build/patches/Allow-building-without-supervised-users.patch +++ b/build/patches/Allow-building-without-supervised-users.patch @@ -23,7 +23,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -794,7 +794,6 @@ if (current_toolchain == default_toolchain) { +@@ -757,7 +757,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", @@ -53,18 +53,18 @@ diff --git a/chrome/browser/feedback/android/BUILD.gn b/chrome/browser/feedback/ "java/src/org/chromium/chrome/browser/feedback/ProcessIdFeedbackSource.java", "java/src/org/chromium/chrome/browser/feedback/SystemInfoFeedbackSource.java", ] -@@ -55,7 +54,6 @@ android_library("java") { - sources = [ +@@ -56,7 +55,6 @@ android_library("java") { "java/src/org/chromium/chrome/browser/feedback/AsyncFeedbackSourceAdapter.java", "java/src/org/chromium/chrome/browser/feedback/DeviceInfoFeedbackSource.java", + "java/src/org/chromium/chrome/browser/feedback/FallbackHelpAndFeedbackLauncherDelegate.java", - "java/src/org/chromium/chrome/browser/feedback/FamilyInfoFeedbackSource.java", "java/src/org/chromium/chrome/browser/feedback/FeedbackContextFeedbackSource.java", "java/src/org/chromium/chrome/browser/feedback/HelpAndFeedbackLauncher.java", - "java/src/org/chromium/chrome/browser/feedback/IMEFeedbackSource.java", + "java/src/org/chromium/chrome/browser/feedback/HelpAndFeedbackLauncherDelegate.java", diff --git a/chrome/browser/prefs/chrome_pref_service_factory.cc b/chrome/browser/prefs/chrome_pref_service_factory.cc --- a/chrome/browser/prefs/chrome_pref_service_factory.cc +++ b/chrome/browser/prefs/chrome_pref_service_factory.cc -@@ -337,7 +337,7 @@ void PrepareFactory( +@@ -341,7 +341,7 @@ void PrepareFactory( policy::BrowserPolicyConnector* policy_connector) { factory->SetManagedPolicies(policy_service, policy_connector); factory->SetRecommendedPolicies(policy_service, policy_connector); @@ -88,7 +88,7 @@ diff --git a/chrome/browser/profiles/profile_attributes_entry.cc b/chrome/browse diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc -@@ -697,10 +697,6 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) { +@@ -667,10 +667,6 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) { prefs->SetTime(prefs::kProfileCreationTime, path_creation_time_); pref_change_registrar_.Init(prefs); @@ -99,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( -@@ -1640,6 +1636,7 @@ GURL ProfileImpl::GetHomePage() { +@@ -1627,6 +1623,7 @@ GURL ProfileImpl::GetHomePage() { } void ProfileImpl::UpdateSupervisedUserIdInStorage() { @@ -110,7 +110,7 @@ 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 -@@ -1221,10 +1221,6 @@ void ProfileManager::InitProfileUserPrefs(Profile* profile) { +@@ -1179,10 +1179,6 @@ void ProfileManager::InitProfileUserPrefs(Profile* profile) { profile->GetPrefs()->SetString(prefs::kProfileName, profile_name); } @@ -121,14 +121,14 @@ diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profile #if !BUILDFLAG(IS_ANDROID) if (profile->IsNewProfile()) { profile->GetPrefs()->SetBoolean(prefs::kHasSeenWelcomePage, false); -@@ -2026,9 +2022,6 @@ void ProfileManager::AddProfileToStorage(Profile* profile) { +@@ -1968,9 +1964,6 @@ void ProfileManager::AddProfileToStorage(Profile* profile) { init_params.icon_index = profile->GetPrefs()->GetInteger(prefs::kProfileAvatarIndex); - init_params.supervised_user_id = - profile->GetPrefs()->GetString(prefs::kSupervisedUserId); - - #if BUILDFLAG(IS_CHROMEOS_ASH) + #if BUILDFLAG(IS_CHROMEOS) user_manager::User* user = ash::ProfileHelper::Get()->GetUserByProfile(profile); diff --git a/chrome/browser/ui/webui/managed_ui_handler.cc b/chrome/browser/ui/webui/managed_ui_handler.cc @@ -148,7 +148,7 @@ diff --git a/chrome/browser/ui/webui/managed_ui_handler.cc b/chrome/browser/ui/w diff --git a/chrome/browser/ui/webui/management/management_ui_handler.cc b/chrome/browser/ui/webui/management/management_ui_handler.cc --- a/chrome/browser/ui/webui/management/management_ui_handler.cc +++ b/chrome/browser/ui/webui/management/management_ui_handler.cc -@@ -571,10 +571,6 @@ bool ManagementUIHandler::managed() const { +@@ -589,10 +589,6 @@ bool ManagementUIHandler::managed() const { void ManagementUIHandler::RegisterPrefChange( PrefChangeRegistrar& pref_registrar) { @@ -162,7 +162,7 @@ diff --git a/chrome/browser/ui/webui/management/management_ui_handler.cc b/chrom diff --git a/components/supervised_user/core/browser/supervised_user_pref_store.cc b/components/supervised_user/core/browser/supervised_user_pref_store.cc --- a/components/supervised_user/core/browser/supervised_user_pref_store.cc +++ b/components/supervised_user/core/browser/supervised_user_pref_store.cc -@@ -126,6 +126,7 @@ SupervisedUserPrefStore::~SupervisedUserPrefStore() {} +@@ -126,6 +126,7 @@ SupervisedUserPrefStore::~SupervisedUserPrefStore() = default; void SupervisedUserPrefStore::OnNewSettingsAvailable( const base::Value::Dict& settings) { @@ -218,7 +218,7 @@ diff --git a/components/supervised_user/core/browser/supervised_user_service.cc diff --git a/components/supervised_user/core/browser/supervised_user_utils.cc b/components/supervised_user/core/browser/supervised_user_utils.cc --- a/components/supervised_user/core/browser/supervised_user_utils.cc +++ b/components/supervised_user/core/browser/supervised_user_utils.cc -@@ -116,6 +116,7 @@ GURL NormalizeUrl(const GURL& url) { +@@ -145,6 +145,7 @@ GURL NormalizeUrl(const GURL& url) { } bool AreWebFilterPrefsDefault(const PrefService& pref_service) { @@ -229,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 -@@ -185,4 +185,10 @@ bool IsKidFriendlyContentFeedAvailable() { +@@ -191,4 +191,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 7f42ed9f5..3c1393c8f 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 -@@ -1263,6 +1263,12 @@ void WebMediaPlayerImpl::OnSelectedVideoTrackChanged( +@@ -1264,6 +1264,12 @@ void WebMediaPlayerImpl::OnSelectedVideoTrackChanged( pipeline_controller_->OnSelectedVideoTrackChanged(selected); } @@ -24,7 +24,7 @@ diff --git a/third_party/blink/renderer/platform/media/web_media_player_impl.cc void WebMediaPlayerImpl::EnabledAudioTracksChanged( const WebVector& enabled_track_ids) { DCHECK(main_task_runner_->BelongsToCurrentThread()); -@@ -3649,7 +3655,10 @@ bool WebMediaPlayerImpl::ShouldPausePlaybackWhenHidden() const { +@@ -3667,7 +3673,10 @@ bool WebMediaPlayerImpl::ShouldPausePlaybackWhenHidden() const { : HasAudio(); // Audio only stream is allowed to play when in background. diff --git a/build/patches/Always-open-browser-controls-in-new-tab.patch b/build/patches/Always-open-browser-controls-in-new-tab.patch index 15aac670b..ca532108c 100644 --- a/build/patches/Always-open-browser-controls-in-new-tab.patch +++ b/build/patches/Always-open-browser-controls-in-new-tab.patch @@ -23,9 +23,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextM import org.chromium.chrome.browser.offlinepages.RequestCoordinatorBridge; import org.chromium.chrome.browser.profiles.Profile; +import org.chromium.chrome.browser.tab.TabBrowserControlsConstraintsHelper; + import org.chromium.chrome.browser.tabmodel.TabGroupModelFilter; import org.chromium.chrome.browser.tabmodel.TabModelSelector; import org.chromium.chrome.browser.tabmodel.document.ChromeAsyncTabLauncher; - import org.chromium.chrome.browser.tasks.tab_groups.TabGroupModelFilter; @@ -250,6 +252,7 @@ public class TabContextMenuItemDelegate implements ContextMenuItemDelegate { Referrer referrer, boolean navigateToTab, 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 0d1c9dfc9..079b9c22d 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 @@ -31,7 +31,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/homepage/Homepa diff --git a/chrome/browser/partnercustomizations/java/src/org/chromium/chrome/browser/partnercustomizations/PartnerBrowserCustomizations.java b/chrome/browser/partnercustomizations/java/src/org/chromium/chrome/browser/partnercustomizations/PartnerBrowserCustomizations.java --- a/chrome/browser/partnercustomizations/java/src/org/chromium/chrome/browser/partnercustomizations/PartnerBrowserCustomizations.java +++ b/chrome/browser/partnercustomizations/java/src/org/chromium/chrome/browser/partnercustomizations/PartnerBrowserCustomizations.java -@@ -212,7 +212,7 @@ public class PartnerBrowserCustomizations { +@@ -210,7 +210,7 @@ public class PartnerBrowserCustomizations { & ApplicationInfo.FLAG_SYSTEM) == 1 || !VersionInfo.isStableBuild(); diff --git a/build/patches/Android-Toolbar-Scroll-Ablation-setting.patch b/build/patches/Android-Toolbar-Scroll-Ablation-setting.patch index 86fc7546e..16ae4a6d6 100644 --- a/build/patches/Android-Toolbar-Scroll-Ablation-setting.patch +++ b/build/patches/Android-Toolbar-Scroll-Ablation-setting.patch @@ -31,7 +31,7 @@ new file mode 100644 diff --git a/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml b/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml --- a/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml +++ b/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml -@@ -73,6 +73,12 @@ found in the LICENSE file. +@@ -78,6 +78,12 @@ found in the LICENSE file. android:key="disable_toolbar_swipeup" android:title="@string/disable_toolbar_swipe_up" /> diff --git a/build/patches/Ask-for-restart-on-connection-change.patch b/build/patches/Ask-for-restart-on-connection-change.patch index 5e568f220..700f77f3d 100644 --- a/build/patches/Ask-for-restart-on-connection-change.patch +++ b/build/patches/Ask-for-restart-on-connection-change.patch @@ -75,7 +75,7 @@ diff --git a/chrome/android/java/res/xml/homepage_preferences.xml b/chrome/andro diff --git a/chrome/android/java/src/org/chromium/chrome/browser/net/connectivitydetector/ConnectivityDetector.java b/chrome/android/java/src/org/chromium/chrome/browser/net/connectivitydetector/ConnectivityDetector.java --- a/chrome/android/java/src/org/chromium/chrome/browser/net/connectivitydetector/ConnectivityDetector.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/net/connectivitydetector/ConnectivityDetector.java -@@ -476,7 +476,6 @@ public class ConnectivityDetector implements NetworkChangeNotifier.ConnectionTyp +@@ -468,7 +468,6 @@ public class ConnectivityDetector implements NetworkChangeNotifier.ConnectionTyp @VisibleForTesting(otherwise = VisibleForTesting.PACKAGE_PRIVATE) public void setConnectionState(@ConnectionState int connectionState) { Log.i(TAG, "setConnectionState connectionState=" + connectionState); @@ -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 -@@ -1141,7 +1141,10 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { +@@ -1169,7 +1169,10 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { mActivity, mStatusIndicatorCoordinator, isUrlBarFocusedSupplier, @@ -296,7 +296,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/tabmodel/TabModelSelectorBase.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorBase.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorBase.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorBase.java -@@ -326,6 +326,13 @@ public abstract class TabModelSelectorBase +@@ -337,6 +337,13 @@ public abstract class TabModelSelectorBase return null; } @@ -334,7 +334,7 @@ new file mode 100644 + +package org.chromium.chrome.browser.flags.cromite; + -+import org.chromium.base.cached_flags.CachedFlag; ++import org.chromium.components.cached_flags.CachedFlag; +import org.chromium.chrome.browser.flags.ChromeFeatureMap; + +public class sAskForRestartOnConnectionChange { @@ -350,7 +350,7 @@ new file mode 100644 diff --git a/chrome/browser/tabmodel/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelSelector.java b/chrome/browser/tabmodel/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelSelector.java --- a/chrome/browser/tabmodel/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelSelector.java +++ b/chrome/browser/tabmodel/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelSelector.java -@@ -138,6 +138,8 @@ public interface TabModelSelector { +@@ -140,6 +140,8 @@ public interface TabModelSelector { /** Close all tabs across all tab models */ void closeAllTabs(); @@ -362,7 +362,7 @@ diff --git a/chrome/browser/tabmodel/android/java/src/org/chromium/chrome/browse diff --git a/chrome/browser/tabmodel/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelUtils.java b/chrome/browser/tabmodel/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelUtils.java --- a/chrome/browser/tabmodel/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelUtils.java +++ b/chrome/browser/tabmodel/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelUtils.java -@@ -12,10 +12,14 @@ import org.chromium.base.supplier.ObservableSupplier; +@@ -17,10 +17,14 @@ import org.chromium.base.supplier.SupplierUtils; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tab.TabSelectionType; import org.chromium.content_public.browser.WebContents; @@ -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. -@@ -79,6 +83,20 @@ public class TabModelUtils { +@@ -89,6 +93,20 @@ public class TabModelUtils { return TabModel.INVALID_TAB_INDEX; } @@ -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 = -@@ -372,6 +377,12 @@ public class SnackbarView implements InsetObserver.WindowInsetObserver { +@@ -376,6 +381,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 -@@ -910,6 +910,22 @@ void WebContentsAndroid::SetFocus(JNIEnv* env, jboolean focused) { +@@ -904,6 +904,22 @@ void WebContentsAndroid::SetFocus(JNIEnv* env, jboolean focused) { view->SetFocus(focused); } @@ -602,7 +602,7 @@ diff --git a/content/browser/web_contents/web_contents_android.cc b/content/brow diff --git a/content/browser/web_contents/web_contents_android.h b/content/browser/web_contents/web_contents_android.h --- a/content/browser/web_contents/web_contents_android.h +++ b/content/browser/web_contents/web_contents_android.h -@@ -199,6 +199,7 @@ class CONTENT_EXPORT WebContentsAndroid { +@@ -197,6 +197,7 @@ class CONTENT_EXPORT WebContentsAndroid { void OnScaleFactorChanged(JNIEnv* env); void SetFocus(JNIEnv* env, jboolean 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 -@@ -3593,8 +3593,10 @@ void WebContentsImpl::Stop() { +@@ -3574,8 +3574,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 -@@ -1164,6 +1164,12 @@ public class WebContentsImpl implements WebContents, RenderFrameHostDelegate, Wi +@@ -1156,6 +1156,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; -@@ -1450,6 +1456,8 @@ public class WebContentsImpl implements WebContents, RenderFrameHostDelegate, Wi +@@ -1438,6 +1444,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 -@@ -288,6 +288,8 @@ public interface WebContents extends Parcelable { +@@ -283,6 +283,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 -@@ -193,6 +193,9 @@ public class MockWebContents implements WebContents { +@@ -187,6 +187,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 -@@ -4266,6 +4266,7 @@ void Document::DispatchUnloadEvents(UnloadEventTimingInfo* unload_timing_info) { +@@ -4250,6 +4250,7 @@ void Document::DispatchUnloadEvents(UnloadEventTimingInfo* unload_timing_info) { } void Document::DispatchFreezeEvent() { diff --git a/build/patches/AudioBuffer-AnalyserNode-fp-mitigations.patch b/build/patches/AudioBuffer-AnalyserNode-fp-mitigations.patch index 16ce866f4..37edd8ebd 100644 --- a/build/patches/AudioBuffer-AnalyserNode-fp-mitigations.patch +++ b/build/patches/AudioBuffer-AnalyserNode-fp-mitigations.patch @@ -16,8 +16,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../renderer/modules/webaudio/base_audio_context.h | 2 ++ .../modules/webaudio/offline_audio_context.cc | 1 + .../renderer/modules/webaudio/realtime_analyser.cc | 7 +++++++ - .../platform/runtime_enabled_features.json5 | 4 ++-- - 11 files changed, 56 insertions(+), 3 deletions(-) + .../platform/runtime_enabled_features.json5 | 5 ++--- + 11 files changed, 56 insertions(+), 4 deletions(-) create mode 100644 cromite_flags/chrome/browser/about_flags_cc/AudioBuffer-AnalyserNode-fp-mitigations.inc create mode 100644 cromite_flags/third_party/blink/common/features_cc/AudioBuffer-AnalyserNode-fp-mitigations.inc create mode 100644 cromite_flags/third_party/blink/common/features_h/AudioBuffer-AnalyserNode-fp-mitigations.inc @@ -96,8 +96,8 @@ 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" -@@ -592,7 +593,9 @@ double AudioContext::baseLatency() const { - DCHECK(IsMainThread()); +@@ -594,7 +595,9 @@ double AudioContext::baseLatency() const { + DCHECK_CALLED_ON_VALID_SEQUENCE(main_thread_sequence_checker_); DCHECK(destination()); - return base_latency_; @@ -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" -@@ -722,6 +723,17 @@ LocalDOMWindow* BaseAudioContext::GetWindow() const { +@@ -697,6 +698,17 @@ LocalDOMWindow* BaseAudioContext::GetWindow() const { return To(GetExecutionContext()); } @@ -139,7 +139,7 @@ diff --git a/third_party/blink/renderer/modules/webaudio/base_audio_context.cc b diff --git a/third_party/blink/renderer/modules/webaudio/base_audio_context.h b/third_party/blink/renderer/modules/webaudio/base_audio_context.h --- a/third_party/blink/renderer/modules/webaudio/base_audio_context.h +++ b/third_party/blink/renderer/modules/webaudio/base_audio_context.h -@@ -331,6 +331,8 @@ class MODULES_EXPORT BaseAudioContext +@@ -327,6 +327,8 @@ class MODULES_EXPORT BaseAudioContext // if the execution context does not exist. bool CheckExecutionContextAndThrowIfNecessary(ExceptionState&); @@ -151,7 +151,7 @@ diff --git a/third_party/blink/renderer/modules/webaudio/base_audio_context.h b/ diff --git a/third_party/blink/renderer/modules/webaudio/offline_audio_context.cc b/third_party/blink/renderer/modules/webaudio/offline_audio_context.cc --- a/third_party/blink/renderer/modules/webaudio/offline_audio_context.cc +++ b/third_party/blink/renderer/modules/webaudio/offline_audio_context.cc -@@ -369,6 +369,7 @@ void OfflineAudioContext::FireCompletionEvent() { +@@ -372,6 +372,7 @@ void OfflineAudioContext::FireCompletionEvent() { if (!rendered_buffer) { return; } @@ -207,11 +207,12 @@ 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 -@@ -441,8 +441,8 @@ +@@ -440,9 +440,8 @@ { // AudioContext.playoutStats interface. // https://chromestatus.com/feature/5172818344148992 - name: "AudioContextPlayoutStats", +- origin_trial_feature_name: "AudioContextPlayoutStats", - status: "experimental", + name: "AudioContextPlayoutStats", // keep AudioContextPlayoutStats + status: "experimental", // experimental diff --git a/build/patches/Block-gateway-attacks-via-websockets.patch b/build/patches/Block-gateway-attacks-via-websockets.patch index 05e80bbf6..1c9b001a1 100644 --- a/build/patches/Block-gateway-attacks-via-websockets.patch +++ b/build/patches/Block-gateway-attacks-via-websockets.patch @@ -224,7 +224,7 @@ diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetc diff --git a/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc b/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc --- a/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc +++ b/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc -@@ -284,6 +284,11 @@ bool WebSocketChannelImpl::Connect(const KURL& url, const String& protocol) { +@@ -288,6 +288,11 @@ bool WebSocketChannelImpl::Connect(const KURL& url, const String& protocol) { return false; } diff --git a/build/patches/Block-leakage-of-urls-in-sandbox-iframes.patch b/build/patches/Block-leakage-of-urls-in-sandbox-iframes.patch index 17d999c90..436054357 100644 --- a/build/patches/Block-leakage-of-urls-in-sandbox-iframes.patch +++ b/build/patches/Block-leakage-of-urls-in-sandbox-iframes.patch @@ -25,7 +25,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html 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 -@@ -4622,7 +4622,17 @@ void RenderFrameHostImpl::SetLastCommittedOrigin( +@@ -4682,7 +4682,17 @@ void RenderFrameHostImpl::SetLastCommittedOrigin( } void RenderFrameHostImpl::SetInheritedBaseUrl(const GURL& inherited_base_url) { @@ -118,7 +118,7 @@ diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_p return referrer_; } -@@ -2787,6 +2792,13 @@ void DocumentLoader::CommitNavigation() { +@@ -2840,6 +2845,13 @@ void DocumentLoader::CommitNavigation() { response_.HttpHeaderField(http_names::kDocumentPolicyReportOnly)); } diff --git a/build/patches/Block-qjz9zk-or-trk-requests.patch b/build/patches/Block-qjz9zk-or-trk-requests.patch index 033468ea1..a0f842890 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 -@@ -97,10 +97,15 @@ void OffsetComponentsExcludingScheme(url::Parsed* parts, int offset) { +@@ -93,10 +93,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); } -@@ -597,7 +602,8 @@ void AutocompleteInput::ParseForEmphasizeComponents( +@@ -572,7 +577,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) || @@ -107,7 +107,7 @@ diff --git a/components/url_formatter/url_fixer.cc b/components/url_formatter/ur diff --git a/content/browser/child_process_security_policy_impl.cc b/content/browser/child_process_security_policy_impl.cc --- a/content/browser/child_process_security_policy_impl.cc +++ b/content/browser/child_process_security_policy_impl.cc -@@ -866,6 +866,7 @@ ChildProcessSecurityPolicyImpl::ChildProcessSecurityPolicyImpl() +@@ -872,6 +872,7 @@ ChildProcessSecurityPolicyImpl::ChildProcessSecurityPolicyImpl() RegisterPseudoScheme(url::kJavaScriptScheme); RegisterPseudoScheme(kViewSourceScheme); RegisterPseudoScheme(kGoogleChromeScheme); @@ -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 -@@ -1062,6 +1062,8 @@ component("net") { +@@ -1067,6 +1067,8 @@ component("net") { "url_request/url_request_http_job.cc", "url_request/url_request_http_job.h", "url_request/url_request_interceptor.cc", @@ -195,7 +195,7 @@ new file mode 100644 diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc --- a/net/url_request/url_request.cc +++ b/net/url_request/url_request.cc -@@ -14,6 +14,7 @@ +@@ -15,6 +15,7 @@ #include "base/notreached.h" #include "base/rand_util.h" #include "base/strings/utf_string_conversions.h" @@ -203,7 +203,7 @@ diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc #include "base/synchronization/lock.h" #include "base/task/single_thread_task_runner.h" #include "base/types/optional_util.h" -@@ -52,6 +53,7 @@ +@@ -53,6 +54,7 @@ #include "net/url_request/url_request_redirect_job.h" #include "url/gurl.h" #include "url/origin.h" @@ -211,7 +211,7 @@ diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc namespace net { -@@ -619,6 +621,12 @@ URLRequest::URLRequest(base::PassKey pass_key, +@@ -637,6 +639,12 @@ URLRequest::URLRequest(base::PassKey pass_key, // Sanity check out environment. DCHECK(base::SingleThreadTaskRunner::HasCurrentDefault()); diff --git a/build/patches/Bookmarks-select-all-menu-entry.patch b/build/patches/Bookmarks-select-all-menu-entry.patch index 40fc05d67..71eb9e18b 100644 --- a/build/patches/Bookmarks-select-all-menu-entry.patch +++ b/build/patches/Bookmarks-select-all-menu-entry.patch @@ -40,7 +40,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm /** * Main toolbar of bookmark UI. It is responsible for displaying title and buttons associated with * the current context. -@@ -189,12 +191,16 @@ public class BookmarkToolbar extends SelectableListToolbar +@@ -186,12 +188,16 @@ public class BookmarkToolbar extends SelectableListToolbar void setCurrentFolder(BookmarkId folder) { mCurrentFolder = mBookmarkModel.getBookmarkById(folder); enableImportExportMenu(); @@ -57,7 +57,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm } void setNavigateBackRunnable(Runnable navigateBackRunnable) { -@@ -221,6 +227,17 @@ public class BookmarkToolbar extends SelectableListToolbar +@@ -218,6 +224,17 @@ public class BookmarkToolbar extends SelectableListToolbar mExportBookmarkRunnable.run(); return true; } @@ -75,7 +75,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm return mMenuIdClickedFunction.apply(menuItem.getItemId()); } -@@ -238,6 +255,7 @@ public class BookmarkToolbar extends SelectableListToolbar +@@ -235,6 +252,7 @@ public class BookmarkToolbar extends SelectableListToolbar getMenu().findItem(R.id.import_menu_id).setVisible(mCurrentFolder != null); getMenu().findItem(R.id.export_menu_id).setVisible(mCurrentFolder != null); diff --git a/build/patches/Bromite-auto-updater.patch b/build/patches/Bromite-auto-updater.patch index c01112680..1e1ce4f2b 100644 --- a/build/patches/Bromite-auto-updater.patch +++ b/build/patches/Bromite-auto-updater.patch @@ -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 -@@ -864,6 +864,8 @@ chrome_java_sources = [ +@@ -869,6 +869,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", @@ -118,8 +118,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/about_settings/ + /** Settings fragment that displays information about Chrome. */ public class AboutChromeSettings extends PreferenceFragmentCompat -- implements SettingsPage, Preference.OnPreferenceClickListener { -+ implements SettingsPage, Preference.OnPreferenceClickListener, +- implements EmbeddableSettingsPage, Preference.OnPreferenceClickListener { ++ implements EmbeddableSettingsPage, Preference.OnPreferenceClickListener, + Preference.OnPreferenceChangeListener { private static final int TAPS_FOR_DEVELOPER_SETTINGS = 7; @@ -210,7 +210,7 @@ new file mode 100644 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase.java b/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase.java --- a/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase.java -@@ -145,7 +145,8 @@ public class OmahaBase { +@@ -140,7 +140,8 @@ public class OmahaBase { } static boolean isDisabled() { @@ -220,7 +220,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase } /** -@@ -585,6 +586,10 @@ public class OmahaBase { +@@ -580,6 +581,10 @@ public class OmahaBase { /** Sends the request to the server and returns the response. */ static String sendRequestToServer(HttpURLConnection urlConnection, String request) throws RequestFailureException { @@ -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 -@@ -2519,6 +2519,12 @@ static_library("browser") { +@@ -2520,6 +2520,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 -@@ -274,6 +274,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { +@@ -282,6 +282,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { &kPriceChangeModule, &kPwaRestoreUi, &kPwaRestoreUiAtStartup, @@ -1096,7 +1096,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 -@@ -348,6 +348,7 @@ public abstract class ChromeFeatureList { +@@ -366,6 +366,7 @@ public abstract class ChromeFeatureList { public static final String INCOGNITO_REAUTHENTICATION_FOR_ANDROID = "IncognitoReauthenticationForAndroid"; public static final String INCOGNITO_SCREENSHOT = "IncognitoScreenshot"; @@ -1116,7 +1116,7 @@ diff --git a/chrome/browser/omaha/android/BUILD.gn b/chrome/browser/omaha/androi + ] deps = [ ":update_proto_java", - "//base:base_cached_flags_java", + "//base:base_java", diff --git a/chrome/browser/omaha/android/java/src/org/chromium/chrome/browser/omaha/OmahaPrefUtils.java b/chrome/browser/omaha/android/java/src/org/chromium/chrome/browser/omaha/OmahaPrefUtils.java --- a/chrome/browser/omaha/android/java/src/org/chromium/chrome/browser/omaha/OmahaPrefUtils.java +++ b/chrome/browser/omaha/android/java/src/org/chromium/chrome/browser/omaha/OmahaPrefUtils.java @@ -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 -@@ -2385,6 +2385,12 @@ Your Google account may have other forms of browsing history like searches and a +@@ -2406,6 +2406,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 -@@ -4315,7 +4321,10 @@ To change this setting, BEGIN_LINKdelete the Chrome d +@@ -4360,7 +4366,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 -@@ -4326,6 +4335,18 @@ To change this setting, BEGIN_LINKdelete the Chrome d +@@ -4371,6 +4380,18 @@ To change this setting, BEGIN_LINKdelete the Chrome d Android version is unsupported diff --git a/build/patches/Bromite-subresource-adblocker.patch b/build/patches/Bromite-subresource-adblocker.patch index afaf722a2..67dfc4ba9 100644 --- a/build/patches/Bromite-subresource-adblocker.patch +++ b/build/patches/Bromite-subresource-adblocker.patch @@ -48,10 +48,10 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../content/shared/browser/ruleset_service.h | 8 +- .../unindexed_ruleset_stream_generator.cc | 3 + .../core/browser/ruleset_version.h | 4 + - .../browser/subresource_filter_features.cc | 116 +------- + .../browser/subresource_filter_features.cc | 114 +------ .../core/browser/verified_ruleset_dealer.cc | 4 + .../core/common/indexed_ruleset.cc | 5 +- - 39 files changed, 1273 insertions(+), 129 deletions(-) + 39 files changed, 1273 insertions(+), 127 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 @@ -66,7 +66,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -360,6 +360,7 @@ if (current_toolchain == default_toolchain) { +@@ -319,6 +319,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", @@ -77,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 -@@ -434,6 +434,7 @@ chrome_java_resources = [ +@@ -428,6 +428,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", @@ -85,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", -@@ -623,6 +624,7 @@ chrome_java_resources = [ +@@ -614,6 +615,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", @@ -96,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 -@@ -942,6 +942,8 @@ chrome_java_sources = [ +@@ -947,6 +947,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", @@ -252,7 +252,7 @@ new file mode 100644 diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/java/res/xml/main_preferences.xml --- a/chrome/android/java/res/xml/main_preferences.xml +++ b/chrome/android/java/res/xml/main_preferences.xml -@@ -122,6 +122,11 @@ for the previous order (main_preferences_legacy). --> +@@ -120,6 +120,11 @@ for the previous order (main_preferences_legacy). --> android:key="toolbar_shortcut" android:order="21" android:title="@string/toolbar_shortcut"/> @@ -426,7 +426,7 @@ 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 -@@ -855,9 +855,7 @@ public class TabModelImpl extends TabModelJniBridge { +@@ -863,9 +863,7 @@ public class TabModelImpl extends TabModelJniBridge { .createTabWithWebContents( parent, webContents, @@ -440,7 +440,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabMod 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 -@@ -15940,6 +15940,16 @@ Please help our engineers fix this problem. Tell us what happened right before y +@@ -15996,6 +15996,16 @@ Please help our engineers fix this problem. Tell us what happened right before y Never show this again. @@ -511,7 +511,7 @@ diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc --- a/chrome/browser/browser_process_impl.cc +++ b/chrome/browser/browser_process_impl.cc -@@ -1227,6 +1227,34 @@ BrowserProcessImpl::component_updater() { +@@ -1228,6 +1228,34 @@ BrowserProcessImpl::component_updater() { return component_updater_.get(); } @@ -568,7 +568,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 -@@ -472,6 +472,9 @@ StartupProfileInfo CreateInitialProfile( +@@ -468,6 +468,9 @@ StartupProfileInfo CreateInitialProfile( // missing code in the above test. CHECK(profile_info.profile) << "Cannot get default profile."; @@ -734,7 +734,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 -@@ -2840,6 +2840,11 @@ inline constexpr char kAudioCaptureAllowed[] = "hardware.audio_capture_enabled"; +@@ -2857,6 +2857,11 @@ inline constexpr char kAudioCaptureAllowed[] = "hardware.audio_capture_enabled"; inline constexpr char kAudioCaptureAllowedUrls[] = "hardware.audio_capture_allowed_urls"; @@ -749,7 +749,7 @@ diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h diff --git a/components/browser_ui/strings/android/site_settings.grdp b/components/browser_ui/strings/android/site_settings.grdp --- a/components/browser_ui/strings/android/site_settings.grdp +++ b/components/browser_ui/strings/android/site_settings.grdp -@@ -374,6 +374,9 @@ +@@ -373,6 +373,9 @@ This site shows intrusive or misleading ads @@ -1583,7 +1583,7 @@ diff --git a/components/subresource_filter/content/browser/content_subresource_f #include "components/subresource_filter/content/browser/ad_tagging_utils.h" #include "components/subresource_filter/content/browser/content_subresource_filter_web_contents_helper.h" #include "components/subresource_filter/content/browser/profile_interaction_manager.h" -@@ -111,6 +114,7 @@ ContentSubresourceFilterThrottleManager:: +@@ -112,6 +115,7 @@ ContentSubresourceFilterThrottleManager:: profile_interaction_manager_( std::make_unique( profile_context)), @@ -1591,7 +1591,7 @@ diff --git a/components/subresource_filter/content/browser/content_subresource_f web_contents_helper_(web_contents_helper) {} ContentSubresourceFilterThrottleManager:: -@@ -671,6 +675,17 @@ ContentSubresourceFilterThrottleManager:: +@@ -672,6 +676,17 @@ ContentSubresourceFilterThrottleManager:: throttle->NotifyPageActivationWithRuleset(EnsureRulesetHandle(), ad_tagging_state); } @@ -1636,7 +1636,7 @@ diff --git a/components/subresource_filter/content/shared/browser/ruleset_servic // Implements operations on a `sentinel file`, which is used as a safeguard to @@ -234,10 +232,13 @@ RulesetService::RulesetService( - RulesetService::~RulesetService() {} + RulesetService::~RulesetService() = default; void RulesetService::IndexAndStoreAndPublishRulesetIfNeeded( - const UnindexedRulesetInfo& unindexed_ruleset_info) { @@ -1816,7 +1816,7 @@ diff --git a/components/subresource_filter/core/browser/ruleset_version.h b/comp diff --git a/components/subresource_filter/core/browser/subresource_filter_features.cc b/components/subresource_filter/core/browser/subresource_filter_features.cc --- a/components/subresource_filter/core/browser/subresource_filter_features.cc +++ b/components/subresource_filter/core/browser/subresource_filter_features.cc -@@ -55,72 +55,7 @@ class CommaSeparatedStrings { +@@ -55,71 +55,8 @@ class CommaSeparatedStrings { const std::vector pieces_; }; @@ -1831,8 +1831,7 @@ diff --git a/components/subresource_filter/core/browser/subresource_filter_featu - return value; -} - --mojom::ActivationLevel ParseActivationLevel( -- const std::string_view activation_level) { +-mojom::ActivationLevel ParseActivationLevel(std::string_view activation_level) { - if (base::EqualsCaseInsensitiveASCII(activation_level, - kActivationLevelEnabled)) - return mojom::ActivationLevel::kEnabled; @@ -1842,7 +1841,7 @@ diff --git a/components/subresource_filter/core/browser/subresource_filter_featu - return mojom::ActivationLevel::kDisabled; -} - --ActivationScope ParseActivationScope(const std::string_view activation_scope) { +-ActivationScope ParseActivationScope(std::string_view activation_scope) { - if (base::EqualsCaseInsensitiveASCII(activation_scope, - kActivationScopeAllSites)) - return ActivationScope::ALL_SITES; @@ -1878,19 +1877,19 @@ diff --git a/components/subresource_filter/core/browser/subresource_filter_featu - return value < 1 ? value : 1; -} - --int ParseInt(const std::string_view value) { +-int ParseInt(std::string_view value) { - int result = 0; - base::StringToInt(value, &result); - return result; -} -- + -std::vector FillEnabledPresetConfigurations( - std::map* params) { +std::vector FillEnabledPresetConfigurations() { // If ad tagging is enabled, turn on the dryrun automatically. bool ad_tagging_enabled = base::FeatureList::IsEnabled(kAdTagging); const struct { -@@ -128,23 +63,16 @@ std::vector FillEnabledPresetConfigurations( +@@ -127,23 +64,16 @@ std::vector FillEnabledPresetConfigurations( bool enabled_by_default; Configuration (*factory_method)(); } kAvailablePresetConfigurations[] = { @@ -1916,7 +1915,7 @@ diff --git a/components/subresource_filter/core/browser/subresource_filter_featu enabled_configurations.push_back(available_preset.factory_method()); } } -@@ -152,46 +80,10 @@ std::vector FillEnabledPresetConfigurations( +@@ -151,46 +81,10 @@ std::vector FillEnabledPresetConfigurations( return enabled_configurations; } diff --git a/build/patches/Chrome-web-store-protection.patch b/build/patches/Chrome-web-store-protection.patch index 6d47eb514..e01a196bf 100644 --- a/build/patches/Chrome-web-store-protection.patch +++ b/build/patches/Chrome-web-store-protection.patch @@ -27,8 +27,9 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../browser/resources/extensions/manager.html | 1 + .../browser/resources/extensions/manager.ts | 7 +++ .../browser/resources/extensions/service.ts | 5 ++ - .../browser/resources/extensions/toolbar.html | 12 ++++ - .../browser/resources/extensions/toolbar.ts | 20 +++++++ + .../browser/resources/extensions/toolbar.css | 5 ++ + .../browser/resources/extensions/toolbar.html | 7 +++ + .../browser/resources/extensions/toolbar.ts | 21 +++++++ .../resources/webstore_app/manifest.json | 7 +-- .../ui/webui/extensions/extensions_ui.cc | 8 +++ .../chrome_update_query_params_delegate.cc | 13 ++-- @@ -41,9 +42,9 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../browser/updater/manifest_fetch_data.cc | 8 +-- .../browser/updater/safe_manifest_parser.cc | 1 + extensions/common/extension_features.cc | 15 +++++ - extensions/common/extension_features.h | 4 ++ + extensions/common/extension_features.h | 5 ++ .../definitions/developer_private.d.ts | 2 + - 30 files changed, 256 insertions(+), 103 deletions(-) + 31 files changed, 258 insertions(+), 103 deletions(-) create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Webstore-protection.inc diff --git a/chrome/app/extensions_strings.grdp b/chrome/app/extensions_strings.grdp @@ -112,7 +113,7 @@ diff --git a/chrome/browser/extensions/api/developer_private/developer_private_a template <> void BrowserContextKeyedAPIFactory< DeveloperPrivateAPI>::DeclareFactoryDependencies() { -@@ -921,6 +949,7 @@ ExtensionFunction::ResponseAction DeveloperPrivateAutoUpdateFunction::Run() { +@@ -925,6 +953,7 @@ ExtensionFunction::ResponseAction DeveloperPrivateAutoUpdateFunction::Run() { ExtensionUpdater::CheckParams params; params.fetch_priority = DownloadFetchPriority::kForeground; params.install_immediately = true; @@ -120,7 +121,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)); -@@ -1061,7 +1090,7 @@ DeveloperPrivateUpdateProfileConfigurationFunction::Run() { +@@ -1065,7 +1094,7 @@ DeveloperPrivateUpdateProfileConfigurationFunction::Run() { const developer::ProfileConfigurationUpdate& update = params->update; @@ -129,7 +130,7 @@ diff --git a/chrome/browser/extensions/api/developer_private/developer_private_a Profile* profile = Profile::FromBrowserContext(browser_context()); CHECK(profile); if (supervised_user::AreExtensionsPermissionsEnabled(profile)) { -@@ -1075,6 +1104,11 @@ DeveloperPrivateUpdateProfileConfigurationFunction::Run() { +@@ -1079,6 +1108,11 @@ DeveloperPrivateUpdateProfileConfigurationFunction::Run() { ->MarkNoticeAsAcknowledgedGlobally(); } @@ -157,7 +158,7 @@ diff --git a/chrome/browser/extensions/api/developer_private/developer_private_a diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc --- a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc +++ b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc -@@ -67,6 +67,7 @@ +@@ -66,6 +66,7 @@ #include "extensions/browser/extension_util.h" #include "extensions/browser/extensions_browser_client.h" #include "extensions/common/extension.h" @@ -165,7 +166,7 @@ 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" -@@ -227,6 +228,8 @@ WebstorePrivateApi::Delegate* test_delegate = nullptr; +@@ -220,6 +221,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) { @@ -174,7 +175,7 @@ diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api if (profile->GetPrefs()->HasPrefPath(kWebstoreLogin)) { return profile->GetPrefs()->GetString(kWebstoreLogin); } -@@ -234,6 +237,8 @@ std::string GetWebstoreLogin(Profile* profile) { +@@ -227,11 +230,15 @@ std::string GetWebstoreLogin(Profile* profile) { } void SetWebstoreLogin(Profile* profile, const std::string& login) { @@ -183,8 +184,6 @@ diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api profile->GetPrefs()->SetString(kWebstoreLogin, login); } -@@ -243,6 +248,8 @@ void RecordWebstoreExtensionInstallResult(bool success) { - api::webstore_private::ExtensionInstallStatus ConvertExtensionInstallStatusForAPI(ExtensionInstallStatus status) { + if (!base::FeatureList::IsEnabled(extensions_features::kEnableExtensionManagementToChromeStore)) @@ -192,7 +191,7 @@ diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api switch (status) { case kCanRequest: return api::webstore_private::ExtensionInstallStatus::kCanRequest; -@@ -1174,7 +1181,8 @@ ExtensionFunction::ResponseAction +@@ -1152,7 +1159,8 @@ ExtensionFunction::ResponseAction WebstorePrivateIsInIncognitoModeFunction::Run() { Profile* profile = Profile::FromBrowserContext(browser_context()); return RespondNow(ArgumentList(IsInIncognitoMode::Results::Create( @@ -202,7 +201,7 @@ diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api } WebstorePrivateIsPendingCustodianApprovalFunction:: -@@ -1269,11 +1277,14 @@ WebstorePrivateGetReferrerChainFunction::Run() { +@@ -1247,11 +1255,14 @@ WebstorePrivateGetReferrerChainFunction::Run() { request.mutable_referrer_chain_options()->set_recent_navigations_to_collect( recent_navigations_to_collect); @@ -509,23 +508,26 @@ diff --git a/chrome/browser/resources/extensions/service.ts b/chrome/browser/res loadUnpacked(): Promise { return this.loadUnpackedHelper_(); } +diff --git a/chrome/browser/resources/extensions/toolbar.css b/chrome/browser/resources/extensions/toolbar.css +--- a/chrome/browser/resources/extensions/toolbar.css ++++ b/chrome/browser/resources/extensions/toolbar.css +@@ -73,6 +73,11 @@ cr-tooltip-icon { + margin-inline-end: 16px; + } + ++#need-update { ++ color: red; ++ margin-inline: 0px; ++} ++ + cr-toolbar { + --cr-toolbar-center-basis: 680px; + --cr-toolbar-field-max-width: var(--cr-toolbar-center-basis); diff --git a/chrome/browser/resources/extensions/toolbar.html b/chrome/browser/resources/extensions/toolbar.html --- a/chrome/browser/resources/extensions/toolbar.html +++ b/chrome/browser/resources/extensions/toolbar.html -@@ -63,6 +63,11 @@ - margin-inline-end: 16px; - } - -+ #need-update { -+ color: red; -+ margin-inline: 0px; -+ } -+ - cr-toolbar { - --cr-toolbar-center-basis: 680px; - --cr-toolbar-field-max-width: var(--cr-toolbar-center-basis); -@@ -88,6 +93,13 @@ - checked="[[inDevMode]]" aria-labelledby="devModeLabel"> +@@ -15,6 +15,13 @@ + ?checked="${this.inDevMode}" aria-labelledby="devModeLabel">

+
@@ -536,8 +538,8 @@ diff --git a/chrome/browser/resources/extensions/toolbar.html b/chrome/browser/r + +
- @@ -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 -@@ -54,6 +54,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; -@@ -77,8 +78,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, -@@ -165,6 +166,7 @@ function addPrivacyChildRoutes(r: Partial) { +@@ -163,6 +164,7 @@ function addPrivacyChildRoutes(r: Partial) { r.SITE_SETTINGS_WEB_APP_INSTALLATION = r.SITE_SETTINGS.createChild('webApplications'); } @@ -588,8 +588,8 @@ diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_ { route: routes.SITE_SETTINGS_ADS, id: Id.ADS, -@@ -463,10 +463,36 @@ function getCategoryItemMap(): Map { - disabledLabel: 'trackingProtectionLinkRowSubLabel', +@@ -460,10 +460,36 @@ function getCategoryItemMap(): Map { + icon: 'privacy:cookie', }); } + for (let index=0; index < loadTimeData.getInteger("br_cs_count"); index++) { @@ -625,7 +625,7 @@ diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_ function buildItemListFromIds(orderedIdList: ContentSettingsTypes[]): CategoryListItem[] { const map = getCategoryItemMap(); -@@ -554,7 +580,7 @@ export class SettingsSiteSettingsPageElement extends +@@ -551,7 +577,7 @@ export class SettingsSiteSettingsPageElement extends Id.IMAGES, Id.POPUPS, ]), @@ -709,7 +709,7 @@ diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_ 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 -@@ -1990,6 +1990,7 @@ static_library("ui") { +@@ -1808,6 +1808,7 @@ static_library("ui") { "//components/commerce/core:shopping_service", "//components/commerce/core/webui", "//components/endpoint_fetcher:endpoint_fetcher", @@ -717,7 +717,7 @@ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn "//components/enterprise/common:files_scan_data", "//components/feedback/proto", "//components/headless/policy", -@@ -5274,6 +5275,7 @@ static_library("ui") { +@@ -5047,6 +5048,7 @@ static_library("ui") { "//components/power_bookmarks/storage", "//components/reading_list/features:flags", "//components/segmentation_platform/embedder/default_model:default_model", @@ -745,7 +745,7 @@ diff --git a/chrome/browser/ui/views/controls/rich_controls_container_view.h b/c diff --git a/chrome/browser/ui/views/page_info/page_info_main_view.cc b/chrome/browser/ui/views/page_info/page_info_main_view.cc --- a/chrome/browser/ui/views/page_info/page_info_main_view.cc +++ b/chrome/browser/ui/views/page_info/page_info_main_view.cc -@@ -50,6 +50,7 @@ +@@ -51,6 +51,7 @@ #include "ui/views/controls/separator.h" #include "ui/views/layout/box_layout.h" #include "ui/views/layout/flex_layout.h" @@ -753,7 +753,7 @@ diff --git a/chrome/browser/ui/views/page_info/page_info_main_view.cc b/chrome/b #include "ui/views/view_class_properties.h" #if BUILDFLAG(FULL_SAFE_BROWSING) -@@ -252,8 +253,20 @@ void PageInfoMainView::SetPermissionInfo( +@@ -261,8 +262,20 @@ void PageInfoMainView::SetPermissionInfo( scroll_view->SetDrawOverflowIndicator(false); auto* content_view = scroll_view->SetContents(std::make_unique()); @@ -776,7 +776,7 @@ diff --git a/chrome/browser/ui/views/page_info/page_info_main_view.cc b/chrome/b content_view->SetID(PageInfoViewFactory::VIEW_ID_PAGE_INFO_PERMISSION_VIEW); content_view->SetProperty(views::kElementIdentifierKey, kPermissionsElementId); -@@ -268,11 +281,16 @@ void PageInfoMainView::SetPermissionInfo( +@@ -277,11 +290,16 @@ void PageInfoMainView::SetPermissionInfo( } } @@ -793,7 +793,7 @@ diff --git a/chrome/browser/ui/views/page_info/page_info_main_view.cc b/chrome/b toggle_row->SetProperty(views::kCrossAxisAlignmentKey, views::LayoutAlignment::kStretch); syncable_permission_rows_.emplace(permission.type, toggle_row); -@@ -280,6 +298,8 @@ void PageInfoMainView::SetPermissionInfo( +@@ -289,6 +307,8 @@ void PageInfoMainView::SetPermissionInfo( } for (auto& object : chosen_object_info_list) { @@ -802,7 +802,7 @@ diff --git a/chrome/browser/ui/views/page_info/page_info_main_view.cc b/chrome/b // The view takes ownership of the object info. auto object_view = std::make_unique( std::move(object), -@@ -290,6 +310,10 @@ void PageInfoMainView::SetPermissionInfo( +@@ -299,6 +319,10 @@ void PageInfoMainView::SetPermissionInfo( content_view->AddChildView(std::move(object_view))); } @@ -816,16 +816,16 @@ diff --git a/chrome/browser/ui/views/page_info/page_info_main_view.cc b/chrome/b diff --git a/chrome/browser/ui/views/page_info/page_info_view_factory.cc b/chrome/browser/ui/views/page_info/page_info_view_factory.cc --- a/chrome/browser/ui/views/page_info/page_info_view_factory.cc +++ b/chrome/browser/ui/views/page_info/page_info_view_factory.cc -@@ -26,6 +26,8 @@ - #include "chrome/browser/ui/views/page_info/page_info_navigation_handler.h" +@@ -27,6 +27,8 @@ #include "chrome/browser/ui/views/page_info/page_info_permission_content_view.h" #include "chrome/browser/ui/views/page_info/page_info_security_content_view.h" + #include "components/content_settings/core/common/content_settings_types.h" +#include "components/content_settings/core/browser/website_settings_info.h" +#include "components/content_settings/core/browser/website_settings_registry.h" #include "components/page_info/core/features.h" #include "components/page_info/core/proto/about_this_site_metadata.pb.h" #include "components/page_info/page_info.h" -@@ -261,7 +263,14 @@ const ui::ImageModel PageInfoViewFactory::GetPermissionIcon( +@@ -265,7 +267,14 @@ const ui::ImageModel PageInfoViewFactory::GetPermissionIcon( ContentSetting setting = info.setting == CONTENT_SETTING_DEFAULT ? info.default_setting : info.setting; @@ -840,8 +840,8 @@ diff --git a/chrome/browser/ui/views/page_info/page_info_view_factory.cc b/chrom // For guard content settings and Automatic Picture-in-Picture, ASK is treated // as an "on" state. const bool show_blocked_badge = -@@ -555,6 +564,17 @@ const ui::ImageModel PageInfoViewFactory::GetPermissionIcon( - icon = &vector_icons::kPointerLockIcon; +@@ -562,6 +571,17 @@ const ui::ImageModel PageInfoViewFactory::GetPermissionIcon( + icon = &vector_icons::kPrinterIcon; break; default: + bool found = false; @@ -925,7 +925,7 @@ diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc b/c if (permission.requesting_origin.has_value()) { std::u16string requesting_origin_string; switch (permission.type) { -@@ -167,6 +187,90 @@ void PermissionToggleRowView::UpdatePermission( +@@ -168,6 +188,90 @@ void PermissionToggleRowView::UpdatePermission( UpdateUiOnPermissionChanged(); } @@ -1016,7 +1016,7 @@ diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc b/c void PermissionToggleRowView::OnToggleButtonPressed() { PageInfoUI::ToggleBetweenAllowAndBlock(permission_); PermissionChanged(); -@@ -175,24 +279,19 @@ void PermissionToggleRowView::OnToggleButtonPressed() { +@@ -176,24 +280,19 @@ void PermissionToggleRowView::OnToggleButtonPressed() { void PermissionToggleRowView::InitForUserSource( bool should_show_spacer_view, const std::u16string& toggle_accessible_name) { @@ -1048,7 +1048,7 @@ diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc b/c const int icon_size = GetLayoutConstant(PAGE_INFO_ICON_SIZE); -@@ -226,9 +325,6 @@ void PermissionToggleRowView::InitForUserSource( +@@ -227,9 +326,6 @@ void PermissionToggleRowView::InitForUserSource( auto spacer_view = std::make_unique(); spacer_view->SetPreferredSize(gfx::Size(icon_size, icon_size)); spacer_view_ = row_view_->AddControl(std::move(spacer_view)); @@ -1058,7 +1058,7 @@ diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc b/c } } } -@@ -255,6 +351,12 @@ void PermissionToggleRowView::InitForManagedSource( +@@ -256,6 +352,12 @@ void PermissionToggleRowView::InitForManagedSource( } void PermissionToggleRowView::UpdateUiOnPermissionChanged() { @@ -1071,7 +1071,7 @@ diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc b/c if (blocked_on_system_level_label_) { if (permission_.setting == CONTENT_SETTING_DEFAULT) { permission_blocked_on_system_level_ = false; -@@ -300,6 +402,37 @@ void PermissionToggleRowView::UpdateUiOnPermissionChanged() { +@@ -301,6 +403,37 @@ void PermissionToggleRowView::UpdateUiOnPermissionChanged() { } } } @@ -1169,9 +1169,9 @@ diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provide #include "build/branding_buildflags.h" #include "build/build_config.h" #include "build/buildflag.h" -@@ -76,6 +77,9 @@ - #include "components/google/core/common/google_util.h" +@@ -78,6 +79,9 @@ #include "components/history/core/common/pref_names.h" + #include "components/history_embeddings/history_embeddings_features.h" #include "components/omnibox/common/omnibox_features.h" +#include "components/content_settings/core/browser/content_settings_registry.h" +#include "components/content_settings/core/browser/website_settings_info.h" @@ -1179,7 +1179,7 @@ diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provide #include "components/password_manager/core/browser/leak_detection_dialog_utils.h" #include "components/password_manager/core/browser/manage_passwords_referrer.h" #include "components/password_manager/core/common/password_manager_features.h" -@@ -3693,6 +3697,56 @@ void AddLocalizedStrings(content::WebUIDataSource* html_source, +@@ -3808,6 +3812,56 @@ void AddLocalizedStrings(content::WebUIDataSource* html_source, policy_indicator::AddLocalizedStrings(html_source); AddSecurityKeysStrings(html_source); @@ -1248,8 +1248,8 @@ diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/b #include "components/content_settings/core/common/content_settings.h" #include "components/content_settings/core/common/content_settings_pattern.h" #include "components/content_settings/core/common/content_settings_types.h" -@@ -246,13 +248,13 @@ const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = { - {ContentSettingsType::STORAGE_ACCESS_HEADER_ORIGIN_TRIAL, nullptr}, +@@ -249,13 +251,13 @@ const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = { + {ContentSettingsType::DIRECT_SOCKETS_PRIVATE_NETWORK_ACCESS, nullptr}, }; -static_assert( @@ -1269,7 +1269,7 @@ diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/b struct SiteSettingSourceStringMapping { SiteSettingSource source; -@@ -482,6 +484,13 @@ bool HasRegisteredGroupName(ContentSettingsType type) { +@@ -504,6 +506,13 @@ bool HasRegisteredGroupName(ContentSettingsType type) { return true; } } @@ -1283,7 +1283,7 @@ diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/b return false; } -@@ -495,11 +504,24 @@ ContentSettingsType ContentSettingsTypeFromGroupName(std::string_view name) { +@@ -517,11 +526,24 @@ ContentSettingsType ContentSettingsTypeFromGroupName(std::string_view name) { return entry.type; } } @@ -1309,7 +1309,7 @@ diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/b for (const auto& entry : kContentSettingsTypeGroupNames) { if (type == entry.type) { // Content setting types that aren't represented in the settings UI -@@ -514,7 +536,6 @@ std::string_view ContentSettingsTypeToGroupName(ContentSettingsType type) { +@@ -536,7 +558,6 @@ std::string_view ContentSettingsTypeToGroupName(ContentSettingsType type) { return entry.name ? entry.name : std::string_view(); } } @@ -1317,7 +1317,7 @@ diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/b NOTREACHED_IN_MIGRATION() << static_cast(type) << " is not a recognized content settings type."; return std::string_view(); -@@ -624,6 +645,13 @@ std::vector GetVisiblePermissionCategories( +@@ -643,6 +664,13 @@ std::vector GetVisiblePermissionCategories( base_types->push_back(ContentSettingsType::WEB_APP_INSTALLATION); } @@ -1497,7 +1497,7 @@ diff --git a/components/browser_ui/settings/android/widget/java/src/org/chromium diff --git a/components/browser_ui/site_settings/android/BUILD.gn b/components/browser_ui/site_settings/android/BUILD.gn --- a/components/browser_ui/site_settings/android/BUILD.gn +++ b/components/browser_ui/site_settings/android/BUILD.gn -@@ -147,6 +147,23 @@ android_library("java") { +@@ -146,6 +146,23 @@ android_library("java") { ":site_settings_jni_headers", "//components/content_settings/android:java_pref_names_srcjar", ] @@ -1521,7 +1521,7 @@ diff --git a/components/browser_ui/site_settings/android/BUILD.gn b/components/b } android_library("javatests") { -@@ -195,6 +212,7 @@ robolectric_library("junit") { +@@ -194,6 +211,7 @@ robolectric_library("junit") { } android_resources("java_resources") { @@ -1532,7 +1532,7 @@ diff --git a/components/browser_ui/site_settings/android/BUILD.gn b/components/b diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/AllSiteSettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/AllSiteSettings.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/AllSiteSettings.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/AllSiteSettings.java -@@ -383,7 +383,8 @@ public class AllSiteSettings extends BaseSiteSettingsFragment +@@ -386,7 +386,8 @@ public class AllSiteSettings extends BaseSiteSettingsFragment if (queryHasChanged) getInfoForOrigins(); }); @@ -1542,7 +1542,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c MenuItem help = menu.add( Menu.NONE, -@@ -395,6 +396,8 @@ public class AllSiteSettings extends BaseSiteSettingsFragment +@@ -398,6 +399,8 @@ public class AllSiteSettings extends BaseSiteSettingsFragment getResources(), R.drawable.ic_help_and_feedback, getContext().getTheme())); @@ -2214,7 +2214,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java -@@ -337,6 +337,10 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -330,6 +330,10 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment website.site() .getContentSetting( browserContextHandle, mCategory.getContentSettingsType()); @@ -2225,7 +2225,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c if (contentSetting != null) { return ContentSettingValues.BLOCK == contentSetting; } -@@ -501,6 +505,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -494,6 +498,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment ? new HashSet<>(getArguments().getStringArrayList(EXTRA_SELECTED_DOMAINS)) : null; @@ -2233,7 +2233,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c configureGlobalToggles(); if (mCategory.getType() == SiteSettingsCategory.Type.REQUEST_DESKTOP_SITE) { RecordUserAction.record("DesktopSiteContentSetting.SettingsPage.Entered"); -@@ -536,7 +541,8 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -529,7 +534,8 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment if (queryHasChanged) getInfoForOrigins(); }); @@ -2243,7 +2243,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c MenuItem help = menu.add( Menu.NONE, -@@ -548,12 +554,20 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -541,12 +547,20 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment getResources(), R.drawable.ic_help_and_feedback, getContext().getTheme())); @@ -2264,7 +2264,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c if (mCategory.getType() == SiteSettingsCategory.Type.PROTECTED_MEDIA) { getSiteSettingsDelegate() .launchProtectedContentHelpAndFeedbackActivity(getActivity()); -@@ -625,6 +639,11 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -618,6 +632,11 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment BrowserContextHandle browserContextHandle = getSiteSettingsDelegate().getBrowserContextHandle(); PrefService prefService = UserPrefs.get(browserContextHandle); @@ -2276,7 +2276,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c if (BINARY_TOGGLE_KEY.equals(preference.getKey())) { assert !mCategory.isManaged(); boolean toggleValue = (boolean) newValue; -@@ -819,6 +838,8 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -812,6 +831,8 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment .website_settings_allowed_group_heading_request_desktop_site; break; } @@ -2285,7 +2285,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c assert resource > 0; return getString(resource); } -@@ -934,6 +955,8 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -927,6 +948,8 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment default: break; } @@ -2294,7 +2294,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c if (allowSpecifyingExceptions) { getPreferenceScreen() .addPreference( -@@ -1120,8 +1143,16 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -1112,8 +1135,16 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment private boolean isBlocked() { switch (mGlobalToggleLayout) { case GlobalToggleLayout.TRI_STATE_TOGGLE: @@ -2311,7 +2311,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c return (triStateToggle.getCheckedSetting() == ContentSettingValues.BLOCK); case GlobalToggleLayout.TRI_STATE_COOKIE_TOGGLE: TriStateCookieSettingsPreference triStateCookieToggle = -@@ -1188,7 +1219,11 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -1180,7 +1211,11 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment } else if (mCategory.getType() == SiteSettingsCategory.Type.STORAGE_ACCESS) { infoText.setSummary(getStorageAccessSummary()); } else { @@ -2324,7 +2324,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c } // Hide the anti-abuse text preferences, as needed. -@@ -1225,6 +1260,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -1217,6 +1252,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment } else { screen.removePreference(mLocationTriStatePref); } @@ -2332,7 +2332,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c if (permissionBlockedByOs) { maybeShowOsWarning(screen); -@@ -1381,7 +1417,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -1373,7 +1409,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment getSiteSettingsDelegate().getBrowserContextHandle(), contentType); int[] descriptionIds = ContentSettingsResources.getTriStateSettingDescriptionIDs(contentType); @@ -2341,7 +2341,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c } private void configureBinaryToggle(ChromeSwitchPreference binaryToggle, int contentType) { -@@ -1505,6 +1541,14 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -1497,6 +1533,14 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment @ContentSettingValues Integer value = site.getContentSetting(browserContextHandle, contentSettingsType); @@ -2376,7 +2376,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c } } -@@ -549,8 +550,21 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -543,8 +544,21 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment private void setupContentSettingsPreferences() { mMaxPermissionOrder = findPreference(PREF_PERMISSIONS_HEADER).getOrder(); @@ -2400,7 +2400,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c preference.setKey(getPreferenceKey(type)); if (type == ContentSettingsType.ADS) { -@@ -1096,20 +1110,32 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -1090,20 +1104,32 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment @ContentSettingValues @Nullable Integer value, boolean isEmbargoed, boolean isOneTime) { @@ -2439,7 +2439,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c AppCompatResources.getColorStateList(getContext(), mHighlightColor) .getDefaultColor()); } -@@ -1325,14 +1351,20 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -1321,14 +1347,20 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment permission = (Boolean) newValue ? ContentSettingValues.ALLOW : ContentSettingValues.BLOCK; } else { @@ -2465,7 +2465,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java -@@ -51,6 +51,7 @@ public class SiteSettings extends BaseSiteSettingsFragment +@@ -53,6 +53,7 @@ public class SiteSettings extends BaseSiteSettingsFragment SettingsUtils.addPreferencesFromResource(this, R.xml.site_settings_preferences); mPageTitle.set(getContext().getString(R.string.prefs_site_settings)); @@ -2473,7 +2473,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c configurePreferences(); updatePreferenceStates(); } -@@ -77,7 +78,7 @@ public class SiteSettings extends BaseSiteSettingsFragment +@@ -79,7 +80,7 @@ public class SiteSettings extends BaseSiteSettingsFragment // Remove unsupported settings categories. for (@SiteSettingsCategory.Type int type = 0; @@ -2482,7 +2482,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c type++) { if (!getSiteSettingsDelegate().isCategoryVisible(type)) { getPreferenceScreen().removePreference(findPreference(type)); -@@ -99,7 +100,7 @@ public class SiteSettings extends BaseSiteSettingsFragment +@@ -101,7 +102,7 @@ public class SiteSettings extends BaseSiteSettingsFragment @CookieControlsMode int cookieControlsMode = UserPrefs.get(browserContextHandle).getInteger(COOKIE_CONTROLS_MODE); @@ -2491,7 +2491,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c Preference p = findPreference(prefCategory); int contentType = SiteSettingsCategory.contentSettingsType(prefCategory); // p can be null if the Preference was removed in configurePreferences. -@@ -169,19 +170,21 @@ public class SiteSettings extends BaseSiteSettingsFragment +@@ -171,19 +172,21 @@ public class SiteSettings extends BaseSiteSettingsFragment } else if (Type.ZOOM == prefCategory) { // Don't want to set a summary for Zoom because we don't want any message to display // under the Zoom row on site settings. @@ -2600,7 +2600,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsDelegate.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsDelegate.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsDelegate.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsDelegate.java -@@ -195,6 +195,8 @@ public interface SiteSettingsDelegate { +@@ -198,6 +198,8 @@ public interface SiteSettingsDelegate { */ String getRelatedWebsiteSetOwner(String memberOrigin); @@ -2811,9 +2811,9 @@ diff --git a/components/content_settings/core/browser/content_settings_registry. namespace content_settings { -@@ -836,6 +837,7 @@ void ContentSettingsRegistry::Init() { +@@ -838,6 +839,7 @@ void ContentSettingsRegistry::Init() { WebsiteSettingsRegistry::DESKTOP, - ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE, + ContentSettingsInfo::INHERIT_IN_INCOGNITO, ContentSettingsInfo::EXCEPTIONS_ON_SECURE_ORIGINS_ONLY); +#include "components/content_settings/core/browser/bromite_content_settings.inc" } @@ -2822,7 +2822,7 @@ diff --git a/components/content_settings/core/browser/content_settings_registry. diff --git a/components/content_settings/core/browser/content_settings_uma_util.cc b/components/content_settings/core/browser/content_settings_uma_util.cc --- a/components/content_settings/core/browser/content_settings_uma_util.cc +++ b/components/content_settings/core/browser/content_settings_uma_util.cc -@@ -205,11 +205,7 @@ void RecordContentSettingsHistogram(const std::string& name, +@@ -207,11 +207,7 @@ void RecordContentSettingsHistogram(const std::string& name, } int ContentSettingTypeToHistogramValue(ContentSettingsType content_setting) { @@ -2867,7 +2867,7 @@ diff --git a/components/content_settings/core/browser/content_settings_utils.cc diff --git a/components/content_settings/core/browser/website_settings_info.h b/components/content_settings/core/browser/website_settings_info.h --- a/components/content_settings/core/browser/website_settings_info.h +++ b/components/content_settings/core/browser/website_settings_info.h -@@ -128,6 +128,32 @@ class WebsiteSettingsInfo { +@@ -124,6 +124,32 @@ class WebsiteSettingsInfo { ScopingType scoping_type() const { return scoping_type_; } IncognitoBehavior incognito_behavior() const { return incognito_behavior_; } @@ -2900,7 +2900,7 @@ diff --git a/components/content_settings/core/browser/website_settings_info.h b/ private: const ContentSettingsType type_; const std::string name_; -@@ -140,6 +166,18 @@ class WebsiteSettingsInfo { +@@ -136,6 +162,18 @@ class WebsiteSettingsInfo { const LossyStatus lossy_status_; const ScopingType scoping_type_; const IncognitoBehavior incognito_behavior_; @@ -3154,10 +3154,11 @@ diff --git a/components/content_settings/core/common/content_settings_mojom_trai diff --git a/components/content_settings/core/common/content_settings_types.mojom b/components/content_settings/core/common/content_settings_types.mojom --- a/components/content_settings/core/common/content_settings_types.mojom +++ b/components/content_settings/core/common/content_settings_types.mojom -@@ -458,5 +458,6 @@ enum ContentSettingsType { - // Website setting to indicate whether user has opted in to allow web apps to - // install other web apps. - WEB_APP_INSTALLATION, +@@ -463,5 +463,7 @@ enum ContentSettingsType { + // Content settings for private network access in the context of the + // Direct Sockets API. + DIRECT_SOCKETS_PRIVATE_NETWORK_ACCESS, ++ +#include "components/content_settings/core/common/bromite_content_settings.inc" }; // LINT.ThenChange(//components/content_settings/core/browser/content_settings_uma_util.cc:kHistogramValue) @@ -3351,7 +3352,7 @@ diff --git a/components/page_info/page_info.cc b/components/page_info/page_info. #include "components/content_settings/browser/ui/cookie_controls_controller.h" #include "components/content_settings/core/browser/content_settings_registry.h" #include "components/content_settings/core/browser/content_settings_uma_util.h" -@@ -1242,6 +1243,14 @@ void PageInfo::PopulatePermissionInfo(PermissionInfo& permission_info, +@@ -1249,6 +1250,14 @@ void PageInfo::PopulatePermissionInfo(PermissionInfo& permission_info, // applies to permissions listed in |kPermissionType|. bool PageInfo::ShouldShowPermission( const PageInfo::PermissionInfo& info) const { @@ -3366,7 +3367,7 @@ diff --git a/components/page_info/page_info.cc b/components/page_info/page_info. // Note |ContentSettingsType::ADS| will show up regardless of its default // value when it has been activated on the current origin. if (info.type == ContentSettingsType::ADS) { -@@ -1356,7 +1365,19 @@ void PageInfo::PresentSitePermissions() { +@@ -1370,7 +1379,19 @@ void PageInfo::PresentSitePermissions() { HostContentSettingsMap* content_settings = GetContentSettings(); DCHECK(web_contents_); @@ -3412,7 +3413,7 @@ diff --git a/components/page_info/page_info_ui.cc b/components/page_info/page_in switch (type) { case ContentSettingsType::GEOLOCATION: message_id = IDS_PAGE_INFO_STATE_TEXT_LOCATION_ASK; -@@ -625,6 +633,12 @@ PageInfoUI::~PageInfoUI() = default; +@@ -630,6 +638,12 @@ PageInfoUI::~PageInfoUI() = default; // static std::u16string PageInfoUI::PermissionTypeToUIString(ContentSettingsType type) { @@ -3425,7 +3426,7 @@ diff --git a/components/page_info/page_info_ui.cc b/components/page_info/page_in for (const PermissionUIInfo& info : GetContentSettingsUIInfo()) { if (info.type == type) return l10n_util::GetStringUTF16(info.string_id); -@@ -636,6 +650,12 @@ std::u16string PageInfoUI::PermissionTypeToUIString(ContentSettingsType type) { +@@ -641,6 +655,12 @@ std::u16string PageInfoUI::PermissionTypeToUIString(ContentSettingsType type) { // static std::u16string PageInfoUI::PermissionTypeToUIStringMidSentence( ContentSettingsType type) { @@ -3438,7 +3439,7 @@ diff --git a/components/page_info/page_info_ui.cc b/components/page_info/page_in for (const PermissionUIInfo& info : GetContentSettingsUIInfo()) { if (info.type == type) return l10n_util::GetStringUTF16(info.string_id_mid_sentence); -@@ -1081,6 +1101,11 @@ bool PageInfoUI::ContentSettingsTypeInPageInfo(ContentSettingsType type) { +@@ -1086,6 +1106,11 @@ bool PageInfoUI::ContentSettingsTypeInPageInfo(ContentSettingsType type) { if (info.type == type) return true; } @@ -3463,15 +3464,19 @@ diff --git a/components/site_settings_strings.grdp b/components/site_settings_st diff --git a/third_party/blink/public/platform/web_content_settings_client.h b/third_party/blink/public/platform/web_content_settings_client.h --- a/third_party/blink/public/platform/web_content_settings_client.h +++ b/third_party/blink/public/platform/web_content_settings_client.h -@@ -10,6 +10,7 @@ +@@ -10,6 +10,11 @@ #include "base/functional/callback.h" - #include "base/time/time.h" + ++#include "base/time/time.h" +#include "components/content_settings/core/common/content_settings_types.h" - #include "third_party/blink/public/common/client_hints/enabled_client_hints.h" - #include "third_party/blink/public/mojom/navigation/renderer_content_settings.mojom.h" ++#include "third_party/blink/public/common/client_hints/enabled_client_hints.h" ++#include "third_party/blink/public/mojom/navigation/renderer_content_settings.mojom.h" ++ + namespace blink { -@@ -46,6 +47,14 @@ class WebContentSettingsClient { + class WebURL; +@@ -43,6 +48,14 @@ class WebContentSettingsClient { // Blocks until done. virtual bool AllowStorageAccessSync(StorageType storage_type) { return true; } diff --git a/build/patches/Cromite-Branding--improve-settings-ui.patch b/build/patches/Cromite-Branding--improve-settings-ui.patch index 628e17da8..80b62ac1e 100644 --- a/build/patches/Cromite-Branding--improve-settings-ui.patch +++ b/build/patches/Cromite-Branding--improve-settings-ui.patch @@ -18,9 +18,9 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.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 -@@ -643,7 +643,7 @@ chrome_java_resources = [ +@@ -633,7 +633,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", "java/res/xml/incognito_preferences.xml", - "java/res/xml/privacy_preferences.xml", + "java/res/xml/privacy_preferences.xml", "java/res/xml/privacy_preferences_cromite.xml", @@ -30,16 +30,16 @@ diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_ja diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/java/res/xml/main_preferences.xml --- a/chrome/android/java/res/xml/main_preferences.xml +++ b/chrome/android/java/res/xml/main_preferences.xml -@@ -17,7 +17,7 @@ for the previous order (main_preferences_legacy). --> - android:key="sync_promo" - android:order="0"/> +@@ -15,7 +15,7 @@ for the previous order (main_preferences_legacy). --> + + +@@ -28,7 +28,7 @@ for the previous order (main_preferences_legacy). --> android:layout="@layout/account_management_account_row" android:title="@string/sync_category_title"/> - android:order="0"/> +@@ -16,20 +16,20 @@ for the previous order (main_preferences_legacy). --> + @@ -13153,7 +13153,7 @@ e)fqMZZ`3a)Ds&5H CreateProfilePrefStoreManager( +@@ -294,10 +295,7 @@ std::unique_ptr CreateProfilePrefStoreManager( #endif std::string seed; CHECK(ui::ResourceBundle::HasSharedInstance()); @@ -13230,7 +13230,7 @@ diff --git a/chrome/browser/resources/settings/settings_menu/settings_menu.html #menu { color: var(--google-grey-700); display: flex; -@@ -164,7 +176,7 @@ +@@ -165,7 +177,7 @@ @@ -13242,7 +13242,7 @@ diff --git a/chrome/browser/resources/settings/settings_menu/settings_menu.html 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 -@@ -2450,7 +2450,7 @@ Your Google account may have other forms of browsing history like searches and a +@@ -2471,7 +2471,7 @@ Your Google account may have other forms of browsing history like searches and a About Chrome @@ -13287,7 +13287,7 @@ diff --git a/chrome/install_static/chromium_install_modes.cc b/chrome/install_st diff --git a/components/browser_ui/strings/android/browser_ui_strings.grd b/components/browser_ui/strings/android/browser_ui_strings.grd --- a/components/browser_ui/strings/android/browser_ui_strings.grd +++ b/components/browser_ui/strings/android/browser_ui_strings.grd -@@ -983,7 +983,7 @@ +@@ -986,7 +986,7 @@ @@ -18924,7 +18924,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 -@@ -622,7 +622,7 @@ void ResolveInvalidConfigurations() { +@@ -610,7 +610,7 @@ void ResolveInvalidConfigurations() { base::FeatureList::IsEnabled( features::kPrivacySandboxAdsAPIsM1Override)) && !base::FeatureList::IsEnabled(blink::features::kFencedFrames)) { @@ -18933,7 +18933,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."; -@@ -632,9 +632,8 @@ void ResolveInvalidConfigurations() { +@@ -620,9 +620,8 @@ void ResolveInvalidConfigurations() { if (!base::FeatureList::IsEnabled(blink::features::kFencedFrames) && base::FeatureList::IsEnabled( blink::features::kFencedFramesLocalUnpartitionedDataAccess)) { @@ -18945,7 +18945,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 << "=" -@@ -647,7 +646,7 @@ void ResolveInvalidConfigurations() { +@@ -635,7 +634,7 @@ void ResolveInvalidConfigurations() { // The Document API should be additionally gated by the // `kBrowsingTopicsDocumentAPI` feature. if (!base::FeatureList::IsEnabled(blink::features::kBrowsingTopics)) { @@ -18954,7 +18954,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."; -@@ -667,7 +666,7 @@ void ResolveInvalidConfigurations() { +@@ -655,7 +654,7 @@ void ResolveInvalidConfigurations() { } if (!base::FeatureList::IsEnabled(blink::features::kSharedStorageAPI)) { @@ -18963,7 +18963,7 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features. << "SharedStorage cannot be enabled in this " "configuration. Use --" << switches::kEnableFeatures << "=" -@@ -677,7 +676,7 @@ void ResolveInvalidConfigurations() { +@@ -665,7 +664,7 @@ void ResolveInvalidConfigurations() { if (!base::FeatureList::IsEnabled(blink::features::kSharedStorageAPIM118) || !base::FeatureList::IsEnabled(blink::features::kSharedStorageAPI)) { @@ -18972,7 +18972,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 << "=" -@@ -688,7 +687,7 @@ void ResolveInvalidConfigurations() { +@@ -676,7 +675,7 @@ void ResolveInvalidConfigurations() { if (!base::FeatureList::IsEnabled(blink::features::kSharedStorageAPIM125) || !base::FeatureList::IsEnabled(blink::features::kSharedStorageAPI)) { @@ -18981,7 +18981,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 << "=" -@@ -699,7 +698,7 @@ void ResolveInvalidConfigurations() { +@@ -687,7 +686,7 @@ void ResolveInvalidConfigurations() { if (!base::FeatureList::IsEnabled( attribution_reporting::features::kConversionMeasurement)) { @@ -18990,7 +18990,7 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features. << "AttributionReporting cannot be enabled in this " "configuration. Use --" << switches::kEnableFeatures << "=" -@@ -712,8 +711,8 @@ void ResolveInvalidConfigurations() { +@@ -700,8 +699,8 @@ void ResolveInvalidConfigurations() { attribution_reporting::features::kConversionMeasurement) || !base::FeatureList::IsEnabled( network::features::kAttributionReportingCrossAppWeb)) { @@ -19001,7 +19001,7 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features. << "AttributionReportingCrossAppWeb cannot be enabled in this " "configuration. Use --" << switches::kEnableFeatures << "=" -@@ -724,7 +723,7 @@ void ResolveInvalidConfigurations() { +@@ -712,7 +711,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 0fa81e52b..9630c63dd 100644 --- a/build/patches/Customize-selection-popup.patch +++ b/build/patches/Customize-selection-popup.patch @@ -23,7 +23,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActionModeHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActionModeHandler.java --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActionModeHandler.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActionModeHandler.java -@@ -154,9 +154,7 @@ public class ChromeActionModeHandler { +@@ -158,9 +158,7 @@ public class ChromeActionModeHandler { | ActionModeCallbackHelper.MENU_ITEM_SHARE; // Disable options that expose additional Chrome functionality prior to the FRE being // completed (i.e. creation of a new tab). @@ -37,14 +37,14 @@ 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 -@@ -753,10 +753,17 @@ public class ChromeTabbedActivity extends ChromeActivity diff --git a/build/patches/Dictionary-suggestions-for-the-Omnibox.patch b/build/patches/Dictionary-suggestions-for-the-Omnibox.patch index 6a72e8cba..9c93eea9b 100644 --- a/build/patches/Dictionary-suggestions-for-the-Omnibox.patch +++ b/build/patches/Dictionary-suggestions-for-the-Omnibox.patch @@ -27,7 +27,7 @@ diff --git a/chrome/android/java/res/layout/url_bar.xml b/chrome/android/java/re diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarMediator.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarMediator.java --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarMediator.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarMediator.java -@@ -294,8 +294,17 @@ class LocationBarMediator +@@ -288,8 +288,17 @@ class LocationBarMediator if (mNativeInitialized) RecordUserAction.record("FocusLocation"); boolean shouldRetainOmniboxOnFocus = OmniboxFeatures.shouldRetainOmniboxOnFocus(); if (!mUrlFocusedWithPastedText && !shouldRetainOmniboxOnFocus) { diff --git a/build/patches/Disable-Accessibility-service-by-default.patch b/build/patches/Disable-Accessibility-service-by-default.patch index 85c4c6017..0be6dca07 100644 --- a/build/patches/Disable-Accessibility-service-by-default.patch +++ b/build/patches/Disable-Accessibility-service-by-default.patch @@ -42,7 +42,7 @@ diff --git a/components/browser_ui/accessibility/android/java/res/xml/accessibil diff --git a/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java b/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java --- a/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java +++ b/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java -@@ -1079,6 +1079,11 @@ public class WebContentsAccessibilityImpl extends AccessibilityNodeProviderCompa +@@ -1080,6 +1080,11 @@ public class WebContentsAccessibilityImpl extends AccessibilityNodeProviderCompa structure.setChildCount(0); return; } diff --git a/build/patches/Disable-Android-AppRestrictions.patch b/build/patches/Disable-Android-AppRestrictions.patch index 4c4ea8299..80e37575d 100644 --- a/build/patches/Disable-Android-AppRestrictions.patch +++ b/build/patches/Disable-Android-AppRestrictions.patch @@ -86,7 +86,7 @@ new file mode 100644 + +package org.chromium.chrome.browser.flags.cromite; + -+import org.chromium.base.cached_flags.CachedFlag; ++import org.chromium.components.cached_flags.CachedFlag; +import org.chromium.chrome.browser.flags.ChromeFeatureMap; +import org.chromium.components.policy.AppRestrictionsProvider; + diff --git a/build/patches/Disable-CSS-blink-feature-support.patch b/build/patches/Disable-CSS-blink-feature-support.patch index 3b1215fc8..8852f04d3 100644 --- a/build/patches/Disable-CSS-blink-feature-support.patch +++ b/build/patches/Disable-CSS-blink-feature-support.patch @@ -28,7 +28,7 @@ diff --git a/third_party/blink/renderer/core/css/parser/css_supports_parser.cc b diff --git a/third_party/blink/renderer/core/speculation_rules/document_rule_predicate.cc b/third_party/blink/renderer/core/speculation_rules/document_rule_predicate.cc --- a/third_party/blink/renderer/core/speculation_rules/document_rule_predicate.cc +++ b/third_party/blink/renderer/core/speculation_rules/document_rule_predicate.cc -@@ -587,7 +587,7 @@ DocumentRulePredicate* DocumentRulePredicate::Parse( +@@ -585,7 +585,7 @@ DocumentRulePredicate* DocumentRulePredicate::Parse( HeapVector> selectors; HeapVector arena; CSSPropertyValueSet* empty_properties = diff --git a/build/patches/Disable-Component-Updates.patch b/build/patches/Disable-Component-Updates.patch index d80857b85..6f645b242 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 -@@ -99,6 +99,7 @@ +@@ -106,6 +106,7 @@ namespace component_updater { void RegisterComponentsForUpdate() { @@ -34,7 +34,7 @@ diff --git a/components/component_updater/component_installer.cc b/components/co diff --git a/components/component_updater/component_updater_service.cc b/components/component_updater/component_updater_service.cc --- a/components/component_updater/component_updater_service.cc +++ b/components/component_updater/component_updater_service.cc -@@ -546,14 +546,8 @@ std::unique_ptr ComponentUpdateServiceFactory( +@@ -541,14 +541,8 @@ std::unique_ptr ComponentUpdateServiceFactory( // Register prefs required by the component update service. void RegisterComponentUpdateServicePrefs(PrefRegistrySimple* registry) { diff --git a/build/patches/Disable-Compose-feature.patch b/build/patches/Disable-Compose-feature.patch index f9e5e5fb8..39e92419a 100644 --- a/build/patches/Disable-Compose-feature.patch +++ b/build/patches/Disable-Compose-feature.patch @@ -4,15 +4,62 @@ Subject: Disable Compose feature License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- + chrome/browser/BUILD.gn | 9 +++++++-- + chrome/browser/ui/webui/settings/settings_ui.cc | 2 +- components/compose/core/browser/compose_features.cc | 2 ++ components/compose/features.gni | 2 +- - 2 files changed, 3 insertions(+), 1 deletion(-) + 4 files changed, 11 insertions(+), 4 deletions(-) +diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn +--- a/chrome/browser/BUILD.gn ++++ b/chrome/browser/BUILD.gn +@@ -8389,6 +8389,12 @@ static_library("browser") { + deps += [ "//components/segmentation_platform/internal:optimization_guide_segmentation_handler" ] + } + ++ if (!is_android) { ++ deps += [ ++ ":compose_optimization_guide_proto", ++ ] ++ } ++ + if (enable_compose) { + sources += [ + "compose/chrome_compose_client.cc", +@@ -8404,7 +8410,6 @@ static_library("browser") { + ] + + deps += [ +- ":compose_optimization_guide_proto", + "//chrome/common/compose", + "//chrome/common/compose:mojo_bindings", + "//components/autofill/content/browser:browser", +@@ -8845,7 +8850,7 @@ source_set("font_pref") { + deps = [ "//chrome/common" ] + } + +-if (enable_compose) { ++if (!is_android) { + proto_library("compose_optimization_guide_proto") { + sources = [ "compose/proto/compose_optimization_guide.proto" ] + cc_generator_options = "lite=true:" +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 +@@ -586,7 +586,7 @@ SettingsUI::SettingsUI(content::WebUI* web_ui) + optimization_guide::features::kAiSettingsPageRefresh); + + if (ai_settings_refresh_enabled) { +- const bool compose_enabled = ComposeEnabling::IsEnabledForProfile(profile); ++ const bool compose_enabled = false; + const bool tab_organization_enabled = + TabOrganizationUtils::GetInstance()->IsEnabled(profile); + const bool wallpaper_search_enabled = diff --git a/components/compose/core/browser/compose_features.cc b/components/compose/core/browser/compose_features.cc --- a/components/compose/core/browser/compose_features.cc +++ b/components/compose/core/browser/compose_features.cc -@@ -108,4 +108,6 @@ BASE_FEATURE(kComposeAllowOnDeviceExecution, - "ComposeAllowOnDeviceExecution", +@@ -108,4 +108,6 @@ BASE_FEATURE(kComposeUpfrontInputModes, + "ComposeUpfrontInputModes", base::FEATURE_DISABLED_BY_DEFAULT); +SET_CROMITE_FEATURE_DISABLED(kEnableCompose); diff --git a/build/patches/Disable-Compression-Dictionary-Transport.patch b/build/patches/Disable-Compression-Dictionary-Transport.patch index 1cbad25be..d1f404c73 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 -@@ -814,12 +814,14 @@ +@@ -807,12 +807,14 @@ } }, { diff --git a/build/patches/Disable-FedCm.patch b/build/patches/Disable-FedCm.patch index ca73ef942..ead87e990 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 -@@ -1778,7 +1778,7 @@ +@@ -1782,7 +1782,7 @@ { name: "FedCm", public: true, diff --git a/build/patches/Disable-GSA-by-default.patch b/build/patches/Disable-GSA-by-default.patch index cb1b867c7..ba3c6ccd7 100644 --- a/build/patches/Disable-GSA-by-default.patch +++ b/build/patches/Disable-GSA-by-default.patch @@ -53,7 +53,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/share/LensUtils import org.chromium.components.externalauth.ExternalAuthUtils; /** This class provides utilities for intenting into Google Lens. */ -@@ -54,12 +53,7 @@ public class LensUtils { +@@ -49,12 +48,7 @@ public class LensUtils { if (context == null) { return ""; } @@ -66,7 +66,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/share/LensUtils } } -@@ -98,15 +92,11 @@ public class LensUtils { +@@ -93,15 +87,11 @@ public class LensUtils { * @return Whether the package is valid. */ public static boolean isValidAgsaPackage(final ExternalAuthUtils externalAuthUtils) { diff --git a/build/patches/Disable-GetInstalledRelatedApps-API.patch b/build/patches/Disable-GetInstalledRelatedApps-API.patch index c30c6f259..def106976 100644 --- a/build/patches/Disable-GetInstalledRelatedApps-API.patch +++ b/build/patches/Disable-GetInstalledRelatedApps-API.patch @@ -23,7 +23,7 @@ diff --git a/components/installedapp/android/java/src/org/chromium/components/in + assert false; GURL url = mRenderFrameHost.getLastCommittedURL(); final GURL frameUrl = url == null ? GURL.emptyGURL() : url; - int delayMillis = 0; + int numTasks = Math.min(relatedApps.length, MAX_ALLOWED_RELATED_APPS); diff --git a/content/browser/installedapp/installed_app_provider_impl.cc b/content/browser/installedapp/installed_app_provider_impl.cc --- a/content/browser/installedapp/installed_app_provider_impl.cc +++ b/content/browser/installedapp/installed_app_provider_impl.cc @@ -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 -@@ -2423,9 +2423,9 @@ +@@ -2455,9 +2455,9 @@ status: {"Android": "test", "default": "stable"}, }, { diff --git a/build/patches/Disable-PrivacyGuide.patch b/build/patches/Disable-PrivacyGuide.patch index 80f7747f2..1f50879d3 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 -@@ -357,8 +357,7 @@ SettingsUI::SettingsUI(content::WebUI* web_ui) +@@ -363,8 +363,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 ecf88c83e..c61b7d6f7 100644 --- a/build/patches/Disable-Real-Box.patch +++ b/build/patches/Disable-Real-Box.patch @@ -13,7 +13,7 @@ Real-box is search box in ntp 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 -@@ -2254,7 +2254,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -2327,7 +2327,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, registry->RegisterBooleanPref( prefs::kLensRegionSearchEnabled, true, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); @@ -43,7 +43,7 @@ diff --git a/chrome/browser/resources/new_tab_page/app.html b/chrome/browser/res diff --git a/chrome/browser/ui/webui/searchbox/searchbox_handler.cc b/chrome/browser/ui/webui/searchbox/searchbox_handler.cc --- a/chrome/browser/ui/webui/searchbox/searchbox_handler.cc +++ b/chrome/browser/ui/webui/searchbox/searchbox_handler.cc -@@ -451,6 +451,7 @@ void SearchboxHandler::SetupWebUIDataSource(content::WebUIDataSource* source, +@@ -459,6 +459,7 @@ void SearchboxHandler::SetupWebUIDataSource(content::WebUIDataSource* source, Profile* profile, bool enable_voice_search, bool enable_lens_search) { diff --git a/build/patches/Disable-TLS-resumption.patch b/build/patches/Disable-TLS-resumption.patch index 1ab46b23e..40fc24e39 100644 --- a/build/patches/Disable-TLS-resumption.patch +++ b/build/patches/Disable-TLS-resumption.patch @@ -90,7 +90,7 @@ diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc diff --git a/net/quic/quic_session_pool.cc b/net/quic/quic_session_pool.cc --- a/net/quic/quic_session_pool.cc +++ b/net/quic/quic_session_pool.cc -@@ -80,6 +80,7 @@ +@@ -82,6 +82,7 @@ #include "net/third_party/quiche/src/quiche/quic/platform/api/quic_flags.h" #include "net/traffic_annotation/network_traffic_annotation.h" #include "third_party/boringssl/src/include/openssl/aead.h" @@ -98,7 +98,7 @@ diff --git a/net/quic/quic_session_pool.cc b/net/quic/quic_session_pool.cc #include "url/gurl.h" #include "url/scheme_host_port.h" #include "url/url_constants.h" -@@ -246,6 +247,38 @@ void LogUsingExistingSession(const NetLogWithSource& request_net_log, +@@ -248,6 +249,38 @@ void LogUsingExistingSession(const NetLogWithSource& request_net_log, } // namespace @@ -137,7 +137,7 @@ diff --git a/net/quic/quic_session_pool.cc b/net/quic/quic_session_pool.cc QuicSessionRequest::QuicSessionRequest(QuicSessionPool* pool) : pool_(pool) {} QuicSessionRequest::~QuicSessionRequest() { -@@ -2075,7 +2108,7 @@ QuicSessionPool::CreateCryptoConfigHandle( +@@ -2094,7 +2127,7 @@ QuicSessionPool::CreateCryptoConfigHandle( cert_verifier_, transport_security_state_, sct_auditing_delegate_, HostsFromOrigins(params_.origins_to_force_quic_on), actual_network_anonymization_key), @@ -228,7 +228,7 @@ diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket UMA_HISTOGRAM_ENUMERATION("Net.SSLHandshakeDetails", details); // Measure TLS connections that implement the renegotiation_info and EMS -@@ -1592,6 +1649,8 @@ bool SSLClientSocketImpl::IsRenegotiationAllowed() const { +@@ -1584,6 +1641,8 @@ bool SSLClientSocketImpl::IsRenegotiationAllowed() const { } bool SSLClientSocketImpl::IsCachingEnabled() const { diff --git a/build/patches/Disable-WebGPU.patch b/build/patches/Disable-WebGPU.patch index 54fa48dd4..8877ee6ce 100644 --- a/build/patches/Disable-WebGPU.patch +++ b/build/patches/Disable-WebGPU.patch @@ -12,7 +12,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html 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 -@@ -574,6 +574,8 @@ void SetCustomizedRuntimeFeaturesFromCombinedArgs( +@@ -562,6 +562,8 @@ void SetCustomizedRuntimeFeaturesFromCombinedArgs( WebRuntimeFeatures::EnableV8IdleTasks(true); } @@ -24,7 +24,7 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features. diff --git a/gpu/config/gpu_finch_features.cc b/gpu/config/gpu_finch_features.cc --- a/gpu/config/gpu_finch_features.cc +++ b/gpu/config/gpu_finch_features.cc -@@ -252,7 +252,7 @@ BASE_FEATURE(kEnableDrDc, +@@ -234,7 +234,7 @@ BASE_FEATURE(kEnableDrDc, // enabled by default on supported platforms. #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || \ BUILDFLAG(IS_ANDROID) @@ -36,7 +36,7 @@ diff --git a/gpu/config/gpu_finch_features.cc b/gpu/config/gpu_finch_features.cc diff --git a/third_party/blink/renderer/modules/webgpu/gpu.cc b/third_party/blink/renderer/modules/webgpu/gpu.cc --- a/third_party/blink/renderer/modules/webgpu/gpu.cc +++ b/third_party/blink/renderer/modules/webgpu/gpu.cc -@@ -388,6 +388,7 @@ ScriptPromise> GPU::requestAdapter( +@@ -389,6 +389,7 @@ ScriptPromise> GPU::requestAdapter( "WebGPU is experimental on this platform. See " "https://github.com/gpuweb/gpuweb/wiki/" "Implementation-Status#implementation-status")); diff --git a/build/patches/Disable-all-predictors-code.patch b/build/patches/Disable-all-predictors-code.patch index b29cbac20..2dac667ca 100644 --- a/build/patches/Disable-all-predictors-code.patch +++ b/build/patches/Disable-all-predictors-code.patch @@ -34,13 +34,13 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../Disable-all-predictors-code.inc | 3 +++ .../Disable-all-predictors-code.inc | 1 + .../Disable-all-predictors-code.inc | 1 + - .../features_cc/Disable-all-predictors-code.inc | 4 ++++ + .../features_cc/Disable-all-predictors-code.inc | 3 +++ .../features_cc/Disable-all-predictors-code.inc | 1 + .../features_cc/Disable-all-predictors-code.inc | 2 ++ services/webnn/features.gni | 2 +- .../document_speculation_rules.cc | 1 + .../platform/runtime_enabled_features.json5 | 2 +- - 35 files changed, 97 insertions(+), 35 deletions(-) + 35 files changed, 96 insertions(+), 35 deletions(-) create mode 100644 cromite_flags/chrome/browser/browser_features_cc/Disable-all-predictors-code.inc create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Disable-all-predictors-code.inc create mode 100644 cromite_flags/chrome/common/chrome_features_cc/Disable-all-predictors-code.inc @@ -51,7 +51,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -774,8 +774,6 @@ static_library("browser") { +@@ -759,8 +759,6 @@ static_library("browser") { "navigation_predictor/navigation_predictor_keyed_service_factory.h", "navigation_predictor/navigation_predictor_metrics_document_data.cc", "navigation_predictor/navigation_predictor_metrics_document_data.h", @@ -102,14 +102,14 @@ diff --git a/chrome/browser/navigation_predictor/preloading_model_keyed_service_ diff --git a/chrome/browser/optimization_guide/chrome_hints_manager.cc b/chrome/browser/optimization_guide/chrome_hints_manager.cc --- a/chrome/browser/optimization_guide/chrome_hints_manager.cc +++ b/chrome/browser/optimization_guide/chrome_hints_manager.cc -@@ -27,6 +27,7 @@ bool IsAllowedToFetchForNavigationPrediction( - const std::optional - prediction) { - DCHECK(prediction); +@@ -25,6 +25,7 @@ namespace { + // Returns true if we can make a request for hints for |prediction|. + bool IsAllowedToFetchForNavigationPrediction( + const NavigationPredictorKeyedService::Prediction& prediction) { + if ((true)) return false; - - if (prediction->prediction_source() != + if (prediction.prediction_source() != NavigationPredictorKeyedService::PredictionSource:: + kAnchorElementsParsedFromWebPage) { diff --git a/chrome/browser/optimization_guide/model_validator_keyed_service.cc b/chrome/browser/optimization_guide/model_validator_keyed_service.cc --- a/chrome/browser/optimization_guide/model_validator_keyed_service.cc +++ b/chrome/browser/optimization_guide/model_validator_keyed_service.cc @@ -136,15 +136,15 @@ diff --git a/chrome/browser/optimization_guide/model_validator_keyed_service.cc auto* opt_guide_service = OptimizationGuideKeyedServiceFactory::GetForProfile(profile_); if (!opt_guide_service) { -@@ -150,6 +151,7 @@ void ModelValidatorKeyedService::StartModelExecutionValidation() { - ModelBasedCapabilityKey::kTest, request, +@@ -151,6 +152,7 @@ void ModelValidatorKeyedService::StartModelExecutionValidation() { + /*execution_timeout=*/std::nullopt, base::BindOnce(&ModelValidatorKeyedService::OnModelExecuteResponse, weak_ptr_factory_.GetWeakPtr())); +#endif } void ModelValidatorKeyedService::StartOnDeviceModelExecutionValidation( -@@ -167,6 +169,7 @@ void ModelValidatorKeyedService::StartOnDeviceModelExecutionValidation( +@@ -168,6 +170,7 @@ void ModelValidatorKeyedService::StartOnDeviceModelExecutionValidation( void ModelValidatorKeyedService::PerformOnDeviceModelExecutionValidation( std::unique_ptr input) { @@ -152,10 +152,10 @@ diff --git a/chrome/browser/optimization_guide/model_validator_keyed_service.cc DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); auto* opt_guide_service = OptimizationGuideKeyedServiceFactory::GetForProfile(profile_); -@@ -203,6 +206,7 @@ void ModelValidatorKeyedService::ExecuteModel( - base::RepeatingCallback(base::BindRepeating( - &ModelValidatorKeyedService::OnDeviceModelExecuteResponse, - weak_ptr_factory_.GetWeakPtr()))); +@@ -207,6 +210,7 @@ void ModelValidatorKeyedService::ExecuteModel( + *metadata, base::BindRepeating( + &ModelValidatorKeyedService::OnDeviceModelExecuteResponse, + weak_ptr_factory_.GetWeakPtr(), std::move(request))); +#endif } @@ -163,7 +163,7 @@ diff --git a/chrome/browser/optimization_guide/model_validator_keyed_service.cc diff --git a/chrome/browser/optimization_guide/optimization_guide_keyed_service.cc b/chrome/browser/optimization_guide/optimization_guide_keyed_service.cc --- a/chrome/browser/optimization_guide/optimization_guide_keyed_service.cc +++ b/chrome/browser/optimization_guide/optimization_guide_keyed_service.cc -@@ -558,7 +558,6 @@ void OptimizationGuideKeyedService::RemoveObserverForOptimizationTargetModel( +@@ -564,7 +564,6 @@ void OptimizationGuideKeyedService::RemoveObserverForOptimizationTargetModel( void OptimizationGuideKeyedService::RegisterOptimizationTypes( const std::vector& optimization_types) { @@ -224,7 +224,7 @@ diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc diff --git a/chrome/browser/ui/webui/omnibox/omnibox_page_handler.cc b/chrome/browser/ui/webui/omnibox/omnibox_page_handler.cc --- a/chrome/browser/ui/webui/omnibox/omnibox_page_handler.cc +++ b/chrome/browser/ui/webui/omnibox/omnibox_page_handler.cc -@@ -40,7 +40,9 @@ +@@ -41,7 +41,9 @@ #include "components/omnibox/browser/autocomplete_provider.h" #include "components/omnibox/browser/autocomplete_result.h" #include "components/omnibox/browser/omnibox_feature_configs.h" @@ -328,7 +328,7 @@ diff --git a/chrome/renderer/accessibility/read_aloud_app_model.h b/chrome/rende diff --git a/chrome/renderer/accessibility/read_anything_app_controller.cc b/chrome/renderer/accessibility/read_anything_app_controller.cc --- a/chrome/renderer/accessibility/read_anything_app_controller.cc +++ b/chrome/renderer/accessibility/read_anything_app_controller.cc -@@ -20,7 +20,9 @@ +@@ -21,7 +21,9 @@ #include "base/strings/utf_string_conversions.h" #include "chrome/common/accessibility/read_anything_constants.h" #include "chrome/renderer/accessibility/ax_tree_distiller.h" @@ -338,7 +338,7 @@ diff --git a/chrome/renderer/accessibility/read_anything_app_controller.cc b/chr #include "chrome/renderer/accessibility/read_aloud_traversal_utils.h" #include "chrome/renderer/accessibility/read_anything_node_utils.h" #include "components/language/core/common/locale_util.h" -@@ -362,11 +364,13 @@ SkBitmap CorrectColorOfBitMap(SkBitmap& originalBitmap) { +@@ -364,11 +366,13 @@ SkBitmap CorrectColorOfBitMap(SkBitmap& originalBitmap) { return converted; } @@ -384,7 +384,7 @@ diff --git a/chrome/renderer/accessibility/read_anything_app_controller.cc b/chr } void ReadAnythingAppController::MovePositionToNextGranularity() { -@@ -1874,11 +1882,15 @@ bool ReadAnythingAppController::IsDocsLoadMoreButtonVisible() const { +@@ -1874,14 +1882,18 @@ bool ReadAnythingAppController::IsDocsLoadMoreButtonVisible() const { void ReadAnythingAppController::UpdateDependencyParserModel( base::File model_file) { @@ -400,10 +400,13 @@ diff --git a/chrome/renderer/accessibility/read_anything_app_controller.cc b/chr return GetDependencyParserModel(); } +#endif + + void ReadAnythingAppController::OnTreeAdded(ui::AXTree* tree) { + auto observation = diff --git a/chrome/renderer/accessibility/read_anything_app_controller.h b/chrome/renderer/accessibility/read_anything_app_controller.h --- a/chrome/renderer/accessibility/read_anything_app_controller.h +++ b/chrome/renderer/accessibility/read_anything_app_controller.h -@@ -44,7 +44,9 @@ class MojoUkmRecorder; +@@ -47,7 +47,9 @@ class MojoUkmRecorder; } // namespace ukm class AXTreeDistiller; @@ -413,7 +416,7 @@ diff --git a/chrome/renderer/accessibility/read_anything_app_controller.h b/chro class ReadAnythingAppControllerTest; class ReadAnythingAppControllerScreen2xDataCollectionModeTest; -@@ -366,7 +368,9 @@ class ReadAnythingAppController +@@ -378,7 +380,9 @@ class ReadAnythingAppController // available. void UpdateDependencyParserModel(base::File model_file); @@ -561,7 +564,7 @@ diff --git a/components/optimization_guide/core/hints_manager.cc b/components/op diff --git a/components/optimization_guide/core/optimization_guide_features.cc b/components/optimization_guide/core/optimization_guide_features.cc --- a/components/optimization_guide/core/optimization_guide_features.cc +++ b/components/optimization_guide/core/optimization_guide_features.cc -@@ -39,11 +39,7 @@ namespace features { +@@ -38,11 +38,7 @@ namespace features { namespace { constexpr auto enabled_by_default_mobile_only = @@ -573,7 +576,7 @@ diff --git a/components/optimization_guide/core/optimization_guide_features.cc b } // namespace -@@ -412,8 +408,7 @@ size_t MaxURLKeyedHintCacheSize() { +@@ -415,8 +411,7 @@ size_t MaxURLKeyedHintCacheSize() { } bool ShouldPersistHintsToDisk() { @@ -583,7 +586,7 @@ diff --git a/components/optimization_guide/core/optimization_guide_features.cc b } RequestContextSet GetAllowedContextsForPersonalizedMetadata() { -@@ -869,5 +864,13 @@ int GetOnDeviceModelValidationAttemptCount() { +@@ -874,5 +869,13 @@ int GetOnDeviceModelValidationAttemptCount() { return kParam.Get(); } @@ -695,8 +698,7 @@ diff --git a/cromite_flags/components/permissions/features_cc/Disable-all-predic new file mode 100644 --- /dev/null +++ b/cromite_flags/components/permissions/features_cc/Disable-all-predictors-code.inc -@@ -0,0 +1,4 @@ -+SET_CROMITE_FEATURE_DISABLED(kPermissionPredictionServiceUseUrlOverride); +@@ -0,0 +1,3 @@ +SET_CROMITE_FEATURE_DISABLED(kPermissionOnDeviceNotificationPredictions); +SET_CROMITE_FEATURE_DISABLED(kPermissionOnDeviceGeolocationPredictions); +SET_CROMITE_FEATURE_DISABLED(kPermissionPredictionsV2); @@ -728,7 +730,7 @@ diff --git a/services/webnn/features.gni b/services/webnn/features.gni diff --git a/third_party/blink/renderer/core/speculation_rules/document_speculation_rules.cc b/third_party/blink/renderer/core/speculation_rules/document_speculation_rules.cc --- a/third_party/blink/renderer/core/speculation_rules/document_speculation_rules.cc +++ b/third_party/blink/renderer/core/speculation_rules/document_speculation_rules.cc -@@ -645,6 +645,7 @@ void DocumentSpeculationRules::UpdateSpeculationCandidates() { +@@ -643,6 +643,7 @@ void DocumentSpeculationRules::UpdateSpeculationCandidates() { return; } @@ -739,7 +741,7 @@ diff --git a/third_party/blink/renderer/core/speculation_rules/document_speculat 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 -@@ -3331,7 +3331,7 @@ +@@ -3346,7 +3346,7 @@ // // It also has some feature params defined throughout the codebase. name: "Prerender2", diff --git a/build/patches/Disable-all-promo-dialogs.patch b/build/patches/Disable-all-promo-dialogs.patch index 7c3ac2d94..80e1e5d63 100644 --- a/build/patches/Disable-all-promo-dialogs.patch +++ b/build/patches/Disable-all-promo-dialogs.patch @@ -17,7 +17,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html 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 -@@ -1313,6 +1313,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { +@@ -1361,6 +1361,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { } private boolean maybeShowPromo(Profile profile) { @@ -28,7 +28,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/Tab diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_ui_prefs.cc --- a/chrome/browser/ui/browser_ui_prefs.cc +++ b/chrome/browser/ui/browser_ui_prefs.cc -@@ -150,7 +150,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { +@@ -148,7 +148,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref(prefs::kEnterpriseHardwarePlatformAPIEnabled, false); @@ -40,7 +40,7 @@ diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_u diff --git a/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc b/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc --- a/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc +++ b/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc -@@ -77,6 +77,7 @@ ui::ElementContext BrowserFeaturePromoController::GetAnchorContext() const { +@@ -82,6 +82,7 @@ ui::ElementContext BrowserFeaturePromoController::GetAnchorContext() const { bool BrowserFeaturePromoController::CanShowPromoForElement( ui::TrackedElement* anchor_element) const { @@ -62,7 +62,7 @@ diff --git a/chrome/browser/user_education/java/src/org/chromium/chrome/browser/ diff --git a/components/user_education/common/feature_promo_controller.cc b/components/user_education/common/feature_promo_controller.cc --- a/components/user_education/common/feature_promo_controller.cc +++ b/components/user_education/common/feature_promo_controller.cc -@@ -669,6 +669,7 @@ FeaturePromoResult FeaturePromoControllerCommon::CanShowPromoCommon( +@@ -640,6 +640,7 @@ FeaturePromoResult FeaturePromoControllerCommon::CanShowPromoCommon( const FeaturePromoSpecification** display_spec_out, std::unique_ptr* lifecycle_out, ui::TrackedElement** anchor_element_out) const { diff --git a/build/patches/Disable-conversion-measurement-api.patch b/build/patches/Disable-conversion-measurement-api.patch index d16b28eeb..04c496da9 100644 --- a/build/patches/Disable-conversion-measurement-api.patch +++ b/build/patches/Disable-conversion-measurement-api.patch @@ -36,15 +36,15 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../network/public/cpp/attribution_utils.cc | 2 + third_party/blink/renderer/core/page/page.cc | 2 +- .../platform/runtime_enabled_features.json5 | 10 +- - ui/events/android/motion_event_android.cc | 6 +- - 26 files changed, 77 insertions(+), 381 deletions(-) + ui/events/android/motion_event_android.cc | 8 +- + 26 files changed, 78 insertions(+), 382 deletions(-) create mode 100644 cromite_flags/services/network/public/cpp/features_cc/Disable-conversion-measurement-api.inc create mode 100644 cromite_flags/third_party/blink/common/features_cc/Disable-conversion-measurement-api.inc diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webview/browser/aw_content_browser_client.cc --- a/android_webview/browser/aw_content_browser_client.cc +++ b/android_webview/browser/aw_content_browser_client.cc -@@ -1296,6 +1296,7 @@ network::mojom::AttributionSupport +@@ -1337,6 +1337,7 @@ network::mojom::AttributionSupport AwContentBrowserClient::GetAttributionSupport( AttributionReportingOsApiState state, bool client_os_disabled) { @@ -52,7 +52,7 @@ diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webv // WebView only supports OS-level attribution and not web-attribution. switch (state) { case AttributionReportingOsApiState::kDisabled: -@@ -1314,6 +1315,8 @@ bool AwContentBrowserClient::IsAttributionReportingOperationAllowed( +@@ -1355,6 +1356,8 @@ bool AwContentBrowserClient::IsAttributionReportingOperationAllowed( const url::Origin* destination_origin, const url::Origin* reporting_origin, bool* can_bypass) { @@ -93,7 +93,7 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro +@@ -54,11 +54,6 @@ for the previous order (main_preferences_legacy). --> android:key="privacy" android:order="8" android:title="@string/prefs_privacy_security"/> @@ -85,7 +85,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Fragme import org.chromium.chrome.browser.search_engines.settings.SearchEngineSettings; import org.chromium.chrome.browser.signin.SigninAndHistorySyncActivityLauncherImpl; import org.chromium.chrome.browser.signin.SyncConsentActivityLauncherImpl; -@@ -130,21 +123,6 @@ public class FragmentDependencyProvider extends FragmentManager.FragmentLifecycl +@@ -131,21 +124,6 @@ public class FragmentDependencyProvider extends FragmentManager.FragmentLifecycl baseSiteSettingsFragment.setCustomTabIntentHelper( LaunchIntentDispatcher::createCustomTabActivityIntent); } @@ -107,7 +107,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Fragme if (fragment instanceof PasswordCheckFragmentView) { PasswordCheckComponentUiFactory.create( (PasswordCheckFragmentView) fragment, -@@ -259,18 +237,6 @@ public class FragmentDependencyProvider extends FragmentManager.FragmentLifecycl +@@ -260,18 +238,6 @@ public class FragmentDependencyProvider extends FragmentManager.FragmentLifecycl ((AutofillLocalIbanEditor) fragment) .setModalDialogManagerSupplier(mModalDialogManagerSupplier); } @@ -126,7 +126,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Fragme if (fragment instanceof INeedSnackbarManager) { ((INeedSnackbarManager)fragment).setSnackbarManagerSupplier(mSnackbarManagerSupplier); } -@@ -285,8 +251,5 @@ public class FragmentDependencyProvider extends FragmentManager.FragmentLifecycl +@@ -286,8 +252,5 @@ public class FragmentDependencyProvider extends FragmentManager.FragmentLifecycl if (fragment instanceof ManageSyncSettings) { ((ManageSyncSettings) fragment).setSnackbarManagerSupplier(mSnackbarManagerSupplier); } @@ -135,10 +135,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Fragme - } } } -diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsLauncherImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsLauncherImpl.java ---- a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsLauncherImpl.java -+++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsLauncherImpl.java -@@ -20,8 +20,6 @@ import org.chromium.chrome.browser.browsing_data.ClearBrowsingDataFragmentAdvanc +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsNavigationImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsNavigationImpl.java +--- a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsNavigationImpl.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsNavigationImpl.java +@@ -21,8 +21,6 @@ import org.chromium.chrome.browser.browsing_data.ClearBrowsingDataFragmentAdvanc import org.chromium.chrome.browser.browsing_data.ClearBrowsingDataTabsFragment; import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.chrome.browser.password_manager.settings.PasswordSettings; @@ -146,8 +146,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin -import org.chromium.chrome.browser.safety_hub.SafetyHubFragment; import org.chromium.chrome.browser.sync.settings.GoogleServicesSettings; import org.chromium.chrome.browser.sync.settings.ManageSyncSettings; - import org.chromium.components.browser_ui.settings.SettingsLauncher; -@@ -54,10 +52,7 @@ public class SettingsLauncherImpl implements SettingsLauncher { + import org.chromium.components.browser_ui.settings.SettingsNavigation; +@@ -55,10 +53,7 @@ public class SettingsNavigationImpl implements SettingsNavigation { /* isFetcherSuppliedFromOutside= */ false); break; case SettingsFragment.SAFETY_CHECK: @@ -159,7 +159,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin case SettingsFragment.MAIN: case SettingsFragment.PAYMENT_METHODS: case SettingsFragment.SITE: -@@ -119,11 +114,7 @@ public class SettingsLauncherImpl implements SettingsLauncher { +@@ -118,11 +113,7 @@ public class SettingsNavigationImpl implements SettingsNavigation { case SettingsFragment.PAYMENT_METHODS: return AutofillPaymentMethodsFragment.class; case SettingsFragment.SAFETY_CHECK: @@ -175,7 +175,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -3296,7 +3296,6 @@ static_library("browser") { +@@ -3301,7 +3301,6 @@ static_library("browser") { "//chrome/browser/reading_list/android", "//chrome/browser/recent_tabs:jni_headers", "//chrome/browser/safe_browsing/android:safe_browsing_enums", diff --git a/build/patches/Disable-smart-selection-by-default.patch b/build/patches/Disable-smart-selection-by-default.patch index a45d105e5..67f7bcac1 100644 --- a/build/patches/Disable-smart-selection-by-default.patch +++ b/build/patches/Disable-smart-selection-by-default.patch @@ -44,7 +44,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearc 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 -@@ -206,6 +206,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { +@@ -211,6 +211,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { &kCCTExtendTrustedCdnPublisher, &kCCTFeatureUsage, &kCCTEphemeralMode, @@ -55,7 +55,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 -@@ -461,6 +461,7 @@ public abstract class ChromeFeatureList { +@@ -488,6 +488,7 @@ public abstract class ChromeFeatureList { public static final String SHARE_CUSTOM_ACTIONS_IN_CCT = "ShareCustomActionsInCCT"; public static final String SEARCH_RESUMPTION_MODULE_ANDROID = "SearchResumptionModuleAndroid"; public static final String SEED_ACCOUNTS_REVAMP = "SeedAccountsRevamp"; @@ -66,7 +66,7 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f diff --git a/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java b/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java --- a/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java +++ b/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java -@@ -1102,7 +1102,6 @@ public class SelectionPopupControllerImpl extends ActionModeCallbackHelper +@@ -1087,7 +1087,6 @@ public class SelectionPopupControllerImpl extends ActionModeCallbackHelper public boolean canWebSearch() { return hasSelection() && !isFocusedNodeEditable() diff --git a/build/patches/Disable-some-signed-exchange-features.patch b/build/patches/Disable-some-signed-exchange-features.patch index 86058a65e..c1143f514 100644 --- a/build/patches/Disable-some-signed-exchange-features.patch +++ b/build/patches/Disable-some-signed-exchange-features.patch @@ -11,7 +11,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc -@@ -1624,7 +1624,7 @@ void ChromeContentBrowserClient::RegisterProfilePrefs( +@@ -1593,7 +1593,7 @@ void ChromeContentBrowserClient::RegisterProfilePrefs( site_isolation::prefs::kWebTriggeredIsolatedOrigins); registry->RegisterDictionaryPref( prefs::kDevToolsBackgroundServicesExpirationDict); diff --git a/build/patches/Disable-speechSynthesis-getVoices-API.patch b/build/patches/Disable-speechSynthesis-getVoices-API.patch index 744b65af5..2318a7c9a 100644 --- a/build/patches/Disable-speechSynthesis-getVoices-API.patch +++ b/build/patches/Disable-speechSynthesis-getVoices-API.patch @@ -31,7 +31,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc --- a/chrome/renderer/chrome_content_renderer_client.cc +++ b/chrome/renderer/chrome_content_renderer_client.cc -@@ -1674,7 +1674,7 @@ ChromeContentRendererClient::CreateWorkerContentSettingsClient( +@@ -1693,7 +1693,7 @@ ChromeContentRendererClient::CreateWorkerContentSettingsClient( std::unique_ptr ChromeContentRendererClient::CreateSpeechRecognitionClient( content::RenderFrame* render_frame) { @@ -139,15 +139,15 @@ new file mode 100644 diff --git a/third_party/blink/public/platform/web_content_settings_client.h b/third_party/blink/public/platform/web_content_settings_client.h --- a/third_party/blink/public/platform/web_content_settings_client.h +++ b/third_party/blink/public/platform/web_content_settings_client.h -@@ -115,6 +115,8 @@ class WebContentSettingsClient { +@@ -106,6 +106,8 @@ class WebContentSettingsClient { // frame. virtual bool ShouldAutoupgradeMixedContent() { return true; } + virtual bool IsTimezoneChanged() { return false; } + - // Controls whether the ViewTransition callback needs to be larger than - // default. - virtual bool IncreaseViewTransitionCallbackTimeout() const { return false; } + virtual ~WebContentSettingsClient() = default; + }; + diff --git a/third_party/blink/renderer/modules/speech/speech_synthesis.cc b/third_party/blink/renderer/modules/speech/speech_synthesis.cc --- a/third_party/blink/renderer/modules/speech/speech_synthesis.cc +++ b/third_party/blink/renderer/modules/speech/speech_synthesis.cc diff --git a/build/patches/Disable-support-for-pointer-device-id.patch b/build/patches/Disable-support-for-pointer-device-id.patch index ae30c6bed..effc4f71d 100644 --- a/build/patches/Disable-support-for-pointer-device-id.patch +++ b/build/patches/Disable-support-for-pointer-device-id.patch @@ -71,8 +71,8 @@ diff --git a/ui/views/win/pen_id_handler.cc b/ui/views/win/pen_id_handler.cc #include "base/no_destructor.h" #include "base/strings/utf_string_conversions.h" #include "base/task/thread_pool.h" -@@ -78,6 +79,10 @@ class PenIdStatics { - bool PenIdStatics::skip_initialization_ = false; +@@ -57,6 +58,10 @@ class PenIdStatics { + }; bool PenDeviceApiSupported() { + if (!base::FeatureList::IsEnabled( diff --git a/build/patches/Disable-text-fragments-by-default.patch b/build/patches/Disable-text-fragments-by-default.patch index d3bc7d71a..bb8706599 100644 --- a/build/patches/Disable-text-fragments-by-default.patch +++ b/build/patches/Disable-text-fragments-by-default.patch @@ -42,7 +42,7 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features. + raw_ref(blink::features::kTextFragmentAnchor)}, {wf::EnableUserActivationSameOriginVisibility, raw_ref(features::kUserActivationSameOriginVisibility)}, - {wf::EnableWebBluetooth, raw_ref(features::kWebBluetooth), + {wf::EnableWebAuthenticationAmbient, diff --git a/cromite_flags/chrome/browser/about_flags_cc/Disable-text-fragments-by-default.inc b/cromite_flags/chrome/browser/about_flags_cc/Disable-text-fragments-by-default.inc new file mode 100644 --- /dev/null @@ -74,7 +74,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 -@@ -4534,9 +4534,14 @@ void Document::SetURL(const KURL& url) { +@@ -4520,9 +4520,14 @@ void Document::SetURL(const KURL& url) { TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT, "url", new_url.GetString().Utf8()); @@ -92,7 +92,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink 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 -@@ -4203,10 +4203,9 @@ +@@ -4214,10 +4214,9 @@ }, { name: "TextFragmentIdentifiers", diff --git a/build/patches/Disable-third-party-origin-trials.patch b/build/patches/Disable-third-party-origin-trials.patch index d84685550..1b06df3e3 100644 --- a/build/patches/Disable-third-party-origin-trials.patch +++ b/build/patches/Disable-third-party-origin-trials.patch @@ -76,7 +76,7 @@ diff --git a/components/embedder_support/origin_trials/origin_trial_policy_impl. diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc --- a/content/browser/renderer_host/navigation_request.cc +++ b/content/browser/renderer_host/navigation_request.cc -@@ -9141,7 +9141,6 @@ void NavigationRequest::SetSourceSiteInstanceToInitiatorIfNeeded() { +@@ -9177,7 +9177,6 @@ void NavigationRequest::SetSourceSiteInstanceToInitiatorIfNeeded() { void NavigationRequest::ForceEnableOriginTrials( const std::vector& trials) { DCHECK(!HasCommitted()); @@ -116,7 +116,7 @@ diff --git a/content/browser/renderer_host/origin_trial_state_host_impl.cc b/con diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -539,10 +539,6 @@ void FillNavigationParamsRequest( +@@ -540,10 +540,6 @@ void FillNavigationParamsRequest( common_params.initiator_origin.value(); } @@ -127,7 +127,7 @@ diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_fra navigation_params->was_discarded = commit_params.was_discarded; navigation_params->document_ukm_source_id = commit_params.document_ukm_source_id; -@@ -570,12 +566,6 @@ void FillNavigationParamsRequest( +@@ -571,12 +567,6 @@ void FillNavigationParamsRequest( navigation_params->had_transient_user_activation = common_params.has_user_gesture; @@ -140,7 +140,7 @@ diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_fra if (!commit_params.early_hints_preloaded_resources.empty()) { navigation_params->early_hints_preloaded_resources = WebVector(); for (const auto& resource : commit_params.early_hints_preloaded_resources) { -@@ -636,11 +626,6 @@ blink::mojom::CommonNavigationParamsPtr MakeCommonNavigationParams( +@@ -637,11 +627,6 @@ blink::mojom::CommonNavigationParamsPtr MakeCommonNavigationParams( info->url_request.GetURLRequestExtraData().get()); DCHECK(url_request_extra_data); @@ -152,7 +152,7 @@ diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_fra blink::NavigationDownloadPolicy download_policy; download_policy.ApplyDownloadFramePolicy( info->is_opener_navigation, info->url_request.HasUserGesture(), -@@ -668,7 +653,7 @@ blink::mojom::CommonNavigationParamsPtr MakeCommonNavigationParams( +@@ -669,7 +654,7 @@ blink::mojom::CommonNavigationParamsPtr MakeCommonNavigationParams( info->url_request.HasUserGesture(), info->url_request.HasTextFragmentToken(), info->should_check_main_world_content_security_policy, @@ -237,9 +237,9 @@ diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_p return result; } -@@ -3132,10 +3119,6 @@ void DocumentLoader::CreateParserPostCommit() { - mojom::blink::OriginTrialFeature::kTouchEventFeatureDetection); +@@ -3195,10 +3182,6 @@ void DocumentLoader::CreateParserPostCommit() { } + #endif // BUILDFLAG(IS_CHROMEOS) - // Enable any origin trials that have been force enabled for this commit. - window->GetOriginTrialContext()->AddForceEnabledTrials( @@ -263,7 +263,7 @@ diff --git a/third_party/blink/renderer/core/loader/http_equiv.cc b/third_party/ diff --git a/third_party/blink/renderer/core/origin_trials/origin_trial_context.cc b/third_party/blink/renderer/core/origin_trials/origin_trial_context.cc --- a/third_party/blink/renderer/core/origin_trials/origin_trial_context.cc +++ b/third_party/blink/renderer/core/origin_trials/origin_trial_context.cc -@@ -312,6 +312,9 @@ void OriginTrialContext::AddToken(const String& token) { +@@ -313,6 +313,9 @@ void OriginTrialContext::AddToken(const String& token) { void OriginTrialContext::AddTokenFromExternalScript( const String& token, const Vector>& external_origins) { @@ -273,7 +273,7 @@ diff --git a/third_party/blink/renderer/core/origin_trials/origin_trial_context. Vector script_origins; for (const scoped_refptr& origin : external_origins) { OriginInfo origin_info = {.origin = origin, -@@ -449,8 +452,6 @@ bool OriginTrialContext::InstallSettingFeature( +@@ -450,8 +453,6 @@ bool OriginTrialContext::InstallSettingFeature( } void OriginTrialContext::AddFeature(mojom::blink::OriginTrialFeature feature) { @@ -282,7 +282,7 @@ diff --git a/third_party/blink/renderer/core/origin_trials/origin_trial_context. } bool OriginTrialContext::IsFeatureEnabled( -@@ -494,6 +495,7 @@ void OriginTrialContext::AddForceEnabledTrials( +@@ -495,6 +496,7 @@ void OriginTrialContext::AddForceEnabledTrials( } bool OriginTrialContext::CanEnableTrialFromName(const StringView& trial_name) { diff --git a/build/patches/Disable-various-metrics.patch b/build/patches/Disable-various-metrics.patch index bec7a747e..a431e0791 100644 --- a/build/patches/Disable-various-metrics.patch +++ b/build/patches/Disable-various-metrics.patch @@ -25,7 +25,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/firstrun/FirstRunActivityBase.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java --- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java -@@ -63,7 +63,7 @@ public abstract class FirstRunActivityBase extends AsyncInitializationActivity +@@ -64,7 +64,7 @@ public abstract class FirstRunActivityBase extends AsyncInitializationActivity static final String SHOW_SYNC_CONSENT_PAGE = "ShowSyncConsent"; static final String SHOW_HISTORY_SYNC_PAGE = "ShowHistorySync"; @@ -92,7 +92,7 @@ diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/br diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc --- a/chrome/browser/browser_process_impl.cc +++ b/chrome/browser/browser_process_impl.cc -@@ -1121,7 +1121,7 @@ void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) { +@@ -1122,7 +1122,7 @@ void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) { #endif // BUILDFLAG(IS_CHROMEOS_ASH) registry->RegisterBooleanPref(metrics::prefs::kMetricsReportingEnabled, @@ -112,7 +112,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch #include "chrome/browser/media/audio_service_util.h" #include "chrome/browser/media/prefs/capture_device_ranking.h" #include "chrome/browser/media/router/media_router_feature.h" -@@ -5363,16 +5362,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation( +@@ -5357,16 +5356,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation( content::NavigationHandle* handle) { std::vector> throttles; @@ -129,7 +129,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch #if BUILDFLAG(IS_ANDROID) // TODO(davidben): This is insufficient to integrate with prerender properly. // https://crbug.com/370595 -@@ -5487,10 +5476,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation( +@@ -5488,10 +5477,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation( } } @@ -143,7 +143,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch diff --git a/chrome/browser/metrics/chrome_metrics_services_manager_client.cc b/chrome/browser/metrics/chrome_metrics_services_manager_client.cc --- a/chrome/browser/metrics/chrome_metrics_services_manager_client.cc +++ b/chrome/browser/metrics/chrome_metrics_services_manager_client.cc -@@ -93,6 +93,10 @@ BASE_FEATURE(kPostFREFixMetricsReportingFeature, +@@ -89,6 +89,10 @@ BASE_FEATURE(kPostFREFixMetricsReportingFeature, // Name of the variations param that defines the sampling rate. const char kRateParamName[] = "sampling_rate_per_mille"; diff --git a/build/patches/Disallow-Android-App-Scheme-as-referrer.patch b/build/patches/Disallow-Android-App-Scheme-as-referrer.patch index c1a764694..505911998 100644 --- a/build/patches/Disallow-Android-App-Scheme-as-referrer.patch +++ b/build/patches/Disallow-Android-App-Scheme-as-referrer.patch @@ -9,7 +9,7 @@ Subject: Disallow Android App Scheme as referrer diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc --- a/chrome/renderer/chrome_content_renderer_client.cc +++ b/chrome/renderer/chrome_content_renderer_client.cc -@@ -562,11 +562,6 @@ void ChromeContentRendererClient::RenderThreadStarted() { +@@ -572,11 +572,6 @@ void ChromeContentRendererClient::RenderThreadStarted() { // TODO(nyquist): Add test to ensure this happens when the flag is set. WebSecurityPolicy::RegisterURLSchemeAsDisplayIsolated(dom_distiller_scheme); diff --git a/build/patches/Do-not-build-API-keys-infobar.patch b/build/patches/Do-not-build-API-keys-infobar.patch index 59bdc679e..c3e4b8970 100644 --- a/build/patches/Do-not-build-API-keys-infobar.patch +++ b/build/patches/Do-not-build-API-keys-infobar.patch @@ -11,7 +11,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html 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 -@@ -1331,8 +1331,6 @@ static_library("ui") { +@@ -1201,8 +1201,6 @@ static_library("ui") { "startup/default_browser_prompt/default_browser_prompt_manager.h", "startup/default_browser_prompt/default_browser_prompt_prefs.cc", "startup/default_browser_prompt/default_browser_prompt_prefs.h", diff --git a/build/patches/Do-not-compile-QR-code-sharing.patch b/build/patches/Do-not-compile-QR-code-sharing.patch index f5f9fc985..ad3b0663f 100644 --- a/build/patches/Do-not-compile-QR-code-sharing.patch +++ b/build/patches/Do-not-compile-QR-code-sharing.patch @@ -19,7 +19,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -3666,7 +3666,6 @@ generate_jni("chrome_jni_headers") { +@@ -3664,7 +3664,6 @@ generate_jni("chrome_jni_headers") { "../browser/share/android/java/src/org/chromium/chrome/browser/share/link_to_text/LinkToTextBridge.java", "../browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/LongScreenshotsTabService.java", "../browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/LongScreenshotsTabServiceFactory.java", @@ -30,7 +30,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn 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 -@@ -123,7 +123,6 @@ import org.chromium.chrome.browser.share.ShareDelegate.ShareOrigin; +@@ -121,7 +121,6 @@ import org.chromium.chrome.browser.share.ShareDelegate.ShareOrigin; import org.chromium.chrome.browser.share.ShareUtils; import org.chromium.chrome.browser.share.page_info_sheet.PageInfoSharingControllerImpl; import org.chromium.chrome.browser.share.page_info_sheet.PageSummaryButtonController; @@ -38,7 +38,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordi import org.chromium.chrome.browser.share.scroll_capture.ScrollCaptureManager; import org.chromium.chrome.browser.tab.AccessibilityVisibilityHandler; import org.chromium.chrome.browser.tab.AutofillSessionLifetimeController; -@@ -598,10 +597,6 @@ public class RootUiCoordinator +@@ -589,10 +588,6 @@ public class RootUiCoordinator } public void onAttachFragment(Fragment fragment) { @@ -52,7 +52,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordi 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 -@@ -1862,7 +1862,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) { +@@ -1937,7 +1937,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) { registry->RegisterBooleanPref(prefs::kUiAutomationProviderEnabled, false); #endif @@ -155,7 +155,7 @@ diff --git a/chrome/browser/sharing_hub/sharing_hub_features.cc b/chrome/browser diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc --- a/chrome/browser/ui/browser_command_controller.cc +++ b/chrome/browser/ui/browser_command_controller.cc -@@ -1781,10 +1781,10 @@ void BrowserCommandController::UpdateCommandsForFullscreenMode() { +@@ -1783,10 +1783,10 @@ void BrowserCommandController::UpdateCommandsForFullscreenMode() { command_updater_.UpdateCommandEnabled(IDC_CHROME_WHATS_NEW, show_main_ui); #endif command_updater_.UpdateCommandEnabled(IDC_CONTENT_CONTEXT_SHARING_SUBMENU, @@ -172,7 +172,7 @@ diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc --- a/chrome/browser/ui/browser_commands.cc +++ b/chrome/browser/ui/browser_commands.cc -@@ -1691,6 +1691,7 @@ void SendTabToSelf(Browser* browser) { +@@ -1683,6 +1683,7 @@ void SendTabToSelf(Browser* browser) { } bool CanGenerateQrCode(const Browser* browser) { diff --git a/build/patches/Do-not-ignore-download-location-prompt-setting.patch b/build/patches/Do-not-ignore-download-location-prompt-setting.patch index e3fae0ed5..f70977426 100644 --- a/build/patches/Do-not-ignore-download-location-prompt-setting.patch +++ b/build/patches/Do-not-ignore-download-location-prompt-setting.patch @@ -29,7 +29,7 @@ diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browse - && !mProfile.isOffTheRecord()) { - final DirectoryOption dir = dirs.get(0); - if (dir.type == DirectoryOption.DownloadLocationDirectoryType.DEFAULT) { -- assert (!TextUtils.isEmpty(dir.location)); +- assert !TextUtils.isEmpty(dir.location); - DownloadDialogBridge.setDownloadAndSaveFileDefaultDirectory(mProfile, dir.location); - mController.onDownloadLocationDialogComplete(mSuggestedPath); - } diff --git a/build/patches/Do-not-link-with-libatomic.patch b/build/patches/Do-not-link-with-libatomic.patch index 6a2a77f47..ada9c4184 100644 --- a/build/patches/Do-not-link-with-libatomic.patch +++ b/build/patches/Do-not-link-with-libatomic.patch @@ -14,7 +14,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/base/BUILD.gn b/base/BUILD.gn --- a/base/BUILD.gn +++ b/base/BUILD.gn -@@ -1103,7 +1103,7 @@ component("base") { +@@ -1099,7 +1099,7 @@ component("base") { # more robust check for this. if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos)) && host_toolchain != "//build/toolchain/cros:host") { diff --git a/build/patches/Do-not-store-passwords-by-default.patch b/build/patches/Do-not-store-passwords-by-default.patch index 23b2e2a8b..fb198b533 100644 --- a/build/patches/Do-not-store-passwords-by-default.patch +++ b/build/patches/Do-not-store-passwords-by-default.patch @@ -10,7 +10,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/components/password_manager/core/browser/password_manager.cc b/components/password_manager/core/browser/password_manager.cc --- a/components/password_manager/core/browser/password_manager.cc +++ b/components/password_manager/core/browser/password_manager.cc -@@ -315,14 +315,14 @@ bool HasManuallyFilledFields(const PasswordForm& form) { +@@ -319,7 +319,7 @@ bool HasManuallyFilledFields(const PasswordForm& form) { void PasswordManager::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref( @@ -18,7 +18,8 @@ diff --git a/components/password_manager/core/browser/password_manager.cc b/comp + prefs::kCredentialsEnableService, false, user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF); #if BUILDFLAG(IS_IOS) - registry->RegisterBooleanPref(prefs::kCredentialProviderEnabledOnStartup, + // Deprecated pref in profile prefs. +@@ -327,7 +327,7 @@ void PasswordManager::RegisterProfilePrefs( false); #endif // BUILDFLAG(IS_IOS) registry->RegisterBooleanPref( @@ -27,7 +28,7 @@ diff --git a/components/password_manager/core/browser/password_manager.cc b/comp user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF); registry->RegisterBooleanPref( prefs::kWasAutoSignInFirstRunExperienceShown, false, -@@ -357,9 +357,9 @@ void PasswordManager::RegisterProfilePrefs( +@@ -362,9 +362,9 @@ void PasswordManager::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); registry->RegisterBooleanPref(prefs::kPasswordsPrefWithNewLabelUsed, false); #if BUILDFLAG(IS_ANDROID) diff --git a/build/patches/DoH-improvements.patch b/build/patches/DoH-improvements.patch index ae1e6dfac..b70b8ff5c 100644 --- a/build/patches/DoH-improvements.patch +++ b/build/patches/DoH-improvements.patch @@ -84,7 +84,7 @@ diff --git a/chrome/browser/privacy/secure_dns_bridge.cc b/chrome/browser/privac diff --git a/chrome/browser/ui/webui/settings/settings_secure_dns_handler.cc b/chrome/browser/ui/webui/settings/settings_secure_dns_handler.cc --- a/chrome/browser/ui/webui/settings/settings_secure_dns_handler.cc +++ b/chrome/browser/ui/webui/settings/settings_secure_dns_handler.cc -@@ -126,7 +126,7 @@ base::Value::List SecureDnsHandler::GetSecureDnsResolverList() { +@@ -128,7 +128,7 @@ base::Value::List SecureDnsHandler::GetSecureDnsResolverList() { for (const net::DohProviderEntry* entry : providers_) { net::DnsOverHttpsConfig doh_config({entry->doh_server_config}); base::Value::Dict dict; diff --git a/build/patches/Enable-Android-Dynamic-Performance-Framework.patch b/build/patches/Enable-Android-Dynamic-Performance-Framework.patch index bd4733a4f..4b14d521b 100644 --- a/build/patches/Enable-Android-Dynamic-Performance-Framework.patch +++ b/build/patches/Enable-Android-Dynamic-Performance-Framework.patch @@ -6,8 +6,8 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- chrome/version.gni | 4 ++-- components/viz/common/features.cc | 2 ++ - components/viz/service/performance_hint/hint_session.cc | 3 +++ - 3 files changed, 7 insertions(+), 2 deletions(-) + components/viz/service/performance_hint/hint_session.cc | 5 +---- + 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/chrome/version.gni b/chrome/version.gni --- a/chrome/version.gni @@ -33,7 +33,7 @@ diff --git a/chrome/version.gni b/chrome/version.gni diff --git a/components/viz/common/features.cc b/components/viz/common/features.cc --- a/components/viz/common/features.cc +++ b/components/viz/common/features.cc -@@ -311,9 +311,11 @@ const base::FeatureParam kADPFBoostTimeout{ +@@ -330,9 +330,11 @@ const base::FeatureParam kADPFBoostTimeout{ // If enabled, Chrome includes the Renderer Main thread(s) into the // ADPF(Android Dynamic Performance Framework) hint session. @@ -43,19 +43,27 @@ diff --git a/components/viz/common/features.cc b/components/viz/common/features. base::FEATURE_ENABLED_BY_DEFAULT); +SET_CROMITE_FEATURE_ENABLED(kEnableADPFRendererMain); - // If enabled, Chrome includes the Compositor GPU Thread into the - // ADPF(Android Dynamic Performance Framework) hint session, instead + // If enabled, Chrome includes only main frame's Renderer Main thread(s) into + // the ADPF(Android Dynamic Performance Framework) hint session. diff --git a/components/viz/service/performance_hint/hint_session.cc b/components/viz/service/performance_hint/hint_session.cc --- a/components/viz/service/performance_hint/hint_session.cc +++ b/components/viz/service/performance_hint/hint_session.cc -@@ -230,6 +230,9 @@ void HintSessionFactoryImpl::WakeUp() { - (*hint_sessions_.begin())->WakeUp(); - } +@@ -240,16 +240,13 @@ bool IsAdpfEnabled() { + switches::kDisableAdpf)) { + return false; + } +- if (base::android::BuildInfo::GetInstance()->sdk_int() < +- base::android::SDK_VERSION_S) { +- return false; +- } + if (!AdpfMethods::Get().supported) { + return false; + } + if (!base::FeatureList::IsEnabled(features::kAdpf)) { + return false; + } ++ if ((true)) return true; -+// Notify me when this is introduced -+[[maybe_unused]] void IsAdpfEnabled() {} -+ - } // namespace - - // static + std::string allowlist_param = features::kADPFSocManufacturerAllowlist.Get(); + std::vector allowlist = base::SplitStringPiece( -- diff --git a/build/patches/Enable-Certificate-Transparency.patch b/build/patches/Enable-Certificate-Transparency.patch index 3cfb20af4..3a83341ca 100644 --- a/build/patches/Enable-Certificate-Transparency.patch +++ b/build/patches/Enable-Certificate-Transparency.patch @@ -24,7 +24,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/browser_features.h b/chrome/browser/browser_features.h --- a/chrome/browser/browser_features.h +++ b/chrome/browser/browser_features.h -@@ -25,6 +25,7 @@ BASE_DECLARE_FEATURE(kAllowUnmutedAutoplayForTWA); +@@ -34,6 +34,7 @@ BASE_DECLARE_FEATURE(kAllowUnmutedAutoplayForTWA); BASE_DECLARE_FEATURE(kAutocompleteActionPredictorConfidenceCutoff); BASE_DECLARE_FEATURE(kBookmarksTreeView); BASE_DECLARE_FEATURE(kBookmarkTriggerForPrerender2); @@ -35,7 +35,7 @@ diff --git a/chrome/browser/browser_features.h b/chrome/browser/browser_features 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 -@@ -1031,7 +1031,7 @@ bool SystemNetworkContextManager::IsCertificateTransparencyEnabled() { +@@ -1027,7 +1027,7 @@ bool SystemNetworkContextManager::IsCertificateTransparencyEnabled() { // - on an opt-in basis for other builds and embedders, controlled with the // kCertificateTransparencyAskBeforeEnabling flag return base::FeatureList::IsEnabled( diff --git a/build/patches/Enable-Document-Open-Inheritance-Removal.patch b/build/patches/Enable-Document-Open-Inheritance-Removal.patch index 031022b8d..43b30f2ec 100644 --- a/build/patches/Enable-Document-Open-Inheritance-Removal.patch +++ b/build/patches/Enable-Document-Open-Inheritance-Removal.patch @@ -11,7 +11,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html 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 -@@ -3489,70 +3489,6 @@ void Document::open(LocalDOMWindow* entered_window, +@@ -3476,70 +3476,6 @@ void Document::open(LocalDOMWindow* entered_window, // https://chromestatus.com/metrics/feature/timeline/popularity/4375 CountUse(WebFeature::kDocumentOpenMutateSandbox); } @@ -85,7 +85,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink 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 -@@ -1556,7 +1556,6 @@ +@@ -1568,7 +1568,6 @@ { name: "DocumentOpenSandboxInheritanceRemoval", status: "stable", diff --git a/build/patches/Enable-Global-Privacy-Control.patch b/build/patches/Enable-Global-Privacy-Control.patch index 6b2a8b5f9..c8395042a 100644 --- a/build/patches/Enable-Global-Privacy-Control.patch +++ b/build/patches/Enable-Global-Privacy-Control.patch @@ -61,7 +61,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.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 -@@ -633,6 +633,7 @@ chrome_java_resources = [ +@@ -624,6 +624,7 @@ chrome_java_resources = [ "java/res/xml/contextual_search_preferences.xml", "java/res/xml/developer_preferences.xml", "java/res/xml/do_not_track_preferences.xml", @@ -72,7 +72,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 -@@ -953,6 +953,7 @@ chrome_java_sources = [ +@@ -958,6 +958,7 @@ chrome_java_sources = [ "java/src/org/chromium/chrome/browser/settings/AdBlockPreferences.java", "java/src/org/chromium/chrome/browser/policy/PolicyAuditor.java", "java/src/org/chromium/chrome/browser/policy/PolicyAuditorBridge.java", @@ -173,14 +173,14 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting --- 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,7 @@ public class PrivacySettings extends ChromeBaseSettingsFragment + private static final String PREF_HTTPS_FIRST_MODE = "https_first_mode"; private static final String PREF_SECURE_DNS = "secure_dns"; private static final String PREF_USAGE_STATS = "usage_stats_reporting"; - private static final String PREF_DO_NOT_TRACK = "do_not_track"; + private static final String PREF_GPC = "gpc"; 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_REFERER_POLICY = "referers_policy"; -@@ -496,6 +497,14 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -502,6 +503,14 @@ public class PrivacySettings extends ChromeBaseSettingsFragment : R.string.text_off); } @@ -198,7 +198,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp --- a/chrome/app/settings_strings.grdp +++ b/chrome/app/settings_strings.grdp -@@ -2180,6 +2180,21 @@ +@@ -2186,6 +2186,21 @@ Learn more about Do Not Track @@ -223,7 +223,7 @@ diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp diff --git a/chrome/browser/extensions/api/settings_private/prefs_util.cc b/chrome/browser/extensions/api/settings_private/prefs_util.cc --- a/chrome/browser/extensions/api/settings_private/prefs_util.cc +++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc -@@ -379,6 +379,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlistedKeys() { +@@ -386,6 +386,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlistedKeys() { (*s_allowlist)[::prefs::kTrackingProtectionLevel] = settings_api::PrefType::kNumber; (*s_allowlist)[::prefs::kEnableDoNotTrack] = settings_api::PrefType::kBoolean; @@ -247,7 +247,7 @@ diff --git a/chrome/browser/renderer_preferences_util.cc b/chrome/browser/render diff --git a/chrome/browser/resources/settings/BUILD.gn b/chrome/browser/resources/settings/BUILD.gn --- a/chrome/browser/resources/settings/BUILD.gn +++ b/chrome/browser/resources/settings/BUILD.gn -@@ -121,6 +121,7 @@ build_webui("build") { +@@ -123,6 +123,7 @@ build_webui("build") { "privacy_page/cookies_page.ts", "privacy_page/fingerprint_progress_arc.ts", "privacy_page/do_not_track_toggle.ts", @@ -480,7 +480,7 @@ diff --git a/chrome/browser/ui/prefs/pref_watcher.h b/chrome/browser/ui/prefs/pr diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc --- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc +++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc -@@ -1684,6 +1684,9 @@ void AddPrivacyStrings(content::WebUIDataSource* html_source, +@@ -1809,6 +1809,9 @@ void AddPrivacyStrings(content::WebUIDataSource* html_source, {"doNotTrackDialogMessage", IDS_SETTINGS_ENABLE_DO_NOT_TRACK_DIALOG_TEXT}, {"doNotTrackDialogLearnMoreA11yLabel", IDS_SETTINGS_ENABLE_DO_NOT_TRACK_DIALOG_LEARN_MORE_ACCESSIBILITY_LABEL}, @@ -596,7 +596,7 @@ diff --git a/content/browser/loader/browser_initiated_resource_request.cc b/cont diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4591,6 +4591,10 @@ void RenderFrameImpl::FinalizeRequestInternal( +@@ -4598,6 +4598,10 @@ void RenderFrameImpl::FinalizeRequestInternal( request.SetHttpHeaderField( blink::WebString::FromUTF8(blink::kDoNotTrackHeader), "1"); } @@ -680,7 +680,7 @@ diff --git a/third_party/blink/public/mojom/renderer_preferences.mojom b/third_p diff --git a/third_party/blink/renderer/bindings/idl_in_modules.gni b/third_party/blink/renderer/bindings/idl_in_modules.gni --- a/third_party/blink/renderer/bindings/idl_in_modules.gni +++ b/third_party/blink/renderer/bindings/idl_in_modules.gni -@@ -1269,6 +1269,11 @@ static_idl_files_in_modules = [ +@@ -1274,6 +1274,11 @@ static_idl_files_in_modules = [ "//third_party/blink/renderer/modules/xr/xr_webgl_sub_image.idl", ] @@ -695,7 +695,7 @@ diff --git a/third_party/blink/renderer/bindings/idl_in_modules.gni b/third_part diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -3535,6 +3535,9 @@ void WebViewImpl::UpdateRendererPreferences( +@@ -3537,6 +3537,9 @@ void WebViewImpl::UpdateRendererPreferences( GetSettings()->SetCaretBrowsingEnabled( renderer_preferences_.caret_browsing_enabled); @@ -820,7 +820,7 @@ diff --git a/third_party/blink/renderer/platform/loader/fetch/url_loader/dedicat 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 -@@ -2149,6 +2149,11 @@ +@@ -2172,6 +2172,11 @@ status: "stable", base_feature: "none", }, diff --git a/build/patches/Enable-HighEfficiencyMode-by-default.patch b/build/patches/Enable-HighEfficiencyMode-by-default.patch index 09aefda18..21dfaef39 100644 --- a/build/patches/Enable-HighEfficiencyMode-by-default.patch +++ b/build/patches/Enable-HighEfficiencyMode-by-default.patch @@ -24,12 +24,12 @@ diff --git a/components/performance_manager/features.cc b/components/performance @@ -143,6 +143,7 @@ BASE_FEATURE(kUrgentPageDiscarding, BASE_FEATURE(kCPUMeasurementInFreezingPolicy, "CPUMeasurementInFreezingPolicy", - base::FEATURE_DISABLED_BY_DEFAULT); + base::FEATURE_ENABLED_BY_DEFAULT); +SET_CROMITE_FEATURE_ENABLED(kCPUMeasurementInFreezingPolicy); - // Note: This param is associated with `kCPUMeasurementInFreezingPolicy` instead - // of `kFreezingOnBatterySaver`, to allow retrieving the value without -@@ -159,9 +160,14 @@ BASE_FEATURE(kFreezingOnBatterySaverForTesting, + // Note: These params are associated with `kCPUMeasurementInFreezingPolicy` + // instead of `kFreezingOnBatterySaver`, to allow retrieving the value without +@@ -171,9 +172,14 @@ BASE_FEATURE(kFreezingOnBatterySaverForTesting, "FreezingOnBatterySaverForTesting", base::FEATURE_DISABLED_BY_DEFAULT); @@ -39,7 +39,7 @@ diff --git a/components/performance_manager/features.cc b/components/performance + BASE_FEATURE(kResourceAttributionIncludeOrigins, "ResourceAttributionIncludeOrigins", - base::FEATURE_DISABLED_BY_DEFAULT); + base::FEATURE_ENABLED_BY_DEFAULT); +SET_CROMITE_FEATURE_ENABLED(kResourceAttributionIncludeOrigins); BASE_FEATURE(kSeamlessRenderFrameSwap, @@ -47,7 +47,7 @@ diff --git a/components/performance_manager/features.cc b/components/performance diff --git a/components/performance_manager/freezing/freezing_policy.cc b/components/performance_manager/freezing/freezing_policy.cc --- a/components/performance_manager/freezing/freezing_policy.cc +++ b/components/performance_manager/freezing/freezing_policy.cc -@@ -193,11 +193,11 @@ void FreezingPolicy::UpdateFrozenState( +@@ -207,11 +207,11 @@ void FreezingPolicy::UpdateFrozenState( const BrowsingInstanceState& browsing_instance_state = it->second; if (browsing_instance_state.cpu_intensive_in_background && @@ -64,7 +64,7 @@ diff --git a/components/performance_manager/freezing/freezing_policy.cc b/compon diff --git a/components/performance_manager/public/features.h b/components/performance_manager/public/features.h --- a/components/performance_manager/public/features.h +++ b/components/performance_manager/public/features.h -@@ -157,6 +157,9 @@ BASE_DECLARE_FEATURE(kFreezingOnBatterySaver); +@@ -162,6 +162,9 @@ BASE_DECLARE_FEATURE(kFreezingOnBatterySaver); // - Pretend that all tabs have high CPU usage in background. BASE_DECLARE_FEATURE(kFreezingOnBatterySaverForTesting); diff --git a/build/patches/Enable-ImprovedBookmarks-by-default.patch b/build/patches/Enable-ImprovedBookmarks-by-default.patch index 2a521cb07..b67ce08af 100644 --- a/build/patches/Enable-ImprovedBookmarks-by-default.patch +++ b/build/patches/Enable-ImprovedBookmarks-by-default.patch @@ -7,12 +7,9 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html chrome/android/java/res/layout/bookmark_search_box_row.xml | 4 ++-- .../browser/bookmarks/BookmarkSearchBoxRowViewBinder.java | 2 ++ .../chromium/chrome/browser/bookmarks/BookmarkUiPrefs.java | 2 +- - .../org/chromium/chrome/browser/bookmarks/BookmarkUtils.java | 3 ++- - .../org/chromium/chrome/browser/flags/ChromeFeatureList.java | 2 +- + .../org/chromium/chrome/browser/bookmarks/BookmarkUtils.java | 2 +- components/bookmarks/browser/bookmark_node.cc | 3 +-- - .../Enable-ImprovedBookmarks-by-default.inc | 1 + - 7 files changed, 10 insertions(+), 7 deletions(-) - create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Enable-ImprovedBookmarks-by-default.inc + 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/chrome/android/java/res/layout/bookmark_search_box_row.xml b/chrome/android/java/res/layout/bookmark_search_box_row.xml --- a/chrome/android/java/res/layout/bookmark_search_box_row.xml @@ -62,35 +59,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkUtils.java --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkUtils.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkUtils.java -@@ -39,6 +39,7 @@ import org.chromium.chrome.browser.IntentHandler; - import org.chromium.chrome.browser.app.bookmarks.BookmarkActivity; - import org.chromium.chrome.browser.app.bookmarks.BookmarkEditActivity; - import org.chromium.chrome.browser.app.bookmarks.BookmarkFolderPickerActivity; -+import org.chromium.chrome.browser.bookmarks.BookmarkFeatures; - import org.chromium.chrome.browser.bookmarks.BookmarkUiPrefs.BookmarkRowDisplayPref; - import org.chromium.chrome.browser.commerce.ShoppingServiceFactory; - import org.chromium.chrome.browser.document.ChromeLauncherActivity; -@@ -562,7 +563,7 @@ public class BookmarkUtils { +@@ -562,7 +562,7 @@ public class BookmarkUtils { RecordUserAction.record("MobileBookmarkManagerReopenBookmarksInSameSession"); } - if (DeviceFormFactor.isNonMultiDisplayContextOnTablet(context)) { -+ if (BookmarkFeatures.isAndroidImprovedBookmarksEnabled() || DeviceFormFactor.isNonMultiDisplayContextOnTablet(context)) { ++ if ((true)) { showBookmarkManagerOnTablet( context, activity == null ? null : activity.getComponentName(), -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 -@@ -887,7 +887,7 @@ public abstract class ChromeFeatureList { - public static final MutableFlagWithSafeDefault sAdaptiveButtonInTopToolbarCustomizationV2 = - newMutableFlagWithSafeDefault(ADAPTIVE_BUTTON_IN_TOP_TOOLBAR_CUSTOMIZATION_V2, false); - public static final MutableFlagWithSafeDefault sAndroidImprovedBookmarks = -- newMutableFlagWithSafeDefault(ANDROID_IMPROVED_BOOKMARKS, false); -+ newMutableFlagWithSafeDefault(ANDROID_IMPROVED_BOOKMARKS, true); - public static final MutableFlagWithSafeDefault sAndroidTabDeclutter = - newMutableFlagWithSafeDefault(ANDROID_TAB_DECLUTTER, false); - public static final MutableFlagWithSafeDefault sAndroidTabDeclutterArchiveAllButActiveTab = diff --git a/components/bookmarks/browser/bookmark_node.cc b/components/bookmarks/browser/bookmark_node.cc --- a/components/bookmarks/browser/bookmark_node.cc +++ b/components/bookmarks/browser/bookmark_node.cc @@ -104,10 +81,4 @@ diff --git a/components/bookmarks/browser/bookmark_node.cc b/components/bookmark case BookmarkNode::MOBILE: // Either MOBILE or OTHER_NODE is visible when empty, but never both. return !IsTypeVisibleWhenEmpty(BookmarkNode::OTHER_NODE); -diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Enable-ImprovedBookmarks-by-default.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Enable-ImprovedBookmarks-by-default.inc -new file mode 100644 ---- /dev/null -+++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Enable-ImprovedBookmarks-by-default.inc -@@ -0,0 +1 @@ -+SET_CROMITE_FEATURE_ENABLED(kAndroidImprovedBookmarks); -- diff --git a/build/patches/Enable-StrictOriginIsolation-and-SitePerProcess.patch b/build/patches/Enable-StrictOriginIsolation-and-SitePerProcess.patch index f00aef851..4ba8a2105 100644 --- a/build/patches/Enable-StrictOriginIsolation-and-SitePerProcess.patch +++ b/build/patches/Enable-StrictOriginIsolation-and-SitePerProcess.patch @@ -20,7 +20,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc -@@ -1594,7 +1594,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs( +@@ -1563,7 +1563,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs( registry->RegisterFilePathPref(prefs::kDiskCacheDir, base::FilePath()); registry->RegisterIntegerPref(prefs::kDiskCacheSize, 0); registry->RegisterStringPref(prefs::kIsolateOrigins, std::string()); @@ -29,7 +29,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch registry->RegisterBooleanPref(prefs::kTabFreezingEnabled, true); registry->RegisterIntegerPref(prefs::kSCTAuditingHashdanceReportCount, 0); registry->RegisterBooleanPref(prefs::kDataURLWhitespacePreservationEnabled, -@@ -1617,7 +1617,7 @@ void ChromeContentBrowserClient::RegisterProfilePrefs( +@@ -1586,7 +1586,7 @@ void ChromeContentBrowserClient::RegisterProfilePrefs( // user policy in addition to the same named ones in Local State (which are // used for mapping the command-line flags). registry->RegisterStringPref(prefs::kIsolateOrigins, std::string()); diff --git a/build/patches/Enable-darken-websites-checkbox-in-themes.patch b/build/patches/Enable-darken-websites-checkbox-in-themes.patch index edf934740..a5fb87f65 100644 --- a/build/patches/Enable-darken-websites-checkbox-in-themes.patch +++ b/build/patches/Enable-darken-websites-checkbox-in-themes.patch @@ -14,7 +14,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.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 -@@ -1967,9 +1967,9 @@ +@@ -1962,9 +1962,9 @@ "expiry_milestone": -1 }, { diff --git a/build/patches/Enable-gwp-asan-on-Android.patch b/build/patches/Enable-gwp-asan-on-Android.patch index 68202cb10..413dcb722 100644 --- a/build/patches/Enable-gwp-asan-on-Android.patch +++ b/build/patches/Enable-gwp-asan-on-Android.patch @@ -21,7 +21,7 @@ in android there is a test function accessible in the developer settings. diff --git a/android_webview/lib/aw_main_delegate.cc b/android_webview/lib/aw_main_delegate.cc --- a/android_webview/lib/aw_main_delegate.cc +++ b/android_webview/lib/aw_main_delegate.cc -@@ -402,7 +402,7 @@ void AwMainDelegate::InitializeMemorySystem(const bool is_browser_process) { +@@ -396,7 +396,7 @@ void AwMainDelegate::InitializeMemorySystem(const bool is_browser_process) { const std::string process_type = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( switches::kProcessType); @@ -49,7 +49,7 @@ diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml --- a/chrome/android/java/AndroidManifest.xml +++ b/chrome/android/java/AndroidManifest.xml -@@ -172,6 +172,7 @@ by a child template that "extends" this file. +@@ -176,6 +176,7 @@ by a child template that "extends" this file. GetSwitchValueASCII(switches::kProcessType); const bool is_browser_process = process_type.empty(); @@ -244,7 +244,7 @@ diff --git a/components/gwp_asan/client/gwp_asan.cc b/components/gwp_asan/client diff --git a/components/memory_system/memory_system.cc b/components/memory_system/memory_system.cc --- a/components/memory_system/memory_system.cc +++ b/components/memory_system/memory_system.cc -@@ -199,6 +199,7 @@ void MemorySystem::Impl::Initialize( +@@ -198,6 +198,7 @@ void MemorySystem::Impl::Initialize( if (gwp_asan_parameters) { InitializeGwpASan(*gwp_asan_parameters, initialization_data); diff --git a/build/patches/Enable-menu-on-reload-button.patch b/build/patches/Enable-menu-on-reload-button.patch index 3c6b1cc1b..95731792d 100644 --- a/build/patches/Enable-menu-on-reload-button.patch +++ b/build/patches/Enable-menu-on-reload-button.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/app/generated_resources.grd b/chrome/app/generated_resources.grd --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd -@@ -4806,10 +4806,10 @@ are declared in tools/grit/grit_rule.gni. +@@ -4803,10 +4803,10 @@ are declared in tools/grit/grit_rule.gni. Normal Reload @@ -30,7 +30,7 @@ diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources diff --git a/chrome/browser/ui/views/toolbar/toolbar_view.cc b/chrome/browser/ui/views/toolbar/toolbar_view.cc --- a/chrome/browser/ui/views/toolbar/toolbar_view.cc +++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc -@@ -585,7 +585,7 @@ void ToolbarView::Update(WebContents* tab) { +@@ -581,7 +581,7 @@ void ToolbarView::Update(WebContents* tab) { } if (reload_) diff --git a/build/patches/Enable-native-Android-autofill.patch b/build/patches/Enable-native-Android-autofill.patch index a85731f4a..fb8de427d 100644 --- a/build/patches/Enable-native-Android-autofill.patch +++ b/build/patches/Enable-native-Android-autofill.patch @@ -64,7 +64,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage import org.chromium.base.supplier.ObservableSupplier; import org.chromium.base.supplier.ObservableSupplierImpl; import org.chromium.base.supplier.OneshotSupplier; -@@ -61,6 +63,11 @@ import java.lang.annotation.Retention; +@@ -62,6 +64,11 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.Locale; @@ -76,7 +76,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage /** * The "Passwords" screen in Settings, which allows the user to enable or disable password saving, * to view saved passwords (just the username and URL), and to delete saved passwords. -@@ -68,7 +75,7 @@ import java.util.Locale; +@@ -71,7 +78,7 @@ import java.util.Locale; public class PasswordSettings extends ChromeBaseSettingsFragment implements PasswordListObserver, Preference.OnPreferenceClickListener, @@ -85,7 +85,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage @IntDef({ TrustedVaultBannerState.NOT_SHOWN, TrustedVaultBannerState.OFFER_OPT_IN, -@@ -98,6 +105,12 @@ public class PasswordSettings extends ChromeBaseSettingsFragment +@@ -101,6 +108,12 @@ public class PasswordSettings extends ChromeBaseSettingsFragment public static final String PREF_TRUSTED_VAULT_BANNER = "trusted_vault_banner"; public static final String PREF_KEY_MANAGE_ACCOUNT_LINK = "manage_account_link"; @@ -98,7 +98,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage private static final String PREF_KEY_CATEGORY_SAVED_PASSWORDS = "saved_passwords"; private static final String PREF_KEY_CATEGORY_EXCEPTIONS = "exceptions"; private static final String PREF_KEY_SAVED_PASSWORDS_NO_TEXT = "saved_passwords_no_text"; -@@ -130,6 +143,8 @@ public class PasswordSettings extends ChromeBaseSettingsFragment +@@ -133,6 +146,8 @@ public class PasswordSettings extends ChromeBaseSettingsFragment private Preference mLinkPref; private Menu mMenu; @@ -107,7 +107,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage private @ManagePasswordsReferrer int mManagePasswordsReferrer; private OneshotSupplier mBottomSheetControllerSupplier; private final ObservableSupplierImpl mPageTitle = new ObservableSupplierImpl<>(); -@@ -315,6 +330,7 @@ public class PasswordSettings extends ChromeBaseSettingsFragment +@@ -318,6 +333,7 @@ public class PasswordSettings extends ChromeBaseSettingsFragment } createSavePasswordsSwitch(); @@ -115,7 +115,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage if (shouldShowAutoSigninOption()) { createAutoSignInCheckbox(); } -@@ -587,6 +603,71 @@ public class PasswordSettings extends ChromeBaseSettingsFragment +@@ -590,6 +606,71 @@ public class PasswordSettings extends ChromeBaseSettingsFragment getPrefService().getBoolean(Pref.CREDENTIALS_ENABLE_SERVICE)); } @@ -190,7 +190,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java --- a/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java -@@ -482,8 +482,7 @@ public class MainSettings extends ChromeBaseSettingsFragment +@@ -511,8 +511,7 @@ public class MainSettings extends ChromeBaseSettingsFragment private void updateAutofillPreferences() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O @@ -203,7 +203,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSe diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java -@@ -93,6 +93,13 @@ import java.lang.annotation.RetentionPolicy; +@@ -94,6 +94,13 @@ import java.lang.annotation.RetentionPolicy; import java.nio.ByteBuffer; import java.util.Objects; @@ -217,7 +217,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav /** * Implementation of the interface {@link Tab}. Contains and manages a {@link ContentView}. This * class is not intended to be extended. -@@ -1011,6 +1018,11 @@ class TabImpl implements Tab { +@@ -1026,6 +1033,11 @@ class TabImpl implements Tab { for (TabObserver observer : mObservers) observer.onDestroyed(this); mObservers.clear(); @@ -229,7 +229,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav mUserDataHost.destroy(); mTabViewManager.destroy(); hideNativePage(false, null); -@@ -1284,6 +1296,7 @@ class TabImpl implements Tab { +@@ -1305,6 +1317,7 @@ class TabImpl implements Tab { * @return iff the AutofillProvider should provide a ViewStructure when prompted. */ boolean providesAutofillStructure() { @@ -237,7 +237,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav if (!ChromeFeatureList.isEnabled( AutofillFeatures.AUTOFILL_VIRTUAL_VIEW_STRUCTURE_ANDROID)) { return false; -@@ -2035,15 +2048,20 @@ class TabImpl implements Tab { +@@ -2072,15 +2085,20 @@ class TabImpl implements Tab { * @return true if the the provider is available for the given WebContents. */ private boolean prepareAutofillProvider(WebContents newWebContents) { @@ -264,7 +264,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav mAutofillProvider = new AutofillProvider( getContext(), -@@ -2052,7 +2070,16 @@ class TabImpl implements Tab { +@@ -2089,7 +2107,16 @@ class TabImpl implements Tab { getContext().getString(R.string.app_name)); TabImplJni.get().initializeAutofillIfNecessary(mNativeTabAndroid); } @@ -285,7 +285,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav 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 -@@ -3830,28 +3830,6 @@ const FeatureEntry::FeatureVariation kAutofillGranularFillingAvailableVariations +@@ -3787,28 +3787,6 @@ const FeatureEntry::FeatureVariation kAutofillGranularFillingAvailableVariations kAutofillGranularFillingAvailableVariationWithExpandControlVisibleOnSelectionOnly), nullptr}}; @@ -314,7 +314,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc const FeatureEntry::FeatureParam kPrerender2WarmUpCompositorTriggerPointDidCommitLoad[] = { {"trigger_point", "did_commit_load"}}; -@@ -6188,15 +6166,6 @@ const FeatureEntry kFeatureEntries[] = { +@@ -6145,15 +6123,6 @@ const FeatureEntry kFeatureEntries[] = { #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_ANDROID) @@ -346,7 +346,7 @@ diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_ diff --git a/chrome/browser/autofill/android/BUILD.gn b/chrome/browser/autofill/android/BUILD.gn --- a/chrome/browser/autofill/android/BUILD.gn +++ b/chrome/browser/autofill/android/BUILD.gn -@@ -129,7 +129,7 @@ android_library("bottom_sheet_utils_java") { +@@ -130,7 +130,7 @@ android_library("bottom_sheet_utils_java") { generate_jni("jni_headers") { sources = [ "java/src/org/chromium/chrome/browser/autofill/AddressNormalizerFactory.java", @@ -371,7 +371,7 @@ diff --git a/chrome/browser/autofill/android/java/src/org/chromium/chrome/browse 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 -@@ -754,12 +754,6 @@ const char kAutofillVcnEnrollRequestTimeoutDescription[] = +@@ -805,12 +805,6 @@ const char kAutofillVcnEnrollRequestTimeoutDescription[] = "VCN enrollment request. Upon timeout, the client will terminate the VCN " "enrollment UI, but the request may still succeed server-side."; @@ -387,7 +387,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h -@@ -441,9 +441,6 @@ extern const char kAutofillUpstreamUpdatedUiDescription[]; +@@ -457,9 +457,6 @@ extern const char kAutofillUpstreamUpdatedUiDescription[]; extern const char kAutofillVcnEnrollRequestTimeoutName[]; extern const char kAutofillVcnEnrollRequestTimeoutDescription[]; @@ -540,9 +540,9 @@ diff --git a/chrome/browser/ui/autofill/autofill_client_provider.h b/chrome/brow diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc --- a/chrome/browser/ui/tab_helpers.cc +++ b/chrome/browser/ui/tab_helpers.cc -@@ -390,9 +390,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { +@@ -389,9 +389,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { web_contents); - chrome::ChainedBackNavigationTracker::CreateForWebContents(web_contents); + ChainedBackNavigationTracker::CreateForWebContents(web_contents); chrome_browser_net::NetErrorTabHelper::CreateForWebContents(web_contents); - if (!autofill_client_provider.uses_platform_autofill()) { - ChromePasswordManagerClient::CreateForWebContents(web_contents); @@ -625,7 +625,7 @@ diff --git a/components/android_autofill/browser/java/src/org/chromium/component diff --git a/components/android_autofill/browser/java/src/org/chromium/components/autofill/AutofillProvider.java b/components/android_autofill/browser/java/src/org/chromium/components/autofill/AutofillProvider.java --- a/components/android_autofill/browser/java/src/org/chromium/components/autofill/AutofillProvider.java +++ b/components/android_autofill/browser/java/src/org/chromium/components/autofill/AutofillProvider.java -@@ -196,13 +196,19 @@ public class AutofillProvider { +@@ -195,13 +195,19 @@ public class AutofillProvider { /** @return whether query autofill suggestion. */ public boolean shouldQueryAutofillSuggestion() { @@ -645,7 +645,7 @@ diff --git a/components/android_autofill/browser/java/src/org/chromium/component FocusField focusField = mRequest.getFocusField(); mAutofillManager.requestAutofill( mContainerView, -@@ -262,6 +268,7 @@ public class AutofillProvider { +@@ -261,6 +267,7 @@ public class AutofillProvider { float width, float height, boolean hasServerPrediction) { @@ -737,7 +737,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }, source, Lift(source, std::forward(args))...); } -@@ -614,6 +621,10 @@ ContentAutofillDriver::GetAutofillAgent() { +@@ -610,6 +617,10 @@ ContentAutofillDriver::GetAutofillAgent() { return autofill_agent_; } @@ -807,7 +807,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver_factory diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components/autofill/content/renderer/autofill_agent.cc --- a/components/autofill/content/renderer/autofill_agent.cc +++ b/components/autofill/content/renderer/autofill_agent.cc -@@ -1390,12 +1390,16 @@ void AutofillAgent::ShowSuggestions( +@@ -1281,12 +1281,16 @@ void AutofillAgent::ShowSuggestions( password_generation_agent_->ShowPasswordGenerationSuggestions( input_element)) { is_popup_possibly_visible_ = true; @@ -822,27 +822,26 @@ diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components return; +#endif } - } -@@ -1404,12 +1408,14 @@ void AutofillAgent::ShowSuggestions( - // `FormControlTypeForAutofill()` because we are interested in whether the - // field is *currently* a password field, not whether it has ever been a - // password field. + // Password field elements should only have suggestions shown by the +@@ -1294,11 +1298,13 @@ void AutofillAgent::ShowSuggestions( + // `FormControlTypeForAutofill()` because we are interested in whether the + // field is *currently* a password field, not whether it has ever been a + // password field. +#if !BUILDFLAG(IS_ANDROID) - if (input_element && - input_element.FormControlType() // nocheck - == blink::mojom::FormControlType::kInputPassword && - !config_.query_password_suggestions) { - return; - } + if (input_element.FormControlType() == // nocheck + blink::mojom::FormControlType::kInputPassword && + !config_.query_password_suggestions) { + return; + } +#endif + } QueryAutofillSuggestions(element, trigger_source); - } diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc --- a/components/autofill/content/renderer/password_autofill_agent.cc +++ b/components/autofill/content/renderer/password_autofill_agent.cc -@@ -844,7 +844,10 @@ void PasswordAutofillAgent::UpdatePasswordStateForTextChange( +@@ -900,7 +900,10 @@ void PasswordAutofillAgent::UpdatePasswordStateForTextChange( void PasswordAutofillAgent::TrackAutofilledElement( const WebFormControlElement& element) { @@ -895,7 +894,7 @@ diff --git a/components/autofill/core/browser/autofill_manager.h b/components/au diff --git a/components/autofill/core/browser/browser_autofill_manager.cc b/components/autofill/core/browser/browser_autofill_manager.cc --- a/components/autofill/core/browser/browser_autofill_manager.cc +++ b/components/autofill/core/browser/browser_autofill_manager.cc -@@ -719,6 +719,8 @@ BrowserAutofillManager::~BrowserAutofillManager() { +@@ -744,6 +744,8 @@ BrowserAutofillManager::~BrowserAutofillManager() { single_field_form_fill_router_->CancelPendingQueries(); } @@ -907,7 +906,7 @@ diff --git a/components/autofill/core/browser/browser_autofill_manager.cc b/comp diff --git a/components/autofill/core/browser/browser_autofill_manager.h b/components/autofill/core/browser/browser_autofill_manager.h --- a/components/autofill/core/browser/browser_autofill_manager.h +++ b/components/autofill/core/browser/browser_autofill_manager.h -@@ -117,6 +117,8 @@ class BrowserAutofillManager : public AutofillManager { +@@ -113,6 +113,8 @@ class BrowserAutofillManager : public AutofillManager { ~BrowserAutofillManager() override; @@ -919,7 +918,7 @@ diff --git a/components/autofill/core/browser/browser_autofill_manager.h b/compo diff --git a/components/autofill/core/common/autofill_features.cc b/components/autofill/core/common/autofill_features.cc --- a/components/autofill/core/common/autofill_features.cc +++ b/components/autofill/core/common/autofill_features.cc -@@ -776,7 +776,7 @@ BASE_FEATURE(kAutofillEnableSecurityTouchEventFilteringAndroid, +@@ -752,7 +752,7 @@ BASE_FEATURE(kAutofillEnableSecurityTouchEventFilteringAndroid, BASE_FEATURE(kAutofillVirtualViewStructureAndroid, "AutofillVirtualViewStructureAndroid", base::FEATURE_DISABLED_BY_DEFAULT); @@ -931,7 +930,7 @@ diff --git a/components/autofill/core/common/autofill_features.cc b/components/a diff --git a/components/autofill/core/common/autofill_features.h b/components/autofill/core/common/autofill_features.h --- a/components/autofill/core/common/autofill_features.h +++ b/components/autofill/core/common/autofill_features.h -@@ -262,28 +262,6 @@ COMPONENT_EXPORT(AUTOFILL) +@@ -258,28 +258,6 @@ COMPONENT_EXPORT(AUTOFILL) BASE_DECLARE_FEATURE(kAutofillEnableSecurityTouchEventFilteringAndroid); COMPONENT_EXPORT(AUTOFILL) BASE_DECLARE_FEATURE(kAutofillVirtualViewStructureAndroid); @@ -963,7 +962,7 @@ diff --git a/components/autofill/core/common/autofill_features.h b/components/au diff --git a/components/autofill/core/common/autofill_prefs.cc b/components/autofill/core/common/autofill_prefs.cc --- a/components/autofill/core/common/autofill_prefs.cc +++ b/components/autofill/core/common/autofill_prefs.cc -@@ -67,6 +67,8 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { +@@ -65,6 +65,8 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref( prefs::kAutofillCreditCardFidoAuthOfferCheckboxState, true); #endif diff --git a/build/patches/Enable-network-isolation-features.patch b/build/patches/Enable-network-isolation-features.patch index b68ecdbb6..1f36c1a88 100644 --- a/build/patches/Enable-network-isolation-features.patch +++ b/build/patches/Enable-network-isolation-features.patch @@ -19,7 +19,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/net/profile_network_context_service.cc b/chrome/browser/net/profile_network_context_service.cc --- a/chrome/browser/net/profile_network_context_service.cc +++ b/chrome/browser/net/profile_network_context_service.cc -@@ -1026,7 +1026,7 @@ bool GetHttpCacheBackendResetParam(PrefService* local_state) { +@@ -1181,7 +1181,7 @@ bool GetHttpCacheBackendResetParam(PrefService* local_state) { field_trial = base::FeatureList::GetFieldTrial( net::features::kSplitCacheByIncludeCredentials); current_field_trial_status += diff --git a/build/patches/Enable-percent-based-scrolling-on-Windows.patch b/build/patches/Enable-percent-based-scrolling-on-Windows.patch index 59440ab61..a9685d07a 100644 --- a/build/patches/Enable-percent-based-scrolling-on-Windows.patch +++ b/build/patches/Enable-percent-based-scrolling-on-Windows.patch @@ -14,7 +14,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html 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 -@@ -191,6 +191,9 @@ static_assert(!BUILDFLAG(IS_MAC) || +@@ -202,6 +202,9 @@ static_assert(!BUILDFLAG(IS_MAC) || BASE_FEATURE(kWindowsScrollingPersonality, "WindowsScrollingPersonality", kWindowsScrollingPersonalityDefaultStatus); diff --git a/build/patches/Enable-platform-aac-audio-and-h264-video.patch b/build/patches/Enable-platform-aac-audio-and-h264-video.patch index 330ff14b4..629793b60 100644 --- a/build/patches/Enable-platform-aac-audio-and-h264-video.patch +++ b/build/patches/Enable-platform-aac-audio-and-h264-video.patch @@ -64,8 +64,8 @@ diff --git a/media/base/android/media_codec_util.cc b/media/base/android/media_c + if (codec == AudioCodec::kAAC) return kAacMimeType; +#endif // Passthrough is possible for some bitstream formats. - const bool is_passthrough = sample_format == kSampleFormatDts || - sample_format == kSampleFormatDtsxP2 || + if (sample_format == kSampleFormatDts || + sample_format == kSampleFormatDtsxP2 || diff --git a/media/base/win/mf_helpers.cc b/media/base/win/mf_helpers.cc --- a/media/base/win/mf_helpers.cc +++ b/media/base/win/mf_helpers.cc diff --git a/build/patches/Enable-search-engine-settings-desktop-ui.patch b/build/patches/Enable-search-engine-settings-desktop-ui.patch index b2816c079..9dec1101c 100644 --- a/build/patches/Enable-search-engine-settings-desktop-ui.patch +++ b/build/patches/Enable-search-engine-settings-desktop-ui.patch @@ -7,7 +7,7 @@ The desktop ui is accessible via a button in the android ui. License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - .../settings/SettingsLauncherImpl.java | 10 + + .../settings/SettingsNavigationImpl.java | 10 + chrome/app/generated_resources.grd | 7 +- chrome/app/settings_strings.grdp | 3 + chrome/app/settings_strings_android.grdp | 260 ++++++++++++++++++ @@ -28,7 +28,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html chrome/browser/search/background/BUILD.gn | 4 +- .../browser/search_engines/android/BUILD.gn | 2 + .../java/res/layout/search_engine_layout.xml | 25 ++ - .../settings/SearchEngineSettings.java | 20 ++ + .../settings/SearchEngineSettings.java | 21 ++ chrome/browser/ui/BUILD.gn | 18 ++ .../edit_search_engine_controller.cc | 8 +- .../edit_search_engine_controller.h | 6 +- @@ -36,7 +36,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../keyword_editor_controller.h | 6 +- .../template_url_table_model.cc | 9 +- .../search_engines/template_url_table_model.h | 6 +- - .../webui/chrome_web_ui_controller_factory.cc | 6 + + .../webui/chrome_web_ui_controller_factory.cc | 7 +- chrome/browser/ui/webui/favicon_source.cc | 18 ++ chrome/browser/ui/webui/favicon_source.h | 2 + .../webui/settings/search_engines_handler.cc | 28 +- @@ -48,7 +48,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../ui/webui/settings/settings_ui_android.cc | 126 +++++++++ .../ui/webui/settings/settings_ui_android.h | 103 +++++++ chrome/chrome_paks.gni | 11 + - .../browser_ui/settings/SettingsLauncher.java | 2 + + .../settings/SettingsNavigation.java | 2 + .../search_engine_desktop_ui.grdp | 6 + .../android/template_url_service_android.cc | 2 +- .../search_engines/search_engines_switches.cc | 1 + @@ -57,21 +57,24 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html content/browser/webui/web_ui_impl.cc | 14 +- content/browser/webui/web_ui_impl.h | 3 + content/public/browser/web_ui.h | 1 + - third_party/polymer/v3_0/BUILD.gn | 6 + + third_party/polymer/v3_0/BUILD.gn | 15 +- ui/base/template_expressions.cc | 21 +- ui/webui/BUILD.gn | 7 + - ui/webui/resources/BUILD.gn | 10 + + ui/webui/resources/BUILD.gn | 20 ++ .../customize_color_scheme_mode/BUILD.gn | 2 +- .../cr_components/help_bubble/BUILD.gn | 2 +- + .../cr_components/localized_link/BUILD.gn | 2 +- + .../cr_components/managed_dialog/BUILD.gn | 2 +- + .../cr_components/managed_footnote/BUILD.gn | 2 +- .../cr_components/theme_color_picker/BUILD.gn | 2 +- + ui/webui/resources/cr_elements/BUILD.gn | 4 +- .../cr_elements/cr_dialog/cr_dialog.css | 2 +- .../resources/cr_elements/cr_shared_vars.css | 4 + ui/webui/resources/css/BUILD.gn | 2 +- ui/webui/resources/images/BUILD.gn | 2 +- - ui/webui/resources/include_polymer.gni | 2 +- ui/webui/resources/js/BUILD.gn | 2 +- ui/webui/resources/js/load_time_data.ts | 17 +- - 64 files changed, 1095 insertions(+), 63 deletions(-) + 67 files changed, 1118 insertions(+), 69 deletions(-) create mode 100644 chrome/app/settings_strings_android.grdp create mode 100644 chrome/browser/search_engines/android/java/res/layout/search_engine_layout.xml create mode 100644 chrome/browser/ui/webui/settings/settings_localized_strings_provider_android.cc @@ -80,10 +83,10 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html create mode 100644 chrome/browser/ui/webui/settings/settings_ui_android.h create mode 100644 components/browser_ui/strings/bromite_content_settings/search_engine_desktop_ui.grdp -diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsLauncherImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsLauncherImpl.java ---- a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsLauncherImpl.java -+++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsLauncherImpl.java -@@ -11,6 +11,9 @@ import android.os.Bundle; +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsNavigationImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsNavigationImpl.java +--- a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsNavigationImpl.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsNavigationImpl.java +@@ -12,6 +12,9 @@ import android.os.Bundle; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; @@ -93,9 +96,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin import org.chromium.base.IntentUtils; import org.chromium.chrome.browser.accessibility.settings.AccessibilitySettings; import org.chromium.chrome.browser.autofill.settings.AutofillPaymentMethodsFragment; -@@ -31,6 +34,13 @@ public class SettingsLauncherImpl implements SettingsLauncher { - /** Instantiated through SettingsLauncherFactory. */ - SettingsLauncherImpl() {} +@@ -32,6 +35,13 @@ public class SettingsNavigationImpl implements SettingsNavigation { + /** Instantiated through SettingsNavigationFactory. */ + SettingsNavigationImpl() {} + @Override + public void launchUrlInCustomTab(Context context, String url) { @@ -105,8 +108,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin + } + @Override - public void launchSettingsActivity(Context context) { - launchSettingsActivity(context, SettingsFragment.MAIN); + public void startSettings(Context context) { + startSettings(context, SettingsFragment.MAIN); 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 @@ -134,7 +137,7 @@ diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp --- a/chrome/app/settings_strings.grdp +++ b/chrome/app/settings_strings.grdp -@@ -2496,6 +2496,9 @@ +@@ -2502,6 +2502,9 @@ URL with %s in place of query @@ -412,7 +415,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 -@@ -3491,6 +3491,9 @@ static_library("browser") { +@@ -3501,6 +3501,9 @@ static_library("browser") { "//components/user_scripts/android", ] } @@ -425,7 +428,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn diff --git a/chrome/browser/chrome_browser_interface_binders.cc b/chrome/browser/chrome_browser_interface_binders.cc --- a/chrome/browser/chrome_browser_interface_binders.cc +++ b/chrome/browser/chrome_browser_interface_binders.cc -@@ -139,6 +139,9 @@ +@@ -141,6 +141,9 @@ #endif #if BUILDFLAG(IS_ANDROID) @@ -435,8 +438,8 @@ diff --git a/chrome/browser/chrome_browser_interface_binders.cc b/chrome/browser #include "chrome/browser/android/dom_distiller/distiller_ui_handle_android.h" #include "chrome/browser/facilitated_payments/payment_link_handler_binder.h" #include "chrome/browser/offline_pages/android/offline_page_auto_fetcher.h" -@@ -1195,6 +1198,15 @@ void PopulateChromeWebUIFrameBinders( - app_management::mojom::PageHandlerFactory, WebAppSettingsUI>(map); +@@ -1188,6 +1191,15 @@ void PopulateChromeWebUIFrameBinders( + OnDeviceTranslationInternalsUI>(map); #endif +#if BUILDFLAG(IS_ANDROID) @@ -584,7 +587,7 @@ diff --git a/chrome/browser/resources/settings/search_engines_page/search_engine urlLocked: boolean; } -@@ -99,7 +100,7 @@ export interface SearchEnginesBrowserProxy { +@@ -100,7 +101,7 @@ export interface SearchEnginesBrowserProxy { searchEngineEditCancelled(): void; searchEngineEditCompleted( @@ -593,7 +596,7 @@ diff --git a/chrome/browser/resources/settings/search_engines_page/search_engine getSearchEnginesList(): Promise; -@@ -141,11 +142,12 @@ export class SearchEnginesBrowserProxyImpl implements +@@ -147,11 +148,12 @@ export class SearchEnginesBrowserProxyImpl implements } searchEngineEditCompleted( @@ -607,7 +610,7 @@ diff --git a/chrome/browser/resources/settings/search_engines_page/search_engine ]); } -@@ -158,7 +160,7 @@ export class SearchEnginesBrowserProxyImpl implements +@@ -168,7 +170,7 @@ export class SearchEnginesBrowserProxyImpl implements } recordSearchEnginesPageHistogram(interaction: SearchEnginesInteractions) { @@ -828,12 +831,12 @@ diff --git a/chrome/browser/search_engines/android/java/src/org/chromium/chrome/ import org.chromium.chrome.browser.search_engines.R; import org.chromium.chrome.browser.search_engines.TemplateUrlServiceFactory; import org.chromium.chrome.browser.settings.ProfileDependentSetting; -+import org.chromium.chrome.browser.settings.SettingsLauncherFactory; -+import org.chromium.components.browser_ui.settings.SettingsLauncher; - import org.chromium.components.browser_ui.settings.SettingsPage; ++import org.chromium.chrome.browser.settings.SettingsNavigationFactory; ++import org.chromium.components.browser_ui.settings.SettingsNavigation; + import org.chromium.components.browser_ui.settings.EmbeddableSettingsPage; import org.chromium.components.search_engines.TemplateUrlService; -@@ -57,6 +63,20 @@ public class SearchEngineSettings extends ListFragment +@@ -57,6 +63,21 @@ public class SearchEngineSettings extends ListFragment return mPageTitle; } @@ -844,8 +847,9 @@ diff --git a/chrome/browser/search_engines/android/java/src/org/chromium/chrome/ + + TextView selectButton = (TextView) v.findViewById(R.id.open_desktop_ui); + selectButton.setOnClickListener(view -> { -+ SettingsLauncher settingsLauncher = SettingsLauncherFactory.createSettingsLauncher(); -+ settingsLauncher.launchUrlInCustomTab(getContext(), ++ SettingsNavigation settingsNavigation = ++ SettingsNavigationFactory.createSettingsNavigation(); ++ settingsNavigation.launchUrlInCustomTab(getContext(), + "chrome://settings/searchEngines"); + }); + return v; @@ -857,7 +861,7 @@ diff --git a/chrome/browser/search_engines/android/java/src/org/chromium/chrome/ 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 -@@ -712,6 +712,12 @@ static_library("ui") { +@@ -689,6 +689,12 @@ static_library("ui") { "//v8:v8_version", ] @@ -870,7 +874,7 @@ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn if (is_chrome_branded) { deps += [ "//components/plus_addresses/resources:vector_icons" ] } -@@ -1003,6 +1009,18 @@ static_library("ui") { +@@ -984,6 +990,18 @@ static_library("ui") { # TODO(b/335257259): Resolve circular deps. # Any circular includes must depend on the target "//chrome/browser:browser_public_dependencies". allow_circular_includes_from += [ "//chrome/browser/facilitated_payments" ] @@ -1072,26 +1076,27 @@ diff --git a/chrome/browser/ui/search_engines/template_url_table_model.h b/chrom 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 -@@ -110,6 +110,8 @@ - #include "chrome/browser/ui/webui/offline/offline_internals_ui.h" - #include "chrome/browser/ui/webui/webapks/webapks_ui.h" +@@ -79,6 +79,8 @@ + + #if BUILDFLAG(IS_ANDROID) #include "components/feed/feed_feature_list.h" +#include "chrome/browser/ui/webui/settings/settings_ui_android.h" +#include "chrome/browser/ui/webui/settings/settings_utils.h" #else // BUILDFLAG(IS_ANDROID) #include "chrome/browser/media/router/discovery/access_code/access_code_cast_feature.h" - #include "chrome/browser/media/router/media_router_feature.h" -@@ -501,6 +503,10 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, - return &NewWebUI; - } - #endif // !BUILDFLAG(IS_ANDROID) + #include "chrome/browser/ui/ui_features.h" +@@ -270,7 +272,10 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, + if (url.host_piece() == user_scripts::kChromeUIUserScriptsHost) + return &NewWebUI; + #endif +- +#if BUILDFLAG(IS_ANDROID) + if (url.host_piece() == chrome::kChromeUISettingsHost) + return &NewWebUI; +#endif // BUILDFLAG(IS_ANDROID) - #if BUILDFLAG(IS_WIN) - if (url.host_piece() == chrome::kChromeUIConflictsHost) - return &NewWebUI; + #if !BUILDFLAG(IS_ANDROID) + if (url.host_piece() == chrome::kChromeUINewTabHost) { + // The URL chrome://newtab/ can be either a virtual or a real URL, diff --git a/chrome/browser/ui/webui/favicon_source.cc b/chrome/browser/ui/webui/favicon_source.cc --- a/chrome/browser/ui/webui/favicon_source.cc +++ b/chrome/browser/ui/webui/favicon_source.cc @@ -1152,7 +1157,7 @@ diff --git a/chrome/browser/ui/webui/favicon_source.cc b/chrome/browser/ui/webui return; } int icon_size = std::ceil(parsed.size_in_dip * parsed.device_scale_factor); -@@ -260,7 +272,11 @@ void FaviconSource::SendDefaultResponse( +@@ -261,7 +273,11 @@ void FaviconSource::SendDefaultResponse( SendDefaultResponse(std::move(callback), 16, 1.0f, force_light_mode ? false @@ -1164,7 +1169,7 @@ diff --git a/chrome/browser/ui/webui/favicon_source.cc b/chrome/browser/ui/webui } void FaviconSource::SendDefaultResponse( -@@ -270,6 +286,7 @@ void FaviconSource::SendDefaultResponse( +@@ -271,6 +287,7 @@ void FaviconSource::SendDefaultResponse( bool dark_mode) { int resource_id; switch (size_in_dip) { @@ -1172,7 +1177,7 @@ diff --git a/chrome/browser/ui/webui/favicon_source.cc b/chrome/browser/ui/webui case 64: resource_id = dark_mode ? IDR_DEFAULT_FAVICON_DARK_64 : IDR_DEFAULT_FAVICON_64; -@@ -278,6 +295,7 @@ void FaviconSource::SendDefaultResponse( +@@ -279,6 +296,7 @@ void FaviconSource::SendDefaultResponse( resource_id = dark_mode ? IDR_DEFAULT_FAVICON_DARK_32 : IDR_DEFAULT_FAVICON_32; break; @@ -1219,7 +1224,7 @@ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.cc b/chrome // Dummy number used for indicating that a new search engine is added. const int kNewSearchEngineIndex = -1; -@@ -219,15 +222,18 @@ base::Value::Dict SearchEnginesHandler::CreateDictionaryForEngine( +@@ -223,15 +226,18 @@ base::Value::Dict SearchEnginesHandler::CreateDictionaryForEngine( table_model->GetText(index, IDS_SEARCH_ENGINES_EDITOR_DESCRIPTION_COLUMN)); dict.Set("keyword", table_model->GetKeywordToDisplay(index)); @@ -1239,7 +1244,7 @@ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.cc b/chrome // The icons that are used for search engines in the EEA region are bundled // with Chrome. We use the favicon service for countries outside the EEA // region to guarantee having icons for all search engines. -@@ -246,6 +252,7 @@ base::Value::Dict SearchEnginesHandler::CreateDictionaryForEngine( +@@ -250,6 +256,7 @@ base::Value::Dict SearchEnginesHandler::CreateDictionaryForEngine( dict.Set("iconPath", base::StrCat({icon_path, "@2x"})); } } @@ -1247,7 +1252,7 @@ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.cc b/chrome dict.Set("modelIndex", base::checked_cast(index)); -@@ -262,6 +269,7 @@ base::Value::Dict SearchEnginesHandler::CreateDictionaryForEngine( +@@ -266,6 +273,7 @@ base::Value::Dict SearchEnginesHandler::CreateDictionaryForEngine( dict.Set("isOmniboxExtension", type == TemplateURL::OMNIBOX_API_EXTENSION); dict.Set("isPrepopulated", template_url->prepopulate_id() > 0); dict.Set("isStarterPack", template_url->starter_pack_id() > 0); @@ -1255,7 +1260,7 @@ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.cc b/chrome if (type == TemplateURL::NORMAL_CONTROLLED_BY_EXTENSION || type == TemplateURL::OMNIBOX_API_EXTENSION) { const extensions::Extension* extension = -@@ -278,6 +286,7 @@ base::Value::Dict SearchEnginesHandler::CreateDictionaryForEngine( +@@ -282,6 +290,7 @@ base::Value::Dict SearchEnginesHandler::CreateDictionaryForEngine( dict.Set("extension", std::move(ext_info)); } } @@ -1263,7 +1268,7 @@ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.cc b/chrome return dict; } -@@ -358,12 +367,13 @@ void SearchEnginesHandler::HandleSearchEngineEditStarted( +@@ -400,12 +409,13 @@ void SearchEnginesHandler::HandleSearchEngineEditStarted( void SearchEnginesHandler::OnEditedKeyword(TemplateURL* template_url, const std::u16string& title, const std::u16string& keyword, @@ -1280,7 +1285,7 @@ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.cc b/chrome edit_controller_.reset(); } -@@ -391,6 +401,8 @@ bool SearchEnginesHandler::CheckFieldValidity(const std::string& field_name, +@@ -433,6 +443,8 @@ bool SearchEnginesHandler::CheckFieldValidity(const std::string& field_name, is_valid = edit_controller_->IsKeywordValid(base::UTF8ToUTF16(field_value)); else if (field_name.compare(kQueryUrlField) == 0) is_valid = edit_controller_->IsURLValid(field_value); @@ -1289,7 +1294,7 @@ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.cc b/chrome else NOTREACHED_IN_MIGRATION(); -@@ -410,18 +422,20 @@ void SearchEnginesHandler::HandleSearchEngineEditCompleted( +@@ -452,18 +464,20 @@ void SearchEnginesHandler::HandleSearchEngineEditCompleted( if (!edit_controller_.get()) return; @@ -1329,7 +1334,7 @@ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.h b/chrome/ diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc --- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc +++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc -@@ -2342,6 +2342,8 @@ void AddSearchEnginesStrings(content::WebUIDataSource* html_source) { +@@ -2466,6 +2466,8 @@ void AddSearchEnginesStrings(content::WebUIDataSource* html_source) { {"searchEnginesQueryURL", IDS_SETTINGS_SEARCH_ENGINES_QUERY_URL}, {"searchEnginesQueryURLExplanation", IDS_SETTINGS_SEARCH_ENGINES_QUERY_URL_EXPLANATION}, @@ -1338,7 +1343,7 @@ diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provide {"searchEnginesMakeDefault", IDS_SETTINGS_SEARCH_ENGINES_MAKE_DEFAULT}, {"searchEnginesActivate", IDS_SETTINGS_SEARCH_ENGINES_ACTIVATE}, {"searchEnginesDeactivate", IDS_SETTINGS_SEARCH_ENGINES_DEACTIVATE}, -@@ -3690,6 +3692,12 @@ void AddLocalizedStrings(content::WebUIDataSource* html_source, +@@ -3805,6 +3807,12 @@ void AddLocalizedStrings(content::WebUIDataSource* html_source, AddSystemStrings(html_source); #endif @@ -1581,7 +1586,7 @@ new file mode 100644 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 -@@ -460,12 +460,12 @@ SettingsUI::SettingsUI(content::WebUI* web_ui) +@@ -471,12 +471,12 @@ SettingsUI::SettingsUI(content::WebUI* web_ui) web_ui->AddMessageHandler(std::make_unique()); webui::SetupWebUIDataSource( @@ -1838,7 +1843,7 @@ new file mode 100644 diff --git a/chrome/chrome_paks.gni b/chrome/chrome_paks.gni --- a/chrome/chrome_paks.gni +++ b/chrome/chrome_paks.gni -@@ -156,6 +156,17 @@ template("chrome_extra_paks") { +@@ -158,6 +158,17 @@ template("chrome_extra_paks") { sources += invoker.additional_paks } @@ -1856,17 +1861,17 @@ diff --git a/chrome/chrome_paks.gni b/chrome/chrome_paks.gni if (!is_android) { # New paks should be added here by default. sources += [ -diff --git a/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsLauncher.java b/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsLauncher.java ---- a/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsLauncher.java -+++ b/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsLauncher.java -@@ -56,6 +56,8 @@ public interface SettingsLauncher { +diff --git a/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsNavigation.java b/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsNavigation.java +--- a/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsNavigation.java ++++ b/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsNavigation.java +@@ -56,6 +56,8 @@ public interface SettingsNavigation { int FINANCIAL_ACCOUNTS = 10; } + void launchUrlInCustomTab(Context context, String url); + /** - * Launches a Settings Activity with the default (top-level) fragment. + * Starts settings with the default (top-level) fragment. * diff --git a/components/browser_ui/strings/bromite_content_settings/search_engine_desktop_ui.grdp b/components/browser_ui/strings/bromite_content_settings/search_engine_desktop_ui.grdp new file mode 100644 @@ -1943,7 +1948,7 @@ diff --git a/components/search_engines/template_url_service.cc b/components/sear diff --git a/components/search_engines/template_url_service.h b/components/search_engines/template_url_service.h --- a/components/search_engines/template_url_service.h +++ b/components/search_engines/template_url_service.h -@@ -250,7 +250,8 @@ class TemplateURLService final : public WebDataServiceConsumer, +@@ -254,7 +254,8 @@ class TemplateURLService final : public WebDataServiceConsumer, TemplateURL* AddWithOverrides(std::unique_ptr template_url, const std::u16string& short_name, const std::u16string& keyword, @@ -1953,7 +1958,7 @@ diff --git a/components/search_engines/template_url_service.h b/components/searc // Removes the keyword from the model. This deletes the supplied TemplateURL. // This fails if the supplied template_url is the default search provider. -@@ -314,7 +315,8 @@ class TemplateURLService final : public WebDataServiceConsumer, +@@ -318,7 +319,8 @@ class TemplateURLService final : public WebDataServiceConsumer, void ResetTemplateURL(TemplateURL* url, const std::u16string& title, const std::u16string& keyword, @@ -1966,7 +1971,7 @@ diff --git a/components/search_engines/template_url_service.h b/components/searc diff --git a/content/browser/webui/web_ui_impl.cc b/content/browser/webui/web_ui_impl.cc --- a/content/browser/webui/web_ui_impl.cc +++ b/content/browser/webui/web_ui_impl.cc -@@ -238,6 +238,10 @@ void WebUIImpl::RegisterMessageCallback(std::string_view message, +@@ -279,6 +279,10 @@ void WebUIImpl::RegisterMessageCallback(std::string_view message, message_callbacks_.emplace(message, std::move(callback)); } @@ -1977,7 +1982,7 @@ diff --git a/content/browser/webui/web_ui_impl.cc b/content/browser/webui/web_ui void WebUIImpl::ProcessWebUIMessage(const GURL& source_url, const std::string& message, base::Value::List args) { -@@ -251,8 +255,14 @@ void WebUIImpl::ProcessWebUIMessage(const GURL& source_url, +@@ -292,8 +296,14 @@ void WebUIImpl::ProcessWebUIMessage(const GURL& source_url, return; } @@ -1997,7 +2002,7 @@ diff --git a/content/browser/webui/web_ui_impl.cc b/content/browser/webui/web_ui diff --git a/content/browser/webui/web_ui_impl.h b/content/browser/webui/web_ui_impl.h --- a/content/browser/webui/web_ui_impl.h +++ b/content/browser/webui/web_ui_impl.h -@@ -81,6 +81,7 @@ class CONTENT_EXPORT WebUIImpl : public WebUI, public mojom::WebUIHost { +@@ -83,6 +83,7 @@ class CONTENT_EXPORT WebUIImpl : public WebUI, public mojom::WebUIHost { void ProcessWebUIMessage(const GURL& source_url, const std::string& message, base::Value::List args) override; @@ -2005,7 +2010,7 @@ diff --git a/content/browser/webui/web_ui_impl.h b/content/browser/webui/web_ui_ bool CanCallJavascript() override; void CallJavascriptFunctionUnsafe( std::string_view function_name, -@@ -153,6 +154,8 @@ class CONTENT_EXPORT WebUIImpl : public WebUI, public mojom::WebUIHost { +@@ -160,6 +161,8 @@ class CONTENT_EXPORT WebUIImpl : public WebUI, public mojom::WebUIHost { std::unique_ptr controller_; @@ -2028,7 +2033,16 @@ diff --git a/content/public/browser/web_ui.h b/content/public/browser/web_ui.h diff --git a/third_party/polymer/v3_0/BUILD.gn b/third_party/polymer/v3_0/BUILD.gn --- a/third_party/polymer/v3_0/BUILD.gn +++ b/third_party/polymer/v3_0/BUILD.gn -@@ -34,6 +34,12 @@ js_files = [ +@@ -8,7 +8,7 @@ import("//tools/typescript/ts_library.gni") + import("//ui/webui/resources/tools/generate_grd.gni") + import("//ui/webui/resources/tools/minify_js.gni") + +-assert(!is_android && !is_ios) ++#assert(!is_android && !is_ios) + + js_files = [ + "iron-a11y-keys-behavior/iron-a11y-keys-behavior.js", +@@ -31,12 +31,25 @@ js_files = [ "paper-spinner/paper-spinner-styles.js", ] @@ -2041,6 +2055,19 @@ diff --git a/third_party/polymer/v3_0/BUILD.gn b/third_party/polymer/v3_0/BUILD. # Also needed on LaCros for Print Preview. Remove once CrOS Print Preview # launches. if (is_chromeos) { + js_files += [ "iron-fit-behavior/iron-fit-behavior.js" ] + } + ++if (is_android) { ++ js_files += [ ++ "iron-icon/iron-icon.js", ++ "iron-iconset-svg/iron-iconset-svg.js", ++ ] ++} ++ + if (is_chromeos_ash) { + js_files += [ + "iron-a11y-announcer/iron-a11y-announcer.js", diff --git a/ui/base/template_expressions.cc b/ui/base/template_expressions.cc --- a/ui/base/template_expressions.cc +++ b/ui/base/template_expressions.cc @@ -2101,23 +2128,33 @@ diff --git a/ui/webui/BUILD.gn b/ui/webui/BUILD.gn diff --git a/ui/webui/resources/BUILD.gn b/ui/webui/resources/BUILD.gn --- a/ui/webui/resources/BUILD.gn +++ b/ui/webui/resources/BUILD.gn -@@ -77,6 +77,16 @@ generate_grd("build_grd") { - "$target_gen_dir/cr_components/managed_footnote/resources.grdp", - "$target_gen_dir/cr_components/most_visited/resources.grdp", - ] -+ if (is_android) { -+ public_deps -= [ -+ "cr_components/app_management:build_grdp", -+ "cr_components/most_visited:build_grdp", -+ ] -+ grdp_files -= [ -+ "$target_gen_dir/cr_components/app_management/resources.grdp", -+ "$target_gen_dir/cr_components/most_visited/resources.grdp", -+ ] -+ } +@@ -51,6 +51,26 @@ generate_grd("build_grd") { + "$target_gen_dir/mojo/resources.grdp", + ] - if (use_blink) { - if (use_nss_certs || chrome_root_store_cert_management_ui) { ++ if (is_android) { ++ public_deps += [ ++ "cr_components/customize_color_scheme_mode:build_grdp", ++ "cr_components/help_bubble:build_grdp", ++ "cr_components/localized_link:build_grdp", ++ "cr_components/managed_dialog:build_grdp", ++ "cr_components/managed_footnote:build_grdp", ++ "cr_components/theme_color_picker:build_grdp", ++ "//third_party/polymer/v3_0:build_grdp", ++ ] ++ grdp_files += [ ++ "$target_gen_dir/cr_components/customize_color_scheme_mode/resources.grdp", ++ "$target_gen_dir/cr_components/help_bubble/resources.grdp", ++ "$target_gen_dir/cr_components/localized_link/resources.grdp", ++ "$target_gen_dir/cr_components/managed_dialog/resources.grdp", ++ "$target_gen_dir/cr_components/managed_footnote/resources.grdp", ++ "$target_gen_dir/cr_components/theme_color_picker/resources.grdp", ++ "$root_gen_dir/third_party/polymer/v3_0/polymer_3_0_resources.grdp", ++ ] ++ } + if (!is_android && !is_ios) { + public_deps += [ + "cr_components/app_management:build_grdp", diff --git a/ui/webui/resources/cr_components/customize_color_scheme_mode/BUILD.gn b/ui/webui/resources/cr_components/customize_color_scheme_mode/BUILD.gn --- a/ui/webui/resources/cr_components/customize_color_scheme_mode/BUILD.gn +++ b/ui/webui/resources/cr_components/customize_color_scheme_mode/BUILD.gn @@ -2142,6 +2179,42 @@ diff --git a/ui/webui/resources/cr_components/help_bubble/BUILD.gn b/ui/webui/re mojom("mojo_bindings") { sources = [ "help_bubble.mojom" ] +diff --git a/ui/webui/resources/cr_components/localized_link/BUILD.gn b/ui/webui/resources/cr_components/localized_link/BUILD.gn +--- a/ui/webui/resources/cr_components/localized_link/BUILD.gn ++++ b/ui/webui/resources/cr_components/localized_link/BUILD.gn +@@ -4,7 +4,7 @@ + + import("//ui/webui/resources/tools/build_webui.gni") + +-assert(!is_android && !is_ios) ++#assert(!is_android && !is_ios) + + build_webui("build") { + grd_prefix = "cr_components_localized_link" +diff --git a/ui/webui/resources/cr_components/managed_dialog/BUILD.gn b/ui/webui/resources/cr_components/managed_dialog/BUILD.gn +--- a/ui/webui/resources/cr_components/managed_dialog/BUILD.gn ++++ b/ui/webui/resources/cr_components/managed_dialog/BUILD.gn +@@ -4,7 +4,7 @@ + + import("//ui/webui/resources/tools/build_webui.gni") + +-assert(!is_android && !is_ios) ++#assert(!is_android && !is_ios) + + build_webui("build") { + grd_prefix = "cr_components_managed_dialog" +diff --git a/ui/webui/resources/cr_components/managed_footnote/BUILD.gn b/ui/webui/resources/cr_components/managed_footnote/BUILD.gn +--- a/ui/webui/resources/cr_components/managed_footnote/BUILD.gn ++++ b/ui/webui/resources/cr_components/managed_footnote/BUILD.gn +@@ -4,7 +4,7 @@ + + import("//ui/webui/resources/tools/build_webui.gni") + +-assert(!is_android && !is_ios) ++#assert(!is_android && !is_ios) + + build_webui("build") { + grd_prefix = "cr_components_managed_footnote" diff --git a/ui/webui/resources/cr_components/theme_color_picker/BUILD.gn b/ui/webui/resources/cr_components/theme_color_picker/BUILD.gn --- a/ui/webui/resources/cr_components/theme_color_picker/BUILD.gn +++ b/ui/webui/resources/cr_components/theme_color_picker/BUILD.gn @@ -2154,6 +2227,27 @@ diff --git a/ui/webui/resources/cr_components/theme_color_picker/BUILD.gn b/ui/w mojom("mojom") { sources = [ "theme_color_picker.mojom" ] +diff --git a/ui/webui/resources/cr_elements/BUILD.gn b/ui/webui/resources/cr_elements/BUILD.gn +--- a/ui/webui/resources/cr_elements/BUILD.gn ++++ b/ui/webui/resources/cr_elements/BUILD.gn +@@ -37,7 +37,7 @@ build_webui("build") { + "cr_tabs/cr_tabs.css", + ] + +- if (!is_android && !is_ios) { ++ if (!is_ios) { + web_component_files += [ "cr_a11y_announcer/cr_a11y_announcer.ts" ] + + icons_html_files = [ +@@ -233,7 +233,7 @@ build_webui("build") { + "../js:build_ts", + "//third_party/lit/v3_0:build_ts", + ] +- if (!is_android && !is_ios) { ++ if (!is_ios) { + ts_deps += [ "//third_party/polymer/v3_0:library" ] + } + ts_definitions = [ diff --git a/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.css b/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.css --- a/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.css +++ b/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.css @@ -2204,15 +2298,6 @@ diff --git a/ui/webui/resources/images/BUILD.gn b/ui/webui/resources/images/BUIL input_files += [ "arrow_down.svg", "arrow_right.svg", -diff --git a/ui/webui/resources/include_polymer.gni b/ui/webui/resources/include_polymer.gni ---- a/ui/webui/resources/include_polymer.gni -+++ b/ui/webui/resources/include_polymer.gni -@@ -2,4 +2,4 @@ - # Use of this source code is governed by a BSD-style license that can be - # found in the LICENSE file. - --include_polymer = !is_android && !is_ios -+include_polymer = !is_ios diff --git a/ui/webui/resources/js/BUILD.gn b/ui/webui/resources/js/BUILD.gn --- a/ui/webui/resources/js/BUILD.gn +++ b/ui/webui/resources/js/BUILD.gn diff --git a/build/patches/Enable-share-intent.patch b/build/patches/Enable-share-intent.patch index 8777f720b..20b405258 100644 --- a/build/patches/Enable-share-intent.patch +++ b/build/patches/Enable-share-intent.patch @@ -34,7 +34,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 -@@ -575,6 +575,7 @@ chrome_java_resources = [ +@@ -568,6 +568,7 @@ chrome_java_resources = [ "java/res/layout/signin_settings_card_view.xml", "java/res/layout/status_indicator_container.xml", "java/res/layout/suggestions_tile_view_condensed.xml", @@ -45,7 +45,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 -@@ -1021,6 +1021,7 @@ chrome_java_sources = [ +@@ -1027,6 +1027,7 @@ chrome_java_sources = [ "java/src/org/chromium/chrome/browser/signin/SyncConsentActivity.java", "java/src/org/chromium/chrome/browser/signin/SyncConsentActivityLauncherImpl.java", "java/src/org/chromium/chrome/browser/signin/SyncConsentFragment.java", @@ -56,7 +56,7 @@ diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml --- a/chrome/android/java/AndroidManifest.xml +++ b/chrome/android/java/AndroidManifest.xml -@@ -245,12 +245,6 @@ by a child template that "extends" this file. +@@ -249,12 +249,6 @@ by a child template that "extends" this file. @@ -69,7 +69,7 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro -@@ -329,6 +323,10 @@ by a child template that "extends" this file. +@@ -333,6 +327,10 @@ by a child template that "extends" this file. @@ -80,7 +80,7 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro -@@ -365,6 +363,24 @@ by a child template that "extends" this file. +@@ -369,6 +367,24 @@ by a child template that "extends" this file. @@ -211,7 +211,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.j /** A hash code for the URL to verify intent data hasn't been modified. */ public static final String EXTRA_DATA_HASH_CODE = "org.chromium.chrome.browser.data_hash"; -@@ -1364,6 +1367,17 @@ public class IntentHandler { +@@ -1363,6 +1366,17 @@ public class IntentHandler { return IntentUtils.safeGetSerializableExtra(intent, EXTRA_TAB_LAUNCH_TYPE); } @@ -229,7 +229,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.j /** * Creates an Intent that will launch a ChromeTabbedActivity on the new tab page. The Intent * will be trusted and therefore able to launch Incognito tabs. -@@ -1493,7 +1507,7 @@ public class IntentHandler { +@@ -1492,7 +1506,7 @@ public class IntentHandler { String headers = getExtraHeadersFromIntent(intent); headers = maybeAddAdditionalContentHeaders(intent, url, headers); @@ -293,7 +293,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessIni import org.chromium.chrome.browser.usb.UsbNotificationManager; import org.chromium.chrome.browser.util.AfterStartupTaskUtils; import org.chromium.chrome.browser.webapps.ChromeWebApkHost; -@@ -675,6 +676,7 @@ public class ProcessInitializationHandler { +@@ -670,6 +671,7 @@ public class ProcessInitializationHandler { ::makeDeferredRecordings); tasks.add(WebApkUninstallTracker::runDeferredTasks); @@ -468,7 +468,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 -@@ -298,6 +298,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { +@@ -306,6 +306,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { &kSearchReadyOmniboxFeature, &kRelatedSearchesAllLanguage, &kRelatedSearchesSwitch, @@ -479,7 +479,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 -@@ -441,6 +441,7 @@ public abstract class ChromeFeatureList { +@@ -468,6 +468,7 @@ public abstract class ChromeFeatureList { public static final String READER_MODE_IN_CCT = "ReaderModeInCCT"; public static final String READING_LIST_ENABLE_SYNC_TRANSPORT_MODE_UPON_SIGNIN = "ReadingListEnableSyncTransportModeUponSignIn"; @@ -490,7 +490,7 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f 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 -@@ -5870,6 +5870,19 @@ To change this setting, BEGIN_LINKdelete the Chrome d +@@ -5918,6 +5918,19 @@ To change this setting, BEGIN_LINKdelete the Chrome d Make sure a phone app is enabled on this device diff --git a/build/patches/Enables-deactivation-of-the-js-debugger-statement.patch b/build/patches/Enables-deactivation-of-the-js-debugger-statement.patch index 9b72d5e5d..9af76ddbe 100644 --- a/build/patches/Enables-deactivation-of-the-js-debugger-statement.patch +++ b/build/patches/Enables-deactivation-of-the-js-debugger-statement.patch @@ -28,7 +28,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/third_party/devtools-frontend/src/front_end/core/sdk/DebuggerModel.ts b/third_party/devtools-frontend/src/front_end/core/sdk/DebuggerModel.ts --- a/third_party/devtools-frontend/src/front_end/core/sdk/DebuggerModel.ts +++ b/third_party/devtools-frontend/src/front_end/core/sdk/DebuggerModel.ts -@@ -225,6 +225,9 @@ export class DebuggerModel extends SDKModel { +@@ -231,6 +231,9 @@ export class DebuggerModel extends SDKModel { Common.Settings.Settings.instance() .moduleSetting('disable-async-stack-traces') .addChangeListener(this.asyncStackTracesStateChanged, this); @@ -38,7 +38,7 @@ diff --git a/third_party/devtools-frontend/src/front_end/core/sdk/DebuggerModel. Common.Settings.Settings.instance() .moduleSetting('breakpoints-active') .addChangeListener(this.breakpointsActiveChanged, this); -@@ -238,6 +241,7 @@ export class DebuggerModel extends SDKModel { +@@ -244,6 +247,7 @@ export class DebuggerModel extends SDKModel { Common.Settings.Settings.instance() .moduleSetting('js-source-maps-enabled') .addChangeListener(event => this.#sourceMapManagerInternal.setEnabled((event.data as boolean))); @@ -46,7 +46,7 @@ diff --git a/third_party/devtools-frontend/src/front_end/core/sdk/DebuggerModel. const resourceTreeModel = (target.model(ResourceTreeModel) as ResourceTreeModel); if (resourceTreeModel) { -@@ -396,6 +400,11 @@ export class DebuggerModel extends SDKModel { +@@ -435,6 +439,11 @@ export class DebuggerModel extends SDKModel { return this.agent.invoke_setAsyncCallStackDepth({maxDepth}); } @@ -72,7 +72,7 @@ diff --git a/third_party/devtools-frontend/src/front_end/core/sdk/sdk-meta.ts b/ /** *@description Title of a setting under the Debugger category that can be invoked through the Command Menu */ -@@ -374,6 +378,25 @@ Common.Settings.registerSettingExtension({ +@@ -373,6 +377,25 @@ Common.Settings.registerSettingExtension({ ], }); @@ -101,22 +101,22 @@ diff --git a/third_party/devtools-frontend/src/front_end/core/sdk/sdk-meta.ts b/ diff --git a/third_party/devtools-frontend/src/front_end/generated/InspectorBackendCommands.js b/third_party/devtools-frontend/src/front_end/generated/InspectorBackendCommands.js --- a/third_party/devtools-frontend/src/front_end/generated/InspectorBackendCommands.js +++ b/third_party/devtools-frontend/src/front_end/generated/InspectorBackendCommands.js -@@ -1384,6 +1384,10 @@ inspectorBackend.registerCommand("Debugger.restartFrame", [{"name": "callFrameId - inspectorBackend.registerCommand("Debugger.resume", [{"name": "terminateOnResume", "type": "boolean", "optional": true, "description": "Set to true to terminate execution upon resuming execution. In contrast to Runtime.terminateExecution, this will allows to execute further JavaScript (i.e. via evaluation) until execution of the paused code is actually resumed, at which point termination is triggered. If execution is currently not paused, this parameter has no effect.", "typeRef": null}], [], "Resumes JavaScript execution."); +@@ -1387,6 +1387,10 @@ inspectorBackend.registerCommand("Debugger.resume", [{"name": "terminateOnResume inspectorBackend.registerCommand("Debugger.searchInContent", [{"name": "scriptId", "type": "string", "optional": false, "description": "Id of the script to search in.", "typeRef": "Runtime.ScriptId"}, {"name": "query", "type": "string", "optional": false, "description": "String to search for.", "typeRef": null}, {"name": "caseSensitive", "type": "boolean", "optional": true, "description": "If true, search is case sensitive.", "typeRef": null}, {"name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats string parameter as regex.", "typeRef": null}], ["result"], "Searches for given string in script content."); inspectorBackend.registerCommand("Debugger.setAsyncCallStackDepth", [{"name": "maxDepth", "type": "number", "optional": false, "description": "Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async call stacks (default).", "typeRef": null}], [], "Enables or disables async call stacks tracking."); + inspectorBackend.registerCommand("Debugger.setBlackboxExecutionContexts", [{"name": "uniqueIds", "type": "array", "optional": false, "description": "Array of execution context unique ids for the debugger to ignore.", "typeRef": "string"}], [], "Replace previous blackbox execution contexts with passed ones. Forces backend to skip stepping/pausing in scripts in these execution contexts. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful."); +inspectorBackend.registerCommand("Debugger.setDebuggerStatementEnabled", [ + {"name": "value", "type": "boolean", "optional": false, + "description": "", + "typeRef": null}], [], ""); - inspectorBackend.registerCommand("Debugger.setBlackboxPatterns", [{"name": "patterns", "type": "array", "optional": false, "description": "Array of regexps that will be used to check script url for blackbox state.", "typeRef": "string"}], [], "Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful."); + inspectorBackend.registerCommand("Debugger.setBlackboxPatterns", [{"name": "patterns", "type": "array", "optional": false, "description": "Array of regexps that will be used to check script url for blackbox state.", "typeRef": "string"}, {"name": "skipAnonymous", "type": "boolean", "optional": true, "description": "If true, also ignore scripts with no source url.", "typeRef": null}], [], "Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful."); inspectorBackend.registerCommand("Debugger.setBlackboxedRanges", [{"name": "scriptId", "type": "string", "optional": false, "description": "Id of the script.", "typeRef": "Runtime.ScriptId"}, {"name": "positions", "type": "array", "optional": false, "description": "", "typeRef": "Debugger.ScriptPosition"}], [], "Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted."); inspectorBackend.registerCommand("Debugger.setBreakpoint", [{"name": "location", "type": "object", "optional": false, "description": "Location to set breakpoint in.", "typeRef": "Debugger.Location"}, {"name": "condition", "type": "string", "optional": true, "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.", "typeRef": null}], ["breakpointId", "actualLocation"], "Sets JavaScript breakpoint at a given location."); diff --git a/third_party/devtools-frontend/src/front_end/generated/protocol-mapping.d.ts b/third_party/devtools-frontend/src/front_end/generated/protocol-mapping.d.ts --- a/third_party/devtools-frontend/src/front_end/generated/protocol-mapping.d.ts +++ b/third_party/devtools-frontend/src/front_end/generated/protocol-mapping.d.ts -@@ -4732,6 +4732,10 @@ export namespace ProtocolMapping { - paramsType: [Protocol.Debugger.SetAsyncCallStackDepthRequest]; +@@ -4751,6 +4751,10 @@ export namespace ProtocolMapping { + paramsType: [Protocol.Debugger.SetBlackboxExecutionContextsRequest]; returnType: void; }; + 'Debugger.setDebuggerStatementEnabled': { @@ -129,9 +129,9 @@ diff --git a/third_party/devtools-frontend/src/front_end/generated/protocol-mapp diff --git a/third_party/devtools-frontend/src/front_end/generated/protocol-proxy-api.d.ts b/third_party/devtools-frontend/src/front_end/generated/protocol-proxy-api.d.ts --- a/third_party/devtools-frontend/src/front_end/generated/protocol-proxy-api.d.ts +++ b/third_party/devtools-frontend/src/front_end/generated/protocol-proxy-api.d.ts -@@ -4206,6 +4206,8 @@ declare namespace ProtocolProxyApi { +@@ -4225,6 +4225,8 @@ declare namespace ProtocolProxyApi { */ - invoke_setAsyncCallStackDepth(params: Protocol.Debugger.SetAsyncCallStackDepthRequest): Promise; + invoke_setBlackboxExecutionContexts(params: Protocol.Debugger.SetBlackboxExecutionContextsRequest): Promise; + invoke_setDebuggerStatementEnabled(params: Protocol.Debugger.SetDebuggerStatementEnabledRequest): Promise; + @@ -141,8 +141,8 @@ diff --git a/third_party/devtools-frontend/src/front_end/generated/protocol-prox diff --git a/third_party/devtools-frontend/src/front_end/generated/protocol.ts b/third_party/devtools-frontend/src/front_end/generated/protocol.ts --- a/third_party/devtools-frontend/src/front_end/generated/protocol.ts +++ b/third_party/devtools-frontend/src/front_end/generated/protocol.ts -@@ -18217,6 +18217,10 @@ export namespace Debugger { - maxDepth: integer; +@@ -18256,6 +18256,10 @@ export namespace Debugger { + uniqueIds: string[]; } + export interface SetDebuggerStatementEnabledRequest { @@ -155,7 +155,7 @@ diff --git a/third_party/devtools-frontend/src/front_end/generated/protocol.ts b diff --git a/third_party/devtools-frontend/src/third_party/blink/public/devtools_protocol/browser_protocol.json b/third_party/devtools-frontend/src/third_party/blink/public/devtools_protocol/browser_protocol.json --- a/third_party/devtools-frontend/src/third_party/blink/public/devtools_protocol/browser_protocol.json +++ b/third_party/devtools-frontend/src/third_party/blink/public/devtools_protocol/browser_protocol.json -@@ -27628,8 +27628,17 @@ +@@ -27672,8 +27672,17 @@ "$ref": "WasmDisassemblyChunk" } ] @@ -175,7 +175,7 @@ diff --git a/third_party/devtools-frontend/src/third_party/blink/public/devtools "name": "nextWasmDisassemblyChunk", "description": "Disassemble the next chunk of lines for the module corresponding to the\nstream. If disassembly is complete, this API will invalidate the streamId\nand return an empty chunk. Any subsequent calls for the now invalid stream\nwill return errors.", "experimental": true, -@@ -30755,4 +30764,4 @@ +@@ -30823,4 +30832,4 @@ ] } ] @@ -199,7 +199,7 @@ diff --git a/v8/include/js_protocol.pdl b/v8/include/js_protocol.pdl diff --git a/v8/src/common/message-template.h b/v8/src/common/message-template.h --- a/v8/src/common/message-template.h +++ b/v8/src/common/message-template.h -@@ -749,6 +749,7 @@ namespace internal { +@@ -746,6 +746,7 @@ namespace internal { /* AggregateError */ \ T(AllPromisesRejected, "All promises were rejected") \ T(CannotDeepFreezeObject, "Cannot DeepFreeze object of type %") \ @@ -210,7 +210,7 @@ diff --git a/v8/src/common/message-template.h b/v8/src/common/message-template.h diff --git a/v8/src/debug/debug-interface.cc b/v8/src/debug/debug-interface.cc --- a/v8/src/debug/debug-interface.cc +++ b/v8/src/debug/debug-interface.cc -@@ -1019,6 +1019,11 @@ void SetAsyncEventDelegate(Isolate* v8_isolate, AsyncEventDelegate* delegate) { +@@ -1027,6 +1027,11 @@ void SetAsyncEventDelegate(Isolate* v8_isolate, AsyncEventDelegate* delegate) { reinterpret_cast(v8_isolate)->set_async_event_delegate(delegate); } @@ -225,7 +225,7 @@ diff --git a/v8/src/debug/debug-interface.cc b/v8/src/debug/debug-interface.cc diff --git a/v8/src/debug/debug-interface.h b/v8/src/debug/debug-interface.h --- a/v8/src/debug/debug-interface.h +++ b/v8/src/debug/debug-interface.h -@@ -351,6 +351,9 @@ class AsyncEventDelegate { +@@ -355,6 +355,9 @@ class AsyncEventDelegate { V8_EXPORT_PRIVATE void SetAsyncEventDelegate(Isolate* isolate, AsyncEventDelegate* delegate); @@ -260,7 +260,7 @@ diff --git a/v8/src/debug/debug.h b/v8/src/debug/debug.h diff --git a/v8/src/execution/messages.cc b/v8/src/execution/messages.cc --- a/v8/src/execution/messages.cc +++ b/v8/src/execution/messages.cc -@@ -492,6 +492,7 @@ MaybeHandle MessageFormatter::TryFormat( +@@ -484,6 +484,7 @@ MaybeHandle MessageFormatter::TryFormat( MessageTemplate::kUndefinedOrNullToObject, MessageTemplate::kUnexpectedStrictReserved, MessageTemplate::kUnexpectedTokenIdentifier, @@ -271,7 +271,7 @@ diff --git a/v8/src/execution/messages.cc b/v8/src/execution/messages.cc diff --git a/v8/src/inspector/v8-debugger-agent-impl.cc b/v8/src/inspector/v8-debugger-agent-impl.cc --- a/v8/src/inspector/v8-debugger-agent-impl.cc +++ b/v8/src/inspector/v8-debugger-agent-impl.cc -@@ -1664,6 +1664,14 @@ Response V8DebuggerAgentImpl::setAsyncCallStackDepth(int depth) { +@@ -1677,6 +1677,14 @@ Response V8DebuggerAgentImpl::setAsyncCallStackDepth(int depth) { return Response::Success(); } @@ -284,8 +284,8 @@ diff --git a/v8/src/inspector/v8-debugger-agent-impl.cc b/v8/src/inspector/v8-de +} + Response V8DebuggerAgentImpl::setBlackboxPatterns( - std::unique_ptr> patterns) { - if (patterns->empty()) { + std::unique_ptr> patterns, + Maybe skipAnonymous) { diff --git a/v8/src/inspector/v8-debugger-agent-impl.h b/v8/src/inspector/v8-debugger-agent-impl.h --- a/v8/src/inspector/v8-debugger-agent-impl.h +++ b/v8/src/inspector/v8-debugger-agent-impl.h @@ -295,8 +295,8 @@ diff --git a/v8/src/inspector/v8-debugger-agent-impl.h b/v8/src/inspector/v8-deb Response setAsyncCallStackDepth(int depth) override; + Response setDebuggerStatementEnabled(bool in_enabled) override; Response setBlackboxPatterns( - std::unique_ptr> patterns) override; - Response setBlackboxedRanges( + std::unique_ptr> patterns, + Maybe skipAnonymous) override; diff --git a/v8/src/runtime/runtime-debug.cc b/v8/src/runtime/runtime-debug.cc --- a/v8/src/runtime/runtime-debug.cc +++ b/v8/src/runtime/runtime-debug.cc @@ -325,7 +325,7 @@ diff --git a/v8/src/runtime/runtime-debug.cc b/v8/src/runtime/runtime-debug.cc + Handle message = + MessageHandler::MakeMessageObject( + isolate, MessageTemplate::kDebuggerStatementSuppressed, location, -+ isolate->factory()->null_value(), Handle::null()); ++ isolate->factory()->null_value(), DirectHandle::null()); + message->set_error_level(v8::Isolate::kMessageWarning); + MessageHandler::ReportMessage(isolate, location, message); + } diff --git a/build/patches/Experimental-user-scripts-support.patch b/build/patches/Experimental-user-scripts-support.patch index 963efb9eb..cea47d07e 100644 --- a/build/patches/Experimental-user-scripts-support.patch +++ b/build/patches/Experimental-user-scripts-support.patch @@ -40,7 +40,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html chrome/browser/profiles/profile_manager.cc | 11 + chrome/browser/profiles/renderer_updater.cc | 19 +- chrome/browser/profiles/renderer_updater.h | 3 + - .../webui/chrome_web_ui_controller_factory.cc | 5 + + .../webui/chrome_web_ui_controller_factory.cc | 6 + chrome/chrome_paks.gni | 2 + chrome/common/renderer_configuration.mojom | 1 + chrome/renderer/BUILD.gn | 6 + @@ -74,7 +74,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../user-script-ui/user-scripts-ui.js | 9 + .../browser/ui/user_scripts_ui.cc | 146 ++++ .../user_scripts/browser/ui/user_scripts_ui.h | 37 + - .../browser/user_script_loader.cc | 704 +++++++++++++++ + .../browser/user_script_loader.cc | 702 +++++++++++++++ .../user_scripts/browser/user_script_loader.h | 168 ++++ .../browser/user_script_pref_info.cc | 34 + .../browser/user_script_pref_info.h | 72 ++ @@ -135,7 +135,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../Experimental-user-scripts-support.inc | 13 + ipc/ipc_message_start.h | 1 + tools/gritsettings/resource_ids.spec | 6 + - 108 files changed, 9483 insertions(+), 2 deletions(-) + 108 files changed, 9482 insertions(+), 2 deletions(-) create mode 100644 components/user_scripts/README.md create mode 100755 components/user_scripts/android/BUILD.gn create mode 100644 components/user_scripts/android/java/res/layout/accept_script_item.xml @@ -226,7 +226,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -200,7 +200,11 @@ if (current_toolchain == default_toolchain) { +@@ -198,7 +198,11 @@ if (current_toolchain == default_toolchain) { sources = chrome_java_resources sources += [ "//chrome/android/java/res_app/layout/main.xml" ] @@ -239,7 +239,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn ":chrome_base_module_resources", ":ui_locale_string_resources", "//chrome/android/webapk/libs/common:splash_resources", -@@ -684,6 +688,7 @@ if (current_toolchain == default_toolchain) { +@@ -647,6 +651,7 @@ if (current_toolchain == default_toolchain) { "//components/ukm/android:java", "//components/url_formatter/android:url_formatter_java", "//components/user_prefs/android:java", @@ -250,7 +250,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/java/res/xml/main_preferences.xml --- a/chrome/android/java/res/xml/main_preferences.xml +++ b/chrome/android/java/res/xml/main_preferences.xml -@@ -151,6 +151,11 @@ for the previous order (main_preferences_legacy). --> +@@ -149,6 +149,11 @@ for the previous order (main_preferences_legacy). --> android:key="useragent_settings" android:order="20" android:title="@string/prefs_useragent_settings"/> @@ -265,7 +265,7 @@ diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/j diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java --- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java -@@ -75,6 +75,7 @@ import org.chromium.ui.base.DeviceFormFactor; +@@ -74,6 +74,7 @@ import org.chromium.ui.base.DeviceFormFactor; import org.chromium.ui.base.MimeTypeUtils; import org.chromium.ui.widget.Toast; import org.chromium.url.GURL; @@ -273,7 +273,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/Downlo import java.io.File; -@@ -411,6 +412,11 @@ public class DownloadUtils { +@@ -426,6 +427,11 @@ public class DownloadUtils { String referrer, @DownloadOpenSource int source, Context context) { @@ -297,7 +297,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessIni /** * Handles the initialization dependences of the browser process. This is meant to handle the * initialization that is not tied to any particular Activity, and the logic that should only be -@@ -615,6 +617,8 @@ public class ProcessInitializationHandler { +@@ -610,6 +612,8 @@ public class ProcessInitializationHandler { DefaultBrowserInfo.initBrowserFetcher(); @@ -309,7 +309,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessIni diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni --- a/chrome/android/java_sources.gni +++ b/chrome/android/java_sources.gni -@@ -20,6 +20,7 @@ import("//chrome/browser/tab_group_sync/android/test_java_sources.gni") +@@ -19,6 +19,7 @@ import("//chrome/browser/tab_group_sync/android/test_java_sources.gni") import("//chrome/common/features.gni") import("//components/offline_pages/buildflags/features.gni") import("//device/vr/buildflags/buildflags.gni") @@ -317,7 +317,7 @@ diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni # Only used for testing, should not be shipped to end users. if (enable_offline_pages_harness) { -@@ -57,3 +58,5 @@ if (enable_cardboard) { +@@ -55,3 +56,5 @@ if (enable_cardboard) { "java/src/org/chromium/chrome/browser/vr/VrCompositorDelegateProviderImpl.java", ] } @@ -326,7 +326,7 @@ diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -3475,6 +3475,13 @@ static_library("browser") { +@@ -3485,6 +3485,13 @@ static_library("browser") { ] deps += [ "//chrome/android/modules/dev_ui/provider:native" ] } @@ -343,7 +343,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn 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 -@@ -180,6 +180,7 @@ +@@ -181,6 +181,7 @@ #include "components/ui_devtools/switches.h" #include "components/variations/variations_switches.h" #include "components/version_info/channel.h" @@ -354,7 +354,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc 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 -@@ -275,6 +275,7 @@ +@@ -274,6 +274,7 @@ #include "components/ntp_tiles/popular_sites_impl.h" #include "components/permissions/contexts/geolocation_permission_context_android.h" #include "components/webapps/browser/android/install_prompt_prefs.h" @@ -362,7 +362,7 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browse #else // BUILDFLAG(IS_ANDROID) #include "chrome/browser/cart/cart_service.h" #include "chrome/browser/companion/core/promo_handler.h" -@@ -1975,6 +1976,9 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -2050,6 +2051,9 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, translate::TranslatePrefs::RegisterProfilePrefs(registry); omnibox::RegisterProfilePrefs(registry); ZeroSuggestProvider::RegisterProfilePrefs(registry); @@ -370,8 +370,8 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browse + user_scripts::UserScriptsPrefs::RegisterProfilePrefs(registry); +#endif - #if !BUILDFLAG(IS_ANDROID) && BUILDFLAG(GOOGLE_CHROME_BRANDING) - promos_utils::RegisterProfilePrefs(registry); + #if BUILDFLAG(ENABLE_SESSION_SERVICE) + RegisterSessionServiceLogProfilePrefs(registry); diff --git a/chrome/browser/profiles/BUILD.gn b/chrome/browser/profiles/BUILD.gn --- a/chrome/browser/profiles/BUILD.gn +++ b/chrome/browser/profiles/BUILD.gn @@ -388,7 +388,7 @@ diff --git a/chrome/browser/profiles/BUILD.gn b/chrome/browser/profiles/BUILD.gn diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc --- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc +++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -549,6 +549,10 @@ +@@ -540,6 +540,10 @@ #include "chrome/browser/enterprise/data_controls/reporting_service.h" #endif @@ -399,7 +399,7 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc namespace chrome { void AddProfilesExtraParts(ChromeBrowserMainParts* main_parts) { -@@ -1357,6 +1361,9 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1312,6 +1316,9 @@ void ChromeBrowserMainExtraPartsProfiles:: #endif WebDataServiceFactory::GetInstance(); webrtc_event_logging::WebRtcEventLogManagerKeyedServiceFactory::GetInstance(); @@ -423,7 +423,7 @@ diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profile #if BUILDFLAG(ENABLE_SESSION_SERVICE) #include "chrome/browser/sessions/app_session_service_factory.h" #include "chrome/browser/sessions/session_service_factory.h" -@@ -1528,6 +1532,13 @@ void ProfileManager::DoFinalInitForServices(Profile* profile, +@@ -1482,6 +1486,13 @@ void ProfileManager::DoFinalInitForServices(Profile* profile, ChildAccountServiceFactory::GetForProfile(profile)->Init(); SupervisedUserServiceFactory::GetForProfile(profile)->Init(); ListFamilyMembersServiceFactory::GetForProfile(profile)->Init(); @@ -501,39 +501,40 @@ diff --git a/chrome/browser/profiles/renderer_updater.h b/chrome/browser/profile 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 -@@ -80,6 +80,7 @@ - #include "components/security_interstitials/content/known_interception_disclosure_ui.h" - #include "components/security_interstitials/content/urls.h" - #include "components/site_engagement/content/site_engagement_service.h" +@@ -60,6 +60,7 @@ + #include "components/reading_list/features/reading_list_switches.h" + #include "components/safe_browsing/content/browser/web_ui/safe_browsing_ui.h" + #include "components/safe_browsing/core/common/web_ui_constants.h" +#include "components/user_scripts/browser/ui/user_scripts_ui.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_ui.h" #include "content/public/common/content_client.h" -@@ -413,6 +414,10 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, - history_clusters_internals::kChromeUIHistoryClustersInternalsHost) { - return &NewWebUI; +@@ -265,6 +266,11 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, + if (url.host_piece() == chrome::kChromeUIProxyConfigHost) { + return &NewWebUI; } +#if BUILDFLAG(IS_ANDROID) + if (url.host_piece() == user_scripts::kChromeUIUserScriptsHost) + return &NewWebUI; +#endif - ++ #if !BUILDFLAG(IS_ANDROID) - #if !BUILDFLAG(IS_CHROMEOS) + if (url.host_piece() == chrome::kChromeUINewTabHost) { + // The URL chrome://newtab/ can be either a virtual or a real URL, diff --git a/chrome/chrome_paks.gni b/chrome/chrome_paks.gni --- a/chrome/chrome_paks.gni +++ b/chrome/chrome_paks.gni -@@ -129,6 +129,7 @@ template("chrome_extra_paks") { - "$root_gen_dir/net/net_resources.pak", +@@ -130,6 +130,7 @@ template("chrome_extra_paks") { "$root_gen_dir/third_party/blink/public/resources/blink_resources.pak", "$root_gen_dir/third_party/blink/public/resources/inspector_overlay_resources.pak", + "$root_gen_dir/third_party/blink/public/strings/permission_element_generated_strings.pak", + "$root_gen_dir/chrome/userscripts_browser_resources.pak", "$root_gen_dir/ui/resources/webui_resources.pak", ] deps = [ -@@ -146,6 +147,7 @@ template("chrome_extra_paks") { - "//third_party/blink/public:devtools_inspector_resources", +@@ -148,6 +149,7 @@ template("chrome_extra_paks") { "//third_party/blink/public:resources", + "//third_party/blink/public/strings:permission_element_generated_strings", "//ui/resources", + "//components/user_scripts/browser:userscripts_browser_resources_grit", ] @@ -553,7 +554,7 @@ diff --git a/chrome/common/renderer_configuration.mojom b/chrome/common/renderer diff --git a/chrome/renderer/BUILD.gn b/chrome/renderer/BUILD.gn --- a/chrome/renderer/BUILD.gn +++ b/chrome/renderer/BUILD.gn -@@ -242,6 +242,12 @@ static_library("renderer") { +@@ -243,6 +243,12 @@ static_library("renderer") { "//v8", ] @@ -569,7 +570,7 @@ diff --git a/chrome/renderer/BUILD.gn b/chrome/renderer/BUILD.gn diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc --- a/chrome/renderer/chrome_content_renderer_client.cc +++ b/chrome/renderer/chrome_content_renderer_client.cc -@@ -267,6 +267,11 @@ +@@ -270,6 +270,11 @@ #include "chrome/renderer/media/chrome_key_systems.h" #endif @@ -581,7 +582,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer using autofill::AutofillAgent; using autofill::PasswordAutofillAgent; using autofill::PasswordGenerationAgent; -@@ -465,6 +470,14 @@ void ChromeContentRendererClient::RenderThreadStarted() { +@@ -468,6 +473,14 @@ void ChromeContentRendererClient::RenderThreadStarted() { WebString::FromASCII(extensions::kExtensionScheme)); #endif // BUILDFLAG(ENABLE_EXTENSIONS_CORE) @@ -596,7 +597,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer #if BUILDFLAG(ENABLE_SPELLCHECK) if (!spellcheck_) InitSpellCheck(); -@@ -625,6 +638,15 @@ void ChromeContentRendererClient::RenderFrameCreated( +@@ -635,6 +648,15 @@ void ChromeContentRendererClient::RenderFrameCreated( registry); #endif @@ -612,7 +613,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer #if BUILDFLAG(ENABLE_PPAPI) new PepperHelper(render_frame); #endif -@@ -1684,6 +1706,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentStart( +@@ -1703,6 +1725,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentStart( render_frame); // |render_frame| might be dead by now. #endif @@ -630,7 +631,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer } void ChromeContentRendererClient::RunScriptsAtDocumentEnd( -@@ -1693,6 +1726,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentEnd( +@@ -1712,6 +1745,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentEnd( render_frame); // |render_frame| might be dead by now. #endif @@ -648,7 +649,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer } void ChromeContentRendererClient::RunScriptsAtDocumentIdle( -@@ -1702,6 +1746,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentIdle( +@@ -1721,6 +1765,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentIdle( render_frame); // |render_frame| might be dead by now. #endif @@ -691,7 +692,7 @@ diff --git a/chrome/renderer/chrome_render_thread_observer.cc b/chrome/renderer/ diff --git a/components/components_strings.grd b/components/components_strings.grd --- a/components/components_strings.grd +++ b/components/components_strings.grd -@@ -341,6 +341,7 @@ +@@ -340,6 +340,7 @@ @@ -1262,9 +1263,8 @@ new file mode 100755 +import org.chromium.base.IntentUtils; + +import org.chromium.chrome.browser.IntentHandler; -+import org.chromium.chrome.browser.settings.SettingsLauncherFactory; -+import org.chromium.chrome.browser.settings.SettingsLauncherImpl; -+import org.chromium.components.browser_ui.settings.SettingsLauncher; ++import org.chromium.chrome.browser.settings.SettingsNavigationFactory; ++import org.chromium.components.browser_ui.settings.SettingsNavigation; + +import org.chromium.components.user_scripts.UserScriptsPreferences; +import org.chromium.components.user_scripts.UserScriptsBridge; @@ -1300,8 +1300,9 @@ new file mode 100755 + + if (visibleName.toUpperCase().endsWith(".USER.JS") == false) return false; + -+ SettingsLauncher settingsLauncher = SettingsLauncherFactory.createSettingsLauncher(); -+ Intent intent = settingsLauncher.createSettingsActivityIntent( ++ SettingsNavigation settingsNavigation = ++ SettingsNavigationFactory.createSettingsNavigation(); ++ Intent intent = settingsNavigation.createSettingsIntent( + context, UserScriptsPreferences.class, + UserScriptsPreferences.createFragmentArgsForInstall(filePath)); + IntentUtils.safeStartActivity(context, intent); @@ -2834,7 +2835,7 @@ diff --git a/components/user_scripts/browser/user_script_loader.cc b/components/ new file mode 100755 --- /dev/null +++ b/components/user_scripts/browser/user_script_loader.cc -@@ -0,0 +1,704 @@ +@@ -0,0 +1,702 @@ +/* + This file is part of Bromite. + @@ -3048,13 +3049,11 @@ new file mode 100755 + + base::File infile; + if (user_script_path.IsContentUri()) { -+ if (base::FeatureList::IsEnabled(features::kEnableLoggingUserScripts)) ++ if (base::FeatureList::IsEnabled(features::kEnableLoggingUserScripts)) { + LOG(INFO) << "UserScriptLoader: path " << user_script_path << " is a content uri"; -+ -+ infile = OpenContentUri(user_script_path, base::File::FLAG_OPEN | base::File::FLAG_READ); -+ } else { -+ infile = base::File(user_script_path, base::File::FLAG_OPEN | base::File::FLAG_READ); ++ } + } ++ infile = base::File(user_script_path, base::File::FLAG_OPEN | base::File::FLAG_READ); + + if (!infile.IsValid()) { + base::File::Error out_error = infile.error_details(); @@ -10472,15 +10471,15 @@ diff --git a/ipc/ipc_message_start.h b/ipc/ipc_message_start.h diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -1061,6 +1061,12 @@ - "components/search_engine_descriptions_strings.grd": { - "messages": [7260], +@@ -1018,6 +1018,12 @@ + "META": {"sizes": {"includes": [30],}}, + "includes": [7480], }, + "components/user_scripts/renderer/resources/user_scripts_renderer_resources.grd": { -+ "includes": [7280], ++ "includes": [7500], + }, + "components/user_scripts/browser/resources/browser_resources.grd": { -+ "includes": [7300], ++ "includes": [7620], + }, # END components/ section. diff --git a/build/patches/Eyeo-Adblock-for-Cromite.patch b/build/patches/Eyeo-Adblock-for-Cromite.patch index 56d2225ac..bf0371685 100644 --- a/build/patches/Eyeo-Adblock-for-Cromite.patch +++ b/build/patches/Eyeo-Adblock-for-Cromite.patch @@ -162,7 +162,7 @@ diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/j -@@ -125,6 +116,11 @@ for the previous order (main_preferences_legacy). --> +@@ -123,6 +114,11 @@ for the previous order (main_preferences_legacy). --> android:key="adblock" android:order="13" android:title="@string/prefs_adblock"/> @@ -174,7 +174,7 @@ diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/j +@@ -137,11 +133,6 @@ for the previous order (main_preferences_legacy). --> android:key="accessibility" android:order="24" android:title="@string/prefs_accessibility"/> @@ -723,7 +723,7 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.h b/chrome/br diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc -@@ -6719,7 +6719,9 @@ ChromeContentBrowserClient:: +@@ -6724,7 +6724,9 @@ ChromeContentBrowserClient:: } bool ChromeContentBrowserClient::WillInterceptWebSocket( @@ -734,7 +734,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch #if BUILDFLAG(ENABLE_EXTENSIONS) if (!frame) { return false; -@@ -6742,9 +6744,11 @@ bool ChromeContentBrowserClient::WillInterceptWebSocket( +@@ -6747,9 +6749,11 @@ bool ChromeContentBrowserClient::WillInterceptWebSocket( } void ChromeContentBrowserClient::CreateWebSocket( @@ -749,7 +749,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch diff --git a/chrome/browser/chrome_content_browser_client.h b/chrome/browser/chrome_content_browser_client.h --- a/chrome/browser/chrome_content_browser_client.h +++ b/chrome/browser/chrome_content_browser_client.h -@@ -677,11 +677,15 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -683,11 +683,15 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { CreateURLLoaderHandlerForServiceWorkerNavigationPreload( content::FrameTreeNodeId frame_tree_node_id, const network::ResourceRequest& resource_request) override; @@ -1001,15 +1001,15 @@ diff --git a/chrome/browser/extensions/api/eyeo_filtering_private/eyeo_filtering diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc --- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc +++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -19,7 +19,6 @@ - #include "chrome/browser/affiliations/affiliation_service_factory.h" +@@ -20,7 +20,6 @@ + #include "chrome/browser/ai/ai_data_keyed_service_factory.h" #include "chrome/browser/ai/ai_manager_keyed_service_factory.h" #include "chrome/browser/adblock/adblock_controller_factory.h" -#include "chrome/browser/adblock/adblock_telemetry_service_factory.h" #include "chrome/browser/adblock/content_security_policy_injector_factory.h" #include "chrome/browser/adblock/element_hider_factory.h" #include "chrome/browser/adblock/resource_classification_runner_factory.h" -@@ -902,7 +901,6 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -872,7 +871,6 @@ void ChromeBrowserMainExtraPartsProfiles:: FakeSmartCardDeviceServiceFactory::GetInstance(); #endif adblock::AdblockControllerFactory::GetInstance(); @@ -1043,15 +1043,15 @@ diff --git a/chrome/browser/resources/adblock_internals/BUILD.gn b/chrome/browse diff --git a/chrome/browser/resources/settings/BUILD.gn b/chrome/browser/resources/settings/BUILD.gn --- a/chrome/browser/resources/settings/BUILD.gn +++ b/chrome/browser/resources/settings/BUILD.gn -@@ -66,6 +66,7 @@ build_webui("build") { - "ai_page/ai_info_card.ts", - "ai_page/ai_page.ts", +@@ -69,6 +69,7 @@ build_webui("build") { "ai_page/ai_tab_organization_subpage.ts", + "ai_page/history_search_page.ts", + "ai_page/offer_writing_help_page.ts", + "adblock_page/adblock_page.ts", "appearance_page/appearance_fonts_page.ts", "appearance_page/appearance_page.ts", "appearance_page/home_url_input.ts", -@@ -387,6 +388,7 @@ build_webui("build") { +@@ -392,6 +393,7 @@ build_webui("build") { ts_definitions = [ "//tools/typescript/definitions/autofill_private.d.ts", "//tools/typescript/definitions/chrome_event.d.ts", @@ -1609,7 +1609,7 @@ diff --git a/chrome/browser/resources/settings/page_visibility.ts b/chrome/brows diff --git a/chrome/browser/resources/settings/route.ts b/chrome/browser/resources/settings/route.ts --- a/chrome/browser/resources/settings/route.ts +++ b/chrome/browser/resources/settings/route.ts -@@ -228,6 +228,10 @@ function createRoutes(): SettingsRoutes { +@@ -237,6 +237,10 @@ function createRoutes(): SettingsRoutes { r.FONTS = r.APPEARANCE.createChild('/fonts'); } @@ -1645,7 +1645,7 @@ diff --git a/chrome/browser/resources/settings/settings.ts b/chrome/browser/reso diff --git a/chrome/browser/resources/settings/settings_menu/settings_menu.html b/chrome/browser/resources/settings/settings_menu/settings_menu.html --- a/chrome/browser/resources/settings/settings_menu/settings_menu.html +++ b/chrome/browser/resources/settings/settings_menu/settings_menu.html -@@ -148,6 +148,11 @@ +@@ -149,6 +149,11 @@ $i18n{a11yPageTitle} @@ -1668,7 +1668,7 @@ diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc #include "chrome/browser/bookmarks/bookmark_model_factory.h" #include "chrome/browser/breadcrumbs/breadcrumb_manager_tab_helper.h" #include "chrome/browser/browser_process.h" -@@ -378,6 +379,8 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { +@@ -377,6 +378,8 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { } } @@ -1677,7 +1677,7 @@ diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc AdblockWebContentObserver::CreateForWebContents( web_contents, adblock::SubscriptionServiceFactory::GetForBrowserContext( -@@ -386,7 +389,8 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { +@@ -385,7 +388,8 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { web_contents->GetBrowserContext()), adblock::SitekeyStorageFactory::GetForBrowserContext( web_contents->GetBrowserContext()), @@ -1764,7 +1764,7 @@ diff --git a/chrome/browser/ui/webui/adblock_internals/adblock_internals_ui.cc b diff --git a/chrome/common/extensions/api/_api_features.json b/chrome/common/extensions/api/_api_features.json --- a/chrome/common/extensions/api/_api_features.json +++ b/chrome/common/extensions/api/_api_features.json -@@ -70,7 +70,7 @@ +@@ -71,7 +71,7 @@ }, "adblockPrivate": [{ "dependencies": ["permission:adblockPrivate"], @@ -1773,7 +1773,7 @@ diff --git a/chrome/common/extensions/api/_api_features.json b/chrome/common/ext }, { "channel": "stable", "contexts": ["webui"], -@@ -537,7 +537,7 @@ +@@ -522,7 +522,7 @@ }, "eyeoFilteringPrivate": [{ "dependencies": ["permission:eyeoFilteringPrivate"], @@ -1785,7 +1785,7 @@ diff --git a/chrome/common/extensions/api/_api_features.json b/chrome/common/ext diff --git a/chrome/common/extensions/api/_permission_features.json b/chrome/common/extensions/api/_permission_features.json --- a/chrome/common/extensions/api/_permission_features.json +++ b/chrome/common/extensions/api/_permission_features.json -@@ -71,10 +71,6 @@ +@@ -66,10 +66,6 @@ "extension" ] }, @@ -1796,7 +1796,7 @@ diff --git a/chrome/common/extensions/api/_permission_features.json b/chrome/com "autofillPrivate": { "channel": "trunk", "extension_types": ["extension", "platform_app"], -@@ -388,10 +384,6 @@ +@@ -180,10 +176,6 @@ "extension", "legacy_packaged_app", "hosted_app", "platform_app" ] }, @@ -1804,9 +1804,9 @@ diff --git a/chrome/common/extensions/api/_permission_features.json b/chrome/com - "channel": "stable", - "extension_types": ["extension", "platform_app"] - }, - "favicon": { + "commandLinePrivate": { "channel": "stable", - "extension_types": ["extension"] + "extension_types": ["extension", "legacy_packaged_app", "platform_app"], diff --git a/chrome/common/extensions/api/adblock_private.idl b/chrome/common/extensions/api/adblock_private.idl --- a/chrome/common/extensions/api/adblock_private.idl +++ b/chrome/common/extensions/api/adblock_private.idl @@ -10569,7 +10569,7 @@ diff --git a/content/browser/websockets/websocket_connector_impl.cc b/content/br diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -1065,7 +1065,7 @@ void ContentBrowserClient::WillCreateURLLoaderFactory( +@@ -1076,7 +1076,7 @@ void ContentBrowserClient::WillCreateURLLoaderFactory( DCHECK(browser_context); } @@ -10578,7 +10578,7 @@ diff --git a/content/public/browser/content_browser_client.cc b/content/public/b return false; } -@@ -1074,9 +1074,11 @@ uint32_t ContentBrowserClient::GetWebSocketOptions(RenderFrameHost* frame) { +@@ -1085,9 +1085,11 @@ uint32_t ContentBrowserClient::GetWebSocketOptions(RenderFrameHost* frame) { } void ContentBrowserClient::CreateWebSocket( @@ -10593,7 +10593,7 @@ diff --git a/content/public/browser/content_browser_client.cc b/content/public/b diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -2014,7 +2014,7 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -2038,7 +2038,7 @@ class CONTENT_EXPORT ContentBrowserClient { scoped_refptr navigation_response_task_runner); // Returns true when the embedder wants to intercept a websocket connection. @@ -10602,7 +10602,7 @@ diff --git a/content/public/browser/content_browser_client.h b/content/public/br // Returns the WebSocket creation options. virtual uint32_t GetWebSocketOptions(RenderFrameHost* frame); -@@ -2036,9 +2036,11 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -2060,9 +2060,11 @@ class CONTENT_EXPORT ContentBrowserClient { // Always called on the UI thread and only when the Network Service is // enabled. virtual void CreateWebSocket( @@ -10636,7 +10636,7 @@ new file mode 100644 diff --git a/third_party/blink/renderer/core/css/style_engine.cc b/third_party/blink/renderer/core/css/style_engine.cc --- a/third_party/blink/renderer/core/css/style_engine.cc +++ b/third_party/blink/renderer/core/css/style_engine.cc -@@ -630,6 +630,14 @@ void StyleEngine::UpdateActiveStyleSheetsInShadow( +@@ -625,6 +625,14 @@ void StyleEngine::UpdateActiveStyleSheetsInShadow( } } diff --git a/build/patches/Fix-chromium-build-bugs.patch b/build/patches/Fix-chromium-build-bugs.patch index c53d8ceaa..7c11cea0b 100644 --- a/build/patches/Fix-chromium-build-bugs.patch +++ b/build/patches/Fix-chromium-build-bugs.patch @@ -25,7 +25,7 @@ https://bugs.chromium.org/p/chromium/issues/detail?id=1491776#c10 diff --git a/BUILD.gn b/BUILD.gn --- a/BUILD.gn +++ b/BUILD.gn -@@ -419,7 +419,6 @@ group("gn_all") { +@@ -423,7 +423,6 @@ group("gn_all") { "//android_webview:empty_group", "//android_webview/test", "//android_webview/tools/automated_ui_tests:webview_ui_test_app_test_apk", @@ -36,10 +36,10 @@ diff --git a/BUILD.gn b/BUILD.gn diff --git a/chrome/browser/extensions/api/BUILD.gn b/chrome/browser/extensions/api/BUILD.gn --- a/chrome/browser/extensions/api/BUILD.gn +++ b/chrome/browser/extensions/api/BUILD.gn -@@ -34,7 +34,6 @@ group("api_implementations") { - "//chrome/browser/extensions/api/downloads_internal", +@@ -36,7 +36,6 @@ group("api_implementations") { "//chrome/browser/extensions/api/experimental_ai_data", "//chrome/browser/extensions/api/font_settings", + "//chrome/browser/extensions/api/idltest", - "//chrome/browser/extensions/api/mdns", "//chrome/browser/extensions/api/module", "//chrome/browser/extensions/api/networking_private", @@ -59,14 +59,14 @@ diff --git a/chrome/browser/navigation_predictor/navigation_predictor_metrics_do diff --git a/chrome/browser/safe_browsing/BUILD.gn b/chrome/browser/safe_browsing/BUILD.gn --- a/chrome/browser/safe_browsing/BUILD.gn +++ b/chrome/browser/safe_browsing/BUILD.gn -@@ -200,6 +200,7 @@ static_library("safe_browsing") { +@@ -207,6 +207,7 @@ static_library("safe_browsing") { "//components/webdata/common", "//content/public/browser", "//services/preferences/public/mojom:mojom", + "//third_party/flatbuffers:flatbuffers", ] - if (safe_browsing_mode == 1) { - # "Safe Browsing Full" files in addition to the "basic" ones to use for + + allow_circular_includes_from += [ "//chrome/browser/ui/safety_hub" ] diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc --- a/chrome/browser/ui/browser_commands.cc +++ b/chrome/browser/ui/browser_commands.cc @@ -81,7 +81,7 @@ diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_c diff --git a/chrome/browser/ui/lens/lens_overlay_controller.cc b/chrome/browser/ui/lens/lens_overlay_controller.cc --- a/chrome/browser/ui/lens/lens_overlay_controller.cc +++ b/chrome/browser/ui/lens/lens_overlay_controller.cc -@@ -12,6 +12,7 @@ +@@ -14,6 +14,7 @@ #include "base/system/sys_info.h" #include "base/task/bind_post_task.h" #include "base/task/sequenced_task_runner.h" @@ -92,9 +92,9 @@ diff --git a/chrome/browser/ui/lens/lens_overlay_controller.cc b/chrome/browser/ diff --git a/chrome/browser/ui/views/webid/fedcm_account_selection_view_desktop.cc b/chrome/browser/ui/views/webid/fedcm_account_selection_view_desktop.cc --- a/chrome/browser/ui/views/webid/fedcm_account_selection_view_desktop.cc +++ b/chrome/browser/ui/views/webid/fedcm_account_selection_view_desktop.cc -@@ -7,6 +7,7 @@ - #include "base/debug/dump_without_crashing.h" +@@ -8,6 +8,7 @@ #include "base/functional/bind.h" + #include "base/metrics/histogram_functions.h" #include "base/metrics/histogram_macros.h" +#include "base/metrics/histogram_functions.h" #include "chrome/browser/accessibility/accessibility_state_utils.h" @@ -125,7 +125,7 @@ diff --git a/components/component_updater/installer_policies/BUILD.gn b/componen diff --git a/components/omnibox/browser/autocomplete_classifier.cc b/components/omnibox/browser/autocomplete_classifier.cc --- a/components/omnibox/browser/autocomplete_classifier.cc +++ b/components/omnibox/browser/autocomplete_classifier.cc -@@ -94,8 +94,8 @@ void AutocompleteClassifier::Classify( +@@ -96,8 +96,8 @@ void AutocompleteClassifier::Classify( metrics::OmniboxEventProto::PageClassification page_classification, AutocompleteMatch* match, GURL* alternate_nav_url) { @@ -139,7 +139,7 @@ diff --git a/components/omnibox/browser/autocomplete_classifier.cc b/components/ diff --git a/components/omnibox/browser/omnibox_field_trial.cc b/components/omnibox/browser/omnibox_field_trial.cc --- a/components/omnibox/browser/omnibox_field_trial.cc +++ b/components/omnibox/browser/omnibox_field_trial.cc -@@ -1074,11 +1074,11 @@ MLConfig& MLConfig::operator=(const MLConfig& other) = default; +@@ -1010,11 +1010,11 @@ MLConfig& MLConfig::operator=(const MLConfig& other) = default; ScopedMLConfigForTesting::ScopedMLConfigForTesting() : original_config_(std::make_unique(GetMLConfig())) { @@ -156,7 +156,7 @@ diff --git a/components/omnibox/browser/omnibox_field_trial.cc b/components/omni diff --git a/components/plus_addresses/BUILD.gn b/components/plus_addresses/BUILD.gn --- a/components/plus_addresses/BUILD.gn +++ b/components/plus_addresses/BUILD.gn -@@ -102,6 +102,7 @@ source_set("plus_addresses") { +@@ -112,6 +112,7 @@ source_set("plus_addresses") { "//services/data_decoder/public/cpp", "//services/network/public/cpp", "//ui/base", @@ -191,7 +191,7 @@ diff --git a/components/safe_browsing/content/renderer/phishing_classifier/phish diff --git a/content/browser/browser_interface_binders.cc b/content/browser/browser_interface_binders.cc --- a/content/browser/browser_interface_binders.cc +++ b/content/browser/browser_interface_binders.cc -@@ -376,6 +376,7 @@ void BindDateTimeChooserForFrame( +@@ -363,6 +363,7 @@ void BindDateTimeChooserForFrame( void BindTextSuggestionHostForFrame( RenderFrameHost* host, mojo::PendingReceiver receiver) { @@ -202,7 +202,7 @@ diff --git a/content/browser/browser_interface_binders.cc b/content/browser/brow diff --git a/net/BUILD.gn b/net/BUILD.gn --- a/net/BUILD.gn +++ b/net/BUILD.gn -@@ -1710,6 +1710,7 @@ component("net") { +@@ -1722,6 +1722,7 @@ component("net") { if (!is_cronet_build) { deps += [ "//mojo/public/cpp/bindings:default_construct_tag" ] } diff --git a/build/patches/Follow-only-system-dark-mode.patch b/build/patches/Follow-only-system-dark-mode.patch index 5d2c26655..ce8372a04 100644 --- a/build/patches/Follow-only-system-dark-mode.patch +++ b/build/patches/Follow-only-system-dark-mode.patch @@ -12,7 +12,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/GlobalNightModeStateController.java b/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/GlobalNightModeStateController.java --- a/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/GlobalNightModeStateController.java +++ b/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/GlobalNightModeStateController.java -@@ -139,7 +139,7 @@ class GlobalNightModeStateController +@@ -133,7 +133,7 @@ class GlobalNightModeStateController } private void updateNightMode() { @@ -20,5 +20,5 @@ diff --git a/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/b + boolean powerSaveModeOn = false; final int theme = NightModeUtils.getThemeSetting(); final boolean newNightModeOn = - theme == ThemeType.SYSTEM_DEFAULT + (theme == ThemeType.SYSTEM_DEFAULT -- diff --git a/build/patches/Fonts-fingerprinting-mitigation.patch b/build/patches/Fonts-fingerprinting-mitigation.patch index b65bd180e..44c6b4701 100644 --- a/build/patches/Fonts-fingerprinting-mitigation.patch +++ b/build/patches/Fonts-fingerprinting-mitigation.patch @@ -115,8 +115,8 @@ diff --git a/skia/ext/skia_utils_win.h b/skia/ext/skia_utils_win.h 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 -@@ -291,6 +291,9 @@ BLINK_COMMON_EXPORT extern const base::FeatureParam - kMaxDiskDataAllocatorCapacityMB; +@@ -296,6 +296,9 @@ BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE_PARAM(int, + kMaxDiskDataAllocatorCapacityMB); BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kLessAggressiveParkableString); +// Filter the list of fonts allowing the use of only standard fonts diff --git a/build/patches/Guard-for-user-agent-reduction.patch b/build/patches/Guard-for-user-agent-reduction.patch index 6e08d8107..e0874d5c0 100644 --- a/build/patches/Guard-for-user-agent-reduction.patch +++ b/build/patches/Guard-for-user-agent-reduction.patch @@ -12,7 +12,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc -@@ -1656,7 +1656,7 @@ void ChromeContentBrowserClient::RegisterProfilePrefs( +@@ -1625,7 +1625,7 @@ void ChromeContentBrowserClient::RegisterProfilePrefs( registry->RegisterIntegerPref( prefs::kUserAgentReduction, static_cast( @@ -54,7 +54,7 @@ diff --git a/content/common/user_agent.cc b/content/common/user_agent.cc 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 -@@ -3467,23 +3467,23 @@ +@@ -3482,23 +3482,23 @@ // If enabled, the deviceModel will be reduced to "K" and the // androidVersion will be reduced to a static "10" string in android // User-Agent string. diff --git a/build/patches/History-number-of-days-privacy-setting.patch b/build/patches/History-number-of-days-privacy-setting.patch index 57f699380..c26b1626c 100644 --- a/build/patches/History-number-of-days-privacy-setting.patch +++ b/build/patches/History-number-of-days-privacy-setting.patch @@ -32,8 +32,9 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../history/core/browser/history_service.h | 8 +++ components/history/core/common/pref_names.cc | 4 ++ components/history/core/common/pref_names.h | 1 + + components/history_embeddings/sql_database.cc | 2 +- .../omnibox/browser/shortcuts_backend.cc | 4 +- - 23 files changed, 259 insertions(+), 13 deletions(-) + 24 files changed, 260 insertions(+), 14 deletions(-) create mode 100644 components/cromite_components_strings_grd/History-number-of-days-privacy-setting.grdp diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml @@ -55,7 +56,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 -@@ -47,6 +47,7 @@ import org.chromium.chrome.browser.sync.settings.ManageSyncSettings; +@@ -49,6 +49,7 @@ import org.chromium.chrome.browser.sync.settings.ManageSyncSettings; import org.chromium.chrome.browser.usage_stats.UsageStatsConsentDialog; import org.chromium.components.browser_ui.settings.ChromeSwitchPreference; import org.chromium.components.browser_ui.settings.SettingsUtils; @@ -63,7 +64,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting import org.chromium.components.browser_ui.site_settings.ContentSettingsResources; import org.chromium.components.browser_ui.site_settings.SingleCategorySettings; import org.chromium.components.browser_ui.util.TraceEventVectorDrawableCompat; -@@ -72,6 +73,9 @@ import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; +@@ -73,6 +74,9 @@ import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; import org.chromium.components.browser_ui.settings.ChromeSwitchPreference; import org.chromium.components.browser_ui.settings.ManagedPreferenceDelegate; @@ -73,7 +74,7 @@ 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 { -@@ -114,6 +118,8 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -115,6 +119,8 @@ public class PrivacySettings extends ChromeBaseSettingsFragment private ChromeSwitchPreference allowCustomTabIntentsPref; private ChromeSwitchPreference openExternalLinksPref; @@ -82,7 +83,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting @Override public void onCreatePreferencesCromite(Bundle savedInstanceState, String rootKey) { mPageTitle.set(getString(R.string.prefs_privacy_security)); -@@ -244,6 +250,40 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -245,6 +251,40 @@ public class PrivacySettings extends ChromeBaseSettingsFragment Preference syncAndServicesLink = findPreference(PREF_SYNC_AND_SERVICES_LINK); syncAndServicesLink.setSummary(buildFooterString()); @@ -121,9 +122,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting + }); + Preference thirdPartyCookies = findPreference(PREF_THIRD_PARTY_COOKIES); - Preference doNotTrackPref = findPreference(PREF_DO_NOT_TRACK); - -@@ -504,6 +544,29 @@ public class PrivacySettings extends ChromeBaseSettingsFragment + if (showTrackingProtectionUI()) { + if (thirdPartyCookies != null) thirdPartyCookies.setVisible(false); +@@ -519,6 +559,29 @@ public class PrivacySettings extends ChromeBaseSettingsFragment && ChromeFeatureList.isEnabled(ChromeFeatureList.FINGERPRINTING_PROTECTION_UX); } @@ -156,7 +157,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting diff --git a/chrome/browser/extensions/api/settings_private/prefs_util.cc b/chrome/browser/extensions/api/settings_private/prefs_util.cc --- a/chrome/browser/extensions/api/settings_private/prefs_util.cc +++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc -@@ -40,6 +40,7 @@ +@@ -39,6 +39,7 @@ #include "components/content_settings/core/common/pref_names.h" #include "components/dom_distiller/core/pref_names.h" #include "components/drive/drive_pref_names.h" @@ -164,7 +165,7 @@ diff --git a/chrome/browser/extensions/api/settings_private/prefs_util.cc b/chro #include "components/embedder_support/pref_names.h" #include "components/language/core/browser/pref_names.h" #include "components/live_caption/pref_names.h" -@@ -219,6 +220,9 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlistedKeys() { +@@ -214,6 +215,9 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlistedKeys() { (*s_allowlist)[::prefs::kShowForwardButton] = settings_api::PrefType::kBoolean; @@ -189,7 +190,7 @@ diff --git a/chrome/browser/history/history_service_factory.cc b/chrome/browser/ diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc -@@ -379,6 +379,7 @@ std::unique_ptr Profile::CreateProfile(const base::FilePath& path, +@@ -375,6 +375,7 @@ std::unique_ptr Profile::CreateProfile(const base::FilePath& path, void ProfileImpl::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref(prefs::kSavingBrowserHistoryDisabled, false); @@ -200,7 +201,7 @@ diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/p diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.html b/chrome/browser/resources/settings/privacy_page/privacy_page.html --- a/chrome/browser/resources/settings/privacy_page/privacy_page.html +++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html -@@ -94,6 +94,15 @@ +@@ -96,6 +96,15 @@ sub-label="$i18n{permissionsPageDescription}" on-click="onPermissionsPageClick_" role-description="$i18n{subpageArrowRoleDescription}"> @@ -219,7 +220,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 -@@ -83,6 +83,23 @@ export class SettingsPrivacyPageElement extends SettingsPrivacyPageElementBase { +@@ -82,6 +82,23 @@ export class SettingsPrivacyPageElement extends SettingsPrivacyPageElementBase { static get properties() { return { @@ -246,7 +247,7 @@ diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.ts b/ch 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 -@@ -1383,6 +1383,18 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1404,6 +1404,18 @@ Your Google account may have other forms of browsing history like searches and a Browsing history @@ -268,7 +269,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc --- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc +++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc -@@ -1770,6 +1770,11 @@ void AddPrivacyStrings(content::WebUIDataSource* html_source, +@@ -1897,6 +1897,11 @@ void AddPrivacyStrings(content::WebUIDataSource* html_source, IDS_SETTINGS_SAFEBROWSING_ENHANCED_THINGS_TO_CONSIDER_BULLET_THREE}, {"safeBrowsingStandard", IDS_SETTINGS_SAFEBROWSING_STANDARD}, {"safeBrowsingStandardDesc", IDS_SETTINGS_SAFEBROWSING_STANDARD_DESC}, @@ -624,10 +625,22 @@ diff --git a/components/history/core/common/pref_names.h b/components/history/co extern const char kAllowDeletingBrowserHistory[]; } // namespace prefs +diff --git a/components/history_embeddings/sql_database.cc b/components/history_embeddings/sql_database.cc +--- a/components/history_embeddings/sql_database.cc ++++ b/components/history_embeddings/sql_database.cc +@@ -175,7 +175,7 @@ sql::InitStatus SqlDatabase::InitInternal(const base::FilePath& storage_dir, + // Chrome is running, but it's possible to miss events or start Chrome after + // some down time, so this prevents long term accidental retention edge cases. + DeleteExpiredData(/*expiration_time=*/base::Time::Now() - +- base::Days(history::HistoryBackend::kExpireDaysThreshold)); ++ base::Days(90)); + + // It's possible to get here without `embedder_metadata_` if forcing for + // data deletion. In that case, don't check or change meta table. diff --git a/components/omnibox/browser/shortcuts_backend.cc b/components/omnibox/browser/shortcuts_backend.cc --- a/components/omnibox/browser/shortcuts_backend.cc +++ b/components/omnibox/browser/shortcuts_backend.cc -@@ -505,7 +505,7 @@ void ShortcutsBackend::ComputeDatabaseMetrics() { +@@ -511,7 +511,7 @@ void ShortcutsBackend::ComputeDatabaseMetrics() { const base::Time now(base::Time::Now()); for (const auto& shortcut_pair : shortcuts_map_) { if (now - shortcut_pair.second.last_access_time > @@ -636,7 +649,7 @@ diff --git a/components/omnibox/browser/shortcuts_backend.cc b/components/omnibo num_old_shortcuts++; } } -@@ -623,7 +623,7 @@ bool ShortcutsBackend::DeleteOldShortcuts() { +@@ -629,7 +629,7 @@ bool ShortcutsBackend::DeleteOldShortcuts() { const base::Time now(base::Time::Now()); for (const auto& guid_pair : guid_map_) { if (now - guid_pair.second->second.last_access_time > diff --git a/build/patches/Improve-the-browser-sandbox.patch b/build/patches/Improve-the-browser-sandbox.patch index 481ab3191..2134a8ed4 100644 --- a/build/patches/Improve-the-browser-sandbox.patch +++ b/build/patches/Improve-the-browser-sandbox.patch @@ -7,16 +7,17 @@ using the new flags on android License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - sandbox/policy/features.cc | 8 ++++++++ - 1 file changed, 8 insertions(+) + sandbox/policy/features.cc | 9 +++++++++ + 1 file changed, 9 insertions(+) diff --git a/sandbox/policy/features.cc b/sandbox/policy/features.cc --- a/sandbox/policy/features.cc +++ b/sandbox/policy/features.cc -@@ -226,4 +226,12 @@ bool IsNetworkSandboxEnabled() { - #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) +@@ -229,4 +229,13 @@ bool IsParallelLaunchEnabled() { + return base::FeatureList::IsEnabled(kWinSboxParallelProcessLaunch); } - + #endif // BUILDFLAG(IS_WIN) ++ +#if BUILDFLAG(IS_ANDROID) +SET_CROMITE_FEATURE_ENABLED(kUseRendererProcessPolicy); +SET_CROMITE_FEATURE_ENABLED(kRestrictRendererPoliciesInBaseline); diff --git a/build/patches/Increase-number-of-autocomplete-matches-to-10.patch b/build/patches/Increase-number-of-autocomplete-matches-to-10.patch index 549686ad2..163855d21 100644 --- a/build/patches/Increase-number-of-autocomplete-matches-to-10.patch +++ b/build/patches/Increase-number-of-autocomplete-matches-to-10.patch @@ -13,7 +13,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/components/omnibox/browser/autocomplete_result.cc b/components/omnibox/browser/autocomplete_result.cc --- a/components/omnibox/browser/autocomplete_result.cc +++ b/components/omnibox/browser/autocomplete_result.cc -@@ -87,10 +87,11 @@ constexpr size_t kMaxPedalMatchIndex = +@@ -89,10 +89,11 @@ constexpr size_t kMaxPedalMatchIndex = // static size_t AutocompleteResult::GetMaxMatches(bool is_zero_suggest) { diff --git a/build/patches/Internal-firewall.patch b/build/patches/Internal-firewall.patch index 7079c1f4a..98028e2ed 100644 --- a/build/patches/Internal-firewall.patch +++ b/build/patches/Internal-firewall.patch @@ -70,7 +70,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn 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 -@@ -219,6 +219,7 @@ +@@ -220,6 +220,7 @@ #include "sandbox/policy/features.h" #include "sandbox/policy/switches.h" #include "services/device/public/cpp/device_features.h" @@ -81,7 +81,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc diff --git a/chrome/browser/download/android/download_controller.cc b/chrome/browser/download/android/download_controller.cc --- a/chrome/browser/download/android/download_controller.cc +++ b/chrome/browser/download/android/download_controller.cc -@@ -291,6 +291,36 @@ void LogAppVerificationPromptToPrefs(download::DownloadItem* item) { +@@ -228,6 +228,36 @@ void LogAppVerificationPromptToPrefs(download::DownloadItem* item) { update->Append(base::TimeToValue(base::Time::Now())); } @@ -118,7 +118,7 @@ diff --git a/chrome/browser/download/android/download_controller.cc b/chrome/bro } // namespace static void JNI_DownloadController_OnAcquirePermissionResult( -@@ -346,7 +376,7 @@ static void JNI_DownloadController_DownloadUrl( +@@ -283,7 +313,7 @@ static void JNI_DownloadController_DownloadUrl( std::unique_ptr dl_params = content::DownloadRequestUtils::CreateDownloadForWebContentsMainFrame( web_contents, GURL(url), @@ -289,7 +289,7 @@ new file mode 100644 diff --git a/net/BUILD.gn b/net/BUILD.gn --- a/net/BUILD.gn +++ b/net/BUILD.gn -@@ -1098,6 +1098,7 @@ component("net") { +@@ -1103,6 +1103,7 @@ component("net") { "//components/miracle_parameter/common", "//components/network_time/time_tracker", "//net/http:transport_security_state_generated_files", @@ -314,7 +314,7 @@ diff --git a/net/traffic_annotation/network_traffic_annotation.h b/net/traffic_a diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc --- a/net/url_request/url_request_http_job.cc +++ b/net/url_request/url_request_http_job.cc -@@ -422,6 +422,9 @@ URLRequestHttpJob::URLRequestHttpJob( +@@ -414,6 +414,9 @@ URLRequestHttpJob::URLRequestHttpJob( : URLRequestJob(request), http_user_agent_settings_(http_user_agent_settings) { ResetTimer(); @@ -324,7 +324,7 @@ diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_reque } URLRequestHttpJob::~URLRequestHttpJob() { -@@ -743,6 +746,18 @@ void URLRequestHttpJob::MaybeStartTransactionInternal(int result) { +@@ -712,6 +715,18 @@ void URLRequestHttpJob::MaybeStartTransactionInternal(int result) { void URLRequestHttpJob::StartTransactionInternal() { DCHECK(!override_response_headers_); @@ -354,7 +354,7 @@ diff --git a/net/url_request/url_request_http_job.h b/net/url_request/url_reques namespace net { -@@ -81,6 +82,8 @@ class NET_EXPORT_PRIVATE URLRequestHttpJob : public URLRequestJob { +@@ -94,6 +95,8 @@ class NET_EXPORT_PRIVATE URLRequestHttpJob : public URLRequestJob { return priority_; } @@ -1647,7 +1647,7 @@ new file mode 100644 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 -@@ -97,6 +97,7 @@ +@@ -99,6 +99,7 @@ #include "net/url_request/url_request.h" #include "net/url_request/url_request_context.h" #include "net/url_request/url_request_context_builder.h" @@ -1655,7 +1655,7 @@ diff --git a/services/network/network_context.cc b/services/network/network_cont #include "services/network/brokered_client_socket_factory.h" #include "services/network/cookie_manager.h" #include "services/network/data_remover_util.h" -@@ -1742,6 +1743,9 @@ void NetworkContext::OnNewSCTAuditingReportSent() { +@@ -1751,6 +1752,9 @@ void NetworkContext::OnNewSCTAuditingReportSent() { void NetworkContext::CreateUDPSocket( mojo::PendingReceiver receiver, mojo::PendingRemote listener) { @@ -1665,7 +1665,7 @@ diff --git a/services/network/network_context.cc b/services/network/network_cont socket_factory_->CreateUDPSocket(std::move(receiver), std::move(listener)); } -@@ -1754,6 +1758,17 @@ void NetworkContext::CreateRestrictedUDPSocket( +@@ -1763,6 +1767,17 @@ void NetworkContext::CreateRestrictedUDPSocket( mojo::PendingRemote listener, CreateRestrictedUDPSocketCallback callback) { // SimpleHostResolver is transitively owned by |this|. @@ -1683,7 +1683,7 @@ diff --git a/services/network/network_context.cc b/services/network/network_cont socket_factory_->CreateRestrictedUDPSocket( addr, mode, traffic_annotation, std::move(params), std::move(receiver), std::move(listener), SimpleHostResolver::Create(this), -@@ -1766,6 +1781,17 @@ void NetworkContext::CreateTCPServerSocket( +@@ -1775,6 +1790,17 @@ void NetworkContext::CreateTCPServerSocket( const net::MutableNetworkTrafficAnnotationTag& traffic_annotation, mojo::PendingReceiver receiver, CreateTCPServerSocketCallback callback) { @@ -1701,7 +1701,7 @@ diff --git a/services/network/network_context.cc b/services/network/network_cont socket_factory_->CreateTCPServerSocket( local_addr, std::move(options), static_cast(traffic_annotation), -@@ -1780,6 +1806,21 @@ void NetworkContext::CreateTCPConnectedSocket( +@@ -1789,6 +1815,21 @@ void NetworkContext::CreateTCPConnectedSocket( mojo::PendingReceiver receiver, mojo::PendingRemote observer, CreateTCPConnectedSocketCallback callback) { @@ -1723,7 +1723,7 @@ diff --git a/services/network/network_context.cc b/services/network/network_cont socket_factory_->CreateTCPConnectedSocket( local_addr, remote_addr_list, std::move(tcp_connected_socket_options), static_cast(traffic_annotation), -@@ -1791,6 +1832,20 @@ void NetworkContext::CreateTCPBoundSocket( +@@ -1800,6 +1841,20 @@ void NetworkContext::CreateTCPBoundSocket( const net::MutableNetworkTrafficAnnotationTag& traffic_annotation, mojo::PendingReceiver receiver, CreateTCPBoundSocketCallback callback) { @@ -1744,7 +1744,7 @@ diff --git a/services/network/network_context.cc b/services/network/network_cont socket_factory_->CreateTCPBoundSocket( local_addr, static_cast(traffic_annotation), -@@ -1857,6 +1912,24 @@ void NetworkContext::CreateWebSocket( +@@ -1866,6 +1921,24 @@ void NetworkContext::CreateWebSocket( mojo::PendingRemote auth_handler, mojo::PendingRemote header_client, const std::optional& throttling_profile_id) { diff --git a/build/patches/Invalidate-components-public-key.patch b/build/patches/Invalidate-components-public-key.patch index a907cbb4c..9a24189b2 100644 --- a/build/patches/Invalidate-components-public-key.patch +++ b/build/patches/Invalidate-components-public-key.patch @@ -12,7 +12,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/component_updater/pki_metadata_component_installer.cc b/chrome/browser/component_updater/pki_metadata_component_installer.cc --- a/chrome/browser/component_updater/pki_metadata_component_installer.cc +++ b/chrome/browser/component_updater/pki_metadata_component_installer.cc -@@ -76,7 +76,8 @@ const uint64_t kMaxSupportedKPCompatibilityVersion = 1; +@@ -77,7 +77,8 @@ const uint64_t kMaxSupportedKPCompatibilityVersion = 1; // The extension id is: efniojlnjndmcbiieegkicadnoecjjef const uint8_t kPKIMetadataPublicKeySHA256[32] = { 0x45, 0xd8, 0xe9, 0xbd, 0x9d, 0x3c, 0x21, 0x88, 0x44, 0x6a, 0x82, diff --git a/build/patches/JIT-site-settings.patch b/build/patches/JIT-site-settings.patch index 7383ce40b..9df972a57 100644 --- a/build/patches/JIT-site-settings.patch +++ b/build/patches/JIT-site-settings.patch @@ -275,7 +275,7 @@ new file mode 100644 diff --git a/components/content_settings/core/browser/content_settings_registry.cc b/components/content_settings/core/browser/content_settings_registry.cc --- a/components/content_settings/core/browser/content_settings_registry.cc +++ b/components/content_settings/core/browser/content_settings_registry.cc -@@ -613,7 +613,7 @@ void ContentSettingsRegistry::Init() { +@@ -602,7 +602,7 @@ void ContentSettingsRegistry::Init() { ContentSettingsInfo::EXCEPTIONS_ON_SECURE_ORIGINS_ONLY); Register(ContentSettingsType::JAVASCRIPT_JIT, "javascript-jit", @@ -287,7 +287,7 @@ diff --git a/components/content_settings/core/browser/content_settings_registry. diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -3257,6 +3257,9 @@ void RenderProcessHostImpl::AppendRendererCommandLine( +@@ -3235,6 +3235,9 @@ void RenderProcessHostImpl::AppendRendererCommandLine( if (IsJitDisabled()) { command_line->AppendSwitchASCII(blink::switches::kJavaScriptFlags, "--jitless"); diff --git a/build/patches/Keep-ComputePressure-disabled.patch b/build/patches/Keep-ComputePressure-disabled.patch index f6947a8bb..403f5282e 100644 --- a/build/patches/Keep-ComputePressure-disabled.patch +++ b/build/patches/Keep-ComputePressure-disabled.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 -@@ -830,11 +830,9 @@ +@@ -823,11 +823,9 @@ status: "experimental", }, { diff --git a/build/patches/Keep-Manta-Service-Disabled.patch b/build/patches/Keep-Manta-Service-Disabled.patch index f9060156a..f029a1855 100644 --- a/build/patches/Keep-Manta-Service-Disabled.patch +++ b/build/patches/Keep-Manta-Service-Disabled.patch @@ -23,6 +23,6 @@ diff --git a/components/manta/features.cc b/components/manta/features.cc base::FEATURE_ENABLED_BY_DEFAULT); +SET_CROMITE_FEATURE_DISABLED(kOrcaUseProdServer); - // Enables SeaPen Prod Server - BASE_FEATURE(kSeaPenUseProdServer, + // Enables Scanner Prod Server + BASE_FEATURE(kScannerUseProdServer, -- diff --git a/build/patches/Keep-Side-Panel-Companion-disabled.patch b/build/patches/Keep-Side-Panel-Companion-disabled.patch index f933f0ada..b6a9df226 100644 --- a/build/patches/Keep-Side-Panel-Companion-disabled.patch +++ b/build/patches/Keep-Side-Panel-Companion-disabled.patch @@ -49,7 +49,7 @@ diff --git a/chrome/browser/ui/side_search/side_search_prefs.cc b/chrome/browser diff --git a/components/search_engines/template_url.cc b/components/search_engines/template_url.cc --- a/components/search_engines/template_url.cc +++ b/components/search_engines/template_url.cc -@@ -2048,7 +2048,7 @@ const TemplateURLData::RegulatoryExtension* TemplateURL::GetRegulatoryExtension( +@@ -2012,7 +2012,7 @@ const TemplateURLData::RegulatoryExtension* TemplateURL::GetRegulatoryExtension( } bool TemplateURL::IsSideSearchSupported() const { diff --git a/build/patches/Keep-disabled-FetchLaterAPI.patch b/build/patches/Keep-disabled-FetchLaterAPI.patch index 183348dd8..99dd86be8 100644 --- a/build/patches/Keep-disabled-FetchLaterAPI.patch +++ b/build/patches/Keep-disabled-FetchLaterAPI.patch @@ -12,11 +12,11 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../browser/loader/keep_alive_url_loader.cc | 33 +++++++++++++++++-- .../browser/loader/keep_alive_url_loader.h | 3 -- .../Keep-disabled-FetchLaterAPI.inc | 2 ++ - .../renderer/core/fetch/fetch_manager.cc | 12 +++++-- + .../renderer/core/fetch/fetch_manager.cc | 21 ++++++++++-- .../loader/child_url_loader_factory_bundle.cc | 14 ++++---- .../platform/loader/fetch/resource_fetcher.cc | 2 +- .../platform/runtime_enabled_features.json5 | 5 ++- - 7 files changed, 54 insertions(+), 17 deletions(-) + 7 files changed, 62 insertions(+), 18 deletions(-) create mode 100644 cromite_flags/third_party/blink/common/features_cc/Keep-disabled-FetchLaterAPI.inc diff --git a/content/browser/loader/keep_alive_url_loader.cc b/content/browser/loader/keep_alive_url_loader.cc @@ -99,32 +99,49 @@ new file mode 100644 diff --git a/third_party/blink/renderer/core/fetch/fetch_manager.cc b/third_party/blink/renderer/core/fetch/fetch_manager.cc --- a/third_party/blink/renderer/core/fetch/fetch_manager.cc +++ b/third_party/blink/renderer/core/fetch/fetch_manager.cc -@@ -1195,7 +1195,11 @@ void FetchManager::Loader::Failed( - if (resolver_) { +@@ -290,6 +290,7 @@ class ResponseResolver final : public GarbageCollected { + // Rejects the promise with the supplied object. + void Reject(v8::Local error); + void Reject(DOMException*); ++ void Detach(); + + // Rejects the promise with the TypeError exception created at construction + // time. Also passes the exception object to devtools if `devtools_request_id` +@@ -341,6 +342,12 @@ void ResponseResolver::Reject(DOMException* dom_exception) { + Clear(); + } + ++void ResponseResolver::Detach() { ++ CHECK(resolver_); ++ resolver_->Detach(); ++ Clear(); ++} ++ + void ResponseResolver::RejectBecauseFailed( + std::optional devtools_request_id, + std::optional issue_id) { +@@ -1283,10 +1290,18 @@ void FetchManager::Loader::Failed( + if (response_resolver_) { ScriptState::Scope scope(GetScriptState()); if (dom_exception) { -- resolver_->Reject(dom_exception); +- response_resolver_->Reject(dom_exception); + if (!GetFetchRequestData()->Keepalive()) { -+ resolver_->Reject(dom_exception); ++ response_resolver_->Reject(dom_exception); + } else { -+ resolver_->Detach(); ++ response_resolver_->Detach(); + } } else { - v8::Local value = - exception_.Get(GetScriptState()->GetIsolate()); -@@ -1215,7 +1219,11 @@ void FetchManager::Loader::Failed( - V8String(GetScriptState()->GetIsolate(), - IdentifiersFactory::IdFromToken(*issue_id))); - } -- resolver_->Reject(value); +- response_resolver_->RejectBecauseFailed(std::move(devtools_request_id), +- issue_id); + if (!GetFetchRequestData()->Keepalive()) { -+ resolver_->Reject(value);; ++ response_resolver_->RejectBecauseFailed(std::move(devtools_request_id), ++ issue_id); + } else { -+ resolver_->Detach(); ++ response_resolver_->Detach(); + } LogIfKeepalive("Failed"); } - } + response_resolver_.Clear(); diff --git a/third_party/blink/renderer/platform/loader/child_url_loader_factory_bundle.cc b/third_party/blink/renderer/platform/loader/child_url_loader_factory_bundle.cc --- a/third_party/blink/renderer/platform/loader/child_url_loader_factory_bundle.cc +++ b/third_party/blink/renderer/platform/loader/child_url_loader_factory_bundle.cc @@ -159,7 +176,7 @@ diff --git a/third_party/blink/renderer/platform/loader/child_url_loader_factory diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc --- a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc +++ b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc -@@ -2939,7 +2939,7 @@ void ResourceFetcher::PrepareForLeakDetection() { +@@ -2950,7 +2950,7 @@ void ResourceFetcher::PrepareForLeakDetection() { void ResourceFetcher::StopFetchingInternal(StopFetchingTarget target) { // TODO(toyoshim): May want to suspend scheduler while canceling loaders so // that the cancellations below do not awake unnecessary scheduling. @@ -171,7 +188,7 @@ diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.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 -@@ -1905,10 +1905,9 @@ +@@ -1915,10 +1915,9 @@ }, { // The Blink runtime-enabled feature name for the API's IDL. diff --git a/build/patches/Keep-disabled-WebViewMediaIntegrityApi.patch b/build/patches/Keep-disabled-WebViewMediaIntegrityApi.patch index f31329a62..72650eabf 100644 --- a/build/patches/Keep-disabled-WebViewMediaIntegrityApi.patch +++ b/build/patches/Keep-disabled-WebViewMediaIntegrityApi.patch @@ -15,9 +15,9 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/android_webview/common/aw_features.cc b/android_webview/common/aw_features.cc --- a/android_webview/common/aw_features.cc +++ b/android_webview/common/aw_features.cc -@@ -264,4 +264,5 @@ BASE_FEATURE(kWebViewRenderDocument, - "WebViewRenderDocument", - base::FEATURE_DISABLED_BY_DEFAULT); +@@ -279,4 +279,5 @@ BASE_FEATURE(kWebViewAutoGrantSanitizedClipboardWrite, + "WebViewAutoGrantSanitizedClipboardWrite", + base::FEATURE_ENABLED_BY_DEFAULT); +SET_CROMITE_FEATURE_DISABLED(kWebViewMediaIntegrityApiBlinkExtension); } // namespace android_webview::features diff --git a/build/patches/Keep-empty-tabs-between-sessions.patch b/build/patches/Keep-empty-tabs-between-sessions.patch index 838b2ca03..9127e460a 100644 --- a/build/patches/Keep-empty-tabs-between-sessions.patch +++ b/build/patches/Keep-empty-tabs-between-sessions.patch @@ -11,7 +11,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/tabmodel/TabPersistentStore.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java -@@ -1191,27 +1191,12 @@ public class TabPersistentStore { +@@ -1216,27 +1216,12 @@ public class TabPersistentStore { continue; } diff --git a/build/patches/Keep-flag-to-allow-screenshots-in-Incognito-mode.patch b/build/patches/Keep-flag-to-allow-screenshots-in-Incognito-mode.patch index 651180a93..4146f7b17 100644 --- a/build/patches/Keep-flag-to-allow-screenshots-in-Incognito-mode.patch +++ b/build/patches/Keep-flag-to-allow-screenshots-in-Incognito-mode.patch @@ -28,7 +28,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/incognito/Incog 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 -@@ -5375,9 +5375,9 @@ +@@ -5343,9 +5343,9 @@ "expiry_milestone": 120 }, { diff --git a/build/patches/Keyboard-protection-flag.patch b/build/patches/Keyboard-protection-flag.patch index 2405feba3..399fe52a3 100644 --- a/build/patches/Keyboard-protection-flag.patch +++ b/build/patches/Keyboard-protection-flag.patch @@ -217,7 +217,7 @@ diff --git a/third_party/blink/renderer/core/events/keyboard_event.h b/third_par 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 -@@ -232,6 +232,14 @@ BASE_FEATURE(kSystemKeyboardLock, +@@ -243,6 +243,14 @@ BASE_FEATURE(kSystemKeyboardLock, "SystemKeyboardLock", base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/build/patches/Log-dangling-attributes-in-some-html-elements.patch b/build/patches/Log-dangling-attributes-in-some-html-elements.patch index 46e10cd16..d68ba5012 100644 --- a/build/patches/Log-dangling-attributes-in-some-html-elements.patch +++ b/build/patches/Log-dangling-attributes-in-some-html-elements.patch @@ -42,7 +42,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 -@@ -4639,6 +4639,14 @@ void Document::ProcessBaseElement() { +@@ -4626,6 +4626,14 @@ void Document::ProcessBaseElement() { KURL base_element_url; if (href) { String stripped_href = StripLeadingAndTrailingHTMLSpaces(*href); @@ -57,7 +57,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink if (!stripped_href.empty()) base_element_url = KURL(FallbackBaseURL(), stripped_href); } -@@ -4656,6 +4664,14 @@ void Document::ProcessBaseElement() { +@@ -4643,6 +4651,14 @@ void Document::ProcessBaseElement() { !GetExecutionContext()->GetSecurityOrigin()->CanRequest( base_element_url)) { UseCounter::Count(*this, WebFeature::kBaseWithCrossOriginHref); @@ -72,7 +72,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink } } -@@ -4687,6 +4703,8 @@ void Document::ProcessBaseElement() { +@@ -4674,6 +4690,8 @@ void Document::ProcessBaseElement() { if (target->Contains('<')) UseCounter::Count(*this, WebFeature::kBaseWithOpenBracketInTarget); base_target_ = *target; @@ -115,7 +115,7 @@ diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/ diff --git a/third_party/blink/renderer/core/dom/element.h b/third_party/blink/renderer/core/dom/element.h --- a/third_party/blink/renderer/core/dom/element.h +++ b/third_party/blink/renderer/core/dom/element.h -@@ -695,7 +695,8 @@ class CORE_EXPORT Element : public ContainerNode, public Animatable { +@@ -693,7 +693,8 @@ class CORE_EXPORT Element : public ContainerNode, public Animatable { virtual bool HasLegalLinkAttribute(const QualifiedName&) const; // Only called by the parser immediately after element construction. @@ -128,7 +128,7 @@ diff --git a/third_party/blink/renderer/core/dom/element.h b/third_party/blink/r diff --git a/third_party/blink/renderer/core/editing/serializers/markup_formatter.cc b/third_party/blink/renderer/core/editing/serializers/markup_formatter.cc --- a/third_party/blink/renderer/core/editing/serializers/markup_formatter.cc +++ b/third_party/blink/renderer/core/editing/serializers/markup_formatter.cc -@@ -33,6 +33,8 @@ +@@ -28,6 +28,8 @@ #include "third_party/blink/renderer/core/editing/serializers/markup_formatter.h" #include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-shared.h" @@ -137,7 +137,7 @@ diff --git a/third_party/blink/renderer/core/editing/serializers/markup_formatte #include "third_party/blink/renderer/core/dom/cdata_section.h" #include "third_party/blink/renderer/core/dom/comment.h" #include "third_party/blink/renderer/core/dom/document.h" -@@ -221,6 +223,13 @@ void MarkupFormatter::AppendAttributeValue(StringBuilder& result, +@@ -211,6 +213,13 @@ void MarkupFormatter::AppendAttributeValue(StringBuilder& result, const Document& document) { if (attribute.Contains('<') || attribute.Contains('>')) { document.CountUse(mojom::blink::WebFeature::kAttributeValueContainsLtOrGt); @@ -331,7 +331,7 @@ diff --git a/third_party/blink/renderer/core/page/frame_tree.cc b/third_party/bl 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 -@@ -1686,8 +1686,8 @@ +@@ -1690,8 +1690,8 @@ // Experiment with preventing some instances of mutation XSS // by escaping "<" and ">" in attribute values. // See: crbug.com/1175016 @@ -342,7 +342,7 @@ diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 }, { name: "EventTimingHandleKeyboardEventSimulatedClick", -@@ -2597,6 +2597,12 @@ +@@ -2634,6 +2634,12 @@ name: "LongTaskFromLongAnimationFrame", status: "test", }, diff --git a/build/patches/Logcat-crash-reports-UI.patch b/build/patches/Logcat-crash-reports-UI.patch index 8050da519..3d695afb3 100644 --- a/build/patches/Logcat-crash-reports-UI.patch +++ b/build/patches/Logcat-crash-reports-UI.patch @@ -154,7 +154,7 @@ diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/ 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 -@@ -687,6 +687,7 @@ static_library("ui") { +@@ -664,6 +664,7 @@ static_library("ui") { "//third_party/re2", "//third_party/webrtc_overrides:webrtc_component", "//third_party/zlib", diff --git a/build/patches/Media-fingerprinting-mitigations.patch b/build/patches/Media-fingerprinting-mitigations.patch index 73ac5ad66..653492453 100644 --- a/build/patches/Media-fingerprinting-mitigations.patch +++ b/build/patches/Media-fingerprinting-mitigations.patch @@ -13,7 +13,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/third_party/blink/renderer/modules/webcodecs/video_decoder.cc b/third_party/blink/renderer/modules/webcodecs/video_decoder.cc --- a/third_party/blink/renderer/modules/webcodecs/video_decoder.cc +++ b/third_party/blink/renderer/modules/webcodecs/video_decoder.cc -@@ -304,7 +304,7 @@ ScriptPromise VideoDecoder::isConfigSupported( +@@ -305,7 +305,7 @@ ScriptPromise VideoDecoder::isConfigSupported( auto* config_copy = CopyConfig(*config); // Run the "Check Configuration Support" algorithm. diff --git a/build/patches/Modify-default-preferences.patch b/build/patches/Modify-default-preferences.patch index c3b31c500..b739dcd1d 100644 --- a/build/patches/Modify-default-preferences.patch +++ b/build/patches/Modify-default-preferences.patch @@ -54,7 +54,7 @@ diff --git a/chrome/browser/background/background_mode_manager.cc b/chrome/brows diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc -@@ -1613,7 +1613,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs( +@@ -1582,7 +1582,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs( void ChromeContentBrowserClient::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref(prefs::kDisable3DAPIs, false); @@ -78,7 +78,7 @@ diff --git a/chrome/browser/preloading/preloading_prefs.h b/chrome/browser/prelo diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc --- a/chrome/browser/profiles/profile.cc +++ b/chrome/browser/profiles/profile.cc -@@ -318,7 +318,7 @@ const char Profile::kProfileKey[] = "__PROFILE__"; +@@ -308,7 +308,7 @@ const char Profile::kProfileKey[] = "__PROFILE__"; void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref( prefs::kSearchSuggestEnabled, @@ -102,7 +102,7 @@ diff --git a/chrome/browser/resources/settings/reset_page/reset_profile_dialog.h diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_ui_prefs.cc --- a/chrome/browser/ui/browser_ui_prefs.cc +++ b/chrome/browser/ui/browser_ui_prefs.cc -@@ -97,10 +97,10 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { +@@ -95,10 +95,10 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true); registry->RegisterBooleanPref(prefs::kWebAppCreateInQuickLaunchBar, true); registry->RegisterBooleanPref( @@ -115,7 +115,7 @@ diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_u registry->RegisterDictionaryPref(prefs::kBrowserWindowPlacement); registry->RegisterDictionaryPref(prefs::kBrowserWindowPlacementPopup); registry->RegisterDictionaryPref(prefs::kAppWindowPlacement); -@@ -170,7 +170,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { +@@ -168,7 +168,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { #endif registry->RegisterBooleanPref( @@ -236,7 +236,7 @@ diff --git a/components/content_settings/core/browser/content_settings_registry. /*allowlisted_primary_schemes=*/{}, /*valid_settings=*/{CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK}, WebsiteSettingsInfo::TOP_ORIGIN_ONLY_SCOPE, -@@ -385,7 +385,7 @@ void ContentSettingsRegistry::Init() { +@@ -374,7 +374,7 @@ void ContentSettingsRegistry::Init() { // TODO(crbug.com/40602007): Update this to "SECURE_ONLY" once // DeviceOrientationEvents and DeviceMotionEvents are only fired in secure // contexts. diff --git a/build/patches/Move-navigation-bar-to-bottom.patch b/build/patches/Move-navigation-bar-to-bottom.patch index a45dab96e..addd9fe56 100644 --- a/build/patches/Move-navigation-bar-to-bottom.patch +++ b/build/patches/Move-navigation-bar-to-bottom.patch @@ -98,7 +98,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/cc/base/features.cc b/cc/base/features.cc --- a/cc/base/features.cc +++ b/cc/base/features.cc -@@ -38,6 +38,14 @@ BASE_FEATURE(kSynchronizedScrolling, +@@ -45,6 +45,14 @@ BASE_FEATURE(kSynchronizedScrolling, base::FEATURE_ENABLED_BY_DEFAULT); #endif @@ -116,7 +116,7 @@ diff --git a/cc/base/features.cc b/cc/base/features.cc diff --git a/cc/base/features.h b/cc/base/features.h --- a/cc/base/features.h +++ b/cc/base/features.h -@@ -17,6 +17,8 @@ namespace features { +@@ -18,6 +18,8 @@ CC_BASE_EXPORT BASE_DECLARE_FEATURE(kAlignSurfaceLayerImplToPixelGrid); CC_BASE_EXPORT BASE_DECLARE_FEATURE(kAnimatedImageResume); CC_BASE_EXPORT extern bool IsImpulseScrollAnimationEnabled(); CC_BASE_EXPORT BASE_DECLARE_FEATURE(kSynchronizedScrolling); @@ -151,7 +151,7 @@ diff --git a/cc/input/browser_controls_offset_manager.cc b/cc/input/browser_cont diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc -@@ -4601,6 +4601,9 @@ bool LayerTreeHostImpl::AnimateBrowserControls(base::TimeTicks time) { +@@ -4628,6 +4628,9 @@ bool LayerTreeHostImpl::AnimateBrowserControls(base::TimeTicks time) { if (scroll_delta.IsZero()) return false; @@ -172,17 +172,17 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser import java.util.List; -@@ -171,7 +172,8 @@ public class TabGroupUiCoordinator implements TabGroupUiMediator.ResetHandler, T +@@ -173,7 +174,8 @@ public class TabGroupUiCoordinator implements TabGroupUiMediator.ResetHandler, T public void initializeWithNative( Activity activity, BottomControlsCoordinator.BottomControlsVisibilityController visibilityController, - Callback onModelTokenChange) { + Callback onModelTokenChange, + TopUiThemeColorProvider topUiThemeColorProvider, ObservableSupplier tabSupplier) { - var currentTabModelFilterSupplier = - mTabModelSelector.getTabModelFilterProvider().getCurrentTabModelFilterSupplier(); - try (TraceEvent e = TraceEvent.scoped("TabGroupUiCoordinator.initializeWithNative")) { -@@ -249,7 +251,8 @@ public class TabGroupUiCoordinator implements TabGroupUiMediator.ResetHandler, T + var currentTabGroupModelFilterSupplier = + mTabModelSelector + .getTabGroupModelFilterProvider() +@@ -253,7 +255,8 @@ public class TabGroupUiCoordinator implements TabGroupUiMediator.ResetHandler, T mIncognitoStateProvider, mTabGridDialogControllerSupplier, mOmniboxFocusStateSupplier, @@ -195,7 +195,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/TabGroupUiMediator.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java -@@ -57,6 +57,12 @@ import org.chromium.url.GURL; +@@ -59,6 +59,12 @@ import org.chromium.url.GURL; import java.util.List; @@ -208,7 +208,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser /** A mediator for the TabGroupUi. Responsible for managing the internal state of the component. */ public class TabGroupUiMediator implements BackPressHandler { /** Defines an interface for a {@link TabGroupUiMediator} reset event handler. */ -@@ -110,6 +116,11 @@ public class TabGroupUiMediator implements BackPressHandler { +@@ -99,6 +105,11 @@ public class TabGroupUiMediator implements BackPressHandler { private final @ColorInt int mPrimaryBackgroundColor; private final @ColorInt int mIncognitoBackgroundColor; @@ -217,10 +217,10 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser + /** An observer that watches for changes in the active tab. */ + private final CurrentTabObserver mTabObserver; + - TabGroupUiMediator( - Context context, - BottomControlsVisibilityController visibilityController, -@@ -125,7 +136,9 @@ public class TabGroupUiMediator implements BackPressHandler { + // These should only be used when regular (non-incognito) tabs are set in the model. + private final @Nullable SharedImageTilesCoordinator mSharedImageTilesCoordinator; + private final @Nullable TransitiveSharedGroupObserver mTransitiveSharedGroupObserver; +@@ -128,7 +139,9 @@ public class TabGroupUiMediator implements BackPressHandler { LazyOneshotSupplier dialogControllerSupplier, ObservableSupplier omniboxFocusStateSupplier, @@ -228,10 +228,10 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser + SharedImageTilesCoordinator sharedImageTilesCoordinator, + TopUiThemeColorProvider topUiThemeColorProvider, ObservableSupplier tabSupplier) { + mTopUiThemeColorProvider = topUiThemeColorProvider; - mContext = context; mResetHandler = resetHandler; mModel = model; -@@ -153,11 +166,30 @@ public class TabGroupUiMediator implements BackPressHandler { + mTabModelSelector = tabModelSelector; +@@ -167,11 +180,30 @@ public class TabGroupUiMediator implements BackPressHandler { mIsShowingOverViewMode = true; } @@ -262,7 +262,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser if (getTabsToShowForId(lastId).contains(tab)) { return; } -@@ -217,6 +249,7 @@ public class TabGroupUiMediator implements BackPressHandler { +@@ -231,6 +263,7 @@ public class TabGroupUiMediator implements BackPressHandler { return; } resetTabStripWithRelatedTabsForId(currentTab.getId()); @@ -270,7 +270,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser } @Override -@@ -339,6 +372,8 @@ public class TabGroupUiMediator implements BackPressHandler { +@@ -356,6 +389,8 @@ public class TabGroupUiMediator implements BackPressHandler { resetTabStripWithRelatedTabsForId(tab.getId()); } @@ -279,7 +279,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser mHandleBackPressChangedSupplier = handleBackPressChangedSupplier; if (mTabGridDialogControllerSupplier != null) { mTabGridDialogControllerSupplier.onAvailable( -@@ -362,6 +397,18 @@ public class TabGroupUiMediator implements BackPressHandler { +@@ -379,6 +414,18 @@ public class TabGroupUiMediator implements BackPressHandler { mModel.set(TabGroupUiProperties.BACKGROUND_COLOR, backgroundColor); } @@ -298,13 +298,13 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser private void setupToolbarButtons() { View.OnClickListener showGroupDialogOnClickListener = view -> { -@@ -524,6 +571,7 @@ public class TabGroupUiMediator implements BackPressHandler { +@@ -531,6 +578,7 @@ public class TabGroupUiMediator implements BackPressHandler { } public void destroy() { + mTabObserver.destroy(); if (mTabModelSelector != null) { - var filterProvider = mTabModelSelector.getTabModelFilterProvider(); + var filterProvider = mTabModelSelector.getTabGroupModelFilterProvider(); diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiProperties.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiProperties.java --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiProperties.java @@ -412,7 +412,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser import android.widget.ImageView; import androidx.annotation.DrawableRes; -@@ -59,6 +64,8 @@ import org.chromium.ui.modelutil.PropertyModelChangeProcessor; +@@ -60,6 +65,8 @@ import org.chromium.ui.modelutil.PropertyModelChangeProcessor; import org.chromium.ui.modelutil.SimpleRecyclerViewAdapter; import org.chromium.ui.widget.ViewLookupCachingFrameLayout; @@ -421,7 +421,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.List; -@@ -116,6 +123,128 @@ public class TabListCoordinator +@@ -130,6 +137,128 @@ public class TabListCoordinator private int mAwaitingTabId = Tab.INVALID_TAB_ID; private @TabActionState int mTabActionState; @@ -550,7 +550,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser /** * Construct a coordinator for UI that shows a list of tabs. * -@@ -312,6 +441,12 @@ public class TabListCoordinator +@@ -344,6 +473,12 @@ public class TabListCoordinator checkAwaitingLayout(); } }; @@ -563,7 +563,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser mRecyclerView.setLayoutManager(gridLayoutManager); mMediator.registerOrientationListener(gridLayoutManager); mMediator.updateSpanCount( -@@ -323,8 +458,7 @@ public class TabListCoordinator +@@ -355,8 +490,7 @@ public class TabListCoordinator .getDecorView() .getWindowVisibleDisplayFrame(frame); updateGridCardLayout(frame.width()); @@ -573,7 +573,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser LinearLayoutManager layoutManager = new LinearLayoutManager( context, -@@ -339,6 +473,25 @@ public class TabListCoordinator +@@ -371,6 +505,25 @@ public class TabListCoordinator } }; mRecyclerView.setLayoutManager(layoutManager); @@ -599,7 +599,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser } mMediator.setRecyclerViewItemAnimationToggle(mRecyclerView::setDisableItemAnimations); } -@@ -359,7 +512,7 @@ public class TabListCoordinator +@@ -391,7 +544,7 @@ public class TabListCoordinator if (hasEmptyView) { mTabListEmptyCoordinator = new TabListEmptyCoordinator( @@ -607,8 +607,8 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser + parentView, mModel, this::runOnItemAnimatorFinished, mBrowserControlsStateProvider); } - configureRecyclerViewTouchHelpers(mMode, mTabActionState); -@@ -645,6 +798,9 @@ public class TabListCoordinator + configureRecyclerViewTouchHelpers(mTabActionState); +@@ -691,6 +844,9 @@ public class TabListCoordinator void prepareTabSwitcherPaneView() { registerLayoutChangeListener(); mRecyclerView.setupCustomItemAnimator(); @@ -683,7 +683,7 @@ diff --git a/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/ import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; -@@ -537,6 +538,9 @@ public class FeedSurfaceCoordinator +@@ -551,6 +552,9 @@ public class FeedSurfaceCoordinator ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); layoutParams.setMarginStart(margin); layoutParams.setMarginEnd(margin); @@ -696,7 +696,7 @@ diff --git a/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/ diff --git 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 --- 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 -@@ -54,6 +54,11 @@ public class AccessibilitySettings extends ChromeBaseSettingsFragment +@@ -55,6 +55,11 @@ public class AccessibilitySettings extends ChromeBaseSettingsFragment private BooleanPreferenceDelegate mForceTabletUIDelegate; static final String PREF_FORCE_TABLET_UI = "force_tablet_ui"; @@ -708,7 +708,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/s private TextScalePreference mTextScalePref; private PageZoomPreference mPageZoomDefaultZoomPref; private ChromeSwitchPreference mPageZoomIncludeOSAdjustment; -@@ -91,6 +96,10 @@ public class AccessibilitySettings extends ChromeBaseSettingsFragment +@@ -93,6 +98,10 @@ public class AccessibilitySettings extends ChromeBaseSettingsFragment mFontSizePrefs = FontSizePrefs.getInstance(delegate.getBrowserContextHandle()); } @@ -719,7 +719,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/s @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); -@@ -161,6 +170,18 @@ public class AccessibilitySettings extends ChromeBaseSettingsFragment +@@ -163,6 +172,18 @@ public class AccessibilitySettings extends ChromeBaseSettingsFragment forceTabletUiPref.setChecked(mForceTabletUIDelegate.isEnabled()); forceTabletUiPref.setOnPreferenceChangeListener(this); @@ -738,7 +738,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/s Preference captions = findPreference(PREF_CAPTIONS); captions.setOnPreferenceClickListener( preference -> { -@@ -245,6 +266,11 @@ public class AccessibilitySettings extends ChromeBaseSettingsFragment +@@ -253,6 +274,11 @@ public class AccessibilitySettings extends ChromeBaseSettingsFragment mDelegate.getBrowserContextHandle(), (Integer) newValue); } else if (PREF_PAGE_ZOOM_ALWAYS_SHOW.equals(preference.getKey())) { PageZoomUtils.setShouldAlwaysShowZoomMenuItem((Boolean) newValue); @@ -749,7 +749,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/s + mDisableToolbarSwipeUpDelegate.setEnabled((Boolean) newValue); } else if (PREF_PAGE_ZOOM_INCLUDE_OS_ADJUSTMENT.equals(preference.getKey())) { // TODO(mschillaci): Implement the override behavior for OS level. - } + } else if (OmniboxFeatures.KEY_JUMP_START_OMNIBOX.equals(preference.getKey())) { diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/ChromeAccessibilitySettingsDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/ChromeAccessibilitySettingsDelegate.java --- a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/ChromeAccessibilitySettingsDelegate.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/ChromeAccessibilitySettingsDelegate.java @@ -860,7 +860,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/CompositorViewHolder.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorViewHolder.java --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorViewHolder.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorViewHolder.java -@@ -252,6 +252,10 @@ public class CompositorViewHolder extends FrameLayout +@@ -255,6 +255,10 @@ public class CompositorViewHolder extends FrameLayout @Override public void setCurrentTouchEventOffsets(float top) { EventForwarder forwarder = getEventForwarder(); @@ -871,7 +871,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/Comp if (forwarder != null) forwarder.setCurrentTouchOffsetY(top); } -@@ -886,6 +890,9 @@ public class CompositorViewHolder extends FrameLayout +@@ -892,6 +896,9 @@ public class CompositorViewHolder extends FrameLayout mApplicationBottomInsetSupplier != null ? mApplicationBottomInsetSupplier.get().webContentsHeightInset : 0; @@ -884,7 +884,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/Comp diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChrome.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChrome.java --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChrome.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChrome.java -@@ -38,6 +38,7 @@ import org.chromium.chrome.browser.util.ChromeAccessibilityUtil; +@@ -38,6 +38,7 @@ import org.chromium.components.browser_ui.desktop_windowing.DesktopWindowStatePr import org.chromium.components.browser_ui.widget.gesture.SwipeGestureListener.ScrollDirection; import org.chromium.components.browser_ui.widget.gesture.SwipeGestureListener.SwipeHandler; import org.chromium.ui.resources.dynamics.DynamicResourceLoader; @@ -950,20 +950,20 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layo diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChromeTablet.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChromeTablet.java --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChromeTablet.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChromeTablet.java -@@ -37,6 +37,7 @@ import org.chromium.chrome.browser.ui.desktop_windowing.DesktopWindowStateProvid - import org.chromium.ui.base.WindowAndroid; +@@ -38,6 +38,7 @@ import org.chromium.ui.base.WindowAndroid; import org.chromium.ui.dragdrop.DragAndDropDelegate; + import org.chromium.ui.modaldialog.ModalDialogManager; import org.chromium.ui.resources.dynamics.DynamicResourceLoader; +import org.chromium.chrome.browser.fullscreen.BrowserControlsManager; - /** - * {@link LayoutManagerChromeTablet} is the specialization of {@link LayoutManagerChrome} for the -@@ -125,7 +126,8 @@ public class LayoutManagerChromeTablet extends LayoutManagerChrome { - windowAndroid, - toolbarManager, + /** LayoutManagerChromeTablet is the specialization of LayoutManagerChrome for the tablet. */ + public class LayoutManagerChromeTablet extends LayoutManagerChrome { +@@ -124,7 +125,8 @@ public class LayoutManagerChromeTablet extends LayoutManagerChrome { desktopWindowStateProvider, -- actionConfirmationManager); -+ actionConfirmationManager, + actionConfirmationManager, + modalDialogManager, +- dataSharingTabManager); ++ dataSharingTabManager, + /*browserControlsManagerSupplier*/ () -> getBrowserControlsManager()); addSceneOverlay(mTabStripLayoutHelperManager); addObserver(mTabStripLayoutHelperManager.getTabSwitcherObserver()); @@ -971,7 +971,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layo diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/ToolbarSwipeLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/ToolbarSwipeLayout.java --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/ToolbarSwipeLayout.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/ToolbarSwipeLayout.java -@@ -37,6 +37,8 @@ import org.chromium.ui.base.LocalizationUtils; +@@ -38,6 +38,8 @@ import org.chromium.ui.base.LocalizationUtils; import org.chromium.ui.interpolators.Interpolators; import org.chromium.ui.resources.ResourceManager; @@ -980,7 +980,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layo import java.util.ArrayList; import java.util.List; -@@ -446,7 +448,11 @@ public class ToolbarSwipeLayout extends Layout { +@@ -447,7 +449,11 @@ public class ToolbarSwipeLayout extends Layout { mLeftToolbarOverlay.setXOffset(leftX * dpToPx); } mLeftTab.setX(leftX); @@ -993,7 +993,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layo needUpdate = updateSnap(dt, mLeftTab) || needUpdate; } else if (mLeftToolbarOverlay != null) { mLeftToolbarOverlay.setManualVisibility(false); -@@ -459,7 +465,11 @@ public class ToolbarSwipeLayout extends Layout { +@@ -460,7 +466,11 @@ public class ToolbarSwipeLayout extends Layout { mRightToolbarOverlay.setXOffset(rightX * dpToPx); } mRightTab.setX(rightX); @@ -1009,7 +1009,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layo diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/ScrollDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/ScrollDelegate.java --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/ScrollDelegate.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/ScrollDelegate.java -@@ -343,7 +343,7 @@ public class ScrollDelegate { +@@ -257,7 +257,7 @@ public class ScrollDelegate { boolean useUnadjustedScrollOffset = isRtl != isLeft; float scrollOffset = mScrollOffset; @@ -1029,7 +1029,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over import org.chromium.base.supplier.ObservableSupplier; import org.chromium.base.supplier.ObservableSupplierImpl; import org.chromium.cc.input.BrowserControlsOffsetTagsInfo; -@@ -101,6 +102,8 @@ import org.chromium.ui.interpolators.Interpolators; +@@ -102,6 +103,8 @@ import org.chromium.ui.modaldialog.ModalDialogManager; import org.chromium.ui.resources.ResourceManager; import org.chromium.ui.util.ColorUtils; import org.chromium.url.GURL; @@ -1038,7 +1038,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; -@@ -267,12 +270,16 @@ public class StripLayoutHelperManager +@@ -268,12 +271,16 @@ public class StripLayoutHelperManager // Drag-Drop @Nullable private TabDragSource mTabDragSource; @@ -1055,7 +1055,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over if (mModelSelectorButton != null && mModelSelectorButton.onDown(x, y, fromMouse, buttons)) { return; -@@ -298,6 +305,7 @@ public class StripLayoutHelperManager +@@ -299,6 +306,7 @@ public class StripLayoutHelperManager if (DragDropGlobalState.hasValue()) { return; } @@ -1063,7 +1063,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over if (mModelSelectorButton != null) { mModelSelectorButton.drag(x, y); } -@@ -309,6 +317,7 @@ public class StripLayoutHelperManager +@@ -310,6 +318,7 @@ public class StripLayoutHelperManager if (DragDropGlobalState.hasValue()) { return; } @@ -1071,7 +1071,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over long time = time(); if (mModelSelectorButton != null && mModelSelectorButton.click(x, y, fromMouse, buttons)) { -@@ -323,6 +332,7 @@ public class StripLayoutHelperManager +@@ -324,6 +333,7 @@ public class StripLayoutHelperManager if (DragDropGlobalState.hasValue()) { return; } @@ -1079,7 +1079,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over getActiveStripLayoutHelper().fling(time(), x, y, velocityX, velocityY); } -@@ -331,6 +341,7 @@ public class StripLayoutHelperManager +@@ -332,6 +342,7 @@ public class StripLayoutHelperManager if (DragDropGlobalState.hasValue()) { return; } @@ -1087,17 +1087,17 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over getActiveStripLayoutHelper().onLongPress(time(), x, y); } -@@ -437,7 +448,8 @@ public class StripLayoutHelperManager - // implement an interface to manage strip transition states. - @NonNull ToolbarManager toolbarManager, +@@ -439,7 +450,8 @@ public class StripLayoutHelperManager @Nullable DesktopWindowStateProvider desktopWindowStateProvider, -- ActionConfirmationManager actionConfirmationManager) { -+ ActionConfirmationManager actionConfirmationManager, + ActionConfirmationManager actionConfirmationManager, + ModalDialogManager modalDialogManager, +- DataSharingTabManager dataSharingTabManager) { ++ DataSharingTabManager dataSharingTabManager, + Supplier browserControlsManagerSupplier) { Resources res = context.getResources(); mUpdateHost = updateHost; mLayerTitleCacheSupplier = layerTitleCacheSupplier; -@@ -537,6 +549,8 @@ public class StripLayoutHelperManager +@@ -543,6 +555,8 @@ public class StripLayoutHelperManager !mTabStripObscured && getStripVisibilityState() == StripVisibilityState.VISIBLE); @@ -1106,7 +1106,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over tabHoverCardViewStub.setOnInflateListener( (viewStub, view) -> { -@@ -772,6 +786,10 @@ public class StripLayoutHelperManager +@@ -778,6 +792,10 @@ public class StripLayoutHelperManager // layer should be a negative value. yOffset -= getHeight(); } @@ -1117,7 +1117,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over mTabStripTreeProvider.pushAndUpdateStrip( this, mLayerTitleCacheSupplier.get(), -@@ -785,7 +803,9 @@ public class StripLayoutHelperManager +@@ -791,7 +809,9 @@ public class StripLayoutHelperManager mStripTransitionScrimOpacity, mLeftPadding, mRightPadding, @@ -1128,7 +1128,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over return mTabStripTreeProvider; } -@@ -844,11 +864,21 @@ public class StripLayoutHelperManager +@@ -850,11 +870,21 @@ public class StripLayoutHelperManager mLeftPadding, mRightPadding); @@ -1204,7 +1204,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/scen diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/scene_layer/TabStripSceneLayer.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/scene_layer/TabStripSceneLayer.java --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/scene_layer/TabStripSceneLayer.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/scene_layer/TabStripSceneLayer.java -@@ -20,6 +20,9 @@ import org.chromium.chrome.browser.flags.ChromeFeatureList; +@@ -19,6 +19,9 @@ import org.chromium.chrome.browser.compositor.overlays.strip.StripLayoutTab; import org.chromium.chrome.browser.layouts.scene_layer.SceneLayer; import org.chromium.chrome.browser.layouts.scene_layer.SceneOverlayLayer; import org.chromium.ui.resources.ResourceManager; @@ -1214,7 +1214,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/scen /** * The Java component of what is basically a CC Layer that manages drawing the Tab Strip (which is -@@ -90,9 +93,22 @@ public class TabStripSceneLayer extends SceneOverlayLayer { +@@ -89,9 +92,22 @@ public class TabStripSceneLayer extends SceneOverlayLayer { float scrimOpacity, float leftPaddingDp, float rightPaddingDp, @@ -1237,8 +1237,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/scen + } + } - // When BrowserControlsInViz is enabled, this function will be called sparingly during a - // scroll to reduce/remove browser frames. If the tab strip isn't visible, + // This will hide the tab strips if necessary. + TabStripSceneLayerJni.get() diff --git a/chrome/android/java/src/org/chromium/chrome/browser/findinpage/FindToolbarTablet.java b/chrome/android/java/src/org/chromium/chrome/browser/findinpage/FindToolbarTablet.java --- a/chrome/android/java/src/org/chromium/chrome/browser/findinpage/FindToolbarTablet.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/findinpage/FindToolbarTablet.java @@ -1269,17 +1269,17 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/findinpage/Find diff --git a/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/BrowserControlsManager.java b/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/BrowserControlsManager.java --- a/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/BrowserControlsManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/BrowserControlsManager.java -@@ -48,6 +48,8 @@ import org.chromium.ui.util.TokenHolder; - import java.lang.annotation.Retention; - import java.lang.annotation.RetentionPolicy; +@@ -44,6 +44,8 @@ import org.chromium.content_public.browser.WebContents; + import org.chromium.ui.base.ViewUtils; + import org.chromium.ui.util.TokenHolder; +import org.chromium.chrome.browser.flags.ChromeFeatureList; + /** A class that manages browser control visibility and positioning. */ public class BrowserControlsManager implements ActivityStateListener, BrowserControlsSizer { // The amount of time to delay the control show request after returning to a once visible -@@ -464,6 +466,14 @@ public class BrowserControlsManager implements ActivityStateListener, BrowserCon - return mTopControlContainerHeight; +@@ -454,6 +456,14 @@ public class BrowserControlsManager implements ActivityStateListener, BrowserCon + return mTopControlsHeight; } + @Override @@ -1287,13 +1287,13 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/Brow + if (ChromeFeatureList.sMoveTopToolbarToBottom.isEnabled()) + return 0; + else -+ return mTopControlContainerHeight; ++ return mTopControlsHeight; + } + @Override public int getTopControlsMinHeight() { return mTopControlsMinHeight; -@@ -530,6 +540,8 @@ public class BrowserControlsManager implements ActivityStateListener, BrowserCon +@@ -526,6 +536,8 @@ public class BrowserControlsManager implements ActivityStateListener, BrowserCon @Override public float getTopVisibleContentOffset() { @@ -1357,7 +1357,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/modaldialog/Chr diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java -@@ -109,6 +109,7 @@ import org.chromium.ui.base.DeviceFormFactor; +@@ -111,6 +111,7 @@ import org.chromium.ui.base.DeviceFormFactor; import org.chromium.ui.base.WindowAndroid; import org.chromium.ui.modaldialog.ModalDialogManager; import org.chromium.url.GURL; @@ -1365,7 +1365,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage. import java.util.List; -@@ -658,11 +659,16 @@ public class NewTabPage +@@ -665,11 +666,16 @@ public class NewTabPage final int topControlsDistanceToRest = mBrowserControlsStateProvider.getContentOffset() - mBrowserControlsStateProvider.getTopControlsHeight(); @@ -1384,7 +1384,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage. if (topMargin != layoutParams.topMargin || bottomMargin != layoutParams.bottomMargin) { layoutParams.topMargin = topMargin; -@@ -678,9 +684,7 @@ public class NewTabPage +@@ -685,9 +691,7 @@ public class NewTabPage * strip. */ private int getToolbarExtraYOffset() { @@ -1408,7 +1408,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageL import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; -@@ -174,7 +177,12 @@ public class NewTabPageLayout extends LinearLayout { +@@ -169,7 +172,12 @@ public class NewTabPageLayout extends LinearLayout { mMiddleSpacer = findViewById(R.id.ntp_middle_spacer); mFakeSearchBoxLayout = findViewById(R.id.search_box); insertSiteSectionView(); @@ -1425,7 +1425,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageL diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsPage.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsPage.java --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsPage.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsPage.java -@@ -25,6 +25,7 @@ import org.chromium.components.browser_ui.styles.SemanticColorUtils; +@@ -27,6 +27,7 @@ import org.chromium.components.browser_ui.styles.SemanticColorUtils; import org.chromium.components.embedder_support.util.UrlConstants; import org.chromium.ui.base.DeviceFormFactor; import org.chromium.ui.base.ViewUtils; @@ -1433,7 +1433,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsP /** * The native recent tabs page. Lists recently closed tabs, open windows and tabs from the user's -@@ -98,7 +99,8 @@ public class RecentTabsPage +@@ -97,7 +98,8 @@ public class RecentTabsPage mView.addOnAttachStateChangeListener(this); @@ -1443,7 +1443,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsP mBrowserControlsStateProvider = browserControlsStateProvider; mBrowserControlsStateProvider.addObserver(this); onBottomControlsHeightChanged( -@@ -110,14 +112,22 @@ public class RecentTabsPage +@@ -109,14 +111,22 @@ public class RecentTabsPage mTabStripHeightSupplier = tabStripHeightSupplier; mView.setPadding(0, mTabStripHeightSupplier.get(), 0, 0); @@ -1468,7 +1468,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsP onUpdated(); } -@@ -303,7 +313,7 @@ public class RecentTabsPage +@@ -311,7 +321,7 @@ public class RecentTabsPage private void updateMargins() { final View recentTabsRoot = mView.findViewById(R.id.recent_tabs_root); @@ -1477,7 +1477,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsP final int contentOffset = mBrowserControlsStateProvider.getContentOffset(); ViewGroup.MarginLayoutParams layoutParams = (ViewGroup.MarginLayoutParams) recentTabsRoot.getLayoutParams(); -@@ -319,9 +329,17 @@ public class RecentTabsPage +@@ -327,9 +337,17 @@ public class RecentTabsPage // If the content offset is different from the margin, we use translationY to position the // view in line with the content offset. @@ -1512,7 +1512,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/Se import java.lang.ref.WeakReference; /** Queries the user's default search engine and shows autocomplete suggestions. */ -@@ -287,6 +292,12 @@ public class SearchActivity extends AsyncInitializationActivity +@@ -288,6 +293,12 @@ public class SearchActivity extends AsyncInitializationActivity // Build the search box. mSearchBox = contentView.findViewById(R.id.search_location_bar); View anchorView = contentView.findViewById(R.id.toolbar); @@ -1528,7 +1528,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/Se diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/FragmentDependencyProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/FragmentDependencyProvider.java --- a/chrome/android/java/src/org/chromium/chrome/browser/settings/FragmentDependencyProvider.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/FragmentDependencyProvider.java -@@ -240,6 +240,11 @@ public class FragmentDependencyProvider extends FragmentManager.FragmentLifecycl +@@ -241,6 +241,11 @@ public class FragmentDependencyProvider extends FragmentManager.FragmentLifecycl if (fragment instanceof INeedSnackbarManager) { ((INeedSnackbarManager)fragment).setSnackbarManagerSupplier(mSnackbarManagerSupplier); } @@ -1592,7 +1592,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/status_indicato 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 -@@ -195,6 +195,9 @@ import org.chromium.url.GURL; +@@ -196,6 +196,9 @@ import org.chromium.url.GURL; import java.util.List; @@ -1602,7 +1602,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar /** * Contains logic for managing the toolbar visual component. This class manages the interactions * with the rest of the application to ensure the toolbar is always visually up to date. -@@ -644,6 +647,17 @@ public class ToolbarManager +@@ -673,6 +676,17 @@ public class ToolbarManager }, AlwaysIncognitoLinkInterceptor.isAlwaysIncognito()); mControlContainer = controlContainer; mToolbarHairline = mControlContainer.findViewById(R.id.toolbar_hairline); @@ -1620,7 +1620,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar mBookmarkModelSupplier = bookmarkModelSupplier; mBookmarkModelSupplier.addObserver(mBookmarkModelSupplierObserver); -@@ -1134,6 +1148,7 @@ public class ToolbarManager +@@ -1182,6 +1196,7 @@ public class ToolbarManager // the height won't be measured by the background image. if (mControlContainer.getBackground() == null) { setControlContainerTopMargin(getToolbarExtraYOffset()); @@ -1628,7 +1628,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar } else if (mLayoutChangeListener == null) { mLayoutChangeListener = (view, -@@ -1147,6 +1162,7 @@ public class ToolbarManager +@@ -1195,6 +1210,7 @@ public class ToolbarManager oldBottom) -> { if (mControlContainer.getBackground() == null) { setControlContainerTopMargin(getToolbarExtraYOffset()); @@ -1636,7 +1636,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar mControlContainer.removeOnLayoutChangeListener( mLayoutChangeListener); mLayoutChangeListener = null; -@@ -1536,16 +1552,28 @@ public class ToolbarManager +@@ -1603,16 +1619,28 @@ public class ToolbarManager return ((LocationBarCoordinator) mLocationBar).getUrlBarTextWithoutAutocomplete(); } @@ -1647,7 +1647,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar + ChromeFeatureList.sMoveTopToolbarToBottom.isEnabled()) { + // move up the container view of the ui + // below there is the toolbar -+ mBottomRoot.setTranslationY(-mBrowserControlsVisibilityManager.getTopControlsHeight()); ++ mBottomRoot.setTranslationY(-mBrowserControlsSizer.getTopControlsHeight()); + } + } + @@ -1664,10 +1664,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar mActivity, - root.findViewById(R.id.bottom_container_slot), + mBottomRoot.findViewById(R.id.bottom_container_slot), - mBrowserControlsVisibilityManager, + mBrowserControlsSizer, mIncognitoStateProvider, mScrimCoordinator, -@@ -1570,7 +1598,7 @@ public class ToolbarManager +@@ -1637,7 +1665,7 @@ public class ToolbarManager mControlsVisibilityDelegate, mFullscreenManager, mEdgeToEdgeControllerSupplier, @@ -1676,7 +1676,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar bottomControlsContentDelegateSupplier, mTabObscuringHandler, mOverlayPanelVisibilitySupplier, -@@ -1578,7 +1606,8 @@ public class ToolbarManager +@@ -1645,7 +1673,8 @@ public class ToolbarManager /* readAloudRestoringSupplier= */ () -> { final var readAloud = mReadAloudControllerSupplier.get(); return readAloud != null && readAloud.isRestoringPlayer(); @@ -1744,7 +1744,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/system/Statu import org.chromium.chrome.browser.layouts.LayoutManager; import org.chromium.chrome.browser.layouts.LayoutStateProvider; import org.chromium.chrome.browser.layouts.LayoutStateProvider.LayoutStateObserver; -@@ -479,6 +481,12 @@ public class StatusBarColorController +@@ -475,6 +477,12 @@ public class StatusBarColorController boolean needsDarkStatusBarIcons = !ColorUtils.shouldUseLightForegroundOnBackground(color); UiUtils.setStatusBarIconColor(root, needsDarkStatusBarIcons); UiUtils.setStatusBarColor(window, color); @@ -1834,7 +1834,7 @@ diff --git a/chrome/browser/android/compositor/scene_layer/tab_strip_scene_layer diff --git a/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BottomControlsStacker.java b/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BottomControlsStacker.java --- a/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BottomControlsStacker.java +++ b/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BottomControlsStacker.java -@@ -186,7 +186,7 @@ public class BottomControlsStacker implements BrowserControlsStateProvider.Obser +@@ -189,7 +189,7 @@ public class BottomControlsStacker implements BrowserControlsStateProvider.Obser /** * @return {@link BrowserControlsStateProvider} instance in the current Activity. */ @@ -1868,7 +1868,7 @@ diff --git a/chrome/browser/browser_controls/android/java/src/org/chromium/chrom diff --git a/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BrowserControlsStateProvider.java b/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BrowserControlsStateProvider.java --- a/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BrowserControlsStateProvider.java +++ b/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BrowserControlsStateProvider.java -@@ -85,6 +85,12 @@ public interface BrowserControlsStateProvider { +@@ -108,6 +108,12 @@ public interface BrowserControlsStateProvider { */ int getTopControlsHeight(); @@ -1915,7 +1915,7 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse #include "chrome/browser/android/webapk/webapk_features.h" #include "chrome/browser/browser_features.h" #include "chrome/browser/flags/android/chrome_session_state.h" -@@ -270,6 +271,8 @@ const base::Feature* const kFeaturesExposedToJava[] = { +@@ -277,6 +278,8 @@ const base::Feature* const kFeaturesExposedToJava[] = { &kNavBarColorMatchesTabBackground, &kNewTabSearchEngineUrlAndroid, &kNewTabPageAndroidTriggerForPrerender2, @@ -1923,11 +1923,11 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse + &features::kDisableToolbarSwipeUp, &kNotificationPermissionVariant, &kNotificationPermissionBottomSheet, - &kOfflineIndicatorV2, + &kNotificationTrampoline, 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 -@@ -379,6 +379,10 @@ public abstract class ChromeFeatureList { +@@ -397,6 +397,10 @@ public abstract class ChromeFeatureList { public static final String NEW_TAB_PAGE_ANDROID_TRIGGER_FOR_PRERENDER2 = "NewTabPageAndroidTriggerForPrerender2"; public static final String NOTIFICATION_ONE_TAP_UNSUBSCRIBE = "NotificationOneTapUnsubscribe"; @@ -1938,7 +1938,7 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f public static final String NOTIFICATION_PERMISSION_VARIANT = "NotificationPermissionVariant"; public static final String NOTIFICATION_PERMISSION_BOTTOM_SHEET = "NotificationPermissionBottomSheet"; -@@ -679,6 +683,10 @@ public abstract class ChromeFeatureList { +@@ -716,6 +720,10 @@ public abstract class ChromeFeatureList { public static final CachedFlag sPriceInsights = newCachedFlag(PRICE_INSIGHTS, false); public static final CachedFlag sPrivacyGuideAndroid3 = newCachedFlag(PRIVACY_GUIDE_ANDROID_3, false); @@ -1949,7 +1949,7 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f public static final CachedFlag sPrivacyGuidePreloadAndroid = newCachedFlag(PRIVACY_GUIDE_PRELOAD_ANDROID, false); public static final CachedFlag sOptimizationGuidePushNotifications = -@@ -814,6 +822,8 @@ public abstract class ChromeFeatureList { +@@ -854,6 +862,8 @@ public abstract class ChromeFeatureList { sPrivacyGuideAndroid3, sPrivacyGuidePreloadAndroid, sOptimizationGuidePushNotifications, @@ -1969,9 +1969,9 @@ diff --git a/chrome/browser/hub/internal/BUILD.gn b/chrome/browser/hub/internal/ "android/java/src/org/chromium/chrome/browser/hub/ApplyButtonData.java", "android/java/src/org/chromium/chrome/browser/hub/FadeHubLayoutAnimationFactory.java", "android/java/src/org/chromium/chrome/browser/hub/FadeHubLayoutAnimationFactoryImpl.java", -@@ -68,6 +69,10 @@ android_library("java") { - "//third_party/androidx:androidx_interpolator_interpolator_java", +@@ -74,6 +75,10 @@ android_library("java") { "//ui/android:ui_no_recycler_view_java", + "//url:url_java", ] + deps += [ + "//base:base_cached_flags_java", @@ -1983,7 +1983,7 @@ diff --git a/chrome/browser/hub/internal/BUILD.gn b/chrome/browser/hub/internal/ diff --git a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubCoordinator.java b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubCoordinator.java --- a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubCoordinator.java +++ b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubCoordinator.java -@@ -9,6 +9,7 @@ import android.view.LayoutInflater; +@@ -10,6 +10,7 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; @@ -1991,7 +1991,7 @@ diff --git a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/br import androidx.annotation.NonNull; import androidx.annotation.Nullable; -@@ -19,6 +20,7 @@ import org.chromium.base.supplier.ObservableSupplierImpl; +@@ -20,6 +21,7 @@ import org.chromium.base.supplier.ObservableSupplierImpl; import org.chromium.base.supplier.OneshotSupplier; import org.chromium.base.supplier.TransitiveObservableSupplier; import org.chromium.chrome.browser.feature_engagement.TrackerFactory; @@ -1999,10 +1999,10 @@ diff --git a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/br import org.chromium.chrome.browser.profiles.ProfileProvider; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.toolbar.menu_button.MenuButtonCoordinator; -@@ -94,6 +96,12 @@ public class HubCoordinator implements PaneHubController, BackPressHandler { - HubPaneHostView hubPaneHostView = mContainerView.findViewById(R.id.hub_pane_host); +@@ -108,6 +110,12 @@ public class HubCoordinator implements PaneHubController, BackPressHandler { mHubPaneHostCoordinator = - new HubPaneHostCoordinator(hubPaneHostView, paneManager.getFocusedPaneSupplier()); + new HubPaneHostCoordinator( + hubPaneHostView, paneManager.getFocusedPaneSupplier(), edgeToEdgeSupplier); + if (ChromeFeatureList.sMoveTopToolbarToBottom.isEnabled()) { + LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) + hubPaneHostView.getLayoutParams(); @@ -2017,7 +2017,7 @@ diff --git a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/br +++ b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubManagerImpl.java @@ -6,6 +6,7 @@ package org.chromium.chrome.browser.hub; - import android.content.Context; + import android.app.Activity; import android.view.View; +import android.view.ViewGroup; import android.widget.FrameLayout.LayoutParams; @@ -2031,7 +2031,7 @@ diff --git a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/br import org.chromium.chrome.browser.back_press.BackPressManager; import org.chromium.chrome.browser.profiles.ProfileProvider; import org.chromium.chrome.browser.tab.Tab; -@@ -120,7 +122,10 @@ public class HubManagerImpl implements HubManager, HubController { +@@ -128,7 +130,10 @@ public class HubManagerImpl implements HubManager, HubController { LayoutParams params = (LayoutParams) mHubContainerView.getLayoutParams(); assert params != null : "HubContainerView should always have layout params."; mStatusIndicatorHeight = height; @@ -2043,7 +2043,7 @@ diff --git a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/br mHubContainerView.setLayoutParams(params); } -@@ -130,7 +135,10 @@ public class HubManagerImpl implements HubManager, HubController { +@@ -138,7 +143,10 @@ public class HubManagerImpl implements HubManager, HubController { LayoutParams params = (LayoutParams) mHubContainerView.getLayoutParams(); assert params != null : "HubContainerView should always have layout params."; mAppHeaderHeight = height; @@ -2055,7 +2055,7 @@ diff --git a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/br mHubContainerView.setLayoutParams(params); } -@@ -256,6 +264,8 @@ public class HubManagerImpl implements HubManager, HubController { +@@ -267,6 +275,8 @@ public class HubManagerImpl implements HubManager, HubController { } mSnackbarOverrideToken = mSnackbarManager.pushParentViewToOverrideStack( @@ -2134,19 +2134,19 @@ diff --git a/chrome/browser/hub/internal/android/res/layout/hub_layout.xml b/chr diff --git a/chrome/browser/hub/internal/android/res/layout/hub_toolbar_layout.xml b/chrome/browser/hub/internal/android/res/layout/hub_toolbar_layout.xml --- a/chrome/browser/hub/internal/android/res/layout/hub_toolbar_layout.xml +++ b/chrome/browser/hub/internal/android/res/layout/hub_toolbar_layout.xml -@@ -9,7 +9,7 @@ found in the LICENSE file. - xmlns:app="http://schemas.android.com/apk/res-auto" +@@ -10,7 +10,7 @@ found in the LICENSE file. + xmlns:tools="http://schemas.android.com/tools" android:id="@+id/hub_toolbar" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="@dimen/toolbar_height_no_shadow" android:orientation="vertical"> -