Loading build/cromite_patches/Add-an-always-incognito-mode.patch +2 −2 Original line number Diff line number Diff line Loading @@ -285,7 +285,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct // Defer creation of this helper so it triggers after TabGroupModelFilter observers. mUndoRefocusHelper = new UndoRefocusHelper( @@ -3152,7 +3161,7 @@ public class ChromeTabbedActivity extends ChromeActivity { @@ -3137,7 +3146,7 @@ public class ChromeTabbedActivity extends ChromeActivity { } // We determine the model as soon as possible so every systems get initialized coherently. Loading Loading @@ -2201,7 +2201,7 @@ diff --git a/components/omnibox/browser/autocomplete_provider_client.h b/compone diff --git a/components/omnibox/browser/base_search_provider.cc b/components/omnibox/browser/base_search_provider.cc --- a/components/omnibox/browser/base_search_provider.cc +++ b/components/omnibox/browser/base_search_provider.cc @@ -431,7 +431,7 @@ bool BaseSearchProvider::CanSendSuggestRequest( @@ -432,7 +432,7 @@ bool BaseSearchProvider::CanSendSuggestRequest( // Don't make a suggest request if in incognito mode; unless for the Lens // searchboxes. Loading build/cromite_patches/Add-cromite-flags-support.patch +15 −7 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html base/android/feature_map.cc | 5 + .../base/cached_flags/ValuesReturned.java | 2 +- base/feature_list.cc | 76 ++++++++ base/feature_list.h | 72 +++++++- base/feature_list.h | 80 +++++++- build/android/gyp/java_cpp_features.py | 17 ++ chrome/android/java/res/values/values.xml | 3 + .../java/res/xml/privacy_preferences.xml | 4 + Loading Loading @@ -107,7 +107,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 + 94 files changed, 826 insertions(+), 31 deletions(-) 94 files changed, 834 insertions(+), 31 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 Loading Loading @@ -327,7 +327,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 @@ -754,4 +764,62 @@ class BASE_EXPORT FeatureList { @@ -754,4 +764,70 @@ class BASE_EXPORT FeatureList { } // namespace base Loading Loading @@ -388,6 +388,14 @@ diff --git a/base/feature_list.h b/base/feature_list.h + g_feature_default_state_overrider_ ##feature {namespace_value::feature, base::FEATURE_DISABLED_BY_DEFAULT}; \ + _Pragma("clang diagnostic pop") \ + static_assert(true, "") /* for a semicolon requirement */ + +#define BASE_FEATURE_DISABLED(feature, name, default_state) \ + BASE_FEATURE(feature, name, default_state); \ + static_assert(default_state == base::FEATURE_DISABLED_BY_DEFAULT, "Check default state") + +#define BASE_FEATURE_ENABLED(feature, name, default_state) \ + BASE_FEATURE(feature, name, default_state); \ + static_assert(default_state == base::FEATURE_ENABLED_BY_DEFAULT, "Check default state") + #endif // BASE_FEATURE_LIST_H_ diff --git a/build/android/gyp/java_cpp_features.py b/build/android/gyp/java_cpp_features.py Loading Loading @@ -634,7 +642,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tracing/setting 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; @@ -381,6 +381,10 @@ using flags_ui::kOsLinux; using flags_ui::kOsMac; using flags_ui::kOsWin; Loading @@ -645,7 +653,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc namespace about_flags { namespace { @@ -4902,6 +4906,10 @@ const FeatureEntry::FeatureVariation @@ -4903,6 +4907,10 @@ const FeatureEntry::FeatureVariation constexpr char kWebiumFlag[] = "webium"; #endif // !BUILDFLAG(IS_ANDROID) Loading @@ -656,7 +664,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. @@ -4928,6 +4936,9 @@ constexpr char kWebiumFlag[] = "webium"; @@ -4929,6 +4937,9 @@ constexpr char kWebiumFlag[] = "webium"; const FeatureEntry kFeatureEntries[] = { // Include generated flags for flag unexpiry; see //docs/flag_expiry.md and // //tools/flags/generate_unexpire_flags.py. Loading Loading @@ -738,7 +746,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 @@ -331,6 +331,7 @@ constexpr base::FeatureParam<bool> kTouchToSearchCalloutSnippetAsSubtitle( @@ -337,6 +337,7 @@ constexpr base::FeatureParam<bool> kTouchToSearchCalloutSnippetAsSubtitle( "snippet_as_subtitle", /*default_value=*/false); Loading build/cromite_patches/Add-exit-menu-item.patch +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,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. @@ -3707,6 +3709,8 @@ public class ChromeTabbedActivity extends ChromeActivity { @@ -3692,6 +3694,8 @@ public class ChromeTabbedActivity extends ChromeActivity { .closeTabs( TabClosureParams.closeTab(currentTab).build(), /* allowDialog= */ true); RecordUserAction.record("MobileTabClosed"); Loading build/cromite_patches/Add-flag-for-omnibox-autocomplete-filtering.patch +1 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/ #include "base/feature_list.h" #include "base/format_macros.h" #include "base/functional/bind.h" @@ -567,6 +568,15 @@ AutocompleteController::AutocompleteController( @@ -569,6 +570,15 @@ AutocompleteController::AutocompleteController( provider_client_->GetOmniboxTriggeredFeatureService()), steady_state_omnibox_position_( metrics::OmniboxEventProto::UNKNOWN_POSITION) { Loading build/cromite_patches/Add-menu-item-to-bookmark-all-tabs.patch +2 −2 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct import org.chromium.components.browser_ui.bottomsheet.BottomSheetController; import org.chromium.components.browser_ui.edge_to_edge.SystemBarColorHelper; import org.chromium.components.browser_ui.edge_to_edge.TabbedSystemBarColorHelper; @@ -3739,6 +3745,8 @@ public class ChromeTabbedActivity extends ChromeActivity { @@ -3724,6 +3730,8 @@ public class ChromeTabbedActivity extends ChromeActivity { getTabModelSelectorSupplier().get(), closeAllTabsRunnable); RecordUserAction.record("MobileMenuCloseAllTabs"); Loading @@ -82,7 +82,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct } else if (id == R.id.close_all_incognito_tabs_menu_id) { boolean allowUndo = TabClosureParamsUtils.shouldAllowUndo(triggeringMotion); @@ -3863,6 +3871,41 @@ public class ChromeTabbedActivity extends ChromeActivity { @@ -3848,6 +3856,41 @@ public class ChromeTabbedActivity extends ChromeActivity { getTabModalLifetimeHandler().onOmniboxFocusChanged(hasFocus); } Loading Loading
build/cromite_patches/Add-an-always-incognito-mode.patch +2 −2 Original line number Diff line number Diff line Loading @@ -285,7 +285,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct // Defer creation of this helper so it triggers after TabGroupModelFilter observers. mUndoRefocusHelper = new UndoRefocusHelper( @@ -3152,7 +3161,7 @@ public class ChromeTabbedActivity extends ChromeActivity { @@ -3137,7 +3146,7 @@ public class ChromeTabbedActivity extends ChromeActivity { } // We determine the model as soon as possible so every systems get initialized coherently. Loading Loading @@ -2201,7 +2201,7 @@ diff --git a/components/omnibox/browser/autocomplete_provider_client.h b/compone diff --git a/components/omnibox/browser/base_search_provider.cc b/components/omnibox/browser/base_search_provider.cc --- a/components/omnibox/browser/base_search_provider.cc +++ b/components/omnibox/browser/base_search_provider.cc @@ -431,7 +431,7 @@ bool BaseSearchProvider::CanSendSuggestRequest( @@ -432,7 +432,7 @@ bool BaseSearchProvider::CanSendSuggestRequest( // Don't make a suggest request if in incognito mode; unless for the Lens // searchboxes. Loading
build/cromite_patches/Add-cromite-flags-support.patch +15 −7 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html base/android/feature_map.cc | 5 + .../base/cached_flags/ValuesReturned.java | 2 +- base/feature_list.cc | 76 ++++++++ base/feature_list.h | 72 +++++++- base/feature_list.h | 80 +++++++- build/android/gyp/java_cpp_features.py | 17 ++ chrome/android/java/res/values/values.xml | 3 + .../java/res/xml/privacy_preferences.xml | 4 + Loading Loading @@ -107,7 +107,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 + 94 files changed, 826 insertions(+), 31 deletions(-) 94 files changed, 834 insertions(+), 31 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 Loading Loading @@ -327,7 +327,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 @@ -754,4 +764,62 @@ class BASE_EXPORT FeatureList { @@ -754,4 +764,70 @@ class BASE_EXPORT FeatureList { } // namespace base Loading Loading @@ -388,6 +388,14 @@ diff --git a/base/feature_list.h b/base/feature_list.h + g_feature_default_state_overrider_ ##feature {namespace_value::feature, base::FEATURE_DISABLED_BY_DEFAULT}; \ + _Pragma("clang diagnostic pop") \ + static_assert(true, "") /* for a semicolon requirement */ + +#define BASE_FEATURE_DISABLED(feature, name, default_state) \ + BASE_FEATURE(feature, name, default_state); \ + static_assert(default_state == base::FEATURE_DISABLED_BY_DEFAULT, "Check default state") + +#define BASE_FEATURE_ENABLED(feature, name, default_state) \ + BASE_FEATURE(feature, name, default_state); \ + static_assert(default_state == base::FEATURE_ENABLED_BY_DEFAULT, "Check default state") + #endif // BASE_FEATURE_LIST_H_ diff --git a/build/android/gyp/java_cpp_features.py b/build/android/gyp/java_cpp_features.py Loading Loading @@ -634,7 +642,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tracing/setting 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; @@ -381,6 +381,10 @@ using flags_ui::kOsLinux; using flags_ui::kOsMac; using flags_ui::kOsWin; Loading @@ -645,7 +653,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc namespace about_flags { namespace { @@ -4902,6 +4906,10 @@ const FeatureEntry::FeatureVariation @@ -4903,6 +4907,10 @@ const FeatureEntry::FeatureVariation constexpr char kWebiumFlag[] = "webium"; #endif // !BUILDFLAG(IS_ANDROID) Loading @@ -656,7 +664,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. @@ -4928,6 +4936,9 @@ constexpr char kWebiumFlag[] = "webium"; @@ -4929,6 +4937,9 @@ constexpr char kWebiumFlag[] = "webium"; const FeatureEntry kFeatureEntries[] = { // Include generated flags for flag unexpiry; see //docs/flag_expiry.md and // //tools/flags/generate_unexpire_flags.py. Loading Loading @@ -738,7 +746,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 @@ -331,6 +331,7 @@ constexpr base::FeatureParam<bool> kTouchToSearchCalloutSnippetAsSubtitle( @@ -337,6 +337,7 @@ constexpr base::FeatureParam<bool> kTouchToSearchCalloutSnippetAsSubtitle( "snippet_as_subtitle", /*default_value=*/false); Loading
build/cromite_patches/Add-exit-menu-item.patch +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,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. @@ -3707,6 +3709,8 @@ public class ChromeTabbedActivity extends ChromeActivity { @@ -3692,6 +3694,8 @@ public class ChromeTabbedActivity extends ChromeActivity { .closeTabs( TabClosureParams.closeTab(currentTab).build(), /* allowDialog= */ true); RecordUserAction.record("MobileTabClosed"); Loading
build/cromite_patches/Add-flag-for-omnibox-autocomplete-filtering.patch +1 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/ #include "base/feature_list.h" #include "base/format_macros.h" #include "base/functional/bind.h" @@ -567,6 +568,15 @@ AutocompleteController::AutocompleteController( @@ -569,6 +570,15 @@ AutocompleteController::AutocompleteController( provider_client_->GetOmniboxTriggeredFeatureService()), steady_state_omnibox_position_( metrics::OmniboxEventProto::UNKNOWN_POSITION) { Loading
build/cromite_patches/Add-menu-item-to-bookmark-all-tabs.patch +2 −2 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct import org.chromium.components.browser_ui.bottomsheet.BottomSheetController; import org.chromium.components.browser_ui.edge_to_edge.SystemBarColorHelper; import org.chromium.components.browser_ui.edge_to_edge.TabbedSystemBarColorHelper; @@ -3739,6 +3745,8 @@ public class ChromeTabbedActivity extends ChromeActivity { @@ -3724,6 +3730,8 @@ public class ChromeTabbedActivity extends ChromeActivity { getTabModelSelectorSupplier().get(), closeAllTabsRunnable); RecordUserAction.record("MobileMenuCloseAllTabs"); Loading @@ -82,7 +82,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct } else if (id == R.id.close_all_incognito_tabs_menu_id) { boolean allowUndo = TabClosureParamsUtils.shouldAllowUndo(triggeringMotion); @@ -3863,6 +3871,41 @@ public class ChromeTabbedActivity extends ChromeActivity { @@ -3848,6 +3856,41 @@ public class ChromeTabbedActivity extends ChromeActivity { getTabModalLifetimeHandler().onOmniboxFocusChanged(hasFocus); } Loading