diff --git a/Dockerfile b/Dockerfile index 615dedbec98e10e72262a855c760aee7cef84769..7a43e0a516ad6cac6cbb8a8d952671da645c2645 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:20.04 ENV CHROMIUM_DIR "/srv/chromium" -ENV CHROMIUM_VER "130.0.6723.67" +ENV CHROMIUM_VER "131.0.6778.140" RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive \ diff --git a/build/cromite_patches/AImageReader-CFI-crash-mitigations.patch b/build/cromite_patches/AImageReader-CFI-crash-mitigations.patch index 33f76f526068b452fc765ad002721c7ac650c157..40a0ef0a9fc038cb41d39827f566e06b5e592798 100644 --- a/build/cromite_patches/AImageReader-CFI-crash-mitigations.patch +++ b/build/cromite_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/cromite_patches/Add-AllowUserCertificates-flag.patch b/build/cromite_patches/Add-AllowUserCertificates-flag.patch index 758c398d87b99cf820ce9ac1b98b8b260145a3be..79834013eedd89244b814c749a321a414814af28 100644 --- a/build/cromite_patches/Add-AllowUserCertificates-flag.patch +++ b/build/cromite_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[] = { +@@ -161,6 +161,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 { +@@ -609,6 +610,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 { +@@ -780,6 +783,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/cromite_patches/Add-IsCleartextPermitted-flag.patch b/build/cromite_patches/Add-IsCleartextPermitted-flag.patch index 7f8c467b3f5aaa24d0ac1eef2cd9f80ae54f20a0..f93fcb5dae086e6f43ba256edff77eaba4bc163b 100644 --- a/build/cromite_patches/Add-IsCleartextPermitted-flag.patch +++ b/build/cromite_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/cromite_patches/Add-a-proxy-configuration-page.patch b/build/cromite_patches/Add-a-proxy-configuration-page.patch index 207369edeff2b76f809954a65e3f7cedebd30e55..0675e3bc4647a54c9a67708e265120777409a2a9 100644 --- a/build/cromite_patches/Add-a-proxy-configuration-page.patch +++ b/build/cromite_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/cromite_patches/Add-an-always-incognito-mode.patch b/build/cromite_patches/Add-an-always-incognito-mode.patch index c0de729c76457051592773ce4e8e89e14f06e694..0c82dcfdbe92a84c9b63195aa58fe0e63e871766 100644 --- a/build/cromite_patches/Add-an-always-incognito-mode.patch +++ b/build/cromite_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 +@@ -213,6 +214,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/cromite_patches/Add-bookmark-import-export-actions.patch b/build/cromite_patches/Add-bookmark-import-export-actions.patch index d38477cf81da94c4c87de2476d05042cb60e8c79..a2d4df33e892d9805dd3371f2bbc179d5582b07b 100644 --- a/build/cromite_patches/Add-bookmark-import-export-actions.patch +++ b/build/cromite_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, +@@ -206,6 +206,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"; +@@ -560,6 +560,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/cromite_patches/Add-cromite-flags-support.patch b/build/cromite_patches/Add-cromite-flags-support.patch index 4d007ab5eaf06417e31eda0d9030128cb70aec34..231e8191f2887f6079ac39bf6f48382da63d0561 100644 --- a/build/cromite_patches/Add-cromite-flags-support.patch +++ b/build/cromite_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, +@@ -1096,5 +1096,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 { +@@ -766,7 +770,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, +@@ -867,6 +871,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 -@@ -479,4 +479,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/cromite_patches/Add-custom-tab-intents-privacy-option.patch b/build/cromite_patches/Add-custom-tab-intents-privacy-option.patch index 363cd8e17828b6f219da4c431098d7d6bac04aef..1d31cbfa3f3a5d1f9054b22c7cef878a912d0f09 100644 --- a/build/cromite_patches/Add-custom-tab-intents-privacy-option.patch +++ b/build/cromite_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 { +@@ -692,6 +692,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, +@@ -833,6 +834,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/cromite_patches/Add-exit-menu-item.patch b/build/cromite_patches/Add-exit-menu-item.patch index 5ea8e34ba870d02c745511e0c67ef7687184ccbc..6fb3a743f3e08b9a01f52815e5f71938690333d1 100644 --- a/build/cromite_patches/Add-exit-menu-item.patch +++ b/build/cromite_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/cromite_patches/Add-flag-to-disable-IPv6-probes.patch b/build/cromite_patches/Add-flag-to-disable-IPv6-probes.patch index 4dd58944ba4fe39ce0a86ce9ed02906b95f39f33..6ea30ba6097e78652724160972dff121021e902d 100644 --- a/build/cromite_patches/Add-flag-to-disable-IPv6-probes.patch +++ b/build/cromite_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/cromite_patches/Add-flag-to-disable-external-intent-requests.patch b/build/cromite_patches/Add-flag-to-disable-external-intent-requests.patch index 9fda0a81c8a95f83f53acf7a295eb491b2794a75..defd6307ede501566e246ed32622fde188504504 100644 --- a/build/cromite_patches/Add-flag-to-disable-external-intent-requests.patch +++ b/build/cromite_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/cromite_patches/Add-flag-to-disable-vibration.patch b/build/cromite_patches/Add-flag-to-disable-vibration.patch index 2815f1cdb44bd8f97607c015525d7a61ebf9601e..ed36bcd34bedf22e8c3965d1838bfc5f7f7887b0 100644 --- a/build/cromite_patches/Add-flag-to-disable-vibration.patch +++ b/build/cromite_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/cromite_patches/Add-lifetime-options-for-permissions.patch b/build/cromite_patches/Add-lifetime-options-for-permissions.patch index b3f4df8acd3332415e6972966a6f0cbf2ac12da9..6dd29f9f015b6b52d1cc8dd1dda51a27aaf05362 100644 --- a/build/cromite_patches/Add-lifetime-options-for-permissions.patch +++ b/build/cromite_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/cromite_patches/Add-menu-item-to-bookmark-all-tabs.patch b/build/cromite_patches/Add-menu-item-to-bookmark-all-tabs.patch index abff9f3fb0068da3c521f7683edfe52663242a14..427ab057040fb5cf5d96f085c429a97ac5eca52a 100644 --- a/build/cromite_patches/Add-menu-item-to-bookmark-all-tabs.patch +++ b/build/cromite_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/cromite_patches/Add-menu-item-to-view-source.patch b/build/cromite_patches/Add-menu-item-to-view-source.patch index b5a9ed589bce92f87f3e75c7bb5364368e6197ed..22fb94e5e34b399ab0aa1a02cebd7e2b2b6b7636 100644 --- a/build/cromite_patches/Add-menu-item-to-view-source.patch +++ b/build/cromite_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 +@@ -293,6 +293,7 @@ public class CustomTabAppMenuPropertiesDelegate extends AppMenuPropertiesDelegat updateRequestDesktopSiteMenuItem( menu, currentTab, requestDesktopSiteVisible, isNativePage); diff --git a/build/cromite_patches/Add-option-to-force-tablet-UI.patch b/build/cromite_patches/Add-option-to-force-tablet-UI.patch index ba9601715b1d5ff6936cc9990e4756e5685b9779..c15844f2597da06af2ee68a5a04b15bc74664183 100644 --- a/build/cromite_patches/Add-option-to-force-tablet-UI.patch +++ b/build/cromite_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/cromite_patches/Add-option-to-not-persist-tabs-across-sessions.patch b/build/cromite_patches/Add-option-to-not-persist-tabs-across-sessions.patch index 41571325f163513a532eb3bc8ea6f1c52de9a735..9b20dedfc048af4eea7033c384ee9c6f64647b9a 100644 --- a/build/cromite_patches/Add-option-to-not-persist-tabs-across-sessions.patch +++ b/build/cromite_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/cromite_patches/Add-option-to-use-home-page-as-NTP.patch b/build/cromite_patches/Add-option-to-use-home-page-as-NTP.patch index 30bf001f06d1da31e615d106dcb4016d49a17388..3b90362663e190d6ac2b295b474b0c5d8fd95552 100644 --- a/build/cromite_patches/Add-option-to-use-home-page-as-NTP.patch +++ b/build/cromite_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/cromite_patches/Add-search-engine.patch b/build/cromite_patches/Add-search-engine.patch index 08b52dfe16bbcd42e8728c09af3255018ddb30f5..c06d56cd7d88cbdbce49769b85a806a2946ba775 100644 --- a/build/cromite_patches/Add-search-engine.patch +++ b/build/cromite_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/cromite_patches/Add-site-engagement-flag.patch b/build/cromite_patches/Add-site-engagement-flag.patch index 2a00fae854bc5b8ceda5faa3f8ea1627eaa9759d..3f9d94113b886706623b108e65cfecd20c3c61fd 100644 --- a/build/cromite_patches/Add-site-engagement-flag.patch +++ b/build/cromite_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/cromite_patches/Add-support-for-ISupportHelpAndFeedback.patch b/build/cromite_patches/Add-support-for-ISupportHelpAndFeedback.patch index 9d4f1b72d484cda0361b8f9c6433d4278247f286..f9085359aae40364c62b43359a07400844effe57 100644 --- a/build/cromite_patches/Add-support-for-ISupportHelpAndFeedback.patch +++ b/build/cromite_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/cromite_patches/Add-support-for-writing-URIs.patch b/build/cromite_patches/Add-support-for-writing-URIs.patch index c4a1b8a098585b56be59f8f5f5aee77428268320..ce39006af3837c6c8ee6892d7b76f6fac9ecc287 100644 --- a/build/cromite_patches/Add-support-for-writing-URIs.patch +++ b/build/cromite_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/cromite_patches/Add-webGL-site-setting.patch b/build/cromite_patches/Add-webGL-site-setting.patch index eecbd496735a63ac8178919111b4f0918c263a38..e16eca76263df6a1484ab967e4e0d297ea1abdce 100644 --- a/build/cromite_patches/Add-webGL-site-setting.patch +++ b/build/cromite_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/cromite_patches/Add-webRTC-site-settings.patch b/build/cromite_patches/Add-webRTC-site-settings.patch index 8d26c555be35e410a8e8099262dad53029d64e9b..977e1c2e2fbaa3d4f3854c5e77ced9efbc253ad0 100644 --- a/build/cromite_patches/Add-webRTC-site-settings.patch +++ b/build/cromite_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/cromite_patches/Allow-building-without-enable_reporting.patch b/build/cromite_patches/Allow-building-without-enable_reporting.patch index 99dd74252acfd693e36d0a13e4474369a26565c2..02ae6598102b806ee01e96ec9449f070d1708058 100644 --- a/build/cromite_patches/Allow-building-without-enable_reporting.patch +++ b/build/cromite_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( +@@ -15114,12 +15114,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/cromite_patches/Allow-building-without-supervised-users.patch b/build/cromite_patches/Allow-building-without-supervised-users.patch index 776b4d3d8f602122a333ef95ad0a30fac0076a06..0cb2b7b4b01d91426b1ff4cc02f47053765b11d6 100644 --- a/build/cromite_patches/Allow-building-without-supervised-users.patch +++ b/build/cromite_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/cromite_patches/Allow-playing-audio-in-background.patch b/build/cromite_patches/Allow-playing-audio-in-background.patch index 7f42ed9f589df52ff1596f6ba80ca2884a0e9502..3c1393c8fdaba2eb1e5100ef133416b17544ae9d 100644 --- a/build/cromite_patches/Allow-playing-audio-in-background.patch +++ b/build/cromite_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/cromite_patches/Always-use-new-tab-page-for-default-home-page.patch b/build/cromite_patches/Always-use-new-tab-page-for-default-home-page.patch index 0d1c9dfc962be0d8949ce3162e71de996ce0c951..079b9c22d4ed2bc138efa2dca396eacd6ed16cd4 100644 --- a/build/cromite_patches/Always-use-new-tab-page-for-default-home-page.patch +++ b/build/cromite_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/cromite_patches/AudioBuffer-AnalyserNode-fp-mitigations.patch b/build/cromite_patches/AudioBuffer-AnalyserNode-fp-mitigations.patch index 16ce866f49ee1dc2f9f718725aa098ab584c6a15..37edd8ebd384d09c627cec9ed7af27987a2cbd1f 100644 --- a/build/cromite_patches/AudioBuffer-AnalyserNode-fp-mitigations.patch +++ b/build/cromite_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/cromite_patches/Block-qjz9zk-or-trk-requests.patch b/build/cromite_patches/Block-qjz9zk-or-trk-requests.patch index 033468ea19e58c604b865717ac8ce03657b4e6c8..a0f84289000ed631d44534e6cd2028d4fe9e54cb 100644 --- a/build/cromite_patches/Block-qjz9zk-or-trk-requests.patch +++ b/build/cromite_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/cromite_patches/Bookmarks-select-all-menu-entry.patch b/build/cromite_patches/Bookmarks-select-all-menu-entry.patch index 40fc05d67113a83fea553d2eaadf1dc4bdfcc965..71eb9e18b85b29ada853ce87db98738503be4d25 100644 --- a/build/cromite_patches/Bookmarks-select-all-menu-entry.patch +++ b/build/cromite_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/cromite_patches/Bromite-subresource-adblocker.patch b/build/cromite_patches/Bromite-subresource-adblocker.patch index afaf722a278e19e9520ebbbaf7b184e089aa3c93..67dfc4ba9922a46529429dfd9d275354f08acecb 100644 --- a/build/cromite_patches/Bromite-subresource-adblocker.patch +++ b/build/cromite_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/cromite_patches/Client-hints-overrides.patch b/build/cromite_patches/Client-hints-overrides.patch index bf0b28a17c68e19d5e4c4ef9f030f587cc761716..8f4c5b433cf4f31eeae53da8085b781abf2c2267 100644 --- a/build/cromite_patches/Client-hints-overrides.patch +++ b/build/cromite_patches/Client-hints-overrides.patch @@ -90,7 +90,7 @@ diff --git a/content/browser/client_hints/client_hints.cc b/content/browser/clie diff --git a/content/browser/loader/navigation_url_loader_impl.cc b/content/browser/loader/navigation_url_loader_impl.cc --- a/content/browser/loader/navigation_url_loader_impl.cc +++ b/content/browser/loader/navigation_url_loader_impl.cc -@@ -1216,6 +1216,11 @@ void NavigationURLLoaderImpl::OnAcceptCHFrameReceived( +@@ -1225,6 +1225,11 @@ void NavigationURLLoaderImpl::OnAcceptCHFrameReceived( return; } @@ -255,7 +255,7 @@ diff --git a/third_party/blink/renderer/core/loader/frame_fetch_context.cc b/thi 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 -@@ -391,6 +391,11 @@ +@@ -395,6 +395,11 @@ name: "AriaNotify", status: "test", }, diff --git a/build/cromite_patches/Content-settings-infrastructure.patch b/build/cromite_patches/Content-settings-infrastructure.patch index cc8168775dd2a0f9813f95aef82091132aacc9f6..807f3f6e429ed583eccf74e4f593337315cdd0b6 100644 --- a/build/cromite_patches/Content-settings-infrastructure.patch +++ b/build/cromite_patches/Content-settings-infrastructure.patch @@ -25,7 +25,7 @@ Require: bromite-build-utils.patch .../site_settings/site_settings_mixin.ts | 18 + .../site_settings_page/site_settings_page.ts | 30 +- .../site_settings_page_util.ts | 55 +++ - chrome/browser/ui/BUILD.gn | 1 + + chrome/browser/ui/BUILD.gn | 2 + .../controls/rich_controls_container_view.h | 7 + .../ui/views/page_info/page_info_main_view.cc | 28 +- .../views/page_info/page_info_view_factory.cc | 20 + @@ -71,8 +71,8 @@ Require: bromite-build-utils.patch .../core/common/content_settings.mojom | 6 + .../common/content_settings_mojom_traits.cc | 12 +- .../common/content_settings_mojom_traits.h | 24 + - .../core/common/content_settings_types.mojom | 1 + - .../renderer/content_settings_agent_impl.cc | 68 +++ + .../core/common/content_settings_types.mojom | 2 + + .../renderer/content_settings_agent_impl.cc | 71 +++ .../renderer/content_settings_agent_impl.h | 9 + .../PageInfoPermissionsController.java | 9 + .../PermissionParamsListBuilder.java | 1 + @@ -80,10 +80,10 @@ Require: bromite-build-utils.patch components/page_info/page_info.cc | 23 +- components/page_info/page_info_ui.cc | 25 ++ components/site_settings_strings.grdp | 1 + - .../platform/web_content_settings_client.h | 9 + + .../platform/web_content_settings_client.h | 13 + .../execution_context/execution_context.cc | 16 + .../execution_context/execution_context.h | 5 + - 72 files changed, 1910 insertions(+), 93 deletions(-) + 72 files changed, 1919 insertions(+), 93 deletions(-) create mode 100644 components/browser_ui/settings/android/java/res/layout/preference_spinner_single_widget.xml create mode 100644 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSetting.java create mode 100644 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSettingImpl.java @@ -97,7 +97,7 @@ Require: bromite-build-utils.patch diff --git a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java --- a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java -@@ -62,6 +62,10 @@ import org.chromium.url.GURL; +@@ -64,6 +64,10 @@ import org.chromium.url.GURL; import java.util.Set; @@ -108,7 +108,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/C /** A SiteSettingsDelegate instance that contains Chrome-specific Site Settings logic. */ public class ChromeSiteSettingsDelegate implements SiteSettingsDelegate { public static final String EMBEDDED_CONTENT_HELP_CENTER_URL = -@@ -227,7 +231,7 @@ public class ChromeSiteSettingsDelegate implements SiteSettingsDelegate { +@@ -229,7 +233,7 @@ public class ChromeSiteSettingsDelegate implements SiteSettingsDelegate { @Override public boolean isHelpAndFeedbackEnabled() { @@ -117,7 +117,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/C } @Override -@@ -359,6 +363,17 @@ public class ChromeSiteSettingsDelegate implements SiteSettingsDelegate { +@@ -366,6 +370,17 @@ public class ChromeSiteSettingsDelegate implements SiteSettingsDelegate { return mPrivacySandboxBridge.getFirstPartySetOwner(memberOrigin); } @@ -150,7 +150,7 @@ diff --git a/chrome/browser/content_settings/page_specific_content_settings_dele 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 -@@ -1534,4 +1534,5 @@ +@@ -1491,4 +1491,5 @@ @@ -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,6 +717,14 @@ 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", +@@ -5047,6 +5048,7 @@ static_library("ui") { + "//components/power_bookmarks/storage", + "//components/reading_list/features:flags", + "//components/segmentation_platform/embedder/default_model:default_model", ++ "//components/strings:components_strings_grit", + "//components/services/app_service", + "//components/soda", + "//components/soda:constants", diff --git a/chrome/browser/ui/views/controls/rich_controls_container_view.h b/chrome/browser/ui/views/controls/rich_controls_container_view.h --- a/chrome/browser/ui/views/controls/rich_controls_container_view.h +++ b/chrome/browser/ui/views/controls/rich_controls_container_view.h @@ -737,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" @@ -745,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()); @@ -768,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( } } @@ -785,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) { @@ -794,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))); } @@ -808,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; @@ -832,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; @@ -917,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(); } @@ -1008,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) { @@ -1040,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)); @@ -1050,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() { @@ -1063,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() { } } } @@ -1161,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" @@ -1171,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, +@@ -3809,6 +3813,56 @@ void AddLocalizedStrings(content::WebUIDataSource* html_source, policy_indicator::AddLocalizedStrings(html_source); AddSecurityKeysStrings(html_source); @@ -1240,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( @@ -1261,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; } } @@ -1275,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; } } @@ -1301,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(); } } @@ -1309,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); } @@ -1489,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", ] @@ -1513,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") { @@ -1524,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(); }); @@ -1534,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())); @@ -2206,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()); @@ -2217,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; @@ -2225,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(); }); @@ -2235,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())); @@ -2256,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); @@ -2268,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; } @@ -2277,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; } @@ -2286,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: @@ -2303,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 { @@ -2316,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); } @@ -2324,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); @@ -2333,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); @@ -2368,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(); @@ -2392,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) { @@ -2431,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 { @@ -2457,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)); @@ -2465,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; @@ -2474,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); @@ -2483,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. @@ -2592,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); @@ -2803,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" } @@ -2814,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) { @@ -2859,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_; } @@ -2892,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_; @@ -3146,17 +3154,18 @@ 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) diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc b/components/content_settings/renderer/content_settings_agent_impl.cc --- a/components/content_settings/renderer/content_settings_agent_impl.cc +++ b/components/content_settings/renderer/content_settings_agent_impl.cc -@@ -200,6 +200,74 @@ void ContentSettingsAgentImpl::SendRendererContentSettingRules( +@@ -200,6 +200,77 @@ void ContentSettingsAgentImpl::SendRendererContentSettingRules( std::move(renderer_settings)); } @@ -3219,6 +3228,9 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc + if (protocol == content::kChromeDevToolsScheme) + return true; // DevTools UI elements should still work. + ++ if (document_url.ProtocolIs("chrome-extension")) ++ return true; // Extension pages should still work. ++ + // If the scheme is file:, an empty file name indicates a directory listing, + // which requires JavaScript to function properly. + if (protocol == url::kFileScheme && @@ -3340,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 { @@ -3355,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_); @@ -3401,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) { @@ -3414,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) { @@ -3427,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; } @@ -3452,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/cromite_patches/Dictionary-suggestions-for-the-Omnibox.patch b/build/cromite_patches/Dictionary-suggestions-for-the-Omnibox.patch index 6a72e8cba0f7c330929f00522dd93edc47cc71a5..9c93eea9b935ae226e3d36a2bd9141f1f359ad21 100644 --- a/build/cromite_patches/Dictionary-suggestions-for-the-Omnibox.patch +++ b/build/cromite_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/cromite_patches/Disable-Accessibility-service-by-default.patch b/build/cromite_patches/Disable-Accessibility-service-by-default.patch index 85c4c6017f9701cebcadc2351d53b509d6d0aa60..0be6dca077656290869efff935cf249e94a3d759 100644 --- a/build/cromite_patches/Disable-Accessibility-service-by-default.patch +++ b/build/cromite_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/cromite_patches/Disable-PrivacyGuide.patch b/build/cromite_patches/Disable-PrivacyGuide.patch index 80f7747f2d118c93857b1bcdbfd97b6f65d7e23e..1f50879d345c00df29130171533251b35d4556fe 100644 --- a/build/cromite_patches/Disable-PrivacyGuide.patch +++ b/build/cromite_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/cromite_patches/Disable-TLS-resumption.patch b/build/cromite_patches/Disable-TLS-resumption.patch index 1ab46b23ec437ac7dbc0cec54b0fdffb8b8a5462..40fc24e39e581072edbd79d6454d0a3d9df4ff9b 100644 --- a/build/cromite_patches/Disable-TLS-resumption.patch +++ b/build/cromite_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/cromite_patches/Disable-all-predictors-code.patch b/build/cromite_patches/Disable-all-predictors-code.patch index b29cbac20aba9ddddbd3b500932ac33448c6f3a6..2dac667ca659be6d51063d583f527967ba15e058 100644 --- a/build/cromite_patches/Disable-all-predictors-code.patch +++ b/build/cromite_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/cromite_patches/Disable-all-promo-dialogs.patch b/build/cromite_patches/Disable-all-promo-dialogs.patch index 7c3ac2d945e8dc0c904eb5b6c2f0cb079e87327b..80e1e5d6358da24502031b877cc570733c94915f 100644 --- a/build/cromite_patches/Disable-all-promo-dialogs.patch +++ b/build/cromite_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/cromite_patches/Disable-conversion-measurement-api.patch b/build/cromite_patches/Disable-conversion-measurement-api.patch index d16b28eeb67f5643a4486be6570698b1da5e7586..33a5093dfefa50152008a54d9b1d24f99e7a8c99 100644 --- a/build/cromite_patches/Disable-conversion-measurement-api.patch +++ b/build/cromite_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/cromite_patches/Disable-smart-selection-by-default.patch b/build/cromite_patches/Disable-smart-selection-by-default.patch index a45d105e58e54acca9372ce4adfcdb85a9288488..b634ff3c12dae820b679da502ae38cc27456af11 100644 --- a/build/cromite_patches/Disable-smart-selection-by-default.patch +++ b/build/cromite_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[] = { +@@ -212,6 +212,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 { +@@ -489,6 +489,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/cromite_patches/Disable-some-signed-exchange-features.patch b/build/cromite_patches/Disable-some-signed-exchange-features.patch index 86058a65e9855a38f4baab79c2095af5c13c9511..c1143f5143afd54ad6b509cc8cdda3ef2a0f5ebd 100644 --- a/build/cromite_patches/Disable-some-signed-exchange-features.patch +++ b/build/cromite_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/cromite_patches/Disable-text-fragments-by-default.patch b/build/cromite_patches/Disable-text-fragments-by-default.patch index d3bc7d71a9933462abe12e3fc6086be9d61dee3a..bb8706599a83c380c198365f58869e9ae5e84a4b 100644 --- a/build/cromite_patches/Disable-text-fragments-by-default.patch +++ b/build/cromite_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/cromite_patches/Disable-third-party-origin-trials.patch b/build/cromite_patches/Disable-third-party-origin-trials.patch index d84685550ae4ca12f0c6d2e5ea8d89367374ad2e..1b06df3e3ac242d4751255344f5ecb4842767c0b 100644 --- a/build/cromite_patches/Disable-third-party-origin-trials.patch +++ b/build/cromite_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/cromite_patches/Disable-various-metrics.patch b/build/cromite_patches/Disable-various-metrics.patch index bec7a747e797033d13319b651fa3612a0d817126..a431e079141cd879672dcd9414f754041f32710c 100644 --- a/build/cromite_patches/Disable-various-metrics.patch +++ b/build/cromite_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/cromite_patches/Do-not-build-API-keys-infobar.patch b/build/cromite_patches/Do-not-build-API-keys-infobar.patch index 59bdc679e2939d1f674c9d10e74f5e535ff79f58..c3e4b8970a4709ed322c7f3d170639bb4cbb8cb4 100644 --- a/build/cromite_patches/Do-not-build-API-keys-infobar.patch +++ b/build/cromite_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/cromite_patches/Do-not-compile-QR-code-sharing.patch b/build/cromite_patches/Do-not-compile-QR-code-sharing.patch index f5f9fc985e7501b07ca737510114c2b094baf3be..ad3b0663f708f3dfffc46ea6f3bc3b7cec389338 100644 --- a/build/cromite_patches/Do-not-compile-QR-code-sharing.patch +++ b/build/cromite_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/cromite_patches/Do-not-ignore-download-location-prompt-setting.patch b/build/cromite_patches/Do-not-ignore-download-location-prompt-setting.patch index e3fae0ed58bf00e9149f20db6d8cfb4916f6a3ce..f709774260b151ca87b468323138d438d77b960f 100644 --- a/build/cromite_patches/Do-not-ignore-download-location-prompt-setting.patch +++ b/build/cromite_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/cromite_patches/Do-not-link-with-libatomic.patch b/build/cromite_patches/Do-not-link-with-libatomic.patch index 6a2a77f47be93ddcd9efca6d699df53dfa4420cd..ada9c41840fc3c459e3c91d8a3c4645c2d89aa81 100644 --- a/build/cromite_patches/Do-not-link-with-libatomic.patch +++ b/build/cromite_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/cromite_patches/Do-not-store-passwords-by-default.patch b/build/cromite_patches/Do-not-store-passwords-by-default.patch index 23b2e2a8ba3a2fac402306f2482166eb2df9ca5d..fb198b533defcc0ce2f61ab3a1c7291f171a0fec 100644 --- a/build/cromite_patches/Do-not-store-passwords-by-default.patch +++ b/build/cromite_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/cromite_patches/DoH-improvements.patch b/build/cromite_patches/DoH-improvements.patch index ae1e6dfac735bcee3323c50fcfb56036af405980..b70b8ff5cc02c476c05db4c1d24a140459d637c7 100644 --- a/build/cromite_patches/DoH-improvements.patch +++ b/build/cromite_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/cromite_patches/Enable-Certificate-Transparency.patch b/build/cromite_patches/Enable-Certificate-Transparency.patch index 3cfb20af4593c626087312a6e2e4848fa2e3bc08..3a83341ca1f191edda3f55731ef640aa7d5c7194 100644 --- a/build/cromite_patches/Enable-Certificate-Transparency.patch +++ b/build/cromite_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/cromite_patches/Enable-ImprovedBookmarks-by-default.patch b/build/cromite_patches/Enable-ImprovedBookmarks-by-default.patch index 2a521cb078634acf265487b8c7591ac102c0fe2c..b67ce08af4f26b1451639da3a6daaadb31248c93 100644 --- a/build/cromite_patches/Enable-ImprovedBookmarks-by-default.patch +++ b/build/cromite_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/cromite_patches/Enable-StrictOriginIsolation-and-SitePerProcess.patch b/build/cromite_patches/Enable-StrictOriginIsolation-and-SitePerProcess.patch index f00aef851ac7d42880e371fc500cccc358681314..4ba8a21053ee54b9de73daaa6df224a0db2c8f7a 100644 --- a/build/cromite_patches/Enable-StrictOriginIsolation-and-SitePerProcess.patch +++ b/build/cromite_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/cromite_patches/Enable-darken-websites-checkbox-in-themes.patch b/build/cromite_patches/Enable-darken-websites-checkbox-in-themes.patch index edf934740247df10599bf7c1271f8b0643a99b65..a5fb87f6557621f542ea0e8aa71f2bff30686015 100644 --- a/build/cromite_patches/Enable-darken-websites-checkbox-in-themes.patch +++ b/build/cromite_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/cromite_patches/Enable-native-Android-autofill.patch b/build/cromite_patches/Enable-native-Android-autofill.patch index a85731f4a1ad3ea3ea1bffe770a503033f45222f..fb8de427d067a87f168b6a18a8b96fa4fa66cdb3 100644 --- a/build/cromite_patches/Enable-native-Android-autofill.patch +++ b/build/cromite_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/cromite_patches/Enable-network-isolation-features.patch b/build/cromite_patches/Enable-network-isolation-features.patch index b68ecdbb67038e907288551e9b08bb7536b4c97a..1f36c1a88611bef29d4717daf6a74ea7055b37b4 100644 --- a/build/cromite_patches/Enable-network-isolation-features.patch +++ b/build/cromite_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/cromite_patches/Enable-share-intent.patch b/build/cromite_patches/Enable-share-intent.patch index 8777f720b8c678f3edc7f26b7d763d5570cda768..8263542fba9fec564a0fa81f38d2e6693e3b2e46 100644 --- a/build/cromite_patches/Enable-share-intent.patch +++ b/build/cromite_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[] = { +@@ -307,6 +307,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 { +@@ -469,6 +469,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/cromite_patches/Experimental-user-scripts-support.patch b/build/cromite_patches/Experimental-user-scripts-support.patch index 963efb9eb1cbcb873de88648e2480f267c6a7890..cea47d07e904b0ca4a3ac877fdc470097b725ac5 100644 --- a/build/cromite_patches/Experimental-user-scripts-support.patch +++ b/build/cromite_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/cromite_patches/Eyeo-Adblock-for-Cromite.patch b/build/cromite_patches/Eyeo-Adblock-for-Cromite.patch index 56d2225acb069abaf15d47dfab8fd69b490a95a0..bf0371685b828a9bf0b01cb751d6dc1802084a63 100644 --- a/build/cromite_patches/Eyeo-Adblock-for-Cromite.patch +++ b/build/cromite_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/cromite_patches/Fix-chromium-build-bugs.patch b/build/cromite_patches/Fix-chromium-build-bugs.patch index c53d8ceaa4a016c8b01e71bf65a86b8420ea0c69..7c11cea0b4c9293d534542ec7dc67eb2711aaa71 100644 --- a/build/cromite_patches/Fix-chromium-build-bugs.patch +++ b/build/cromite_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/cromite_patches/Follow-only-system-dark-mode.patch b/build/cromite_patches/Follow-only-system-dark-mode.patch index 5d2c266550c8c41f1c483bf5bdd6e2921e751a9d..ce8372a04391c422b711f17fcf5a0876ef251d56 100644 --- a/build/cromite_patches/Follow-only-system-dark-mode.patch +++ b/build/cromite_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/cromite_patches/History-number-of-days-privacy-setting.patch b/build/cromite_patches/History-number-of-days-privacy-setting.patch index 57f699380636676b70deb82ff51f86a7798e3c8a..c52b1861bb3d7eb9c4430301f2eeb315804a702c 100644 --- a/build/cromite_patches/History-number-of-days-privacy-setting.patch +++ b/build/cromite_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, +@@ -1898,6 +1898,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/cromite_patches/Increase-number-of-autocomplete-matches-to-10.patch b/build/cromite_patches/Increase-number-of-autocomplete-matches-to-10.patch index 549686ad2e6721b45dd2a9c2cc74854ed09399d2..1055592e5587795dadd98afecd9f8aa4d9d92c92 100644 --- a/build/cromite_patches/Increase-number-of-autocomplete-matches-to-10.patch +++ b/build/cromite_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 = +@@ -90,10 +90,11 @@ constexpr size_t kMaxPedalMatchIndex = // static size_t AutocompleteResult::GetMaxMatches(bool is_zero_suggest) { diff --git a/build/cromite_patches/Invalidate-components-public-key.patch b/build/cromite_patches/Invalidate-components-public-key.patch index a907cbb4c98b11e7d9e12379e8be0ddf6b75269f..9a24189b275b99a63272db123657b1aa5c13a4c2 100644 --- a/build/cromite_patches/Invalidate-components-public-key.patch +++ b/build/cromite_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/cromite_patches/JIT-site-settings.patch b/build/cromite_patches/JIT-site-settings.patch index 7383ce40b9eb80ba9ab687685232a78317282aee..9df972a57aab49ade00eef8c5b5e677b7538a6a7 100644 --- a/build/cromite_patches/JIT-site-settings.patch +++ b/build/cromite_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/cromite_patches/Keep-empty-tabs-between-sessions.patch b/build/cromite_patches/Keep-empty-tabs-between-sessions.patch index 838b2ca03bfc69eee56255060dff1dde475ddb87..9127e460af163b4f0d98d9f6d8b6367351318a5f 100644 --- a/build/cromite_patches/Keep-empty-tabs-between-sessions.patch +++ b/build/cromite_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/cromite_patches/Keep-flag-to-allow-screenshots-in-Incognito-mode.patch b/build/cromite_patches/Keep-flag-to-allow-screenshots-in-Incognito-mode.patch index cb9dd2f1a8852488a1d5e7eed2d7548e133dedea..4146f7b1773ce35cc27fe1d2ef7169f5a344cf15 100644 --- a/build/cromite_patches/Keep-flag-to-allow-screenshots-in-Incognito-mode.patch +++ b/build/cromite_patches/Keep-flag-to-allow-screenshots-in-Incognito-mode.patch @@ -9,13 +9,26 @@ See also: License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/flag-metadata.json | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + .../browser/incognito/IncognitoSnapshotController.java | 2 +- + chrome/browser/flag-metadata.json | 6 +++--- + 2 files changed, 4 insertions(+), 4 deletions(-) +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/incognito/IncognitoSnapshotController.java b/chrome/android/java/src/org/chromium/chrome/browser/incognito/IncognitoSnapshotController.java +--- a/chrome/android/java/src/org/chromium/chrome/browser/incognito/IncognitoSnapshotController.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/incognito/IncognitoSnapshotController.java +@@ -48,7 +48,7 @@ public abstract class IncognitoSnapshotController { + boolean expectedSecureState = mIsShowingIncognitoSupplier.get(); + if (ChromeFeatureList.sIncognitoScreenshot.isEnabled()) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { +- mActivity.setRecentsScreenshotEnabled(!expectedSecureState); ++ mActivity.setRecentsScreenshotEnabled(true); + } + expectedSecureState = false; + } 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/cromite_patches/Logcat-crash-reports-UI.patch b/build/cromite_patches/Logcat-crash-reports-UI.patch index 8050da5196554ca4724e2d3ec173b7e5b9148bed..3d695afb36c20a7925b15d6bf038c211e66fe6ee 100644 --- a/build/cromite_patches/Logcat-crash-reports-UI.patch +++ b/build/cromite_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/cromite_patches/Modify-default-preferences.patch b/build/cromite_patches/Modify-default-preferences.patch index c3b31c50048aed73c979c2b4016d37353e0ca4bd..b739dcd1dde5a5e2dcaaec535049e1ec978ccc6b 100644 --- a/build/cromite_patches/Modify-default-preferences.patch +++ b/build/cromite_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/cromite_patches/Move-navigation-bar-to-bottom.patch b/build/cromite_patches/Move-navigation-bar-to-bottom.patch index a45dab96e2e34c9146f24dc1774f51d8cca80fd7..bdea25b8ac4926a1f75d97923bba788503b9e1b8 100644 --- a/build/cromite_patches/Move-navigation-bar-to-bottom.patch +++ b/build/cromite_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[] = { +@@ -278,6 +279,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 { +@@ -398,6 +398,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 { +@@ -717,6 +721,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 { +@@ -855,6 +863,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"> -