diff --git a/build/bromite_patches_list.txt b/build/bromite_patches_list.txt index 821313246..a6c182f1f 100644 --- a/build/bromite_patches_list.txt +++ b/build/bromite_patches_list.txt @@ -282,10 +282,10 @@ Timezone-customization.patch 00Disable-Service-and-Shared-workers-on-3P-iframe.patch 00Disable-Real-Box.patch 00Always-allow-inspect-fallback.patch +00Add-cromite-flags-support.patch 00Temp-PerformanceNavigationTiming-privacy-fix.patch -00Temp-Disable-kAutomaticLazyFrameLoadingToEmbeds.patch 00Temp-disable-predictive-back-gesture.patch 00TEMP-Add-a-log-to-track-strange-behavior.patch 00Temp-guard-FileSystemAccessPersistentPermissions.patch diff --git a/build/patches/00Add-a-flag-to-disable-GamePad-API.patch b/build/patches/00Add-a-flag-to-disable-GamePad-API.patch index d46ca5aa6..fe60f4289 100644 --- a/build/patches/00Add-a-flag-to-disable-GamePad-API.patch +++ b/build/patches/00Add-a-flag-to-disable-GamePad-API.patch @@ -7,14 +7,14 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- chrome/browser/flag-metadata.json | 4 ++-- chrome/browser/flag_descriptions.cc | 2 +- - device/gamepad/public/cpp/gamepad_features.cc | 4 ++-- + device/gamepad/public/cpp/gamepad_features.cc | 1 + .../blink/renderer/modules/gamepad/navigator_gamepad.cc | 6 ++++++ - 4 files changed, 11 insertions(+), 5 deletions(-) + 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json -@@ -7341,9 +7341,9 @@ +@@ -7317,9 +7317,9 @@ "expiry_milestone": 121 }, { @@ -29,7 +29,7 @@ diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.js diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc -@@ -3076,7 +3076,7 @@ const char kReduceAcceptLanguageDescription[] = +@@ -3017,7 +3017,7 @@ const char kReduceAcceptLanguageDescription[] = const char kRestrictGamepadAccessName[] = "Restrict gamepad access"; const char kRestrictGamepadAccessDescription[] = @@ -41,17 +41,12 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti diff --git a/device/gamepad/public/cpp/gamepad_features.cc b/device/gamepad/public/cpp/gamepad_features.cc --- a/device/gamepad/public/cpp/gamepad_features.cc +++ b/device/gamepad/public/cpp/gamepad_features.cc -@@ -27,8 +27,8 @@ BASE_FEATURE(kEnableWindowsGamingInputDataFetcher, - base::FEATURE_ENABLED_BY_DEFAULT); +@@ -65,4 +65,5 @@ bool IsGamepadMultitouchEnabled() { + return false; + } - BASE_FEATURE(kRestrictGamepadAccess, -- "RestrictGamepadAccess", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "RestrictGamepadAccess", // enabled -+ base::FEATURE_ENABLED_BY_DEFAULT); // in bromite - - // Enables gamepad multitouch - BASE_FEATURE(kEnableGamepadMultitouch, ++SET_CROMITE_FEATURE_ENABLED(kRestrictGamepadAccess); + } // namespace features diff --git a/third_party/blink/renderer/modules/gamepad/navigator_gamepad.cc b/third_party/blink/renderer/modules/gamepad/navigator_gamepad.cc --- a/third_party/blink/renderer/modules/gamepad/navigator_gamepad.cc +++ b/third_party/blink/renderer/modules/gamepad/navigator_gamepad.cc diff --git a/build/patches/00Add-cromite-flags-support.patch b/build/patches/00Add-cromite-flags-support.patch new file mode 100644 index 000000000..d79d24667 --- /dev/null +++ b/build/patches/00Add-cromite-flags-support.patch @@ -0,0 +1,1167 @@ +From: uazo +Date: Sat, 18 Nov 2023 09:41:28 +0000 +Subject: Add cromite flags support + +Add SET_CROMITE_FEATURE_ENABLED*, SET_CROMITE_FEATURE_DISABLED* +and CROMITE_FEATURE macros, logic has been adapted from that found +in brave. +Allows flags to be defined in separate files. +Activates a new cromite tab in chrome://flags with only the flags +added and changed. In android added chrome://flags/cromite +in the setting ui. +Currently in wip + +Need: bromite-build-utils.patch +License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html +--- + base/BUILD.gn | 4 +- + base/feature_list.cc | 56 +++++++ + base/feature_list.h | 84 +++++++++- + build/android/gyp/java_cpp_features.py | 17 ++ + chrome/android/java/res/values/values.xml | 3 + + .../java/res/xml/privacy_preferences.xml | 4 + + chrome/browser/about_flags.cc | 7 + + chrome/browser/browser_features.cc | 1 + + .../flags/android/chrome_feature_list.cc | 1 + + .../flags/android/chrome_feature_list.h | 1 + + chrome/browser/ui/ui_features.cc | 1 + + chrome/common/chrome_features.cc | 1 + + .../content_settings/core/common/features.cc | 1 + + components/flags_ui/flags_state.cc | 21 +++ + components/flags_ui/resources/experiment.html | 7 +- + components/flags_ui/resources/experiment.ts | 16 ++ + components/flags_ui/resources/flags.css | 19 +++ + components/flags_ui/resources/flags.html | 13 ++ + components/flags_ui/resources/flags.ts | 36 ++++- + .../flags_ui/resources/flags_browser_proxy.ts | 5 + + .../core/offline_page_feature.cc | 1 + + .../offline_pages/core/offline_page_feature.h | 1 + + components/permissions/features.cc | 1 + + content/common/features.cc | 1 + + content/public/common/content_features.cc | 1 + + content/public/common/content_features.h | 1 + + cromite_flags/BUILD.gn | 150 ++++++++++++++++++ + .../browser/about_flags_cc/placeholder.txt | 1 + + .../browser_features_cc/placeholder.txt | 1 + + .../chrome_feature_list_cc/placeholder.txt | 1 + + .../chrome_feature_list_h/placeholder.txt | 1 + + .../browser/ui/ui_features_cc/placeholder.txt | 1 + + .../common/chrome_features_cc/placeholder.txt | 1 + + .../common/chrome_features_h/placeholder.txt | 1 + + .../core/common/features_cc/placeholder.txt | 1 + + .../offline_page_feature_cc/placeholder.txt | 1 + + .../offline_page_feature_h/placeholder.txt | 1 + + .../permissions/features_cc/placeholder.txt | 1 + + .../common/features_cc/placeholder.txt | 1 + + .../content_features_cc/placeholder.txt | 1 + + .../common/content_features_h/placeholder.txt | 1 + + .../base/media_switches_cc/placeholder.txt | 1 + + .../base/media_switches_h/placeholder.txt | 1 + + .../net/base/features_cc/placeholder.txt | 1 + + .../net/base/features_h/placeholder.txt | 1 + + .../public/cpp/features_cc/placeholder.txt | 1 + + .../public/cpp/features_h/placeholder.txt | 1 + + .../blink/common/features_cc/placeholder.txt | 1 + + .../blink/common/features_h/placeholder.txt | 1 + + media/base/media_switches.cc | 2 +- + media/base/media_switches.h | 2 +- + net/base/features.cc | 1 + + net/base/features.h | 1 + + services/network/public/cpp/features.cc | 1 + + services/network/public/cpp/features.h | 1 + + third_party/blink/common/features.cc | 1 + + third_party/blink/public/common/features.h | 1 + + 57 files changed, 474 insertions(+), 12 deletions(-) + create mode 100755 cromite_flags/BUILD.gn + create mode 100755 cromite_flags/chrome/browser/about_flags_cc/placeholder.txt + create mode 100755 cromite_flags/chrome/browser/browser_features_cc/placeholder.txt + create mode 100755 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/placeholder.txt + create mode 100755 cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/placeholder.txt + create mode 100755 cromite_flags/chrome/browser/ui/ui_features_cc/placeholder.txt + create mode 100755 cromite_flags/chrome/common/chrome_features_cc/placeholder.txt + create mode 100755 cromite_flags/chrome/common/chrome_features_h/placeholder.txt + create mode 100755 cromite_flags/components/content_settings/core/common/features_cc/placeholder.txt + create mode 100755 cromite_flags/components/offline_pages/core/offline_page_feature_cc/placeholder.txt + create mode 100755 cromite_flags/components/offline_pages/core/offline_page_feature_h/placeholder.txt + create mode 100755 cromite_flags/components/permissions/features_cc/placeholder.txt + create mode 100755 cromite_flags/content/common/features_cc/placeholder.txt + create mode 100755 cromite_flags/content/public/common/content_features_cc/placeholder.txt + create mode 100755 cromite_flags/content/public/common/content_features_h/placeholder.txt + create mode 100755 cromite_flags/media/base/media_switches_cc/placeholder.txt + create mode 100755 cromite_flags/media/base/media_switches_h/placeholder.txt + create mode 100755 cromite_flags/net/base/features_cc/placeholder.txt + create mode 100755 cromite_flags/net/base/features_h/placeholder.txt + create mode 100755 cromite_flags/services/network/public/cpp/features_cc/placeholder.txt + create mode 100755 cromite_flags/services/network/public/cpp/features_h/placeholder.txt + create mode 100755 cromite_flags/third_party/blink/common/features_cc/placeholder.txt + create mode 100755 cromite_flags/third_party/blink/common/features_h/placeholder.txt + +diff --git a/base/BUILD.gn b/base/BUILD.gn +--- a/base/BUILD.gn ++++ b/base/BUILD.gn +@@ -206,6 +206,8 @@ buildflag_header("message_pump_buildflags") { + # This does not include test code (test support and anything in the test + # directory) which should use source_set as is recommended for GN targets). + component("base") { ++ deps = [ "//cromite_flags", ] ++ + sources = [ + "allocator/allocator_check.cc", + "allocator/allocator_check.h", +@@ -1034,7 +1036,7 @@ component("base") { + "//build/config/compiler:wglobal_constructors", + ] + +- deps = [ ++ deps += [ + ":message_pump_buildflags", + "//base/allocator:buildflags", + "//base/allocator/partition_allocator:raw_ptr", +diff --git a/base/feature_list.cc b/base/feature_list.cc +--- a/base/feature_list.cc ++++ b/base/feature_list.cc +@@ -29,6 +29,33 @@ + #include "base/strings/stringprintf.h" + #include "build/build_config.h" + ++namespace base { ++namespace internal { ++ ++using DefaultStateOverrides = ++ flat_map; ++ ++constexpr size_t kDefaultStateOverridesReserve = 64 * 4; ++ ++DefaultStateOverrides& GetListOfNewFeatureState() { ++ static NoDestructor ++ startup_default_state_overrides([] { ++ DefaultStateOverrides v; ++ v.reserve(kDefaultStateOverridesReserve); ++ return v; ++ }()); ++ return *startup_default_state_overrides; ++} ++ ++FeatureDefaultStateOverrider::FeatureDefaultStateOverrider( ++ const Feature& feature, FeatureState state) { ++ auto& default_state_overrides = GetListOfNewFeatureState(); ++ default_state_overrides.insert({&feature, state}); ++} ++ ++} // namespace internal ++} // namespace base ++ + namespace base { + + namespace { +@@ -436,6 +463,24 @@ bool FeatureList::IsEnabled(const Feature& feature) { + return g_feature_list_instance->IsFeatureEnabled(feature); + } + ++bool FeatureList::IsCromiteChanged(const Feature& feature) { ++ for(auto const& [key, value]: internal::GetListOfNewFeatureState()) { ++ if (key->name == feature.name) { ++ return true; ++ } ++ } ++ return false; ++} ++ ++bool FeatureList::GetCromiteChange(const Feature& feature) { ++ for(auto const& [key, value]: internal::GetListOfNewFeatureState()) { ++ if (key->name == feature.name) { ++ return value == base::FEATURE_ENABLED_BY_DEFAULT; ++ } ++ } ++ NOTREACHED(); ++ return false; ++} + // static + bool FeatureList::IsValidFeatureOrFieldTrialName(StringPiece name) { + return IsStringASCII(name) && name.find_first_of(",<*") == std::string::npos; +@@ -616,6 +661,17 @@ void FeatureList::SetCachingContextForTesting(uint16_t caching_context) { + + void FeatureList::FinalizeInitialization() { + DCHECK(!initialized_); ++ //LOG(INFO) << "---FinalizeInitialization"; ++ for(auto const& [key, value]: internal::GetListOfNewFeatureState()) { ++ // LOG(INFO) << "---key " << key->name ++ // << " " ++ // << (value == base::FEATURE_ENABLED_BY_DEFAULT ? "1" : "0"); ++ RegisterOverride(key->name, ++ value == base::FEATURE_ENABLED_BY_DEFAULT ++ ? OverrideState::OVERRIDE_ENABLE_FEATURE ++ : OverrideState::OVERRIDE_DISABLE_FEATURE, ++ /* field_trial = */ nullptr); ++ } + // Store the field trial list pointer for DCHECKing. + field_trial_list_ = FieldTrialList::GetInstance(); + initialized_ = true; +diff --git a/base/feature_list.h b/base/feature_list.h +--- a/base/feature_list.h ++++ b/base/feature_list.h +@@ -93,8 +93,10 @@ enum FeatureState { + // [1]: + // https://crsrc.org/c/docs/speed/binary_size/android_binary_size_trybot.md#Mutable-Constants + struct BASE_EXPORT LOGICALLY_CONST Feature { +- constexpr Feature(const char* name, FeatureState default_state) +- : name(name), default_state(default_state) { ++ constexpr Feature(const char* name, FeatureState default_state, ++ bool cromite = false, bool is_new_flag = false) ++ : name(name), default_state(default_state), ++ is_cromite(cromite), is_new(is_new_flag) { + #if BUILDFLAG(ENABLE_BANNED_BASE_FEATURE_PREFIX) + if (StringPiece(name).find(BUILDFLAG(BANNED_BASE_FEATURE_PREFIX)) == 0) { + LOG(FATAL) << "Invalid feature name " << name << " starts with " +@@ -120,6 +122,9 @@ struct BASE_EXPORT LOGICALLY_CONST Feature { + // command line switch. + const FeatureState default_state; + ++ const bool is_cromite = false; ++ const bool is_new = false; ++ + private: + friend class FeatureList; + +@@ -395,6 +400,9 @@ class BASE_EXPORT FeatureList { + // instance, which is checked in builds with DCHECKs enabled. + static bool IsEnabled(const Feature& feature); + ++ static bool IsCromiteChanged(const Feature& feature); ++ static bool GetCromiteChange(const Feature& feature); ++ + // 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 +@@ -616,4 +624,76 @@ class BASE_EXPORT FeatureList { + + } // namespace base + ++namespace base { ++namespace internal { ++ ++// Perform base::Feature duplicates check and fills overriden states into a ++// map that is used at runtime to get an override if available. ++class BASE_EXPORT FeatureDefaultStateOverrider { ++ public: ++ using FeatureOverrideInfo = ++ std::pair, FeatureState>; ++ ++ FeatureDefaultStateOverrider( ++ const Feature& feature, FeatureState state); ++}; ++ ++} // namespace internal ++} // namespace base ++ ++#define CROMITE_FEATURE(feature, name, default_state) \ ++ CONSTINIT const base::Feature feature(name, default_state, true, true) ++ ++#define CROMITE_FEATURE_KEEP_DISABLED(feature, name, default_state) \ ++ CONSTINIT const base::Feature feature(name, base::FEATURE_DISABLED_BY_DEFAULT, true); \ ++ static_assert(default_state == base::FEATURE_DISABLED_BY_DEFAULT, \ ++ "Feature is not disabled by default.") ++ ++#define CROMITE_FEATURE_DISABLED(feature, name, default_state) \ ++ CONSTINIT const base::Feature feature(name, base::FEATURE_DISABLED_BY_DEFAULT, true); \ ++ static_assert(default_state == base::FEATURE_ENABLED_BY_DEFAULT, \ ++ "Feature is not enabled by default.") ++ ++#define CROMITE_FEATURE_KEEP_ENABLED(feature, name, default_state) \ ++ CONSTINIT const base::Feature feature(name, base::FEATURE_ENABLED_BY_DEFAULT, true); \ ++ static_assert(default_state == base::FEATURE_ENABLED_BY_DEFAULT, \ ++ "Feature is not enabled by default.") ++ ++#define CROMITE_FEATURE_ENABLED(feature, name, default_state) \ ++ CONSTINIT const base::Feature feature(name, base::FEATURE_ENABLED_BY_DEFAULT, true); \ ++ static_assert(default_state == base::FEATURE_DISABLED_BY_DEFAULT, \ ++ "Feature is not disabled by default.") ++ ++#define SET_CROMITE_FEATURE_ENABLED(feature) \ ++ _Pragma("clang diagnostic push") \ ++ _Pragma("clang diagnostic ignored \"-Wglobal-constructors\"") \ ++ static const ::base::internal::FeatureDefaultStateOverrider \ ++ g_feature_default_state_overrider_ ##feature {feature, base::FEATURE_ENABLED_BY_DEFAULT}; \ ++ _Pragma("clang diagnostic pop") \ ++ static_assert(true, "") /* for a semicolon requirement */ ++ ++#define SET_CROMITE_FEATURE_DISABLED(feature) \ ++ _Pragma("clang diagnostic push") \ ++ _Pragma("clang diagnostic ignored \"-Wglobal-constructors\"") \ ++ static const ::base::internal::FeatureDefaultStateOverrider \ ++ g_feature_default_state_overrider_ ##feature {feature, base::FEATURE_DISABLED_BY_DEFAULT}; \ ++ _Pragma("clang diagnostic pop") \ ++ static_assert(true, "") /* for a semicolon requirement */ ++ ++#define SET_CROMITE_FEATURE_ENABLED_W_NAMESPACE(namespace_value, feature) \ ++ _Pragma("clang diagnostic push") \ ++ _Pragma("clang diagnostic ignored \"-Wglobal-constructors\"") \ ++ static const ::base::internal::FeatureDefaultStateOverrider \ ++ g_feature_default_state_overrider_ ##feature {namespace_value::feature, base::FEATURE_ENABLED_BY_DEFAULT}; \ ++ _Pragma("clang diagnostic pop") \ ++ static_assert(true, "") /* for a semicolon requirement */ ++ ++#define SET_CROMITE_FEATURE_DISABLED_W_NAMESPACE(namespace_value, feature) \ ++ _Pragma("clang diagnostic push") \ ++ _Pragma("clang diagnostic ignored \"-Wglobal-constructors\"") \ ++ static const ::base::internal::FeatureDefaultStateOverrider \ ++ 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 */ ++ + #endif // BASE_FEATURE_LIST_H_ +diff --git a/build/android/gyp/java_cpp_features.py b/build/android/gyp/java_cpp_features.py +--- a/build/android/gyp/java_cpp_features.py ++++ b/build/android/gyp/java_cpp_features.py +@@ -22,10 +22,27 @@ class FeatureParserDelegate(java_cpp_utils.CppConstantParser.Delegate): + # ExtractConstantName() -> 'ConstantName' + # ExtractValue() -> '"StringNameOfTheFeature"' + FEATURE_RE = re.compile(r'BASE_FEATURE\(k([^,]+),') ++ ++ FEATURE_RE1 = re.compile(r'CROMITE_FEATURE\(k([^,]+),') ++ FEATURE_RE2 = re.compile(r'CROMITE_FEATURE_KEEP_DISABLED\(k([^,]+),') ++ FEATURE_RE3 = re.compile(r'CROMITE_FEATURE_DISABLED\(k([^,]+),') ++ FEATURE_RE4 = re.compile(r'CROMITE_FEATURE_KEEP_ENABLED\(k([^,]+),') ++ FEATURE_RE5 = re.compile(r'CROMITE_FEATURE_ENABLED\(k([^,]+),') ++ + VALUE_RE = re.compile(r'\s*("(?:\"|[^"])*")\s*,') + + def ExtractConstantName(self, line): + match = FeatureParserDelegate.FEATURE_RE.match(line) ++ if match is None: ++ match = FeatureParserDelegate.FEATURE_RE1.match(line) ++ if match is None: ++ match = FeatureParserDelegate.FEATURE_RE2.match(line) ++ if match is None: ++ match = FeatureParserDelegate.FEATURE_RE3.match(line) ++ if match is None: ++ match = FeatureParserDelegate.FEATURE_RE4.match(line) ++ if match is None: ++ match = FeatureParserDelegate.FEATURE_RE5.match(line) + return match.group(1) if match else None + + def ExtractValue(self, line): +diff --git a/chrome/android/java/res/values/values.xml b/chrome/android/java/res/values/values.xml +--- a/chrome/android/java/res/values/values.xml ++++ b/chrome/android/java/res/values/values.xml +@@ -42,6 +42,9 @@ found in the LICENSE file. + + 0.95 + ++ Open Cromite flags list ++ chrome://flags/cromite ++ + + 0.5 + 0 +diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml +--- a/chrome/android/java/res/xml/privacy_preferences.xml ++++ b/chrome/android/java/res/xml/privacy_preferences.xml +@@ -99,6 +99,10 @@ found in the LICENSE file. + android:title="@string/tabgrid_use_icons_title" + android:summary="@string/tabgrid_use_icons_summary" + android:defaultValue="false" /> ++ + kAuxiliarySearchMaxTabsCountParam( + "auxiliary_search_max_donation_tab", + 100); + ++#include "cromite_flags/chrome_browser_flags_android_chrome_feature_list_h.inc" + } // namespace android + } // namespace chrome + +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 +@@ -394,4 +394,5 @@ BASE_FEATURE(kStopLoadingAnimationForHiddenWindow, + "StopLoadingAnimationForHiddenWindow", + base::FEATURE_ENABLED_BY_DEFAULT); + ++#include "cromite_flags/chrome_browser_ui_ui_features_cc.inc" + } // namespace features +diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc +--- a/chrome/common/chrome_features.cc ++++ b/chrome/common/chrome_features.cc +@@ -1664,4 +1664,5 @@ BASE_FEATURE(kSupportsRtcWakeOver24Hours, + base::FEATURE_ENABLED_BY_DEFAULT); + #endif // BUILDFLAG(IS_CHROMEOS_ASH) + ++#include "cromite_flags/chrome_common_chrome_features_cc.inc" + } // namespace features +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 +@@ -82,5 +82,6 @@ BASE_FEATURE(kTrackingProtection3pcd, + "TrackingProtection3pcd", + base::FEATURE_DISABLED_BY_DEFAULT); + ++#include "cromite_flags/components_content_settings_core_common_features_cc.inc" + } // namespace features + } // namespace content_settings +diff --git a/components/flags_ui/flags_state.cc b/components/flags_ui/flags_state.cc +--- a/components/flags_ui/flags_state.cc ++++ b/components/flags_ui/flags_state.cc +@@ -668,6 +668,27 @@ void FlagsState::GetFlagFeatureEntries( + bool is_default_value = IsDefaultValue(entry, enabled_entries); + data.Set("is_default", is_default_value); + ++ if (entry.type == FeatureEntry::FEATURE_VALUE ++ || entry.type == FeatureEntry::FEATURE_WITH_PARAMS_VALUE) { ++ DCHECK(entry.feature.feature); ++ if (base::FeatureList::IsCromiteChanged(*entry.feature.feature)) { ++ bool is_enabled = base::FeatureList::GetCromiteChange(*entry.feature.feature); ++ data.Set("is_cromite", true); ++ data.Set("default_value", ++ is_enabled ? "enabled" : "disabled"); ++ } else { ++ bool is_enabled = entry.feature.feature->default_state == base::FEATURE_ENABLED_BY_DEFAULT; ++ data.Set("default_value", is_enabled ++ ? "enabled" : "disabled"); ++ if (is_enabled) ++ data.Set("is_default_value_on", true); ++ } ++ if (entry.feature.feature->is_cromite) ++ data.Set("is_cromite", true); ++ if (entry.feature.feature->is_new) ++ data.Set("is_new", true); ++ } ++ + switch (entry.type) { + case FeatureEntry::SINGLE_VALUE: + case FeatureEntry::SINGLE_DISABLE_VALUE: +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; + } + ++ .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.ts b/components/flags_ui/resources/experiment.ts +--- a/components/flags_ui/resources/experiment.ts ++++ b/components/flags_ui/resources/experiment.ts +@@ -60,11 +60,16 @@ function resetHighlights(element: HTMLElement) { + + export class FlagsExperimentElement extends CustomElement { + private feature_: Feature|null = null; ++ private permalink_: boolean = true; + + static override get template() { + return getTemplate(); + } + ++ set permalink(visible: boolean) { ++ this.permalink_ = visible; ++ } ++ + set data(feature: Feature) { + this.feature_ = feature; + +@@ -76,12 +81,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; +@@ -124,6 +135,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. +@@ -152,6 +164,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); + } + +diff --git a/components/flags_ui/resources/flags.css b/components/flags_ui/resources/flags.css +--- a/components/flags_ui/resources/flags.css ++++ b/components/flags_ui/resources/flags.css +@@ -468,3 +468,22 @@ button.primary:-webkit-any(:active, :hover) { + padding-top: 1.5rem; + } + } ++ ++.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; ++} +diff --git a/components/flags_ui/resources/flags.html b/components/flags_ui/resources/flags.html +--- a/components/flags_ui/resources/flags.html ++++ b/components/flags_ui/resources/flags.html +@@ -92,6 +92,11 @@ + aria-selected="false" aria-controls="panel2" + tabindex="-1">$i18n{unavailable} + ++ Cromite + +
+
+
+ ++
++ ++
++ ++
++ ++
+
+
+
+diff --git a/components/flags_ui/resources/flags.ts b/components/flags_ui/resources/flags.ts +--- a/components/flags_ui/resources/flags.ts ++++ b/components/flags_ui/resources/flags.ts +@@ -39,6 +39,10 @@ interface Tab { + } + + const tabs: Tab[] = [ ++ { ++ tabEl: document.body.querySelector('#tab-cromite')!, ++ panelEl: document.body.querySelector('#tab-content-cromite')!, ++ }, + { + tabEl: document.body.querySelector('#tab-available')!, + panelEl: document.body.querySelector('#tab-content-available')!, +@@ -84,18 +88,27 @@ function render(experimentalFeaturesData: ExperimentalFeaturesData) { + const defaultFeatures: Feature[] = []; + const nonDefaultFeatures: Feature[] = []; + ++ if (document.body.classList.contains("cromite")) { ++ 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)); + + renderExperiments( +- nonDefaultFeatures, getRequiredElement('non-default-experiments')); ++ nonDefaultFeatures, getRequiredElement('non-default-experiments'), ++ getRequiredElement('non-default-cromite-experiments'), false); + +- renderExperiments(defaultFeatures, getRequiredElement('default-experiments')); ++ renderExperiments(defaultFeatures, getRequiredElement('default-experiments'), ++ getRequiredElement('cromite-experiments'), false); + + // + renderExperiments( + experimentalFeaturesData.unsupportedFeatures, +- getRequiredElement('unavailable-experiments'), true); ++ getRequiredElement('unavailable-experiments'), ++ undefined, true); + // + + showRestartToast(experimentalFeaturesData.needsRestart); +@@ -248,16 +261,22 @@ function resetAllFlags() { + } + + function renderExperiments( +- features: Feature[], container: HTMLElement, unsupported = false) { ++ features: Feature[], container: HTMLElement, cromiteContainer: HTMLElement | undefined, unsupported: boolean) { + 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', () => { + showRestartToast(true); +@@ -281,9 +300,14 @@ function renderExperiments( + return false; + }); + } +- fragment.appendChild(experiment); ++ if (feature.is_cromite) ++ fragmentCromite.appendChild(experiment); ++ else ++ fragment.appendChild(experiment); + } + container.replaceChildren(fragment); ++ if (!!cromiteContainer) ++ cromiteContainer.replaceChildren(fragmentCromite); + } + + /** +@@ -507,6 +531,8 @@ function setupRestartButton() { + // + + document.addEventListener('DOMContentLoaded', function() { ++ if (location.pathname == '/cromite') ++ document.body.classList.add('cromite'); + // Get and display the data upon loading. + requestExperimentalFeaturesData(); + // There is no restart button on iOS. +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 +@@ -16,6 +16,11 @@ export interface Feature { + description: string; + enabled: boolean; + is_default: boolean; ++ is_default_value_on: boolean; ++ default_value: string; ++ is_cromite: boolean; ++ is_new: boolean; ++ permalink: boolean; + supported_platforms: string[]; + origin_list_value?: string; + string_value?: string; +diff --git a/components/offline_pages/core/offline_page_feature.cc b/components/offline_pages/core/offline_page_feature.cc +--- a/components/offline_pages/core/offline_page_feature.cc ++++ b/components/offline_pages/core/offline_page_feature.cc +@@ -82,4 +82,5 @@ bool IsOfflinePagesNetworkStateLikelyUnknown() { + return base::FeatureList::IsEnabled(kOfflinePagesNetworkStateLikelyUnknown); + } + ++#include "cromite_flags/components_offline_pages_core_offline_page_feature_cc.inc" + } // namespace offline_pages +diff --git a/components/offline_pages/core/offline_page_feature.h b/components/offline_pages/core/offline_page_feature.h +--- a/components/offline_pages/core/offline_page_feature.h ++++ b/components/offline_pages/core/offline_page_feature.h +@@ -64,6 +64,7 @@ bool IsOnTheFlyMhtmlHashComputationEnabled(); + // offline pages to avoid showing them even when the device is online. + bool IsOfflinePagesNetworkStateLikelyUnknown(); + ++#include "cromite_flags/components_offline_pages_core_offline_page_feature_h.inc" + } // namespace offline_pages + + #endif // COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_FEATURE_H_ +diff --git a/components/permissions/features.cc b/components/permissions/features.cc +--- a/components/permissions/features.cc ++++ b/components/permissions/features.cc +@@ -171,6 +171,7 @@ BASE_FEATURE(kBlockMidiByDefault, + "BlockMidiByDefault", + base::FEATURE_ENABLED_BY_DEFAULT); + ++#include "cromite_flags/components_permissions_features_cc.inc" + } // namespace features + namespace feature_params { + +diff --git a/content/common/features.cc b/content/common/features.cc +--- a/content/common/features.cc ++++ b/content/common/features.cc +@@ -529,4 +529,5 @@ BASE_FEATURE(kWindowOpenFileSelectFix, + + // Please keep features in alphabetical order. + ++#include "cromite_flags/content_common_features_cc.inc" + } // namespace features +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 +@@ -1321,4 +1321,5 @@ bool IsVideoCaptureServiceEnabledForBrowserProcess() { + VideoCaptureServiceConfiguration::kEnabledForBrowserProcess; + } + ++#include "cromite_flags/content_public_common_content_features_cc.inc" + } // namespace features +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 +@@ -327,6 +327,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebRtcPipeWireCapturer); + CONTENT_EXPORT bool IsVideoCaptureServiceEnabledForOutOfProcess(); + CONTENT_EXPORT bool IsVideoCaptureServiceEnabledForBrowserProcess(); + ++#include "cromite_flags/content_public_common_content_features_h.inc" + } // namespace features + + #endif // CONTENT_PUBLIC_COMMON_CONTENT_FEATURES_H_ +diff --git a/cromite_flags/BUILD.gn b/cromite_flags/BUILD.gn +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/BUILD.gn +@@ -0,0 +1,150 @@ ++# This file is part of Bromite. ++ ++# Bromite is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++ ++# Bromite is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with Bromite. If not, see . ++ ++# for placeholder.txt: ++# ++# this file is intentionally empty ++# ++ ++cpp_bromite_include("chrome_browser_about_flags_cc") { ++ inputs = [ "//cromite_flags/chrome/browser/about_flags_cc/placeholder.txt" ] ++ output_file = "chrome_browser_about_flags_cc.inc" ++} ++ ++cpp_bromite_include("chrome_common_chrome_features_cc") { ++ inputs = [ "//cromite_flags/chrome/common/chrome_features_cc/placeholder.txt" ] ++ output_file = "chrome_common_chrome_features_cc.inc" ++} ++ ++cpp_bromite_include("content_common_features_cc") { ++ inputs = [ "//cromite_flags/content/common/features_cc/placeholder.txt" ] ++ output_file = "content_common_features_cc.inc" ++} ++ ++cpp_bromite_include("content_public_common_content_features_h") { ++ inputs = [ "//cromite_flags/content/public/common/content_features_h/placeholder.txt" ] ++ output_file = "content_public_common_content_features_h.inc" ++} ++ ++cpp_bromite_include("content_public_common_content_features_cc") { ++ inputs = [ "//cromite_flags/content/public/common/content_features_cc/placeholder.txt" ] ++ output_file = "content_public_common_content_features_cc.inc" ++} ++ ++cpp_bromite_include("third_party_blink_common_features_cc") { ++ inputs = [ "//cromite_flags/third_party/blink/common/features_cc/placeholder.txt" ] ++ output_file = "third_party_blink_common_features_cc.inc" ++} ++ ++cpp_bromite_include("third_party_blink_common_features_h") { ++ inputs = [ "//cromite_flags/third_party/blink/common/features_h/placeholder.txt" ] ++ output_file = "third_party_blink_common_features_h.inc" ++} ++ ++cpp_bromite_include("chrome_browser_flags_android_chrome_feature_list_cc") { ++ inputs = [ "//cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/placeholder.txt" ] ++ output_file = "chrome_browser_flags_android_chrome_feature_list_cc.inc" ++} ++ ++cpp_bromite_include("chrome_browser_flags_android_chrome_feature_list_h") { ++ inputs = [ "//cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/placeholder.txt" ] ++ output_file = "chrome_browser_flags_android_chrome_feature_list_h.inc" ++} ++ ++cpp_bromite_include("chrome_browser_browser_features_cc") { ++ inputs = [ "//cromite_flags/chrome/browser/browser_features_cc/placeholder.txt" ] ++ output_file = "chrome_browser_browser_features_cc.inc" ++} ++ ++cpp_bromite_include("chrome_browser_ui_ui_features_cc") { ++ inputs = [ "//cromite_flags/chrome/browser/ui/ui_features_cc/placeholder.txt" ] ++ output_file = "chrome_browser_ui_ui_features_cc.inc" ++} ++ ++cpp_bromite_include("media_base_media_switches_cc") { ++ inputs = [ "//cromite_flags/media/base/media_switches_cc/placeholder.txt" ] ++ output_file = "media_base_media_switches_cc.inc" ++} ++ ++cpp_bromite_include("media_base_media_switches_h") { ++ inputs = [ "//cromite_flags/media/base/media_switches_h/placeholder.txt" ] ++ output_file = "media_base_media_switches_h.inc" ++} ++ ++cpp_bromite_include("components_content_settings_core_common_features_cc") { ++ inputs = [ "//cromite_flags/components/content_settings/core/common/features_cc/placeholder.txt" ] ++ output_file = "components_content_settings_core_common_features_cc.inc" ++} ++ ++cpp_bromite_include("components_permissions_features_cc") { ++ inputs = [ "//cromite_flags/components/permissions/features_cc/placeholder.txt" ] ++ output_file = "components_permissions_features_cc.inc" ++} ++ ++cpp_bromite_include("components_offline_pages_core_offline_page_feature_cc") { ++ inputs = [ "//cromite_flags/components/offline_pages/core/offline_page_feature_cc/placeholder.txt" ] ++ output_file = "components_offline_pages_core_offline_page_feature_cc.inc" ++} ++ ++cpp_bromite_include("components_offline_pages_core_offline_page_feature_h") { ++ inputs = [ "//cromite_flags/components/offline_pages/core/offline_page_feature_h/placeholder.txt" ] ++ output_file = "components_offline_pages_core_offline_page_feature_h.inc" ++} ++ ++cpp_bromite_include("net_base_features_cc") { ++ inputs = [ "//cromite_flags/net/base/features_cc/placeholder.txt" ] ++ output_file = "net_base_features_cc.inc" ++} ++ ++cpp_bromite_include("net_base_features_h") { ++ inputs = [ "//cromite_flags/net/base/features_h/placeholder.txt" ] ++ output_file = "net_base_features_h.inc" ++} ++ ++cpp_bromite_include("services_network_public_cpp_features_cc") { ++ inputs = [ "//cromite_flags/services/network/public/cpp/features_cc/placeholder.txt" ] ++ output_file = "services_network_public_cpp_features_cc.inc" ++} ++ ++cpp_bromite_include("services_network_public_cpp_features_h") { ++ inputs = [ "//cromite_flags/services/network/public/cpp/features_h/placeholder.txt" ] ++ output_file = "services_network_public_cpp_features_h.inc" ++} ++ ++component("cromite_flags") { ++ deps = [ ++ ":content_common_features_cc", ++ ":content_public_common_content_features_cc", ++ ":content_public_common_content_features_h", ++ ":components_content_settings_core_common_features_cc", ++ ":components_permissions_features_cc", ++ ":components_offline_pages_core_offline_page_feature_cc", ++ ":components_offline_pages_core_offline_page_feature_h", ++ ":media_base_media_switches_cc", ++ ":media_base_media_switches_h", ++ ":net_base_features_cc", ++ ":net_base_features_h", ++ ":chrome_common_chrome_features_cc", ++ ":chrome_browser_about_flags_cc", ++ ":chrome_browser_flags_android_chrome_feature_list_cc", ++ ":chrome_browser_flags_android_chrome_feature_list_h", ++ ":chrome_browser_ui_ui_features_cc", ++ ":chrome_browser_browser_features_cc", ++ ":services_network_public_cpp_features_cc", ++ ":services_network_public_cpp_features_h", ++ ":third_party_blink_common_features_cc", ++ ":third_party_blink_common_features_h", ++ ] ++} +diff --git a/cromite_flags/chrome/browser/about_flags_cc/placeholder.txt b/cromite_flags/chrome/browser/about_flags_cc/placeholder.txt +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/placeholder.txt +@@ -0,0 +1 @@ ++this file is intentionally empty +diff --git a/cromite_flags/chrome/browser/browser_features_cc/placeholder.txt b/cromite_flags/chrome/browser/browser_features_cc/placeholder.txt +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/chrome/browser/browser_features_cc/placeholder.txt +@@ -0,0 +1 @@ ++this file is intentionally empty +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/placeholder.txt b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/placeholder.txt +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/placeholder.txt +@@ -0,0 +1 @@ ++this file is intentionally empty +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/placeholder.txt b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/placeholder.txt +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/placeholder.txt +@@ -0,0 +1 @@ ++this file is intentionally empty +diff --git a/cromite_flags/chrome/browser/ui/ui_features_cc/placeholder.txt b/cromite_flags/chrome/browser/ui/ui_features_cc/placeholder.txt +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/chrome/browser/ui/ui_features_cc/placeholder.txt +@@ -0,0 +1 @@ ++this file is intentionally empty +diff --git a/cromite_flags/chrome/common/chrome_features_cc/placeholder.txt b/cromite_flags/chrome/common/chrome_features_cc/placeholder.txt +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/chrome/common/chrome_features_cc/placeholder.txt +@@ -0,0 +1 @@ ++this file is intentionally empty +diff --git a/cromite_flags/chrome/common/chrome_features_h/placeholder.txt b/cromite_flags/chrome/common/chrome_features_h/placeholder.txt +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/chrome/common/chrome_features_h/placeholder.txt +@@ -0,0 +1 @@ ++this file is intentionally empty +diff --git a/cromite_flags/components/content_settings/core/common/features_cc/placeholder.txt b/cromite_flags/components/content_settings/core/common/features_cc/placeholder.txt +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/components/content_settings/core/common/features_cc/placeholder.txt +@@ -0,0 +1 @@ ++this file is intentionally empty +diff --git a/cromite_flags/components/offline_pages/core/offline_page_feature_cc/placeholder.txt b/cromite_flags/components/offline_pages/core/offline_page_feature_cc/placeholder.txt +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/components/offline_pages/core/offline_page_feature_cc/placeholder.txt +@@ -0,0 +1 @@ ++this file is intentionally empty +diff --git a/cromite_flags/components/offline_pages/core/offline_page_feature_h/placeholder.txt b/cromite_flags/components/offline_pages/core/offline_page_feature_h/placeholder.txt +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/components/offline_pages/core/offline_page_feature_h/placeholder.txt +@@ -0,0 +1 @@ ++this file is intentionally empty +diff --git a/cromite_flags/components/permissions/features_cc/placeholder.txt b/cromite_flags/components/permissions/features_cc/placeholder.txt +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/components/permissions/features_cc/placeholder.txt +@@ -0,0 +1 @@ ++this file is intentionally empty +diff --git a/cromite_flags/content/common/features_cc/placeholder.txt b/cromite_flags/content/common/features_cc/placeholder.txt +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/content/common/features_cc/placeholder.txt +@@ -0,0 +1 @@ ++this file is intentionally empty +diff --git a/cromite_flags/content/public/common/content_features_cc/placeholder.txt b/cromite_flags/content/public/common/content_features_cc/placeholder.txt +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/content/public/common/content_features_cc/placeholder.txt +@@ -0,0 +1 @@ ++this file is intentionally empty +diff --git a/cromite_flags/content/public/common/content_features_h/placeholder.txt b/cromite_flags/content/public/common/content_features_h/placeholder.txt +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/content/public/common/content_features_h/placeholder.txt +@@ -0,0 +1 @@ ++this file is intentionally empty +diff --git a/cromite_flags/media/base/media_switches_cc/placeholder.txt b/cromite_flags/media/base/media_switches_cc/placeholder.txt +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/media/base/media_switches_cc/placeholder.txt +@@ -0,0 +1 @@ ++this file is intentionally empty +diff --git a/cromite_flags/media/base/media_switches_h/placeholder.txt b/cromite_flags/media/base/media_switches_h/placeholder.txt +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/media/base/media_switches_h/placeholder.txt +@@ -0,0 +1 @@ ++this file is intentionally empty +diff --git a/cromite_flags/net/base/features_cc/placeholder.txt b/cromite_flags/net/base/features_cc/placeholder.txt +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/net/base/features_cc/placeholder.txt +@@ -0,0 +1 @@ ++this file is intentionally empty +diff --git a/cromite_flags/net/base/features_h/placeholder.txt b/cromite_flags/net/base/features_h/placeholder.txt +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/net/base/features_h/placeholder.txt +@@ -0,0 +1 @@ ++this file is intentionally empty +diff --git a/cromite_flags/services/network/public/cpp/features_cc/placeholder.txt b/cromite_flags/services/network/public/cpp/features_cc/placeholder.txt +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/services/network/public/cpp/features_cc/placeholder.txt +@@ -0,0 +1 @@ ++this file is intentionally empty +diff --git a/cromite_flags/services/network/public/cpp/features_h/placeholder.txt b/cromite_flags/services/network/public/cpp/features_h/placeholder.txt +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/services/network/public/cpp/features_h/placeholder.txt +@@ -0,0 +1 @@ ++this file is intentionally empty +diff --git a/cromite_flags/third_party/blink/common/features_cc/placeholder.txt b/cromite_flags/third_party/blink/common/features_cc/placeholder.txt +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/third_party/blink/common/features_cc/placeholder.txt +@@ -0,0 +1 @@ ++this file is intentionally empty +diff --git a/cromite_flags/third_party/blink/common/features_h/placeholder.txt b/cromite_flags/third_party/blink/common/features_h/placeholder.txt +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/third_party/blink/common/features_h/placeholder.txt +@@ -0,0 +1 @@ ++this file is intentionally empty +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 +@@ -1743,5 +1743,5 @@ uint32_t GetPassthroughAudioFormats() { + return 0; + #endif // BUILDFLAG(ENABLE_PASSTHROUGH_AUDIO_CODECS) + } +- ++#include "cromite_flags/media_base_media_switches_cc.inc" + } // namespace media +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 +@@ -505,5 +505,5 @@ MEDIA_EXPORT bool IsOutOfProcessVideoDecodingEnabled(); + MEDIA_EXPORT uint32_t GetPassthroughAudioFormats(); + + } // namespace media +- ++#include "cromite_flags/media_base_media_switches_h.inc" + #endif // 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 +@@ -469,4 +469,5 @@ BASE_FEATURE(kSpdyHeadersToHttpResponseVerifyCorrectness, + "SpdyHeadersToHttpResponseVerifyCorrectness", + base::FEATURE_DISABLED_BY_DEFAULT); + ++#include "cromite_flags/net_base_features_cc.inc" + } // namespace net::features +diff --git a/net/base/features.h b/net/base/features.h +--- a/net/base/features.h ++++ b/net/base/features.h +@@ -467,6 +467,7 @@ NET_EXPORT BASE_DECLARE_FEATURE(kSpdyHeadersToHttpResponseUseBuilder); + // for two weeks on Dev. + NET_EXPORT BASE_DECLARE_FEATURE(kSpdyHeadersToHttpResponseVerifyCorrectness); + ++#include "cromite_flags/net_base_features_h.inc" + } // namespace net::features + + #endif // 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 +@@ -422,4 +422,5 @@ BASE_FEATURE(kVisibilityAwareResourceScheduler, + + BASE_FEATURE(kSharedZstd, "SharedZstd", base::FEATURE_ENABLED_BY_DEFAULT); + ++#include "cromite_flags/services_network_public_cpp_features_cc.inc" + } // namespace network::features +diff --git a/services/network/public/cpp/features.h b/services/network/public/cpp/features.h +--- a/services/network/public/cpp/features.h ++++ b/services/network/public/cpp/features.h +@@ -158,6 +158,7 @@ BASE_DECLARE_FEATURE(kVisibilityAwareResourceScheduler); + COMPONENT_EXPORT(NETWORK_CPP) + BASE_DECLARE_FEATURE(kSharedZstd); + ++#include "cromite_flags/services_network_public_cpp_features_h.inc" + } // namespace features + } // namespace network + +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 +@@ -2168,5 +2168,6 @@ bool IsKeepAliveURLLoaderServiceEnabled() { + base::FeatureList::IsEnabled(kFetchLaterAPI); + } + ++#include "cromite_flags/third_party_blink_common_features_cc.inc" + } // namespace features + } // namespace blink +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 +@@ -1388,6 +1388,7 @@ BLINK_COMMON_EXPORT bool IsKeepAliveURLLoaderServiceEnabled(); + BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE( + kRemoveAuthroizationOnCrossOriginRedirect); + ++#include "cromite_flags/third_party_blink_common_features_h.inc" + } // namespace features + } // namespace blink + +-- +2.25.1 diff --git a/build/patches/00Add-setting-to-invert-tap-and-long-tap.patch b/build/patches/00Add-setting-to-invert-tap-and-long-tap.patch index e15a395b7..f0b3182e1 100644 --- a/build/patches/00Add-setting-to-invert-tap-and-long-tap.patch +++ b/build/patches/00Add-setting-to-invert-tap-and-long-tap.patch @@ -13,25 +13,26 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../contextmenu/ChromeContextMenuItem.java | 5 ++- .../ChromeContextMenuPopulator.java | 5 +++ .../tab/TabContextMenuItemDelegate.java | 8 +++++ - chrome/browser/about_flags.cc | 5 +++ .../contextmenu/ContextMenuItemDelegate.java | 2 ++ - chrome/browser/flag_descriptions.cc | 4 +++ - chrome/browser/flag_descriptions.h | 3 ++ .../flags/android/chrome_feature_list.cc | 1 + .../browser/flags/ChromeFeatureList.java | 5 +++ .../strings/android_chrome_strings.grd | 9 +++++ .../res/xml/accessibility_preferences.xml | 5 +++ .../accessibility/AccessibilitySettings.java | 11 ++++++ .../AccessibilitySettingsDelegate.java | 2 ++ - third_party/blink/common/features.cc | 4 +++ - third_party/blink/public/common/features.h | 2 ++ + ...Add-setting-to-invert-tap-and-long-tap.inc | 8 +++++ + ...Add-setting-to-invert-tap-and-long-tap.inc | 3 ++ + ...Add-setting-to-invert-tap-and-long-tap.inc | 1 + .../renderer/core/html/html_anchor_element.cc | 35 +++++++++++++++---- .../renderer/core/html/html_anchor_element.h | 9 +++-- .../renderer/core/html/html_image_element.cc | 17 +++++++++ .../renderer/core/html/html_image_element.h | 2 ++ .../core/page/context_menu_controller.cc | 32 ++++++++++++----- .../core/page/context_menu_controller.h | 5 +-- - 23 files changed, 170 insertions(+), 20 deletions(-) + 21 files changed, 164 insertions(+), 20 deletions(-) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Add-setting-to-invert-tap-and-long-tap.inc + create mode 100644 cromite_flags/third_party/blink/common/features_cc/Add-setting-to-invert-tap-and-long-tap.inc + create mode 100644 cromite_flags/third_party/blink/common/features_h/Add-setting-to-invert-tap-and-long-tap.inc diff --git a/chrome/android/java/res/values/ids.xml b/chrome/android/java/res/values/ids.xml --- a/chrome/android/java/res/values/ids.xml @@ -142,21 +143,6 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextM @Override public void onOpenImageInNewTab(GURL url, Referrer referrer) { LoadUrlParams loadUrlParams = new LoadUrlParams(url.getSpec()); -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 -@@ -8425,6 +8425,11 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(features::kElasticOverscroll)}, - #endif - -+ {"show-always-context-menu-on-links", -+ flag_descriptions::kShowAlwaysContextMenuOnLinksName, -+ flag_descriptions::kShowAlwaysContextMenuOnLinksDescription, kOsAndroid, -+ FEATURE_VALUE_TYPE(blink::features::kShowAlwaysContextMenuOnLinks)}, -+ - {"device-posture", flag_descriptions::kDevicePostureName, - flag_descriptions::kDevicePostureDescription, kOsAll, - FEATURE_VALUE_TYPE(features::kDevicePosture)}, diff --git a/chrome/browser/contextmenu/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuItemDelegate.java b/chrome/browser/contextmenu/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuItemDelegate.java --- a/chrome/browser/contextmenu/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuItemDelegate.java +++ b/chrome/browser/contextmenu/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuItemDelegate.java @@ -169,33 +155,6 @@ diff --git a/chrome/browser/contextmenu/java/src/org/chromium/chrome/browser/con /** * Called when the {@code url} is of an image and should be opened in a new tab. * @param url The image URL to open. -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 -@@ -2056,6 +2056,10 @@ const char kMoveTopToolbarToBottomName[] = "Move top toolbar to bottom"; - const char kMoveTopToolbarToBottomDescription[] = - "Move the top toolbar to the bottom."; - -+const char kShowAlwaysContextMenuOnLinksName[] = "Always show contextmenu on links"; -+const char kShowAlwaysContextMenuOnLinksDescription[] = -+ "Use accessibility settings to set it."; -+ - const char kIncognitoDownloadsWarningName[] = - "Enable Incognito downloads warning"; - const char kIncognitoDownloadsWarningDescription[] = -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 -@@ -1165,6 +1165,9 @@ extern const char kImprovedKeyboardShortcutsDescription[]; - extern const char kMoveTopToolbarToBottomName[]; - extern const char kMoveTopToolbarToBottomDescription[]; - -+extern const char kShowAlwaysContextMenuOnLinksName[]; -+extern const char kShowAlwaysContextMenuOnLinksDescription[]; -+ - extern const char kIncognitoReauthenticationForAndroidName[]; - extern const char kIncognitoReauthenticationForAndroidDescription[]; - 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 @@ -331,32 +290,33 @@ diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/c /** * @return The BrowserContextHandle that should be used to read and update settings. */ -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 -@@ -241,6 +241,10 @@ BASE_FEATURE(kBackgroundResourceFetch, - "BackgroundResourceFetch", - base::FEATURE_DISABLED_BY_DEFAULT); - -+BASE_FEATURE(kShowAlwaysContextMenuOnLinks, -+ "ShowAlwaysContextMenuOnLinks", -+ base::FEATURE_DISABLED_BY_DEFAULT); +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Add-setting-to-invert-tap-and-long-tap.inc b/cromite_flags/chrome/browser/about_flags_cc/Add-setting-to-invert-tap-and-long-tap.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Add-setting-to-invert-tap-and-long-tap.inc +@@ -0,0 +1,8 @@ ++#ifdef FLAG_SECTION + - // Used to configure a per-origin allowlist of performance.mark events that are - // permitted to be included in slow reports traces. See crbug.com/1181774. - BASE_FEATURE(kBackgroundTracingPerformanceMark, -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 -@@ -143,6 +143,8 @@ BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kBackForwardCacheWithKeepaliveRequest); - - BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kBackgroundResourceFetch); - -+BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kShowAlwaysContextMenuOnLinks); ++ {"show-always-context-menu-on-links", ++ "Always show contextmenu on links", ++ "Use accessibility settings to set it.", kOsAndroid, ++ FEATURE_VALUE_TYPE(blink::features::kShowAlwaysContextMenuOnLinks)}, + - // Used to configure a per-origin allowlist of performance.mark events that are - // permitted to be included in slow reports traces. See crbug.com/1181774. - BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kBackgroundTracingPerformanceMark); ++#endif +diff --git a/cromite_flags/third_party/blink/common/features_cc/Add-setting-to-invert-tap-and-long-tap.inc b/cromite_flags/third_party/blink/common/features_cc/Add-setting-to-invert-tap-and-long-tap.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/third_party/blink/common/features_cc/Add-setting-to-invert-tap-and-long-tap.inc +@@ -0,0 +1,3 @@ ++CROMITE_FEATURE(kShowAlwaysContextMenuOnLinks, ++ "ShowAlwaysContextMenuOnLinks", ++ base::FEATURE_DISABLED_BY_DEFAULT); +diff --git a/cromite_flags/third_party/blink/common/features_h/Add-setting-to-invert-tap-and-long-tap.inc b/cromite_flags/third_party/blink/common/features_h/Add-setting-to-invert-tap-and-long-tap.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/third_party/blink/common/features_h/Add-setting-to-invert-tap-and-long-tap.inc +@@ -0,0 +1 @@ ++BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kShowAlwaysContextMenuOnLinks); diff --git a/third_party/blink/renderer/core/html/html_anchor_element.cc b/third_party/blink/renderer/core/html/html_anchor_element.cc --- a/third_party/blink/renderer/core/html/html_anchor_element.cc +++ b/third_party/blink/renderer/core/html/html_anchor_element.cc diff --git a/build/patches/00Add-support-to-jxl.patch b/build/patches/00Add-support-to-jxl.patch index 1afcbfab7..5cdd82d07 100644 --- a/build/patches/00Add-support-to-jxl.patch +++ b/build/patches/00Add-support-to-jxl.patch @@ -12,23 +12,20 @@ Enabled by default cc/base/devtools_instrumentation.h | 2 +- cc/paint/paint_image.h | 2 +- cc/tiles/image_decode_cache.h | 2 + - chrome/browser/about_flags.cc | 6 + - chrome/browser/flag-metadata.json | 5 + - chrome/browser/flag_descriptions.cc | 7 + - chrome/browser/flag_descriptions.h | 5 + content/common/content_constants_internal.cc | 11 +- content/common/content_constants_internal.h | 3 +- content/public/browser/frame_accept_header.cc | 13 +- + .../about_flags_cc/Add-support-to-jxl.inc | 13 + + .../common/features_cc/Add-support-to-jxl.inc | 4 + + .../common/features_h/Add-support-to-jxl.inc | 1 + media/BUILD.gn | 1 + media/media_options.gni | 3 + net/base/mime_util.cc | 2 + net/base/mime_util_unittest.cc | 3 + third_party/.gitignore | 1 + - third_party/blink/common/features.cc | 3 + .../blink/common/loader/network_utils.cc | 16 +- .../blink/common/mime_util/mime_util.cc | 7 + .../common/mime_util/mime_util_unittest.cc | 6 + - third_party/blink/public/common/features.h | 2 + .../devtools_protocol/browser_protocol.pdl | 1 + .../inspector/inspector_emulation_agent.cc | 7 +- .../inspector_emulation_agent_test.cc | 37 + @@ -60,8 +57,11 @@ Enabled by default third_party/libjxl/README.chromium | 15 + .../libjxl/gen_headers/jxl/jxl_export.h | 11 + tools/metrics/histograms/enums.xml | 3 +- - 55 files changed, 2005 insertions(+), 17 deletions(-) + 52 files changed, 1995 insertions(+), 17 deletions(-) create mode 100644 build/linux/unbundle/libjxl.gn + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Add-support-to-jxl.inc + create mode 100644 cromite_flags/third_party/blink/common/features_cc/Add-support-to-jxl.inc + create mode 100644 cromite_flags/third_party/blink/common/features_h/Add-support-to-jxl.inc create mode 100644 third_party/blink/renderer/platform/image-decoders/jxl/jxl_image_decoder.cc create mode 100644 third_party/blink/renderer/platform/image-decoders/jxl/jxl_image_decoder.h create mode 100644 third_party/blink/renderer/platform/image-decoders/jxl/jxl_image_decoder_test.cc @@ -203,69 +203,6 @@ diff --git a/cc/tiles/image_decode_cache.h b/cc/tiles/image_decode_cache.h case ImageType::kAVIF: return ScopedImageType::kAvif; case ImageType::kBMP: -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 -@@ -8939,6 +8939,12 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(download::features::kSmartSuggestionForLargeDownloads)}, - #endif // BUILDFLAG(IS_ANDROID) - -+#if BUILDFLAG(ENABLE_JXL_DECODER) -+ {"enable-jxl", flag_descriptions::kEnableJXLName, -+ flag_descriptions::kEnableJXLDescription, kOsAll, -+ FEATURE_VALUE_TYPE(blink::features::kJXL)}, -+#endif // BUILDFLAG(ENABLE_JXL_DECODER) -+ - #if BUILDFLAG(IS_ANDROID) - {"messages-for-android-ads-blocked", - flag_descriptions::kMessagesForAndroidAdsBlockedName, -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 -@@ -3100,6 +3100,11 @@ - // This flag is used by web developers to test upcoming javascript features. - "expiry_milestone": -1 - }, -+ { -+ "name": "enable-jxl", -+ "owners": [ "eustas@chromium.org", "firsching", "sboukortt", "veluca" ], -+ "expiry_milestone": 150 -+ }, - { - "name": "enable-keyboard-backlight-toggle", - "owners": [ "rtinkoff" ], -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 -@@ -7720,6 +7720,13 @@ const char kDcheckIsFatalDescription[] = - "rather than crashing. If enabled, DCHECKs will crash the calling process."; - #endif // BUILDFLAG(DCHECK_IS_CONFIGURABLE) - -+#if BUILDFLAG(ENABLE_JXL_DECODER) -+const char kEnableJXLName[] = "Enable JXL image format"; -+const char kEnableJXLDescription[] = -+ "Adds image decoding support for the JPEG XL image format. NOTE: JPEG XL " -+ "format will be removed in Chrome 110 release."; -+#endif // BUILDFLAG(ENABLE_JXL_DECODER) -+ - #if BUILDFLAG(ENABLE_CARDBOARD) - const char kEnableCardboardName[] = "Enable Cardboard VR WebXR Runtime"; - const char kEnableCardboardDescription[] = -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 -@@ -4462,6 +4462,11 @@ extern const char kDcheckIsFatalName[]; - extern const char kDcheckIsFatalDescription[]; - #endif // BUILDFLAG(DCHECK_IS_CONFIGURABLE) - -+#if BUILDFLAG(ENABLE_JXL_DECODER) -+extern const char kEnableJXLName[]; -+extern const char kEnableJXLDescription[]; -+#endif // BUILDFLAG(ENABLE_JXL_DECODER) -+ - #if BUILDFLAG(ENABLE_CARDBOARD) - extern const char kEnableCardboardName[]; - extern const char kEnableCardboardDescription[]; diff --git a/content/common/content_constants_internal.cc b/content/common/content_constants_internal.cc --- a/content/common/content_constants_internal.cc +++ b/content/common/content_constants_internal.cc @@ -331,6 +268,39 @@ diff --git a/content/public/browser/frame_accept_header.cc b/content/public/brow if (allow_sxg_responses && content::signed_exchange_utils::IsSignedExchangeHandlingEnabled( browser_context)) { +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Add-support-to-jxl.inc b/cromite_flags/chrome/browser/about_flags_cc/Add-support-to-jxl.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Add-support-to-jxl.inc +@@ -0,0 +1,13 @@ ++#if BUILDFLAG(ENABLE_JXL_DECODER) ++ ++#ifdef FLAG_SECTION ++ ++ {"enable-jxl", ++ "Enable JXL image format", ++ "Adds image decoding support for the JPEG XL image format. NOTE: JPEG XL " ++ "format will be removed in Chrome 110 release.", kOsAll, ++ FEATURE_VALUE_TYPE(blink::features::kJXL)}, ++ ++#endif ++ ++#endif // BUILDFLAG(ENABLE_JXL_DECODER) +diff --git a/cromite_flags/third_party/blink/common/features_cc/Add-support-to-jxl.inc b/cromite_flags/third_party/blink/common/features_cc/Add-support-to-jxl.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/third_party/blink/common/features_cc/Add-support-to-jxl.inc +@@ -0,0 +1,4 @@ ++// Enables the JPEG XL Image File Format (JXL). ++CROMITE_FEATURE(kJXL, ++ "JXL", ++ base::FEATURE_ENABLED_BY_DEFAULT); +diff --git a/cromite_flags/third_party/blink/common/features_h/Add-support-to-jxl.inc b/cromite_flags/third_party/blink/common/features_h/Add-support-to-jxl.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/third_party/blink/common/features_h/Add-support-to-jxl.inc +@@ -0,0 +1 @@ ++BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kJXL); diff --git a/media/BUILD.gn b/media/BUILD.gn --- a/media/BUILD.gn +++ b/media/BUILD.gn @@ -412,19 +382,6 @@ diff --git a/third_party/.gitignore b/third_party/.gitignore /llvm /llvm-allocated-type /llvm-bootstrap -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 -@@ -422,6 +422,9 @@ BASE_FEATURE(kCORSErrorsIssueOnly, - "CORSErrorsIssueOnly", - base::FEATURE_DISABLED_BY_DEFAULT); - -+// Enables the JPEG XL Image File Format (JXL). -+BASE_FEATURE(kJXL, "JXL", base::FEATURE_ENABLED_BY_DEFAULT); -+ - // When enabled, code cache is produced asynchronously from the script execution - // (https://crbug.com/1260908). - BASE_FEATURE(kCacheCodeOnIdle, diff --git a/third_party/blink/common/loader/network_utils.cc b/third_party/blink/common/loader/network_utils.cc --- a/third_party/blink/common/loader/network_utils.cc +++ b/third_party/blink/common/loader/network_utils.cc @@ -506,18 +463,6 @@ diff --git a/third_party/blink/common/mime_util/mime_util_unittest.cc b/third_pa EXPECT_EQ(IsSupportedImageMimeType("image/avif"), BUILDFLAG(ENABLE_AV1_DECODER)); EXPECT_FALSE(IsSupportedImageMimeType("image/lolcat")); -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 -@@ -145,6 +145,8 @@ BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kBackgroundResourceFetch); - - BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kShowAlwaysContextMenuOnLinks); - -+BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kJXL); -+ - // Used to configure a per-origin allowlist of performance.mark events that are - // permitted to be included in slow reports traces. See crbug.com/1181774. - BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kBackgroundTracingPerformanceMark); diff --git a/third_party/blink/public/devtools_protocol/browser_protocol.pdl b/third_party/blink/public/devtools_protocol/browser_protocol.pdl --- a/third_party/blink/public/devtools_protocol/browser_protocol.pdl +++ b/third_party/blink/public/devtools_protocol/browser_protocol.pdl diff --git a/build/patches/00Block-Intents-While-Locked.patch b/build/patches/00Block-Intents-While-Locked.patch index 1abf423e0..ef7c24bb3 100644 --- a/build/patches/00Block-Intents-While-Locked.patch +++ b/build/patches/00Block-Intents-While-Locked.patch @@ -4,22 +4,15 @@ Subject: Block Intents While Locked see https://source.chromium.org/chromium/chromium/src/+/c5b50f4c2d42e7b808fd3e6fb3545cdb3f4d82c9 --- - chrome/browser/flags/android/chrome_feature_list.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + .../chrome_feature_list_cc/Block-Intents-While-Locked.inc | 1 + + 1 file changed, 1 insertion(+) + create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Block-Intents-While-Locked.inc -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 -@@ -540,8 +540,8 @@ BASE_FEATURE(kBaselineGM3SurfaceColors, - base::FEATURE_ENABLED_BY_DEFAULT); - - BASE_FEATURE(kBlockIntentsWhileLocked, -- "BlockIntentsWhileLocked", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "BlockIntentsWhileLocked", // enabled -+ base::FEATURE_ENABLED_BY_DEFAULT); // by default - - BASE_FEATURE(kCacheActivityTaskID, - "CacheActivityTaskID", +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Block-Intents-While-Locked.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Block-Intents-While-Locked.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Block-Intents-While-Locked.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_ENABLED(kBlockIntentsWhileLocked); -- 2.25.1 diff --git a/build/patches/00Deprecate-Data-URL-in-SVGUseElement.patch b/build/patches/00Deprecate-Data-URL-in-SVGUseElement.patch index effbd42b9..70a4725c3 100644 --- a/build/patches/00Deprecate-Data-URL-in-SVGUseElement.patch +++ b/build/patches/00Deprecate-Data-URL-in-SVGUseElement.patch @@ -10,7 +10,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -3159,8 +3159,8 @@ +@@ -3152,8 +3152,8 @@ status: "stable", }, { diff --git a/build/patches/00Disable-BackForwardCache.patch b/build/patches/00Disable-BackForwardCache.patch index 2e55b10a6..a7084b96e 100644 --- a/build/patches/00Disable-BackForwardCache.patch +++ b/build/patches/00Disable-BackForwardCache.patch @@ -4,24 +4,15 @@ Subject: Disable BackForwardCache License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - content/public/common/content_features.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + .../common/content_features_cc/Disable-BackForwardCache.inc | 1 + + 1 file changed, 1 insertion(+) + create mode 100644 cromite_flags/content/public/common/content_features_cc/Disable-BackForwardCache.inc -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 -@@ -65,9 +65,9 @@ BASE_FEATURE(kBackgroundFetch, - base::FEATURE_ENABLED_BY_DEFAULT); - - // Enable using the BackForwardCache. --BASE_FEATURE(kBackForwardCache, -- "BackForwardCache", -- base::FEATURE_ENABLED_BY_DEFAULT); -+BASE_FEATURE(kBackForwardCache, // **** -+ "BackForwardCache", // always disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite - - // Enable showing a page preview during back/forward navigations. - BASE_FEATURE(kBackForwardTransitions, +diff --git a/cromite_flags/content/public/common/content_features_cc/Disable-BackForwardCache.inc b/cromite_flags/content/public/common/content_features_cc/Disable-BackForwardCache.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/content/public/common/content_features_cc/Disable-BackForwardCache.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_DISABLED(kBackForwardCache); -- 2.25.1 diff --git a/build/patches/00Disable-Compression-Dictionary-Transport.patch b/build/patches/00Disable-Compression-Dictionary-Transport.patch index 29bbb211c..4abcfdc02 100644 --- a/build/patches/00Disable-Compression-Dictionary-Transport.patch +++ b/build/patches/00Disable-Compression-Dictionary-Transport.patch @@ -10,7 +10,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -685,16 +685,18 @@ +@@ -678,16 +678,18 @@ status: "stable", }, { diff --git a/build/patches/00Disable-FedCm.patch b/build/patches/00Disable-FedCm.patch index 4e187831b..e618f0c61 100644 --- a/build/patches/00Disable-FedCm.patch +++ b/build/patches/00Disable-FedCm.patch @@ -4,38 +4,21 @@ Subject: Disable FedCm License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - content/public/common/content_features.cc | 6 +++--- - .../blink/renderer/platform/runtime_enabled_features.json5 | 2 +- - 2 files changed, 4 insertions(+), 4 deletions(-) + .../content/public/common/content_features_cc/Disable-FedCm.inc | 1 + + .../blink/renderer/platform/runtime_enabled_features.json5 | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + create mode 100644 cromite_flags/content/public/common/content_features_cc/Disable-FedCm.inc -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 -@@ -337,7 +337,7 @@ BASE_FEATURE(kEnableServiceWorkersForChromeScheme, - // by the flag in RuntimeEnabledFeatures on the blink side. See also - // the use of kSetOnlyIfOverridden in content/child/runtime_features.cc. - // We enable it here by default to support use in origin trials. --BASE_FEATURE(kFedCm, "FedCm", base::FEATURE_ENABLED_BY_DEFAULT); -+BASE_FEATURE(kFedCm, "FedCm", base::FEATURE_DISABLED_BY_DEFAULT); - - // Field trial boolean parameter which indicates whether FedCM IDP sign-out - // is enabled. -@@ -385,9 +385,9 @@ BASE_FEATURE(kFedCmSelectiveDisclosure, - - // Enables the IDP signin status API for use with FedCM, including avoiding - // network requests when not signed in and mismatch handling. --BASE_FEATURE(kFedCmIdpSigninStatusEnabled, // disabled -+BASE_FEATURE(kFedCmIdpSigninStatusEnabled, // enabled - "FedCmIdpSigninStatusEnabled", // by default -- base::FEATURE_DISABLED_BY_DEFAULT); // on bromite -+ base::FEATURE_ENABLED_BY_DEFAULT); // on bromite - - // Enables bypassing the well-known file enforcement. - BASE_FEATURE(kFedCmWithoutWellKnownEnforcement, +diff --git a/cromite_flags/content/public/common/content_features_cc/Disable-FedCm.inc b/cromite_flags/content/public/common/content_features_cc/Disable-FedCm.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/content/public/common/content_features_cc/Disable-FedCm.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_DISABLED(kFedCm); 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 -@@ -1603,7 +1603,7 @@ +@@ -1596,7 +1596,7 @@ { name: "FedCm", public: true, diff --git a/build/patches/00Disable-FirstPartySets-and-StorageAccessAPI.patch b/build/patches/00Disable-FirstPartySets-and-StorageAccessAPI.patch index 5da4cc25a..a8209127c 100644 --- a/build/patches/00Disable-FirstPartySets-and-StorageAccessAPI.patch +++ b/build/patches/00Disable-FirstPartySets-and-StorageAccessAPI.patch @@ -4,10 +4,11 @@ Subject: Disable FirstPartySets and StorageAccessAPI License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - components/privacy_sandbox/privacy_sandbox_prefs.cc | 2 +- - components/privacy_sandbox/tracking_protection_prefs.cc | 4 ++-- - content/public/common/content_features.cc | 6 +++--- - 3 files changed, 6 insertions(+), 6 deletions(-) + components/privacy_sandbox/privacy_sandbox_prefs.cc | 2 +- + components/privacy_sandbox/tracking_protection_prefs.cc | 4 ++-- + .../Disable-FirstPartySets-and-StorageAccessAPI.inc | 1 + + 3 files changed, 4 insertions(+), 3 deletions(-) + create mode 100644 cromite_flags/content/public/common/content_features_cc/Disable-FirstPartySets-and-StorageAccessAPI.inc diff --git a/components/privacy_sandbox/privacy_sandbox_prefs.cc b/components/privacy_sandbox/privacy_sandbox_prefs.cc --- a/components/privacy_sandbox/privacy_sandbox_prefs.cc @@ -40,21 +41,11 @@ diff --git a/components/privacy_sandbox/tracking_protection_prefs.cc b/component registry->RegisterBooleanPref( prefs::kEnableDoNotTrack, false, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); -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 -@@ -405,9 +405,9 @@ BASE_FEATURE(kWebIdentityMDocs, - base::FEATURE_DISABLED_BY_DEFAULT); - - // Enables usage of First Party Sets to determine cookie availability. --BASE_FEATURE(kFirstPartySets, -- "FirstPartySets", -- base::FEATURE_ENABLED_BY_DEFAULT); -+BASE_FEATURE(kFirstPartySets, // always -+ "FirstPartySets", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite - - // Controls whether to clear sites data on FPS transitions. - const base::FeatureParam kFirstPartySetsClearSiteDataOnChangedSets{ +diff --git a/cromite_flags/content/public/common/content_features_cc/Disable-FirstPartySets-and-StorageAccessAPI.inc b/cromite_flags/content/public/common/content_features_cc/Disable-FirstPartySets-and-StorageAccessAPI.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/content/public/common/content_features_cc/Disable-FirstPartySets-and-StorageAccessAPI.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_DISABLED(kFirstPartySets); -- 2.25.1 diff --git a/build/patches/00Disable-GSA-by-default.patch b/build/patches/00Disable-GSA-by-default.patch index 2e47db49c..2af3d118b 100644 --- a/build/patches/00Disable-GSA-by-default.patch +++ b/build/patches/00Disable-GSA-by-default.patch @@ -6,9 +6,10 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- .../org/chromium/chrome/browser/IntentHandler.java | 5 ----- .../org/chromium/chrome/browser/share/LensUtils.java | 12 +----------- - chrome/browser/flags/android/chrome_feature_list.cc | 8 ++++---- .../org/chromium/chrome/browser/gsa/GSAState.java | 11 +++++------ - 4 files changed, 10 insertions(+), 26 deletions(-) + .../Disable-GSA-by-default.inc | 2 ++ + 4 files changed, 8 insertions(+), 22 deletions(-) + create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Disable-GSA-by-default.inc diff --git a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java --- a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java @@ -76,31 +77,6 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/share/LensUtils } public static boolean isGoogleLensFeatureEnabled(boolean isIncognito) { -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 -@@ -725,8 +725,8 @@ BASE_FEATURE(kContextMenuGoogleLensSearchOptimizations, - base::FEATURE_DISABLED_BY_DEFAULT); - - BASE_FEATURE(kContextMenuSearchWithGoogleLens, -- "ContextMenuSearchWithGoogleLens", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "ContextMenuSearchWithGoogleLens", // always disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite - - BASE_FEATURE(kContextMenuShopWithGoogleLens, - "ContextMenuShopWithGoogleLens", -@@ -827,8 +827,8 @@ BASE_FEATURE(kOfflineIndicatorV2, - base::FEATURE_ENABLED_BY_DEFAULT); - - BASE_FEATURE(kExperimentsForAgsa, -- "ExperimentsForAgsa", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "ExperimentsForAgsa", // disabled by default -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - - BASE_FEATURE(kExploreSites, "ExploreSites", base::FEATURE_DISABLED_BY_DEFAULT); - diff --git a/chrome/browser/gsa/java/src/org/chromium/chrome/browser/gsa/GSAState.java b/chrome/browser/gsa/java/src/org/chromium/chrome/browser/gsa/GSAState.java --- a/chrome/browser/gsa/java/src/org/chromium/chrome/browser/gsa/GSAState.java +++ b/chrome/browser/gsa/java/src/org/chromium/chrome/browser/gsa/GSAState.java @@ -157,5 +133,12 @@ diff --git a/chrome/browser/gsa/java/src/org/chromium/chrome/browser/gsa/GSAStat return packageInfo == null ? null : packageInfo.versionName; } +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Disable-GSA-by-default.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Disable-GSA-by-default.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Disable-GSA-by-default.inc +@@ -0,0 +1,2 @@ ++SET_CROMITE_FEATURE_DISABLED(kContextMenuSearchWithGoogleLens); ++SET_CROMITE_FEATURE_DISABLED(kExperimentsForAgsa); -- 2.25.1 diff --git a/build/patches/00Disable-GetInstalledRelatedApps-API.patch b/build/patches/00Disable-GetInstalledRelatedApps-API.patch index 1d4fe0b82..f1399efa4 100644 --- a/build/patches/00Disable-GetInstalledRelatedApps-API.patch +++ b/build/patches/00Disable-GetInstalledRelatedApps-API.patch @@ -4,11 +4,12 @@ Subject: Disable GetInstalledRelatedApps API License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - .../components/installedapp/InstalledAppProviderImpl.java | 1 + - .../browser/installedapp/installed_app_provider_impl_win.cc | 1 + - content/public/common/content_features.cc | 4 ++-- - .../blink/renderer/platform/runtime_enabled_features.json5 | 2 +- - 4 files changed, 5 insertions(+), 3 deletions(-) + .../components/installedapp/InstalledAppProviderImpl.java | 1 + + content/browser/installedapp/installed_app_provider_impl_win.cc | 1 + + .../content_features_cc/Disable-GetInstalledRelatedApps-API.inc | 2 ++ + .../blink/renderer/platform/runtime_enabled_features.json5 | 2 +- + 4 files changed, 5 insertions(+), 1 deletion(-) + create mode 100644 cromite_flags/content/public/common/content_features_cc/Disable-GetInstalledRelatedApps-API.inc diff --git a/components/installedapp/android/java/src/org/chromium/components/installedapp/InstalledAppProviderImpl.java b/components/installedapp/android/java/src/org/chromium/components/installedapp/InstalledAppProviderImpl.java --- a/components/installedapp/android/java/src/org/chromium/components/installedapp/InstalledAppProviderImpl.java @@ -32,28 +33,17 @@ diff --git a/content/browser/installedapp/installed_app_provider_impl_win.cc b/c ComPtr launcher_statics; HRESULT hr = base::win::RoActivateInstance( base::win::ScopedHString::Create(RuntimeClass_Windows_System_Launcher) -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 -@@ -451,12 +451,12 @@ BASE_FEATURE(kGreaseUACH, "GreaseUACH", base::FEATURE_ENABLED_BY_DEFAULT); - BASE_FEATURE(kIdleDetection, "IdleDetection", base::FEATURE_DISABLED_BY_DEFAULT); - - // Kill switch for the GetInstalledRelatedApps API. --BASE_FEATURE(kInstalledApp, "InstalledApp", base::FEATURE_ENABLED_BY_DEFAULT); -+BASE_FEATURE(kInstalledApp, "InstalledApp", base::FEATURE_DISABLED_BY_DEFAULT); - - // Allow Windows specific implementation for the GetInstalledRelatedApps API. - BASE_FEATURE(kInstalledAppProvider, - "InstalledAppProvider", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ base::FEATURE_DISABLED_BY_DEFAULT); - - // Enable support for isolated web apps. This will guard features like serving - // isolated web apps via the isolated-app:// scheme, and other advanced isolated +diff --git a/cromite_flags/content/public/common/content_features_cc/Disable-GetInstalledRelatedApps-API.inc b/cromite_flags/content/public/common/content_features_cc/Disable-GetInstalledRelatedApps-API.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/content/public/common/content_features_cc/Disable-GetInstalledRelatedApps-API.inc +@@ -0,0 +1,2 @@ ++SET_CROMITE_FEATURE_DISABLED(kInstalledApp); ++SET_CROMITE_FEATURE_DISABLED(kInstalledAppProvider); 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 -@@ -2139,9 +2139,9 @@ +@@ -2132,9 +2132,9 @@ status: {"Android": "test", "default": "stable"}, }, { diff --git a/build/patches/00Disable-PrivateStateTokens-API.patch b/build/patches/00Disable-PrivateStateTokens-API.patch index e99f6972f..ab61971c5 100644 --- a/build/patches/00Disable-PrivateStateTokens-API.patch +++ b/build/patches/00Disable-PrivateStateTokens-API.patch @@ -4,27 +4,16 @@ Subject: Disable PrivateStateTokens API License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - services/network/public/cpp/features.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + .../public/cpp/features_cc/Disable-PrivateStateTokens-API.inc | 2 ++ + 1 file changed, 2 insertions(+) + create mode 100644 cromite_flags/services/network/public/cpp/features_cc/Disable-PrivateStateTokens-API.inc -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 -@@ -168,12 +168,12 @@ BASE_FEATURE(kAttributionReportingCrossAppWeb, // in bromite - // set, and handling their responses, according to the protocol. - // (See https://github.com/WICG/trust-token-api.) - BASE_FEATURE(kPrivateStateTokens, -- "PrivateStateTokens", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "PrivateStateTokens", // must be disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite - - // Secondary flag used by the FLEDGE ads experiment in the interim before - // PSTs are fully rolled out to stable. --BASE_FEATURE(kFledgePst, "TrustTokens", base::FEATURE_ENABLED_BY_DEFAULT); -+BASE_FEATURE(kFledgePst, "TrustTokens", base::FEATURE_DISABLED_BY_DEFAULT); // must be disabled - - // Determines which Trust Tokens operations require the TrustTokens origin trial - // active in order to be used. This is runtime-configurable so that the Trust +diff --git a/cromite_flags/services/network/public/cpp/features_cc/Disable-PrivateStateTokens-API.inc b/cromite_flags/services/network/public/cpp/features_cc/Disable-PrivateStateTokens-API.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/services/network/public/cpp/features_cc/Disable-PrivateStateTokens-API.inc +@@ -0,0 +1,2 @@ ++SET_CROMITE_FEATURE_DISABLED(kPrivateStateTokens); ++SET_CROMITE_FEATURE_DISABLED(kFledgePst); -- 2.25.1 diff --git a/build/patches/00Disable-SHA1-Server-Signature.patch b/build/patches/00Disable-SHA1-Server-Signature.patch index c2d4318df..0974b2dbb 100644 --- a/build/patches/00Disable-SHA1-Server-Signature.patch +++ b/build/patches/00Disable-SHA1-Server-Signature.patch @@ -4,22 +4,15 @@ Subject: Disable SHA1 Server Signature License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - net/base/features.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + .../net/base/features_cc/Disable-SHA1-Server-Signature.inc | 1 + + 1 file changed, 1 insertion(+) + create mode 100644 cromite_flags/net/base/features_cc/Disable-SHA1-Server-Signature.inc -diff --git a/net/base/features.cc b/net/base/features.cc ---- a/net/base/features.cc -+++ b/net/base/features.cc -@@ -88,8 +88,8 @@ BASE_FEATURE(kUseAlternativePortForGloballyReachableCheck, - base::FEATURE_DISABLED_BY_DEFAULT); - - BASE_FEATURE(kSHA1ServerSignature, -- "SHA1ServerSignature", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "SHA1ServerSignature", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite - - BASE_FEATURE(kEnableTLS13EarlyData, - "EnableTLS13EarlyData", +diff --git a/cromite_flags/net/base/features_cc/Disable-SHA1-Server-Signature.inc b/cromite_flags/net/base/features_cc/Disable-SHA1-Server-Signature.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/net/base/features_cc/Disable-SHA1-Server-Signature.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_DISABLED(kSHA1ServerSignature); -- 2.25.1 diff --git a/build/patches/00Disable-prefers-reduced-transparency-media-query.patch b/build/patches/00Disable-prefers-reduced-transparency-media-query.patch index dbb1ecca6..3e82a9de3 100644 --- a/build/patches/00Disable-prefers-reduced-transparency-media-query.patch +++ b/build/patches/00Disable-prefers-reduced-transparency-media-query.patch @@ -10,7 +10,7 @@ This feature can be used for fingerprinting as it exposes a user preference 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 -@@ -3003,8 +3003,8 @@ +@@ -2996,8 +2996,8 @@ base_feature: "none", }, { diff --git a/build/patches/00Disable-privacy-issues-in-password-manager.patch b/build/patches/00Disable-privacy-issues-in-password-manager.patch index b4aa4303f..5f52c5384 100644 --- a/build/patches/00Disable-privacy-issues-in-password-manager.patch +++ b/build/patches/00Disable-privacy-issues-in-password-manager.patch @@ -9,10 +9,10 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../affiliation/affiliation_backend.cc | 1 + .../affiliation/affiliation_service_impl.cc | 4 ++++ .../core/browser/affiliation/facet_manager.cc | 23 +++---------------- - .../browser/features/password_features.cc | 12 +++++----- + .../browser/features/password_features.cc | 4 ++++ .../leak_detection_check_factory_impl.cc | 5 ++++ .../leak_detection_check_impl.cc | 4 +--- - 8 files changed, 21 insertions(+), 40 deletions(-) + 8 files changed, 19 insertions(+), 34 deletions(-) diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml --- a/chrome/android/java/AndroidManifest.xml @@ -114,36 +114,15 @@ diff --git a/components/password_manager/core/browser/affiliation/facet_manager. 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 -@@ -61,8 +61,8 @@ BASE_FEATURE(kFillingAcrossGroupedSites, - // Enables the experiment for the password manager to only fill on account - // selection, rather than autofilling on page load, with highlighting of fields. - BASE_FEATURE(kFillOnAccountSelect, -- "fill-on-account-select", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "fill-on-account-select", // always enabled -+ base::FEATURE_ENABLED_BY_DEFAULT); // by default +@@ -120,4 +120,8 @@ BASE_FEATURE(kUseExtensionListForPSLMatching, + base::FEATURE_ENABLED_BY_DEFAULT); + #endif - #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS) - // Enables new confirmation bubble flow if generated password was used in a -@@ -88,14 +88,14 @@ BASE_FEATURE(kSharedPasswordNotificationUI, - // Enables password receiving service including incoming password sharing - // invitation sync data type. - BASE_FEATURE(kPasswordManagerEnableReceiverService, -- "PasswordManagerEnableReceiverService", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "PasswordManagerEnableReceiverService", // must disable -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - - // Enables password sender service including outgoing password sharing - // invitation sync data type. - BASE_FEATURE(kPasswordManagerEnableSenderService, -- "PasswordManagerEnableSenderService", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "PasswordManagerEnableSenderService", // must disable -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - - // Enables logging the content of chrome://password-manager-internals to the - // terminal. ++SET_CROMITE_FEATURE_ENABLED(kFillOnAccountSelect); ++SET_CROMITE_FEATURE_DISABLED(kPasswordManagerEnableReceiverService); ++SET_CROMITE_FEATURE_DISABLED(kPasswordManagerEnableSenderService); ++ + } // namespace password_manager::features diff --git a/components/password_manager/core/browser/leak_detection/leak_detection_check_factory_impl.cc b/components/password_manager/core/browser/leak_detection/leak_detection_check_factory_impl.cc --- a/components/password_manager/core/browser/leak_detection/leak_detection_check_factory_impl.cc +++ b/components/password_manager/core/browser/leak_detection/leak_detection_check_factory_impl.cc diff --git a/build/patches/00Disable-ranker-url-fetcher.patch b/build/patches/00Disable-ranker-url-fetcher.patch index 15f28e22d..764fc16b1 100644 --- a/build/patches/00Disable-ranker-url-fetcher.patch +++ b/build/patches/00Disable-ranker-url-fetcher.patch @@ -4,28 +4,12 @@ Subject: Disable ranker_url_fetcher License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - .../translate/core/browser/translate_ranker_impl.cc | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) + components/translate/core/browser/translate_ranker_impl.cc | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/translate/core/browser/translate_ranker_impl.cc b/components/translate/core/browser/translate_ranker_impl.cc --- a/components/translate/core/browser/translate_ranker_impl.cc +++ b/components/translate/core/browser/translate_ranker_impl.cc -@@ -94,11 +94,11 @@ const char kDefaultTranslateRankerModelURL[] = - #endif - - BASE_FEATURE(kTranslateRankerQuery, -- "TranslateRankerQuery", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "TranslateRankerQuery", // disable -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - BASE_FEATURE(kTranslateRankerEnforcement, -- "TranslateRankerEnforcement", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "TranslateRankerEnforcement", // disable -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - - BASE_FEATURE(kTranslateRankerPreviousLanguageMatchesOverride, - "TranslateRankerPreviousLanguageMatchesOverride", @@ -234,7 +234,7 @@ bool TranslateRankerImpl::ShouldOfferTranslation( // absence of a model or if enforcement is disabled. As this is ranker is // subsumed into a more general assist ranker, this default will go away @@ -35,5 +19,14 @@ diff --git a/components/translate/core/browser/translate_ranker_impl.cc b/compon translate_event->set_ranker_request_timestamp_sec( (base::TimeTicks::Now() - base::TimeTicks()).InSeconds()); +@@ -389,6 +389,8 @@ bool TranslateRankerImpl::ShouldOverrideMatchesPreviousLanguageDecision( + } + } + ++SET_CROMITE_FEATURE_DISABLED(kTranslateRankerQuery); ++SET_CROMITE_FEATURE_DISABLED(kTranslateRankerEnforcement); + } // namespace translate + + std::ostream& operator<<(std::ostream& stream, -- 2.25.1 diff --git a/build/patches/00Disable-speechSynthesis-getVoices-API.patch b/build/patches/00Disable-speechSynthesis-getVoices-API.patch index a7f986f67..7dee07d92 100644 --- a/build/patches/00Disable-speechSynthesis-getVoices-API.patch +++ b/build/patches/00Disable-speechSynthesis-getVoices-API.patch @@ -11,32 +11,21 @@ Require: Timezone-customization.patch License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - chrome/browser/about_flags.cc | 5 +++++ .../renderer/chrome_content_renderer_client.cc | 2 +- .../renderer/content_settings_agent_impl.cc | 9 ++++++++- .../renderer/content_settings_agent_impl.h | 2 ++ - media/base/media_switches.cc | 8 ++++---- - third_party/blink/common/features.cc | 4 ++++ - third_party/blink/public/common/features.h | 2 ++ + .../Disable-speechSynthesis-getVoices-API.inc | 8 ++++++++ + .../Disable-speechSynthesis-getVoices-API.inc | 2 ++ + .../Disable-speechSynthesis-getVoices-API.inc | 3 +++ + .../Disable-speechSynthesis-getVoices-API.inc | 1 + .../platform/web_content_settings_client.h | 2 ++ .../renderer/modules/speech/speech_synthesis.cc | 17 ++++++++++++++--- - 9 files changed, 42 insertions(+), 9 deletions(-) + 9 files changed, 41 insertions(+), 5 deletions(-) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Disable-speechSynthesis-getVoices-API.inc + create mode 100644 cromite_flags/media/base/media_switches_cc/Disable-speechSynthesis-getVoices-API.inc + create mode 100644 cromite_flags/third_party/blink/common/features_cc/Disable-speechSynthesis-getVoices-API.inc + create mode 100644 cromite_flags/third_party/blink/common/features_h/Disable-speechSynthesis-getVoices-API.inc -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 -@@ -7965,6 +7965,11 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kFileSystemObserverDescription, kOsAll, - FEATURE_VALUE_TYPE(blink::features::kFileSystemObserver)}, - -+ {"disable-speechsynthesis-voice-list", -+ "Disable speechSynthesis.getVoices()", -+ "Disables access to the list of items installed on the device", kOsAll, -+ FEATURE_VALUE_TYPE(blink::features::kDisableSpeechSynthesisVoiceList)}, -+ - {"strict-origin-isolation", flag_descriptions::kStrictOriginIsolationName, - flag_descriptions::kStrictOriginIsolationDescription, kOsAll, - FEATURE_VALUE_TYPE(features::kStrictOriginIsolation)}, 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 @@ -87,57 +76,40 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.h protected: // Allow this to be overridden by tests. virtual void BindContentSettingsManager( -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 -@@ -919,7 +919,7 @@ const base::FeatureParam kMediaFoundationClearKeyCdmPathForTesting{ - #endif // BUILDFLAG(IS_WIN) - - // Enables the Live Caption feature on supported devices. --BASE_FEATURE(kLiveCaption, "LiveCaption", base::FEATURE_ENABLED_BY_DEFAULT); -+BASE_FEATURE(kLiveCaption, "LiveCaption", base::FEATURE_DISABLED_BY_DEFAULT); - - // Controls whether a "Share this tab instead" button should be shown for - // getDisplayMedia captures. Note: This flag does not control if the "Share this -@@ -978,9 +978,9 @@ BASE_FEATURE(kLiveCaptionRightClick, - base::FEATURE_DISABLED_BY_DEFAULT); - - // Enable or disable Live Caption support for WebAudio. --BASE_FEATURE(kLiveCaptionWebAudio, -- "LiveCaptionWebAudio", -- base::FEATURE_ENABLED_BY_DEFAULT); -+BASE_FEATURE(kLiveCaptionWebAudio, // disabled by -+ "LiveCaptionWebAudio", // default -+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite - - // Live Caption runs system-wide on ChromeOS, as opposed to just in the browser. - BASE_FEATURE(kLiveCaptionSystemWideOnChromeOS, -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 -@@ -653,6 +653,10 @@ BASE_FEATURE(kDirectCompositorThreadIpc, - "DirectCompositorThreadIpc", - base::FEATURE_DISABLED_BY_DEFAULT); - -+BASE_FEATURE(kDisableSpeechSynthesisVoiceList, -+ "DisableSpeechSynthesisVoiceList", -+ base::FEATURE_ENABLED_BY_DEFAULT); +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Disable-speechSynthesis-getVoices-API.inc b/cromite_flags/chrome/browser/about_flags_cc/Disable-speechSynthesis-getVoices-API.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Disable-speechSynthesis-getVoices-API.inc +@@ -0,0 +1,8 @@ ++#ifdef FLAG_SECTION + - BASE_FEATURE(kDisableArrayBufferSizeLimitsForTesting, - "DisableArrayBufferSizeLimitsForTesting", - base::FEATURE_DISABLED_BY_DEFAULT); -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 -@@ -330,6 +330,8 @@ extern const base::FeatureParam kCostReductionOfMultiplexedRequests; - // hopping through the IO thread first. - BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kDirectCompositorThreadIpc); - -+BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kDisableSpeechSynthesisVoiceList); ++ {"disable-speechsynthesis-voice-list", ++ "Disable speechSynthesis.getVoices()", ++ "Disables access to the list of items installed on the device", kOsAll, ++ FEATURE_VALUE_TYPE(blink::features::kDisableSpeechSynthesisVoiceList)}, + - // TODO(https://crbug.com/1201109): temporary flag to disable new ArrayBuffer - // size limits, so that tests can be written against code receiving these - // buffers. Remove when the bindings code instituting these limits is removed. ++#endif +diff --git a/cromite_flags/media/base/media_switches_cc/Disable-speechSynthesis-getVoices-API.inc b/cromite_flags/media/base/media_switches_cc/Disable-speechSynthesis-getVoices-API.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/media/base/media_switches_cc/Disable-speechSynthesis-getVoices-API.inc +@@ -0,0 +1,2 @@ ++SET_CROMITE_FEATURE_DISABLED(kLiveCaption); ++SET_CROMITE_FEATURE_DISABLED(kLiveCaptionWebAudio); +diff --git a/cromite_flags/third_party/blink/common/features_cc/Disable-speechSynthesis-getVoices-API.inc b/cromite_flags/third_party/blink/common/features_cc/Disable-speechSynthesis-getVoices-API.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/third_party/blink/common/features_cc/Disable-speechSynthesis-getVoices-API.inc +@@ -0,0 +1,3 @@ ++CROMITE_FEATURE(kDisableSpeechSynthesisVoiceList, ++ "DisableSpeechSynthesisVoiceList", ++ base::FEATURE_ENABLED_BY_DEFAULT); +diff --git a/cromite_flags/third_party/blink/common/features_h/Disable-speechSynthesis-getVoices-API.inc b/cromite_flags/third_party/blink/common/features_h/Disable-speechSynthesis-getVoices-API.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/third_party/blink/common/features_h/Disable-speechSynthesis-getVoices-API.inc +@@ -0,0 +1 @@ ++BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kDisableSpeechSynthesisVoiceList); 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 diff --git a/build/patches/00Enable-Document-Open-Inheritance-Removal.patch b/build/patches/00Enable-Document-Open-Inheritance-Removal.patch index c480385b8..721d5620c 100644 --- a/build/patches/00Enable-Document-Open-Inheritance-Removal.patch +++ b/build/patches/00Enable-Document-Open-Inheritance-Removal.patch @@ -85,7 +85,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -1441,7 +1441,6 @@ +@@ -1434,7 +1434,6 @@ { name: "DocumentOpenSandboxInheritanceRemoval", status: "stable", diff --git a/build/patches/00Enable-ImprovedBookmarks-by-default.patch b/build/patches/00Enable-ImprovedBookmarks-by-default.patch index d1633a0fc..c9fadacf5 100644 --- a/build/patches/00Enable-ImprovedBookmarks-by-default.patch +++ b/build/patches/00Enable-ImprovedBookmarks-by-default.patch @@ -9,8 +9,9 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../browser/bookmarks/BookmarkSearchBoxRowViewBinder.java | 2 ++ .../chromium/chrome/browser/bookmarks/BookmarkUiPrefs.java | 2 +- .../org/chromium/chrome/browser/bookmarks/BookmarkUtils.java | 3 ++- - chrome/browser/flags/android/chrome_feature_list.cc | 2 +- - 6 files changed, 9 insertions(+), 6 deletions(-) + .../Enable-ImprovedBookmarks-by-default.inc | 1 + + 6 files changed, 9 insertions(+), 5 deletions(-) + create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Enable-ImprovedBookmarks-by-default.inc 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 @@ -89,17 +90,11 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm showBookmarkManagerOnTablet(context, activity == null ? null : activity.getComponentName(), url, isIncognito); } else { -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 -@@ -509,7 +509,7 @@ BASE_FEATURE(kAndroidSearchEngineChoiceNotification, - - BASE_FEATURE(kAndroidImprovedBookmarks, - "AndroidImprovedBookmarks", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ base::FEATURE_ENABLED_BY_DEFAULT); - - BASE_FEATURE(kAndroidNoVisibleHintForTablets, - "AndroidNoVisibleHintForTablets", +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); -- 2.25.1 diff --git a/build/patches/00Evict-the-entire-FrameTree-like-desktop.patch b/build/patches/00Evict-the-entire-FrameTree-like-desktop.patch index 4c5893b55..067d6e72e 100644 --- a/build/patches/00Evict-the-entire-FrameTree-like-desktop.patch +++ b/build/patches/00Evict-the-entire-FrameTree-like-desktop.patch @@ -4,9 +4,10 @@ Subject: Evict the entire FrameTree like desktop License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - components/viz/common/features.cc | 2 +- - content/common/features.cc | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) + components/viz/common/features.cc | 2 +- + .../features_cc/Evict-the-entire-FrameTree-like-desktop.inc | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + create mode 100644 cromite_flags/content/common/features_cc/Evict-the-entire-FrameTree-like-desktop.inc diff --git a/components/viz/common/features.cc b/components/viz/common/features.cc --- a/components/viz/common/features.cc @@ -20,19 +21,11 @@ diff --git a/components/viz/common/features.cc b/components/viz/common/features. // If enabled, CompositorFrameSinkClient::OnBeginFrame is also treated as the // DidReceiveCompositorFrameAck. Both in providing the Ack for the previous -diff --git a/content/common/features.cc b/content/common/features.cc ---- a/content/common/features.cc -+++ b/content/common/features.cc -@@ -241,8 +241,8 @@ BASE_FEATURE(kInMemoryCodeCache, - // frames. Otherwise only toplevel frames and OOPIF are handled, and other - // cases, e.g. PDF tiles are ignored. See https://crbug.com/1360351 for details. - BASE_FEATURE(kInnerFrameCompositorSurfaceEviction, -- "InnerFrameCompositorSurfaceEviction", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "InnerFrameCompositorSurfaceEviction", // guard this -+ base::FEATURE_ENABLED_BY_DEFAULT); // guard this - - // Enable IOSurface based screen capturer. - #if BUILDFLAG(IS_MAC) +diff --git a/cromite_flags/content/common/features_cc/Evict-the-entire-FrameTree-like-desktop.inc b/cromite_flags/content/common/features_cc/Evict-the-entire-FrameTree-like-desktop.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/content/common/features_cc/Evict-the-entire-FrameTree-like-desktop.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_ENABLED(kInnerFrameCompositorSurfaceEviction); -- 2.25.1 diff --git a/build/patches/00Fonts-fingerprinting-mitigation.patch b/build/patches/00Fonts-fingerprinting-mitigation.patch index 033672e6c..4167379eb 100644 --- a/build/patches/00Fonts-fingerprinting-mitigation.patch +++ b/build/patches/00Fonts-fingerprinting-mitigation.patch @@ -15,90 +15,53 @@ fonts-fingerprint-mitigation flag, which is active by default. License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - chrome/browser/about_flags.cc | 5 + - chrome/browser/flag_descriptions.cc | 5 + - chrome/browser/flag_descriptions.h | 3 + - content/common/features.cc | 8 +- + .../Fonts-fingerprinting-mitigation.inc | 8 + + .../Fonts-fingerprinting-mitigation.inc | 2 + + .../Fonts-fingerprinting-mitigation.inc | 5 + skia/ext/skia_utils_win.cc | 20 ++ skia/ext/skia_utils_win.h | 3 + - third_party/blink/common/features.cc | 6 +- third_party/blink/public/common/features.h | 3 + third_party/blink/renderer/platform/BUILD.gn | 1 + .../renderer/platform/fonts/font_cache.h | 2 +- .../fonts/skia/bromite_allowed_fonts.h | 270 ++++++++++++++++++ .../platform/fonts/skia/font_cache_skia.cc | 44 ++- .../platform/fonts/win/font_cache_skia_win.cc | 7 +- - 13 files changed, 363 insertions(+), 14 deletions(-) + 11 files changed, 356 insertions(+), 9 deletions(-) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Fonts-fingerprinting-mitigation.inc + create mode 100644 cromite_flags/content/common/features_cc/Fonts-fingerprinting-mitigation.inc + create mode 100644 cromite_flags/third_party/blink/common/features_cc/Fonts-fingerprinting-mitigation.inc create mode 100644 third_party/blink/renderer/platform/fonts/skia/bromite_allowed_fonts.h -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 -@@ -10429,6 +10429,11 @@ const FeatureEntry kFeatureEntries[] = { - kClipboardMaximumAgeVariations, - "ClipboardMaximumAge")}, - +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Fonts-fingerprinting-mitigation.inc b/cromite_flags/chrome/browser/about_flags_cc/Fonts-fingerprinting-mitigation.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Fonts-fingerprinting-mitigation.inc +@@ -0,0 +1,8 @@ ++#ifdef FLAG_SECTION ++ + {"fonts-fingerprint-mitigation", -+ flag_descriptions::kFontsFingerprintMitigationName, -+ flag_descriptions::kFontsFingerprintMitigationDescription, kOsAll, ++ "Enable fonts fingerprint mitigation", ++ "Filters the list of fonts allowing only standard ones to be used.", kOsAll, + FEATURE_VALUE_TYPE(blink::features::kFontsFingerprintMitigation)}, + - #if BUILDFLAG(IS_CHROMEOS_ASH) - {"enable-media-dynamic-cgroup", flag_descriptions::kMediaDynamicCgroupName, - flag_descriptions::kMediaDynamicCgroupDescription, kOsCrOS, -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 -@@ -159,6 +159,11 @@ const char kClipboardUnsanitizedContentDescription[] = - "Allows reading/writing unsanitized content from/to the clipboard. " - "Currently, it is only applicable to HTML format. See crbug.com/1268679."; - -+const char kFontsFingerprintMitigationName[] = -+ "Enable fonts fingerprint mitigation"; -+const char kFontsFingerprintMitigationDescription[] = -+ "Filters the list of fonts allowing only standard ones to be used."; -+ - const char kChromeRootStoreEnabledName[] = "Chrome Root Store"; - const char kChromeRootStoreEnabledDescription[] = - "Enable use of Chrome Root Store over platform roots. " -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 -@@ -131,6 +131,9 @@ extern const char kClickToCallDescription[]; - extern const char kClipboardUnsanitizedContentName[]; - extern const char kClipboardUnsanitizedContentDescription[]; - -+extern const char kFontsFingerprintMitigationName[]; -+extern const char kFontsFingerprintMitigationDescription[]; ++#endif +diff --git a/cromite_flags/content/common/features_cc/Fonts-fingerprinting-mitigation.inc b/cromite_flags/content/common/features_cc/Fonts-fingerprinting-mitigation.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/content/common/features_cc/Fonts-fingerprinting-mitigation.inc +@@ -0,0 +1,2 @@ ++SET_CROMITE_FEATURE_DISABLED(kAndroidDownloadableFontsMatching); ++SET_CROMITE_FEATURE_DISABLED(kFontSrcLocalMatching); +diff --git a/cromite_flags/third_party/blink/common/features_cc/Fonts-fingerprinting-mitigation.inc b/cromite_flags/third_party/blink/common/features_cc/Fonts-fingerprinting-mitigation.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/third_party/blink/common/features_cc/Fonts-fingerprinting-mitigation.inc +@@ -0,0 +1,5 @@ ++SET_CROMITE_FEATURE_DISABLED(kGMSCoreEmoji); + - extern const char kClipboardMaximumAgeName[]; - extern const char kClipboardMaximumAgeDescription[]; - -diff --git a/content/common/features.cc b/content/common/features.cc ---- a/content/common/features.cc -+++ b/content/common/features.cc -@@ -21,8 +21,8 @@ BASE_FEATURE(kAllowContentInitiatedDataUrlNavigations, - // Allows Blink to request fonts from the Android Downloadable Fonts API through - // the service implemented on the Java side. - BASE_FEATURE(kAndroidDownloadableFontsMatching, -- "AndroidDownloadableFontsMatching", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "AndroidDownloadableFontsMatching", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - - // The following two features, when enabled, result in the browser process only - // asking the renderer process to run beforeunload handlers if it knows such -@@ -195,8 +195,8 @@ const base::FeatureParam kFledgeLimitNumAuctionsParam{ - // font name or postscript name. Rolling out behind a flag, as enabling this - // enables a font indexer on Android which we need to test in the field first. - BASE_FEATURE(kFontSrcLocalMatching, -- "FontSrcLocalMatching", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "FontSrcLocalMatching", // disable -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - - // Feature controlling whether or not memory pressure signals will be forwarded - // to the GPU process. ++CROMITE_FEATURE(kFontsFingerprintMitigation, ++ "FontsFingerprintMitigation", ++ base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/skia/ext/skia_utils_win.cc b/skia/ext/skia_utils_win.cc --- a/skia/ext/skia_utils_win.cc +++ b/skia/ext/skia_utils_win.cc @@ -149,33 +112,10 @@ diff --git a/skia/ext/skia_utils_win.h b/skia/ext/skia_utils_win.h // Creates an HBITMAP backed by 32-bits-per-pixel RGB data (the high bits are // unused in each pixel). SK_API base::win::ScopedBitmap CreateHBitmapXRGB8888( -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 -@@ -923,7 +923,7 @@ BASE_FEATURE(kFrequencyCappingForOverlayPopupDetection, - "FrequencyCappingForOverlayPopupDetection", - base::FEATURE_ENABLED_BY_DEFAULT); - --BASE_FEATURE(kGMSCoreEmoji, "GMSCoreEmoji", base::FEATURE_ENABLED_BY_DEFAULT); -+BASE_FEATURE(kGMSCoreEmoji, "GMSCoreEmoji", base::FEATURE_DISABLED_BY_DEFAULT); - - BASE_FEATURE(kGainmapHdrImages, - "GainmapHdrImages", -@@ -2036,6 +2036,10 @@ BASE_FEATURE(kWebRtcH264WithOpenH264FFmpeg, - base::FEATURE_ENABLED_BY_DEFAULT); - #endif // BUILDFLAG(RTC_USE_H264) && BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS) - -+BASE_FEATURE(kFontsFingerprintMitigation, -+ "FontsFingerprintMitigation", -+ base::FEATURE_ENABLED_BY_DEFAULT); -+ - // Exposes non-standard stats in the WebRTC getStats() API. - BASE_FEATURE(kWebRtcExposeNonStandardStats, - "WebRtc-ExposeNonStandardStats", 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 -@@ -249,6 +249,9 @@ BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kCompressParkableStrings); +@@ -247,6 +247,9 @@ BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kCompressParkableStrings); BLINK_COMMON_EXPORT extern const base::FeatureParam kMaxDiskDataAllocatorCapacityMB; diff --git a/build/patches/00Internal-firewall.patch b/build/patches/00Internal-firewall.patch index 9f9efe2b1..ff71dbc1e 100644 --- a/build/patches/00Internal-firewall.patch +++ b/build/patches/00Internal-firewall.patch @@ -10,10 +10,11 @@ in services/firewall/tools/rules.xml License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- chrome/browser/BUILD.gn | 1 + - chrome/browser/about_flags.cc | 6 + + chrome/browser/about_flags.cc | 1 + .../downloads/offline_page_download_bridge.cc | 32 +- .../content/internal/context_menu_download.cc | 32 +- .../android/webapk/webapk_icon_hasher.cc | 32 +- + .../about_flags_cc/Internal-firewall.inc | 8 + net/BUILD.gn | 1 + .../network_traffic_annotation.h | 4 - net/url_request/url_request_http_job.cc | 15 + @@ -38,7 +39,8 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../loader/fetch/url_loader/url_loader.cc | 4 +- .../scripts/auditor/auditor.py | 1 + .../scripts/auditor/util.py | 1 + - 29 files changed, 1566 insertions(+), 20 deletions(-) + 30 files changed, 1569 insertions(+), 20 deletions(-) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Internal-firewall.inc create mode 100644 services/firewall/public/BUILD.gn create mode 100644 services/firewall/public/firewall_features.cc create mode 100644 services/firewall/public/firewall_features.h @@ -75,18 +77,6 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc #include "services/media_session/public/cpp/features.h" #include "services/network/public/cpp/features.h" #include "services/network/public/cpp/network_switches.h" -@@ -8613,6 +8614,11 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(page_info::kPageInfoHideSiteSettings)}, - #endif // !BUILDFLAG(IS_ANDROID) - -+ {"enable-firewall", -+ "Enable internal firewall", -+ "Enable internal firewall", kOsDesktop | kOsAndroid, -+ FEATURE_VALUE_TYPE(firewall::features::kEnableFirewall)}, -+ - #if !BUILDFLAG(IS_ANDROID) - {"page-info-history-desktop", - flag_descriptions::kPageInfoHistoryDesktopName, diff --git a/chrome/browser/offline_pages/android/downloads/offline_page_download_bridge.cc b/chrome/browser/offline_pages/android/downloads/offline_page_download_bridge.cc --- a/chrome/browser/offline_pages/android/downloads/offline_page_download_bridge.cc +++ b/chrome/browser/offline_pages/android/downloads/offline_page_download_bridge.cc @@ -233,6 +223,19 @@ diff --git a/components/webapps/browser/android/webapk/webapk_icon_hasher.cc b/c simple_url_loader_->DownloadToStringOfUnboundedSizeUntilCrashAndDie( url_loader_factory, base::BindOnce(&WebApkIconHasher::OnSimpleLoaderComplete, +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Internal-firewall.inc b/cromite_flags/chrome/browser/about_flags_cc/Internal-firewall.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Internal-firewall.inc +@@ -0,0 +1,8 @@ ++#ifdef FLAG_SECTION ++ ++ {"enable-firewall", ++ "Enable internal firewall", ++ "Enable internal firewall", kOsDesktop | kOsAndroid, ++ FEATURE_VALUE_TYPE(firewall::features::kEnableFirewall)}, ++ ++#endif diff --git a/net/BUILD.gn b/net/BUILD.gn --- a/net/BUILD.gn +++ b/net/BUILD.gn @@ -261,7 +264,7 @@ diff --git a/net/traffic_annotation/network_traffic_annotation.h b/net/traffic_a diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc --- a/net/url_request/url_request_http_job.cc +++ b/net/url_request/url_request_http_job.cc -@@ -261,6 +261,9 @@ URLRequestHttpJob::URLRequestHttpJob( +@@ -262,6 +262,9 @@ URLRequestHttpJob::URLRequestHttpJob( throttling_entry_ = manager->RegisterRequestUrl(request->url()); ResetTimer(); @@ -271,7 +274,7 @@ diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_reque } URLRequestHttpJob::~URLRequestHttpJob() { -@@ -555,6 +558,18 @@ void URLRequestHttpJob::MaybeStartTransactionInternal(int result) { +@@ -556,6 +559,18 @@ void URLRequestHttpJob::MaybeStartTransactionInternal(int result) { void URLRequestHttpJob::StartTransactionInternal() { DCHECK(!override_response_headers_); @@ -412,9 +415,9 @@ new file mode 100644 +namespace firewall { +namespace features { + -+BASE_FEATURE(kEnableFirewall, -+ "EnableFirewall", -+ base::FEATURE_ENABLED_BY_DEFAULT); ++CROMITE_FEATURE(kEnableFirewall, ++ "EnableFirewall", ++ base::FEATURE_ENABLED_BY_DEFAULT); + +} // namespace features +} // namespace firewall diff --git a/build/patches/00Keep-Side-Panel-Companion-disabled.patch b/build/patches/00Keep-Side-Panel-Companion-disabled.patch index e2075f420..f5ec4dde4 100644 --- a/build/patches/00Keep-Side-Panel-Companion-disabled.patch +++ b/build/patches/00Keep-Side-Panel-Companion-disabled.patch @@ -4,54 +4,28 @@ Subject: Keep Side Panel Companion disabled License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - chrome/browser/companion/core/features.cc | 23 ++++++++++--------- - .../ui/side_search/side_search_prefs.cc | 2 +- - chrome/browser/ui/ui_features.cc | 2 +- - components/search_engines/template_url.cc | 2 +- - 4 files changed, 15 insertions(+), 14 deletions(-) + chrome/browser/companion/core/features.cc | 6 ++++++ + chrome/browser/ui/side_search/side_search_prefs.cc | 2 +- + chrome/browser/ui/ui_features.cc | 2 +- + components/search_engines/template_url.cc | 2 +- + 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/chrome/browser/companion/core/features.cc b/chrome/browser/companion/core/features.cc --- a/chrome/browser/companion/core/features.cc +++ b/chrome/browser/companion/core/features.cc -@@ -23,17 +23,17 @@ namespace internal { - // `kSidePanelCompanion2`. This makes it possible for Companion to be - // enabled via multiple field trials (e.g., one that's session consistent, other - // that's permanent consistent). --BASE_FEATURE(kSidePanelCompanion, -- "SidePanelCompanion", -- base::FEATURE_DISABLED_BY_DEFAULT); --BASE_FEATURE(kSidePanelCompanion2, -- "SidePanelCompanion2", -- base::FEATURE_DISABLED_BY_DEFAULT); -+BASE_FEATURE(kSidePanelCompanion, // keep -+ "SidePanelCompanion", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite -+BASE_FEATURE(kSidePanelCompanion2, // keep -+ "SidePanelCompanion2", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite - // Dynamically enables the search companion if the user has experiments - // enabled. --BASE_FEATURE(kCompanionEnabledByObservingExpsNavigations, -- "CompanionEnabledByObservingExpsNavigations", -- base::FEATURE_DISABLED_BY_DEFAULT); -+BASE_FEATURE(kCompanionEnabledByObservingExpsNavigations, // keep -+ "CompanionEnabledByObservingExpsNavigations", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite - } // namespace internal - - // When search companion is enabled, show a context menu item that allows the -@@ -53,8 +53,8 @@ BASE_FEATURE(kCompanionEnableNewBadgesInContextMenu, - // user had previously opted in. The user won't be able to opt in (or out) when - // this is disabled. +@@ -55,6 +55,11 @@ BASE_FEATURE(kCompanionEnableNewBadgesInContextMenu, BASE_FEATURE(kCompanionEnablePageContent, -- "CompanionEnablePageContent", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "CompanionEnablePageContent", // keep -+ base::FEATURE_DISABLED_BY_DEFAULT); // disabled + "CompanionEnablePageContent", + base::FEATURE_DISABLED_BY_DEFAULT); ++ ++SET_CROMITE_FEATURE_DISABLED_W_NAMESPACE(internal, kSidePanelCompanion); ++SET_CROMITE_FEATURE_DISABLED_W_NAMESPACE(internal, kSidePanelCompanion2); ++SET_CROMITE_FEATURE_DISABLED_W_NAMESPACE(internal, kCompanionEnabledByObservingExpsNavigations); ++SET_CROMITE_FEATURE_DISABLED(kCompanionEnablePageContent); } // namespace features namespace switches { -@@ -65,6 +65,7 @@ const char kDisableCheckUserPermissionsForCompanion[] = +@@ -65,6 +70,7 @@ const char kDisableCheckUserPermissionsForCompanion[] = const char kForceCompanionPinnedState[] = "force-companion-pinned-state"; bool ShouldOverrideCheckingUserPermissionsForCompanion() { diff --git a/build/patches/00Keep-disabled-FetchLaterAPI.patch b/build/patches/00Keep-disabled-FetchLaterAPI.patch index bd092e74f..2fbbbb718 100644 --- a/build/patches/00Keep-disabled-FetchLaterAPI.patch +++ b/build/patches/00Keep-disabled-FetchLaterAPI.patch @@ -3,39 +3,23 @@ Date: Thu, 28 Sep 2023 08:11:00 +0000 Subject: Keep disabled FetchLaterAPI --- - third_party/blink/common/features.cc | 8 ++++---- - .../renderer/platform/runtime_enabled_features.json5 | 3 ++- - 2 files changed, 6 insertions(+), 5 deletions(-) + .../blink/common/features_cc/Keep-disabled-FetchLaterAPI.inc | 3 +++ + .../blink/renderer/platform/runtime_enabled_features.json5 | 3 ++- + 2 files changed, 5 insertions(+), 1 deletion(-) + create mode 100644 cromite_flags/third_party/blink/common/features_cc/Keep-disabled-FetchLaterAPI.inc -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 -@@ -1026,8 +1026,8 @@ BASE_FEATURE(kKalmanHeuristics, - base::FEATURE_DISABLED_BY_DEFAULT); - - BASE_FEATURE(kKeepAliveInBrowserMigration, -- "KeepAliveInBrowserMigration", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "KeepAliveInBrowserMigration", // keep -+ base::FEATURE_DISABLED_BY_DEFAULT); // disabled - - // Enables reporting as LCP of the time the first frame of an animated image was - // painted. -@@ -1278,8 +1278,8 @@ BASE_FEATURE(kPath2DPaintCache, - base::FEATURE_DISABLED_BY_DEFAULT); - - BASE_FEATURE(kPendingBeaconAPI, -- "PendingBeaconAPI", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "PendingBeaconAPI", // keep -+ base::FEATURE_DISABLED_BY_DEFAULT); // disabled - const base::FeatureParam kPendingBeaconAPIRequiresOriginTrial = { - &kPendingBeaconAPI, "requires_origin_trial", false}; - const base::FeatureParam kPendingBeaconAPIForcesSendingOnNavigation = { +diff --git a/cromite_flags/third_party/blink/common/features_cc/Keep-disabled-FetchLaterAPI.inc b/cromite_flags/third_party/blink/common/features_cc/Keep-disabled-FetchLaterAPI.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/third_party/blink/common/features_cc/Keep-disabled-FetchLaterAPI.inc +@@ -0,0 +1,3 @@ ++SET_CROMITE_FEATURE_DISABLED(kFetchLaterAPI); ++SET_CROMITE_FEATURE_DISABLED(kKeepAliveInBrowserMigration); ++SET_CROMITE_FEATURE_DISABLED(kPendingBeaconAPI); 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 -@@ -1700,7 +1700,8 @@ +@@ -1693,7 +1693,8 @@ }, { // The Blink runtime-enabled feature name for the API's IDL. diff --git a/build/patches/00Keyboard-protection-flag.patch b/build/patches/00Keyboard-protection-flag.patch index e54c54e28..aba8fcd2c 100644 --- a/build/patches/00Keyboard-protection-flag.patch +++ b/build/patches/00Keyboard-protection-flag.patch @@ -8,9 +8,7 @@ keyboard events. License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - chrome/browser/about_flags.cc | 3 + - chrome/browser/flag_descriptions.cc | 6 ++ - chrome/browser/flag_descriptions.h | 3 + + .../Keyboard-protection-flag.inc | 10 +++ .../renderer/core/events/keyboard_event.cc | 66 +++++++++++++++++++ .../renderer/core/events/keyboard_event.h | 3 + ui/base/ui_base_features.cc | 8 +++ @@ -18,50 +16,24 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../dom/dom_keyboard_layout_map_win.cc | 13 ++++ .../keycodes/keyboard_code_conversion.cc | 10 ++- ui/events/keycodes/keyboard_code_conversion.h | 2 +- - 10 files changed, 113 insertions(+), 3 deletions(-) + 8 files changed, 111 insertions(+), 3 deletions(-) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Keyboard-protection-flag.inc -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 -@@ -5430,6 +5430,9 @@ const FeatureEntry kFeatureEntries[] = { - {"system-keyboard-lock", flag_descriptions::kSystemKeyboardLockName, - flag_descriptions::kSystemKeyboardLockDescription, kOsDesktop, - FEATURE_VALUE_TYPE(features::kSystemKeyboardLock)}, -+ {"system-keyboard-protection", flag_descriptions::kSystemKeyboardProtectionName, -+ flag_descriptions::kSystemKeyboardProtectionDescription, kOsAll, -+ FEATURE_VALUE_TYPE(features::kSystemKeyboardProtection)}, - #if BUILDFLAG(IS_ANDROID) - {"add-to-homescreen-iph", flag_descriptions::kAddToHomescreenIPHName, - flag_descriptions::kAddToHomescreenIPHDescription, kOsAndroid, -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 -@@ -3340,6 +3340,12 @@ const char kSystemKeyboardLockDescription[] = - "keyboard shortcuts and have the events routed directly to the website " - "when in fullscreen mode."; - -+const char kSystemKeyboardProtectionName[] = "System keyboard protection"; -+const char kSystemKeyboardProtectionDescription[] = -+ "Hides user preference on the system keyboard by setting the standard " -+ "eng layout and removing the layout information from the " -+ "javascript keyboard events."; +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Keyboard-protection-flag.inc b/cromite_flags/chrome/browser/about_flags_cc/Keyboard-protection-flag.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Keyboard-protection-flag.inc +@@ -0,0 +1,10 @@ ++#ifdef FLAG_SECTION + - const char kSystemSoundsName[] = "Power Sounds"; - const char kSystemSoundsDescription[] = - "Enable device charging and low battery warning sounds."; -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 -@@ -1923,6 +1923,9 @@ extern const char kSuppressToolbarCapturesDescription[]; - extern const char kSystemKeyboardLockName[]; - extern const char kSystemKeyboardLockDescription[]; - -+extern const char kSystemKeyboardProtectionName[]; -+extern const char kSystemKeyboardProtectionDescription[]; ++ {"system-keyboard-protection", ++ "System keyboard protection", ++ "Hides user preference on the system keyboard by setting the standard " ++ "eng layout and removing the layout information from the " ++ "javascript keyboard events.", kOsAll, ++ FEATURE_VALUE_TYPE(features::kSystemKeyboardProtection)}, + - extern const char kSystemSoundsName[]; - extern const char kSystemSoundsDescription[]; - ++#endif diff --git a/third_party/blink/renderer/core/events/keyboard_event.cc b/third_party/blink/renderer/core/events/keyboard_event.cc --- a/third_party/blink/renderer/core/events/keyboard_event.cc +++ b/third_party/blink/renderer/core/events/keyboard_event.cc @@ -190,9 +162,9 @@ diff --git a/ui/base/ui_base_features.cc b/ui/base/ui_base_features.cc "SystemKeyboardLock", base::FEATURE_ENABLED_BY_DEFAULT); -+BASE_FEATURE(kSystemKeyboardProtection, -+ "SystemKeyboardProtection", -+ base::FEATURE_ENABLED_BY_DEFAULT); ++CROMITE_FEATURE(kSystemKeyboardProtection, ++ "SystemKeyboardProtection", ++ base::FEATURE_ENABLED_BY_DEFAULT); + +bool IsSystemKeyboardProtectionEnabled() { + return base::FeatureList::IsEnabled(kSystemKeyboardProtection); diff --git a/build/patches/00Lock-Profile-Cookie-Database.patch b/build/patches/00Lock-Profile-Cookie-Database.patch index 916e00939..0d8a3ffc4 100644 --- a/build/patches/00Lock-Profile-Cookie-Database.patch +++ b/build/patches/00Lock-Profile-Cookie-Database.patch @@ -4,22 +4,19 @@ Subject: Lock Profile Cookie Database License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - chrome/browser/browser_features.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + .../browser_features_cc/Lock-Profile-Cookie-Database.inc | 5 +++++ + 1 file changed, 5 insertions(+) + create mode 100644 cromite_flags/chrome/browser/browser_features_cc/Lock-Profile-Cookie-Database.inc -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 -@@ -213,8 +213,8 @@ BASE_FEATURE(kAppBoundEncryptionMetrics, - // Enables locking the cookie database for profiles. - // TODO(crbug.com/1430226): Remove after fully launched. - BASE_FEATURE(kLockProfileCookieDatabase, -- "LockProfileCookieDatabase", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "LockProfileCookieDatabase", // enabled -+ base::FEATURE_ENABLED_BY_DEFAULT); // by default - - // Don't call the Win32 API PrefetchVirtualMemory when loading chrome.dll inside - // non-browser processes. This is done by passing flags to these processes. This +diff --git a/cromite_flags/chrome/browser/browser_features_cc/Lock-Profile-Cookie-Database.inc b/cromite_flags/chrome/browser/browser_features_cc/Lock-Profile-Cookie-Database.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/browser_features_cc/Lock-Profile-Cookie-Database.inc +@@ -0,0 +1,5 @@ ++#if BUILDFLAG(IS_WIN) ++ ++SET_CROMITE_FEATURE_ENABLED(kLockProfileCookieDatabase); ++ ++#endif -- 2.25.1 diff --git a/build/patches/00Log-dangling-attributes-in-some-html-elements.patch b/build/patches/00Log-dangling-attributes-in-some-html-elements.patch index 63a404d4b..36799908b 100644 --- a/build/patches/00Log-dangling-attributes-in-some-html-elements.patch +++ b/build/patches/00Log-dangling-attributes-in-some-html-elements.patch @@ -9,7 +9,7 @@ under enable-log-dangling-attributes about flag License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - chrome/browser/about_flags.cc | 5 ++++- + ...gling-attributes-in-some-html-elements.inc | 8 +++++++ .../blink/renderer/core/dom/document.cc | 18 +++++++++++++++ .../blink/renderer/core/dom/element.cc | 20 ++++++++++++++++- third_party/blink/renderer/core/dom/element.h | 3 ++- @@ -22,23 +22,22 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../core/loader/frame_load_request.cc | 9 ++++++++ .../blink/renderer/core/page/frame_tree.cc | 22 +++++++++++++++++++ .../platform/runtime_enabled_features.json5 | 10 +++++++-- - 13 files changed, 127 insertions(+), 5 deletions(-) + 13 files changed, 131 insertions(+), 4 deletions(-) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Log-dangling-attributes-in-some-html-elements.inc -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 -@@ -5378,7 +5378,10 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kWebShareDescription, kOsWin | kOsCrOS | kOsMac, - FEATURE_VALUE_TYPE(features::kWebShare)}, - #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -- +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Log-dangling-attributes-in-some-html-elements.inc b/cromite_flags/chrome/browser/about_flags_cc/Log-dangling-attributes-in-some-html-elements.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Log-dangling-attributes-in-some-html-elements.inc +@@ -0,0 +1,8 @@ ++#ifdef FLAG_SECTION ++ + {"enable-log-dangling-attributes", + "Log some dangling attributes", + "NOTE: log only", kOsAll, + FEATURE_VALUE_TYPE(blink::features::kLogDanglingAttributes)}, - #if BUILDFLAG(IS_LINUX) - {"ozone-platform-hint", flag_descriptions::kOzonePlatformHintName, - flag_descriptions::kOzonePlatformHintDescription, kOsLinux, ++ ++#endif 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 @@ -319,7 +318,7 @@ diff --git a/third_party/blink/renderer/core/page/frame_tree.cc b/third_party/bl diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -1525,8 +1525,8 @@ +@@ -1518,8 +1518,8 @@ // Experiment with preventing some instances of mutation XSS // by escaping "<" and ">" in attribute values. // See: crbug.com/1175016 @@ -330,7 +329,7 @@ diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 }, { name: "EventTimingInteractionCount", -@@ -2296,6 +2296,12 @@ +@@ -2289,6 +2289,12 @@ // Use LongAnimationFrameMonitor to emit longtask entries name: "LongTaskFromLongAnimationFrame" }, diff --git a/build/patches/00Partition-HSTS-cache-by-NAK.patch b/build/patches/00Partition-HSTS-cache-by-NAK.patch index 0c6332a5a..64553d902 100644 --- a/build/patches/00Partition-HSTS-cache-by-NAK.patch +++ b/build/patches/00Partition-HSTS-cache-by-NAK.patch @@ -504,7 +504,7 @@ diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_reque return std::make_unique( request, UpgradeSchemeToCryptographic(url), // Use status code 307 to preserve the method, so POST requests work. -@@ -1055,7 +1055,7 @@ void URLRequestHttpJob::ProcessStrictTransportSecurityHeader() { +@@ -1056,7 +1056,7 @@ void URLRequestHttpJob::ProcessStrictTransportSecurityHeader() { HttpResponseHeaders* headers = GetResponseHeaders(); std::string value; if (headers->EnumerateHeader(nullptr, "Strict-Transport-Security", &value)) @@ -513,7 +513,7 @@ diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_reque } void URLRequestHttpJob::OnStartCompleted(int result) { -@@ -1125,7 +1125,7 @@ void URLRequestHttpJob::OnStartCompleted(int result) { +@@ -1126,7 +1126,7 @@ void URLRequestHttpJob::OnStartCompleted(int result) { TransportSecurityState* state = context->transport_security_state(); NotifySSLCertificateError( result, transaction_->GetResponseInfo()->ssl_info, diff --git a/build/patches/00Partition-MediaDeviceId-by-default.patch b/build/patches/00Partition-MediaDeviceId-by-default.patch index d859aaa8d..7880c3c1f 100644 --- a/build/patches/00Partition-MediaDeviceId-by-default.patch +++ b/build/patches/00Partition-MediaDeviceId-by-default.patch @@ -5,30 +5,25 @@ Subject: Partition MediaDeviceId by default and, in windows, hide the presence of the webcam if the user has not given permission License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - components/media_device_salt/media_device_salt_service.cc | 8 ++++---- - .../browser/renderer_host/media/media_devices_manager.cc | 5 +++++ - content/common/features.cc | 4 ++-- - 3 files changed, 11 insertions(+), 6 deletions(-) + components/media_device_salt/media_device_salt_service.cc | 3 +++ + content/browser/renderer_host/media/media_devices_manager.cc | 5 +++++ + .../features_cc/Partition-MediaDeviceId-by-default.inc | 1 + + 3 files changed, 9 insertions(+) + create mode 100644 cromite_flags/content/common/features_cc/Partition-MediaDeviceId-by-default.inc diff --git a/components/media_device_salt/media_device_salt_service.cc b/components/media_device_salt/media_device_salt_service.cc --- a/components/media_device_salt/media_device_salt_service.cc +++ b/components/media_device_salt/media_device_salt_service.cc -@@ -23,11 +23,11 @@ - namespace media_device_salt { - - BASE_FEATURE(kMediaDeviceIdPartitioning, -- "MediaDeviceIdPartitioning", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "MediaDeviceIdPartitioning", // keep -+ base::FEATURE_ENABLED_BY_DEFAULT); // enabled - BASE_FEATURE(kMediaDeviceIdRandomSaltsPerStorageKey, -- "MediaDeviceIdRandomSaltsPerStorageKey", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "MediaDeviceIdRandomSaltsPerStorageKey", // enabled -+ base::FEATURE_ENABLED_BY_DEFAULT); // by default +@@ -29,6 +29,9 @@ BASE_FEATURE(kMediaDeviceIdRandomSaltsPerStorageKey, + "MediaDeviceIdRandomSaltsPerStorageKey", + base::FEATURE_DISABLED_BY_DEFAULT); ++SET_CROMITE_FEATURE_ENABLED(kMediaDeviceIdPartitioning); ++SET_CROMITE_FEATURE_ENABLED(kMediaDeviceIdRandomSaltsPerStorageKey); ++ namespace { + scoped_refptr CreateDatabaseTaskRunner() { diff --git a/content/browser/renderer_host/media/media_devices_manager.cc b/content/browser/renderer_host/media/media_devices_manager.cc --- a/content/browser/renderer_host/media/media_devices_manager.cc +++ b/content/browser/renderer_host/media/media_devices_manager.cc @@ -44,19 +39,11 @@ diff --git a/content/browser/renderer_host/media/media_devices_manager.cc b/cont GetAudioInputCapabilities(video_input_capabilities_requested, audio_input_capabilities_requested, -diff --git a/content/common/features.cc b/content/common/features.cc ---- a/content/common/features.cc -+++ b/content/common/features.cc -@@ -164,8 +164,8 @@ BASE_FEATURE(kEnsureAllowBindingsIsAlwaysForWebUI, - // media-device enumeration will provide at most one device per type and the - // device IDs will not be available. - BASE_FEATURE(kEnumerateDevicesHideDeviceIDs, -- "EnumerateDevicesHideDeviceIDs", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "EnumerateDevicesHideDeviceIDs", // keep -+ base::FEATURE_ENABLED_BY_DEFAULT); // enabled - - // Content counterpart of ExperimentalContentSecurityPolicyFeatures in - // third_party/blink/renderer/platform/runtime_enabled_features.json5. Enables +diff --git a/cromite_flags/content/common/features_cc/Partition-MediaDeviceId-by-default.inc b/cromite_flags/content/common/features_cc/Partition-MediaDeviceId-by-default.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/content/common/features_cc/Partition-MediaDeviceId-by-default.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_ENABLED(kEnumerateDevicesHideDeviceIDs); -- 2.25.1 diff --git a/build/patches/00Partitioning-all-cookies-by-top-frame-domain.patch b/build/patches/00Partitioning-all-cookies-by-top-frame-domain.patch index ebe774af6..bb811e05b 100644 --- a/build/patches/00Partitioning-all-cookies-by-top-frame-domain.patch +++ b/build/patches/00Partitioning-all-cookies-by-top-frame-domain.patch @@ -9,23 +9,27 @@ samesite=none first-party cookies are sent in third-party contexts. License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - .../net/profile_network_context_service.cc | 8 ++++---- - .../core/common/cookie_settings_base.cc | 2 +- - .../content_settings/core/common/features.cc | 4 ++-- - components/permissions/features.cc | 4 ++-- - content/public/common/content_features.cc | 4 ++-- - net/base/features.cc | 16 ++++++++-------- - net/cookies/canonical_cookie.cc | 12 +----------- - net/cookies/cookie_deletion_info.cc | 3 ++- - net/cookies/parsed_cookie.h | 7 ++++++- - .../sqlite/sqlite_persistent_cookie_store.cc | 10 ++++++++++ - net/url_request/url_request_http_job.cc | 2 +- - services/network/restricted_cookie_manager.cc | 3 +++ - .../modules/cookie_store/cookie_init.idl | 2 +- - .../modules/cookie_store/cookie_store.cc | 12 ++++++++++++ - .../cookie_store/cookie_store_delete_options.idl | 2 +- - ui/webui/webui_allowlist.cc | 1 + - 16 files changed, 57 insertions(+), 35 deletions(-) + .../browser/net/profile_network_context_service.cc | 8 ++++---- + .../core/common/cookie_settings_base.cc | 2 +- + .../Partitioning-all-cookies-by-top-frame-domain.inc | 1 + + .../Partitioning-all-cookies-by-top-frame-domain.inc | 1 + + .../Partitioning-all-cookies-by-top-frame-domain.inc | 1 + + .../Partitioning-all-cookies-by-top-frame-domain.inc | 5 +++++ + net/cookies/canonical_cookie.cc | 12 +----------- + net/cookies/cookie_deletion_info.cc | 3 ++- + net/cookies/parsed_cookie.h | 7 ++++++- + net/extras/sqlite/sqlite_persistent_cookie_store.cc | 10 ++++++++++ + net/url_request/url_request_http_job.cc | 2 +- + services/network/restricted_cookie_manager.cc | 3 +++ + .../renderer/modules/cookie_store/cookie_init.idl | 2 +- + .../renderer/modules/cookie_store/cookie_store.cc | 12 ++++++++++++ + .../cookie_store/cookie_store_delete_options.idl | 2 +- + ui/webui/webui_allowlist.cc | 1 + + 16 files changed, 51 insertions(+), 21 deletions(-) + create mode 100644 cromite_flags/components/content_settings/core/common/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc + create mode 100644 cromite_flags/components/permissions/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc + create mode 100644 cromite_flags/content/public/common/content_features_cc/Partitioning-all-cookies-by-top-frame-domain.inc + create mode 100644 cromite_flags/net/base/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc 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 @@ -61,95 +65,34 @@ diff --git a/components/content_settings/core/common/cookie_settings_base.cc b/c : ThirdPartyBlockingScope::kUnpartitionedAndPartitioned; } return {block_third ? CONTENT_SETTING_BLOCK : setting, scope, -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 -@@ -79,8 +79,8 @@ BASE_FEATURE(kImprovedSemanticsActivityIndicators, - base::FEATURE_DISABLED_BY_DEFAULT); - - BASE_FEATURE(kTrackingProtection3pcd, -- "TrackingProtection3pcd", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "TrackingProtection3pcd", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - - } // namespace features - } // namespace content_settings -diff --git a/components/permissions/features.cc b/components/permissions/features.cc ---- a/components/permissions/features.cc -+++ b/components/permissions/features.cc -@@ -156,8 +156,8 @@ BASE_FEATURE(kMitigateUnpartitionedWebviewPermissions, - // This includes enabling prompts, a new settings page and page info and - // omnibox integration. - BASE_FEATURE(kPermissionStorageAccessAPI, -- "PermissionStorageAccessAPI", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "PermissionStorageAccessAPI", // guard -+ base::FEATURE_DISABLED_BY_DEFAULT); // this - - // When enabled "window-placement" may be used as an alias for - // "window-management". Additionally, reverse mappings (i.e. enum to string) -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 -@@ -186,8 +186,8 @@ BASE_FEATURE(kCompositeBGColorAnimation, - // server side testing without cookies. - // (See https://developer.chrome.com/en/docs/privacy-sandbox/chrome-testing) - BASE_FEATURE(kCookieDeprecationFacilitatedTesting, -- "CookieDeprecationFacilitatedTesting", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "CookieDeprecationFacilitatedTesting", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - - // Set whether to enable cookie deprecation API for off-the-record profiles. - const base::FeatureParam -diff --git a/net/base/features.cc b/net/base/features.cc ---- a/net/base/features.cc -+++ b/net/base/features.cc -@@ -260,8 +260,8 @@ BASE_FEATURE(kWaitForFirstPartySetsInit, - base::FEATURE_DISABLED_BY_DEFAULT); - - BASE_FEATURE(kPartitionedCookies, -- "PartitionedCookies", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "PartitionedCookies", // guard this -+ base::FEATURE_ENABLED_BY_DEFAULT); // guard this - - BASE_FEATURE(kBlockTruncatedCookies, - "BlockTruncatedCookies", -@@ -272,8 +272,8 @@ BASE_FEATURE(kStaticKeyPinningEnforcement, - base::FEATURE_ENABLED_BY_DEFAULT); - - BASE_FEATURE(kCookieDomainRejectNonASCII, -- "CookieDomainRejectNonASCII", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "CookieDomainRejectNonASCII", // guard this -+ base::FEATURE_ENABLED_BY_DEFAULT); // guard this - - // Enables partitioning of third party storage (IndexedDB, CacheStorage, etc.) - // by the top level site to reduce fingerprinting. -@@ -446,8 +446,8 @@ BASE_FEATURE(kEnableSchemeBoundCookies, - - // Enable third-party cookie blocking from the command line. - BASE_FEATURE(kForceThirdPartyCookieBlocking, -- "ForceThirdPartyCookieBlockingEnabled", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "ForceThirdPartyCookieBlockingEnabled", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - - BASE_FEATURE(kEnableEarlyHintsOnHttp11, - "EnableEarlyHintsOnHttp11", -@@ -469,8 +469,8 @@ BASE_FEATURE(kDigestAuthEnableSecureAlgorithms, - // are disabled by default. Partitioned storage will not be allowed if - // third-party cookies are disabled due to a specific rule. - BASE_FEATURE(kThirdPartyPartitionedStorageAllowedByDefault, -- "ThirdPartyPartitionedStorageAllowedByDefault", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "ThirdPartyPartitionedStorageAllowedByDefault", // must be -+ base::FEATURE_DISABLED_BY_DEFAULT); // disabled - - BASE_FEATURE(kPriorityHeader, - "PriorityHeader", +diff --git a/cromite_flags/components/content_settings/core/common/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc b/cromite_flags/components/content_settings/core/common/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/components/content_settings/core/common/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_DISABLED(kTrackingProtection3pcd); +diff --git a/cromite_flags/components/permissions/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc b/cromite_flags/components/permissions/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/components/permissions/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_DISABLED(kPermissionStorageAccessAPI); +diff --git a/cromite_flags/content/public/common/content_features_cc/Partitioning-all-cookies-by-top-frame-domain.inc b/cromite_flags/content/public/common/content_features_cc/Partitioning-all-cookies-by-top-frame-domain.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/content/public/common/content_features_cc/Partitioning-all-cookies-by-top-frame-domain.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_DISABLED(kCookieDeprecationFacilitatedTesting); +diff --git a/cromite_flags/net/base/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc b/cromite_flags/net/base/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/net/base/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc +@@ -0,0 +1,5 @@ ++SET_CROMITE_FEATURE_ENABLED(kPartitionedCookies); ++SET_CROMITE_FEATURE_ENABLED(kCookieDomainRejectNonASCII); ++ ++SET_CROMITE_FEATURE_DISABLED(kForceThirdPartyCookieBlocking); ++SET_CROMITE_FEATURE_DISABLED(kThirdPartyPartitionedStorageAllowedByDefault); diff --git a/net/cookies/canonical_cookie.cc b/net/cookies/canonical_cookie.cc --- a/net/cookies/canonical_cookie.cc +++ b/net/cookies/canonical_cookie.cc @@ -239,7 +182,7 @@ diff --git a/net/extras/sqlite/sqlite_persistent_cookie_store.cc b/net/extras/sq 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 -@@ -758,7 +758,7 @@ void URLRequestHttpJob::SetCookieHeaderAndStart( +@@ -759,7 +759,7 @@ void URLRequestHttpJob::SetCookieHeaderAndStart( size_t n_partitioned_cookies = 0; bool may_set_sec_cookie_deprecation_header = diff --git a/build/patches/00Remove-auth-header-upon-cross-origin-redirect.patch b/build/patches/00Remove-auth-header-upon-cross-origin-redirect.patch index ed76e0776..75e72d3f4 100644 --- a/build/patches/00Remove-auth-header-upon-cross-origin-redirect.patch +++ b/build/patches/00Remove-auth-header-upon-cross-origin-redirect.patch @@ -4,25 +4,18 @@ Subject: Remove auth header upon cross origin redirect License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - third_party/blink/common/features.cc | 4 ++-- + .../Remove-auth-header-upon-cross-origin-redirect.inc | 1 + .../blink/renderer/platform/loader/fetch/resource_loader.cc | 3 +++ .../platform/loader/fetch/url_loader/sync_load_context.cc | 4 ++++ - 3 files changed, 9 insertions(+), 2 deletions(-) + 3 files changed, 8 insertions(+) + create mode 100644 cromite_flags/third_party/blink/common/features_cc/Remove-auth-header-upon-cross-origin-redirect.inc -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 -@@ -1526,8 +1526,8 @@ BASE_FEATURE(kRemoteResourceCache, - base::FEATURE_DISABLED_BY_DEFAULT); - - BASE_FEATURE(kRemoveAuthroizationOnCrossOriginRedirect, -- "RemoveAutorizationOnCrossOriginRedirect", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "RemoveAutorizationOnCrossOriginRedirect", // guard -+ base::FEATURE_ENABLED_BY_DEFAULT); // this - - BASE_FEATURE(kRenderBlockingFonts, - "RenderBlockingFonts", +diff --git a/cromite_flags/third_party/blink/common/features_cc/Remove-auth-header-upon-cross-origin-redirect.inc b/cromite_flags/third_party/blink/common/features_cc/Remove-auth-header-upon-cross-origin-redirect.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/third_party/blink/common/features_cc/Remove-auth-header-upon-cross-origin-redirect.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_ENABLED(kRemoveAuthroizationOnCrossOriginRedirect); diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_loader.cc b/third_party/blink/renderer/platform/loader/fetch/resource_loader.cc --- a/third_party/blink/renderer/platform/loader/fetch/resource_loader.cc +++ b/third_party/blink/renderer/platform/loader/fetch/resource_loader.cc diff --git a/build/patches/00Remove-support-for-device-memory-and-cpu-recovery.patch b/build/patches/00Remove-support-for-device-memory-and-cpu-recovery.patch index 0a20178e0..00ee67884 100644 --- a/build/patches/00Remove-support-for-device-memory-and-cpu-recovery.patch +++ b/build/patches/00Remove-support-for-device-memory-and-cpu-recovery.patch @@ -4,15 +4,22 @@ Subject: Remove support for device memory and cpu recovery License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- + ...ort-for-device-memory-and-cpu-recovery.inc | 1 + .../browser/blob/blob_memory_controller.cc | 20 ++++++++++--------- .../browser/quota/quota_device_info_helper.cc | 17 ++++++++++++++-- .../approximated_device_memory.cc | 7 ++++++- - third_party/blink/common/features.cc | 4 ++-- .../frame/navigator_concurrent_hardware.cc | 8 ++++++-- .../blink/renderer/core/timing/memory_info.cc | 14 ++++++++++--- .../core/timing/window_performance.cc | 2 +- - 7 files changed, 52 insertions(+), 20 deletions(-) + 7 files changed, 51 insertions(+), 18 deletions(-) + create mode 100644 cromite_flags/third_party/blink/common/features_cc/Remove-support-for-device-memory-and-cpu-recovery.inc +diff --git a/cromite_flags/third_party/blink/common/features_cc/Remove-support-for-device-memory-and-cpu-recovery.inc b/cromite_flags/third_party/blink/common/features_cc/Remove-support-for-device-memory-and-cpu-recovery.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/third_party/blink/common/features_cc/Remove-support-for-device-memory-and-cpu-recovery.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_DISABLED(kWebMeasureMemoryViaPerformanceManager); diff --git a/storage/browser/blob/blob_memory_controller.cc b/storage/browser/blob/blob_memory_controller.cc --- a/storage/browser/blob/blob_memory_controller.cc +++ b/storage/browser/blob/blob_memory_controller.cc @@ -117,20 +124,6 @@ diff --git a/third_party/blink/common/device_memory/approximated_device_memory.c int64_t ApproximatedDeviceMemory::physical_memory_mb_ = 0; // static -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 -@@ -2034,8 +2034,8 @@ BASE_FEATURE(kWebFontsCacheAwareTimeoutAdaption, - // Controls whether the implementation of the performance.measureMemory - // web API uses PerformanceManager or not. - BASE_FEATURE(kWebMeasureMemoryViaPerformanceManager, -- "WebMeasureMemoryViaPerformanceManager", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "WebMeasureMemoryViaPerformanceManager", // need to be -+ base::FEATURE_DISABLED_BY_DEFAULT); // disabled by default - - BASE_FEATURE(kWebRtcCombinedNetworkAndWorkerThread, - "WebRtcCombinedNetworkAndWorkerThread", diff --git a/third_party/blink/renderer/core/frame/navigator_concurrent_hardware.cc b/third_party/blink/renderer/core/frame/navigator_concurrent_hardware.cc --- a/third_party/blink/renderer/core/frame/navigator_concurrent_hardware.cc +++ b/third_party/blink/renderer/core/frame/navigator_concurrent_hardware.cc diff --git a/build/patches/00Show-warnings-on-downloads-over-HTTP.patch b/build/patches/00Show-warnings-on-downloads-over-HTTP.patch index e9ea2bde0..5db4c6c61 100644 --- a/build/patches/00Show-warnings-on-downloads-over-HTTP.patch +++ b/build/patches/00Show-warnings-on-downloads-over-HTTP.patch @@ -4,24 +4,15 @@ Subject: Show warnings on downloads over HTTP License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - chrome/common/chrome_features.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + .../chrome_features_cc/Show-warnings-on-downloads-over-HTTP.inc | 1 + + 1 file changed, 1 insertion(+) + create mode 100644 cromite_flags/chrome/common/chrome_features_cc/Show-warnings-on-downloads-over-HTTP.inc -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 -@@ -1228,9 +1228,9 @@ BASE_FEATURE(kTreatUnsafeDownloadsAsActive, - base::FEATURE_ENABLED_BY_DEFAULT); - - // Show warnings on downloads not delivered over HTTPS. --BASE_FEATURE(kInsecureDownloadWarnings, -- "InsecureDownloadWarnings", -- base::FEATURE_DISABLED_BY_DEFAULT); -+BASE_FEATURE(kInsecureDownloadWarnings, // enabled by -+ "InsecureDownloadWarnings", // default -+ base::FEATURE_ENABLED_BY_DEFAULT); // in bromite - - // TrustSafetySentimentSurvey - #if !BUILDFLAG(IS_ANDROID) +diff --git a/cromite_flags/chrome/common/chrome_features_cc/Show-warnings-on-downloads-over-HTTP.inc b/cromite_flags/chrome/common/chrome_features_cc/Show-warnings-on-downloads-over-HTTP.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/common/chrome_features_cc/Show-warnings-on-downloads-over-HTTP.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_ENABLED(kInsecureDownloadWarnings); -- 2.25.1 diff --git a/build/patches/00Temp-Disable-kAutomaticLazyFrameLoadingToEmbeds.patch b/build/patches/00Temp-Disable-kAutomaticLazyFrameLoadingToEmbeds.patch deleted file mode 100644 index ff94183be..000000000 --- a/build/patches/00Temp-Disable-kAutomaticLazyFrameLoadingToEmbeds.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: uazo -Date: Tue, 20 Dec 2022 15:09:46 +0000 -Subject: Temp Disable kAutomaticLazyFrameLoadingToEmbeds - -License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html ---- - third_party/blink/common/features.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -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 -@@ -180,7 +180,7 @@ const base::FeatureParam kSkipFrameCountForLazyAds( - // Vitals. - BASE_FEATURE(kAutomaticLazyFrameLoadingToEmbeds, - "AutomaticLazyFrameLoadingToEmbeds", // must be enabled -- base::FEATURE_ENABLED_BY_DEFAULT); // in Bromite -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - - // The timeout value that forces loading iframes that are lazy loaded by - // LazyEmbeds. After this timeout, the frame loading is triggered even when the --- -2.25.1 diff --git a/build/patches/00Warning-message-for-unsupported-hardware-aes.patch b/build/patches/00Warning-message-for-unsupported-hardware-aes.patch index 9f55f38dc..f1a83d0c3 100644 --- a/build/patches/00Warning-message-for-unsupported-hardware-aes.patch +++ b/build/patches/00Warning-message-for-unsupported-hardware-aes.patch @@ -15,14 +15,15 @@ you can remove the message by going to chrome://flags/#no-hw-aes-warning chrome/BUILD.gn | 3 +++ chrome/app/chrome_main_delegate.cc | 10 ++++++++++ chrome/app/generated_resources.grd | 4 ++++ - chrome/browser/about_flags.cc | 4 ++++ - chrome/browser/flag_descriptions.cc | 4 ++++ - chrome/browser/flag_descriptions.h | 3 +++ chrome/browser/ui/startup/bad_flags_prompt.cc | 9 +++++++++ .../browser/renderer_host/render_process_host_impl.cc | 1 + - content/public/common/content_features.cc | 5 +++++ - content/public/common/content_features.h | 1 + - 12 files changed, 47 insertions(+) + .../Warning-message-for-unsupported-hardware-aes.inc | 9 +++++++++ + .../Warning-message-for-unsupported-hardware-aes.inc | 4 ++++ + .../Warning-message-for-unsupported-hardware-aes.inc | 1 + + 10 files changed, 44 insertions(+) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Warning-message-for-unsupported-hardware-aes.inc + create mode 100644 cromite_flags/content/public/common/content_features_cc/Warning-message-for-unsupported-hardware-aes.inc + create mode 100644 cromite_flags/content/public/common/content_features_h/Warning-message-for-unsupported-hardware-aes.inc diff --git a/base/base_switches.cc b/base/base_switches.cc --- a/base/base_switches.cc @@ -108,47 +109,6 @@ diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources You are using an unsupported environment variable: $1SSLKEYLOGFILE. Stability and security will suffer. -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 -@@ -8433,6 +8433,10 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kViewportSegmentsDescription, kOsAll, - FEATURE_VALUE_TYPE(features::kViewportSegments)}, - -+ {"no-hw-aes-warning", flag_descriptions::kNoAESHardwareMessageName, -+ flag_descriptions::kNoAESHardwareMessageDescription, kOsDesktop | kOsAndroid, -+ FEATURE_VALUE_TYPE(features::kNoAESHardwareMessage)}, -+ - #if BUILDFLAG(IS_CHROMEOS_ASH) - {"device-force-scheduled-reboot", - flag_descriptions::kDeviceForceScheduledRebootName, -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 -@@ -897,6 +897,10 @@ const char kViewportSegmentsDescription[] = - "Enable the viewport segment API, giving information about the logical " - "segments of the device (dual screen and foldable devices)"; - -+const char kNoAESHardwareMessageName[] = "Enable no aes warning message"; -+const char kNoAESHardwareMessageDescription[] = -+ "Displays a warning message if the device does not have aes support in the hardware"; -+ - const char kDiscountConsentV2Name[] = "Discount Consent V2"; - const char kDiscountConsentV2Description[] = "Enables Discount Consent V2"; - -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 -@@ -644,6 +644,9 @@ extern const char kDeviceForceScheduledRebootDescription[]; - extern const char kDevicePostureName[]; - extern const char kDevicePostureDescription[]; - -+extern const char kNoAESHardwareMessageName[]; -+extern const char kNoAESHardwareMessageDescription[]; -+ - extern const char kEnableTLS13EarlyDataName[]; - extern const char kEnableTLS13EarlyDataDescription[]; - diff --git a/chrome/browser/ui/startup/bad_flags_prompt.cc b/chrome/browser/ui/startup/bad_flags_prompt.cc --- a/chrome/browser/ui/startup/bad_flags_prompt.cc +++ b/chrome/browser/ui/startup/bad_flags_prompt.cc @@ -179,31 +139,34 @@ diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content }; renderer_cmd->CopySwitchesFrom(browser_cmd, kSwitchNames); -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 -@@ -600,6 +600,11 @@ BASE_FEATURE(kNoStatePrefetchHoldback, - "NoStatePrefetchHoldback", - base::FEATURE_DISABLED_BY_DEFAULT); - -+// Show a warning message to user if aes hardware is not found -+BASE_FEATURE(kNoAESHardwareMessage, -+ "NoAESHardwareMessage", -+ base::FEATURE_ENABLED_BY_DEFAULT); +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Warning-message-for-unsupported-hardware-aes.inc b/cromite_flags/chrome/browser/about_flags_cc/Warning-message-for-unsupported-hardware-aes.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Warning-message-for-unsupported-hardware-aes.inc +@@ -0,0 +1,9 @@ ++ ++#ifdef FLAG_SECTION + - // Controls the Origin-Agent-Cluster header. Tracking bug - // https://crbug.com/1042415; flag removal bug (for when this is fully launched) - // https://crbug.com/1148057. -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 -@@ -155,6 +155,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kNetworkServiceInProcess); - CONTENT_EXPORT BASE_DECLARE_FEATURE(kNotificationContentImage); - CONTENT_EXPORT BASE_DECLARE_FEATURE(kNotificationTriggers); - CONTENT_EXPORT BASE_DECLARE_FEATURE(kNoStatePrefetchHoldback); ++ {"no-hw-aes-warning", ++ "Enable no aes warning message", ++ "Displays a warning message if the device does not have aes support in the hardware", kOsDesktop | kOsAndroid, ++ FEATURE_VALUE_TYPE(features::kNoAESHardwareMessage)}, ++ ++#endif +diff --git a/cromite_flags/content/public/common/content_features_cc/Warning-message-for-unsupported-hardware-aes.inc b/cromite_flags/content/public/common/content_features_cc/Warning-message-for-unsupported-hardware-aes.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/content/public/common/content_features_cc/Warning-message-for-unsupported-hardware-aes.inc +@@ -0,0 +1,4 @@ ++// Show a warning message to user if aes hardware is not found ++CROMITE_FEATURE(kNoAESHardwareMessage, ++ "NoAESHardwareMessage", ++ base::FEATURE_ENABLED_BY_DEFAULT); +diff --git a/cromite_flags/content/public/common/content_features_h/Warning-message-for-unsupported-hardware-aes.inc b/cromite_flags/content/public/common/content_features_h/Warning-message-for-unsupported-hardware-aes.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/content/public/common/content_features_h/Warning-message-for-unsupported-hardware-aes.inc +@@ -0,0 +1 @@ +CONTENT_EXPORT BASE_DECLARE_FEATURE(kNoAESHardwareMessage); - CONTENT_EXPORT BASE_DECLARE_FEATURE(kOriginIsolationHeader); - CONTENT_EXPORT BASE_DECLARE_FEATURE(kOverscrollHistoryNavigation); - CONTENT_EXPORT BASE_DECLARE_FEATURE(kOverscrollHistoryNavigationSetting); -- 2.25.1 diff --git a/build/patches/00add-browser-policy.patch b/build/patches/00add-browser-policy.patch index da1e92adc..ca2aedcea 100644 --- a/build/patches/00add-browser-policy.patch +++ b/build/patches/00add-browser-policy.patch @@ -15,7 +15,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html chrome/browser/signin/chrome_signin_client.cc | 7 +- .../ui/webui/policy/policy_ui_handler.cc | 104 ++++++++++++- .../ui/webui/policy/policy_ui_handler.h | 2 + - .../commerce/core/commerce_feature_list.cc | 24 +-- + .../commerce/core/commerce_feature_list.cc | 7 + .../core/browser/browser_policy_connector.cc | 3 + .../common/command_line_policy_provider.cc | 3 + .../core/common/policy_loader_command_line.cc | 140 ++++++++++++++++-- @@ -30,7 +30,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html components/policy_strings.grdp | 4 +- .../gaia_cookie_manager_service.cc | 4 + google_apis/gaia/gaia_auth_fetcher.cc | 1 + - 26 files changed, 311 insertions(+), 107 deletions(-) + 26 files changed, 306 insertions(+), 95 deletions(-) diff --git a/base/win/win_util.cc b/base/win/win_util.cc --- a/base/win/win_util.cc @@ -431,61 +431,20 @@ diff --git a/chrome/browser/ui/webui/policy/policy_ui_handler.h b/chrome/browser diff --git a/components/commerce/core/commerce_feature_list.cc b/components/commerce/core/commerce_feature_list.cc --- a/components/commerce/core/commerce_feature_list.cc +++ b/components/commerce/core/commerce_feature_list.cc -@@ -159,8 +159,8 @@ BASE_FEATURE(kCommercePriceTrackingChipExperiment, - - #if BUILDFLAG(IS_ANDROID) - BASE_FEATURE(kCommercePriceTrackingRegionLaunched, -- "CommercePriceTrackingRegionLaunched", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "CommercePriceTrackingRegionLaunched", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - #else - BASE_FEATURE(kCommercePriceTrackingRegionLaunched, - "CommercePriceTrackingRegionLaunched", -@@ -227,8 +227,8 @@ BASE_FEATURE(kShoppingList, "ShoppingList", base::FEATURE_DISABLED_BY_DEFAULT); - #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) - BASE_FEATURE(kShoppingListRegionLaunched, -- "ShoppingListRegionLaunched", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "ShoppingListRegionLaunched", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - #else - BASE_FEATURE(kShoppingListRegionLaunched, - "ShoppingListRegionLaunched", -@@ -273,12 +273,12 @@ BASE_FEATURE(kDiscountConsentV2, - base::FEATURE_ENABLED_BY_DEFAULT); - - BASE_FEATURE(kCommerceHintAndroid, -- "CommerceHintAndroid", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "CommerceHintAndroid", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - - BASE_FEATURE(kMerchantWidePromotion, -- "MerchantWidePromotion", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "MerchantWidePromotion", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - - BASE_FEATURE(kCodeBasedRBD, "CodeBasedRBD", base::FEATURE_ENABLED_BY_DEFAULT); - -@@ -287,11 +287,11 @@ BASE_FEATURE(kChromeCartDomBasedHeuristics, +@@ -293,6 +293,13 @@ BASE_FEATURE(kParcelTrackingRegionLaunched, + "ParcelTrackingRegionLaunched", base::FEATURE_DISABLED_BY_DEFAULT); - BASE_FEATURE(kParcelTracking, -- "ParcelTracking", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "ParcelTracking", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - BASE_FEATURE(kParcelTrackingRegionLaunched, -- "ParcelTrackingRegionLaunched", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "ParcelTrackingRegionLaunched", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - ++SET_CROMITE_FEATURE_DISABLED(kCommercePriceTrackingRegionLaunched); ++SET_CROMITE_FEATURE_DISABLED(kShoppingListRegionLaunched); ++SET_CROMITE_FEATURE_DISABLED(kCommerceHintAndroid); ++SET_CROMITE_FEATURE_DISABLED(kMerchantWidePromotion); ++SET_CROMITE_FEATURE_DISABLED(kParcelTracking); ++SET_CROMITE_FEATURE_DISABLED(kParcelTrackingRegionLaunched); ++ // Params for Discount Consent V2 in the NTP Cart module. const char kNtpChromeCartModuleDiscountConsentNtpVariationParam[] = + "discount-consent-ntp-variation"; diff --git a/components/policy/core/browser/browser_policy_connector.cc b/components/policy/core/browser/browser_policy_connector.cc --- a/components/policy/core/browser/browser_policy_connector.cc +++ b/components/policy/core/browser/browser_policy_connector.cc diff --git a/build/patches/AImageReader-CFI-crash-mitigations.patch b/build/patches/AImageReader-CFI-crash-mitigations.patch index 1e66eda80..e6688de68 100644 --- a/build/patches/AImageReader-CFI-crash-mitigations.patch +++ b/build/patches/AImageReader-CFI-crash-mitigations.patch @@ -20,19 +20,21 @@ See discussions at: License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - base/android/android_image_reader_compat.cc | 8 +++++++- - base/android/android_image_reader_compat.h | 4 ++++ - chrome/browser/flag-metadata.json | 6 +++--- - gpu/config/gpu_driver_bug_list.json | 16 ++++++++++++++++ - gpu/config/gpu_finch_features.cc | 5 +++++ - gpu/config/gpu_finch_features.h | 1 + - gpu/config/gpu_util.cc | 8 ++++++++ - gpu/config/gpu_workaround_list.txt | 1 + - gpu/ipc/service/gpu_init.cc | 7 +++++++ - gpu/ipc/service/stream_texture_android.cc | 11 ++++++++++- - media/base/media_switches.cc | 5 +++++ - media/base/media_switches.h | 1 + - 12 files changed, 68 insertions(+), 5 deletions(-) + base/android/android_image_reader_compat.cc | 8 +++++++- + base/android/android_image_reader_compat.h | 4 ++++ + chrome/browser/flag-metadata.json | 6 +++--- + .../AImageReader-CFI-crash-mitigations.inc | 4 ++++ + .../AImageReader-CFI-crash-mitigations.inc | 1 + + gpu/config/gpu_driver_bug_list.json | 16 ++++++++++++++++ + gpu/config/gpu_finch_features.cc | 5 +++++ + gpu/config/gpu_finch_features.h | 1 + + gpu/config/gpu_util.cc | 8 ++++++++ + gpu/config/gpu_workaround_list.txt | 1 + + gpu/ipc/service/gpu_init.cc | 7 +++++++ + gpu/ipc/service/stream_texture_android.cc | 11 ++++++++++- + 12 files changed, 67 insertions(+), 5 deletions(-) + 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 diff --git a/base/android/android_image_reader_compat.cc b/base/android/android_image_reader_compat.cc --- a/base/android/android_image_reader_compat.cc @@ -97,6 +99,21 @@ diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.js }, { "name": "enable-immersive-fullscreen-toolbar", +diff --git a/cromite_flags/media/base/media_switches_cc/AImageReader-CFI-crash-mitigations.inc b/cromite_flags/media/base/media_switches_cc/AImageReader-CFI-crash-mitigations.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/media/base/media_switches_cc/AImageReader-CFI-crash-mitigations.inc +@@ -0,0 +1,4 @@ ++// Enables the Android Image Reader path for Video decoding(for AVDA and MCVD) ++CROMITE_FEATURE(kAImageReaderVideoOutput, ++ "AImageReaderVideoOutput", ++ base::FEATURE_ENABLED_BY_DEFAULT); +diff --git a/cromite_flags/media/base/media_switches_h/AImageReader-CFI-crash-mitigations.inc b/cromite_flags/media/base/media_switches_h/AImageReader-CFI-crash-mitigations.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/media/base/media_switches_h/AImageReader-CFI-crash-mitigations.inc +@@ -0,0 +1 @@ ++MEDIA_EXPORT BASE_DECLARE_FEATURE(kAImageReaderVideoOutput); diff --git a/gpu/config/gpu_driver_bug_list.json b/gpu/config/gpu_driver_bug_list.json --- a/gpu/config/gpu_driver_bug_list.json +++ b/gpu/config/gpu_driver_bug_list.json @@ -126,29 +143,29 @@ diff --git a/gpu/config/gpu_driver_bug_list.json b/gpu/config/gpu_driver_bug_lis diff --git a/gpu/config/gpu_finch_features.cc b/gpu/config/gpu_finch_features.cc --- a/gpu/config/gpu_finch_features.cc +++ b/gpu/config/gpu_finch_features.cc -@@ -70,6 +70,11 @@ BASE_FEATURE(kUseGles2ForOopR, - #endif +@@ -71,6 +71,11 @@ BASE_FEATURE(kUseGles2ForOopR, ); -+ + #if BUILDFLAG(IS_ANDROID) +// Use android AImageReader when playing videos with MediaPlayer. -+const base::Feature kAImageReaderMediaPlayer{"AImageReaderMediaPlayer", -+ base::FEATURE_ENABLED_BY_DEFAULT}; ++CROMITE_FEATURE(kAImageReaderMediaPlayer, ++ "AImageReaderMediaPlayer", ++ base::FEATURE_ENABLED_BY_DEFAULT); + - #if BUILDFLAG(IS_ANDROID) // Use android SurfaceControl API for managing display compositor's buffer queue // and using overlays on Android. Also used by webview to disable surface + // SurfaceControl. diff --git a/gpu/config/gpu_finch_features.h b/gpu/config/gpu_finch_features.h --- a/gpu/config/gpu_finch_features.h +++ b/gpu/config/gpu_finch_features.h -@@ -22,6 +22,7 @@ namespace features { - GPU_EXPORT BASE_DECLARE_FEATURE(kUseGles2ForOopR); - +@@ -24,6 +24,7 @@ GPU_EXPORT BASE_DECLARE_FEATURE(kUseGles2ForOopR); // All features in alphabetical order. The features should be documented -+GPU_EXPORT extern const base::Feature kAImageReaderMediaPlayer; // alongside the definition of their values in the .cc file. #if BUILDFLAG(IS_ANDROID) ++GPU_EXPORT BASE_DECLARE_FEATURE(kAImageReaderMediaPlayer); GPU_EXPORT BASE_DECLARE_FEATURE(kAndroidSurfaceControl); + GPU_EXPORT BASE_DECLARE_FEATURE(kWebViewSurfaceControl); + GPU_EXPORT BASE_DECLARE_FEATURE(kAImageReader); diff --git a/gpu/config/gpu_util.cc b/gpu/config/gpu_util.cc --- a/gpu/config/gpu_util.cc +++ b/gpu/config/gpu_util.cc @@ -230,31 +247,5 @@ diff --git a/gpu/ipc/service/stream_texture_android.cc b/gpu/ipc/service/stream_ ? TextureOwner::Mode::kAImageReaderInsecure : TextureOwner::Mode::kSurfaceTextureInsecure; } -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 -@@ -1022,6 +1022,11 @@ BASE_FEATURE(kHardwareSecureDecryptionExperiment, - // Allows automatically disabling hardware secure Content Decryption Module - // (CDM) after failures or crashes to fallback to software secure CDMs. If this - // feature is disabled, the fallback will never happen and users could be stuck -+// Enables the Android Image Reader path for Video decoding(for AVDA and MCVD) -+BASE_FEATURE(kAImageReaderVideoOutput, -+ "AImageReaderVideoOutput", -+ base::FEATURE_ENABLED_BY_DEFAULT); -+ - // in playback failures. - BASE_FEATURE(kHardwareSecureDecryptionFallback, - "HardwareSecureDecryptionFallback", -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 -@@ -348,6 +348,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVideoBlitColorAccuracy); - MEDIA_EXPORT BASE_DECLARE_FEATURE(kVideoToolboxVideoDecoder); - #endif // BUILDFLAG(IS_APPLE) - MEDIA_EXPORT BASE_DECLARE_FEATURE(kWebRTCColorAccuracy); -+MEDIA_EXPORT BASE_DECLARE_FEATURE(kAImageReaderVideoOutput); - MEDIA_EXPORT BASE_DECLARE_FEATURE(kVp9kSVCHWDecoding); - MEDIA_EXPORT BASE_DECLARE_FEATURE(kWebContentsCaptureHiDpi); - MEDIA_EXPORT BASE_DECLARE_FEATURE(kWebrtcMediaCapabilitiesParameters); -- 2.25.1 diff --git a/build/patches/Add-AllowUserCertificates-flag.patch b/build/patches/Add-AllowUserCertificates-flag.patch index 6bb517ca4..86e113f50 100644 --- a/build/patches/Add-AllowUserCertificates-flag.patch +++ b/build/patches/Add-AllowUserCertificates-flag.patch @@ -5,15 +5,17 @@ Subject: Add AllowUserCertificates flag Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - .../org/chromium/chrome/browser/app/ChromeActivity.java | 3 +++ - chrome/browser/about_flags.cc | 7 +++++++ - chrome/browser/flag_descriptions.cc | 5 +++++ - chrome/browser/flag_descriptions.h | 3 +++ - chrome/browser/flags/android/chrome_feature_list.cc | 5 +++++ - chrome/browser/flags/android/chrome_feature_list.h | 1 + - .../chromium/chrome/browser/flags/ChromeFeatureList.java | 4 ++++ - net/android/java/src/org/chromium/net/X509Util.java | 5 +++++ - 8 files changed, 33 insertions(+) + .../chromium/chrome/browser/app/ChromeActivity.java | 3 +++ + chrome/browser/flags/android/chrome_feature_list.cc | 1 + + .../chrome/browser/flags/ChromeFeatureList.java | 4 ++++ + .../Add-AllowUserCertificates-flag.inc | 13 +++++++++++++ + .../Add-AllowUserCertificates-flag.inc | 3 +++ + .../Add-AllowUserCertificates-flag.inc | 1 + + net/android/java/src/org/chromium/net/X509Util.java | 5 +++++ + 7 files changed, 30 insertions(+) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Add-AllowUserCertificates-flag.inc + create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Add-AllowUserCertificates-flag.inc + create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Add-AllowUserCertificates-flag.inc 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 @@ -35,51 +37,6 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv // postDeferredStartupIfNeeded() is called in TabModelSelectorTabObsever#onLoadStopped(), // #onPageLoadFinished() and #onCrash(). If we are not actively loading a tab (e.g. -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 -@@ -9687,6 +9687,13 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kEnableDrDcDescription, kOsAll, - FEATURE_VALUE_TYPE(features::kEnableDrDc)}, - -+#if BUILDFLAG(IS_ANDROID) -+ {"allow-user-certificates", -+ flag_descriptions::kAllowUserCertificatesName, -+ flag_descriptions::kAllowUserCertificatesDescription, kOsAndroid, -+ FEATURE_VALUE_TYPE(chrome::android::kAllowUserCertificates)}, -+#endif // BUILDFLAG(IS_ANDROID) -+ - {"force-gpu-main-thread-to-normal-priority-drdc", - flag_descriptions::kForceGpuMainThreadToNormalPriorityDrDcName, - flag_descriptions::kForceGpuMainThreadToNormalPriorityDrDcDescription, -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 -@@ -14,6 +14,11 @@ - - namespace flag_descriptions { - -+const char kAllowUserCertificatesName[] = "Allow user certificates"; -+const char kAllowUserCertificatesDescription[] = -+ "Allow user CA certificates during " -+ "validation of the certificate chain"; -+ - const char kAccelerated2dCanvasName[] = "Accelerated 2D canvas"; - const char kAccelerated2dCanvasDescription[] = - "Enables the use of the GPU to perform 2d canvas rendering instead of " -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 -@@ -43,6 +43,9 @@ namespace flag_descriptions { - - // Cross-platform ------------------------------------------------------------- - -+extern const char kAllowUserCertificatesName[]; -+extern const char kAllowUserCertificatesDescription[]; -+ - extern const char kAccelerated2dCanvasName[]; - extern const char kAccelerated2dCanvasDescription[]; - 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 @@ -91,28 +48,6 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse &feed::kInterestFeedV2, &feed::kInterestFeedV2Autoplay, &feed::kInterestFeedV2Hearts, -@@ -477,6 +478,10 @@ BASE_FEATURE(kSearchReadyOmniboxFeature, - "SearchReadyOmnibox", - base::FEATURE_DISABLED_BY_DEFAULT); - -+BASE_FEATURE(kAllowUserCertificates, -+ "AllowUserCertificates", -+ base::FEATURE_DISABLED_BY_DEFAULT); -+ - BASE_FEATURE(kFocusOmniboxInIncognitoTabIntents, - "FocusOmniboxInIncognitoTabIntents", - base::FEATURE_ENABLED_BY_DEFAULT); -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 -@@ -23,6 +23,7 @@ BASE_DECLARE_FEATURE(kAdvancedPeripheralsSupport); - BASE_DECLARE_FEATURE(kAdvancedPeripheralsSupportTabStrip); - BASE_DECLARE_FEATURE(kAllowNewIncognitoTabIntents); - BASE_DECLARE_FEATURE(kAndroidAppIntegration); -+BASE_DECLARE_FEATURE(kAllowUserCertificates); - BASE_DECLARE_FEATURE(kAndroidAppIntegrationSafeSearch); - BASE_DECLARE_FEATURE(kAndroidHatsRefactor); - BASE_DECLARE_FEATURE(kAndroidSearchEngineChoiceNotification); 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 @@ -141,6 +76,38 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f sAppMenuMobileSiteOption, sBackGestureActivityTabProvider, sBackGestureRefactorActivityAndroid, +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 ++++ b/cromite_flags/chrome/browser/about_flags_cc/Add-AllowUserCertificates-flag.inc +@@ -0,0 +1,13 @@ ++#ifdef FLAG_SECTION ++ ++#if BUILDFLAG(IS_ANDROID) ++ ++ {"allow-user-certificates", ++ "Allow user certificates", ++ "Allow user CA certificates during " ++ "validation of the certificate chain", kOsAndroid, ++ FEATURE_VALUE_TYPE(chrome::android::kAllowUserCertificates)}, ++ ++#endif ++ ++#endif +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Add-AllowUserCertificates-flag.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Add-AllowUserCertificates-flag.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Add-AllowUserCertificates-flag.inc +@@ -0,0 +1,3 @@ ++CROMITE_FEATURE(kAllowUserCertificates, ++ "AllowUserCertificates", ++ base::FEATURE_DISABLED_BY_DEFAULT); +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Add-AllowUserCertificates-flag.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Add-AllowUserCertificates-flag.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Add-AllowUserCertificates-flag.inc +@@ -0,0 +1 @@ ++BASE_DECLARE_FEATURE(kAllowUserCertificates); diff --git a/net/android/java/src/org/chromium/net/X509Util.java b/net/android/java/src/org/chromium/net/X509Util.java --- a/net/android/java/src/org/chromium/net/X509Util.java +++ b/net/android/java/src/org/chromium/net/X509Util.java diff --git a/build/patches/Add-IsCleartextPermitted-flag.patch b/build/patches/Add-IsCleartextPermitted-flag.patch index 6a8e48ec9..084b195cd 100644 --- a/build/patches/Add-IsCleartextPermitted-flag.patch +++ b/build/patches/Add-IsCleartextPermitted-flag.patch @@ -5,94 +5,56 @@ Subject: Add IsCleartextPermitted flag Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/about_flags.cc | 4 ++++ - chrome/browser/flag_descriptions.cc | 4 ++++ - chrome/browser/flag_descriptions.h | 3 +++ - net/base/features.cc | 4 ++++ - net/base/features.h | 2 ++ - net/url_request/url_request_http_job.cc | 4 ++++ - 6 files changed, 21 insertions(+) + .../about_flags_cc/Add-IsCleartextPermitted-flag.inc | 8 ++++++++ + .../base/features_cc/Add-IsCleartextPermitted-flag.inc | 3 +++ + .../net/base/features_h/Add-IsCleartextPermitted-flag.inc | 1 + + net/url_request/url_request_http_job.cc | 5 +++++ + 4 files changed, 17 insertions(+) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Add-IsCleartextPermitted-flag.inc + create mode 100644 cromite_flags/net/base/features_cc/Add-IsCleartextPermitted-flag.inc + create mode 100644 cromite_flags/net/base/features_h/Add-IsCleartextPermitted-flag.inc -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 -@@ -9888,6 +9888,10 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kForceOffTextAutosizingName, - flag_descriptions::kForceOffTextAutosizingDescription, kOsAndroid, - FEATURE_VALUE_TYPE(features::kForceOffTextAutosizing)}, +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Add-IsCleartextPermitted-flag.inc b/cromite_flags/chrome/browser/about_flags_cc/Add-IsCleartextPermitted-flag.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Add-IsCleartextPermitted-flag.inc +@@ -0,0 +1,8 @@ ++#ifdef FLAG_SECTION ++ + {"cleartext-permitted", -+ flag_descriptions::kIsCleartextPermittedName, -+ flag_descriptions::kIsCleartextPermittedDescription, kOsAndroid, ++ "Allow cleartext traffic", ++ "Allow insecure connections over HTTP", kOsAll, + FEATURE_VALUE_TYPE(net::features::kIsCleartextPermitted)}, - #endif - - #if BUILDFLAG(IS_ANDROID) -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 -@@ -2001,6 +2001,10 @@ const char kHttpsUpgradesDescription[] = - "Enable automatically upgrading all top-level navigations to HTTPS with " - "fast fallback to HTTP."; - -+const char kIsCleartextPermittedName[] = "Allow cleartext traffic"; -+const char kIsCleartextPermittedDescription[] = -+ "Allow insecure connections over HTTP"; -+ - const char kIgnoreGpuBlocklistName[] = "Override software rendering list"; - const char kIgnoreGpuBlocklistDescription[] = - "Overrides the built-in software rendering list and enables " -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 -@@ -1123,6 +1123,9 @@ extern const char kStorageBucketsDescription[]; - extern const char kHideIncognitoMediaMetadataName[]; - extern const char kHideIncognitoMediaMetadataDescription[]; - -+extern const char kIsCleartextPermittedName[]; -+extern const char kIsCleartextPermittedDescription[]; -+ - extern const char kHttpsFirstModeV2Name[]; - extern const char kHttpsFirstModeV2Description[]; - -diff --git a/net/base/features.cc b/net/base/features.cc ---- a/net/base/features.cc -+++ b/net/base/features.cc -@@ -146,6 +146,10 @@ BASE_FEATURE(kHttpCacheKeyingExperimentControlGroup, - "HttpCacheKeyingExperimentControlGroup", - base::FEATURE_DISABLED_BY_DEFAULT); - -+BASE_FEATURE(kIsCleartextPermitted, -+ "IsCleartextPermitted", -+ base::FEATURE_ENABLED_BY_DEFAULT); + - BASE_FEATURE(kTLS13KeyUpdate, - "TLS13KeyUpdate", - base::FEATURE_DISABLED_BY_DEFAULT); -diff --git a/net/base/features.h b/net/base/features.h ---- a/net/base/features.h -+++ b/net/base/features.h -@@ -30,6 +30,8 @@ NET_EXPORT BASE_DECLARE_FEATURE(kAvoidH2Reprioritization); - // origin requests are restricted to contain at most the source origin. - NET_EXPORT BASE_DECLARE_FEATURE(kCapReferrerToOriginOnCrossOrigin); - ++#endif +diff --git a/cromite_flags/net/base/features_cc/Add-IsCleartextPermitted-flag.inc b/cromite_flags/net/base/features_cc/Add-IsCleartextPermitted-flag.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/net/base/features_cc/Add-IsCleartextPermitted-flag.inc +@@ -0,0 +1,3 @@ ++CROMITE_FEATURE(kIsCleartextPermitted, ++ "IsCleartextPermitted", ++ base::FEATURE_ENABLED_BY_DEFAULT); +diff --git a/cromite_flags/net/base/features_h/Add-IsCleartextPermitted-flag.inc b/cromite_flags/net/base/features_h/Add-IsCleartextPermitted-flag.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/net/base/features_h/Add-IsCleartextPermitted-flag.inc +@@ -0,0 +1 @@ +NET_EXPORT BASE_DECLARE_FEATURE(kIsCleartextPermitted); -+ - // Support for altering the parameters used for DNS transaction timeout. See - // ResolveContext::SecureTransactionTimeout(). - NET_EXPORT BASE_DECLARE_FEATURE(kDnsTransactionDynamicTimeouts); 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 -@@ -233,6 +233,10 @@ std::unique_ptr URLRequestHttpJob::Create(URLRequest* request) { +@@ -232,6 +232,11 @@ std::unique_ptr URLRequestHttpJob::Create(URLRequest* request) { + RedirectUtil::ResponseCode::REDIRECT_307_TEMPORARY_REDIRECT, "HSTS"); } - #if BUILDFLAG(IS_ANDROID) + if (base::FeatureList::IsEnabled(net::features::kIsCleartextPermitted) == false) { + return std::make_unique(request, + ERR_CLEARTEXT_NOT_PERMITTED); + } ++ + #if BUILDFLAG(IS_ANDROID) // Check whether the app allows cleartext traffic to this host, and return // ERR_CLEARTEXT_NOT_PERMITTED if not. - if (request->context()->check_cleartext_permitted() && -- 2.25.1 diff --git a/build/patches/Add-an-always-incognito-mode.patch b/build/patches/Add-an-always-incognito-mode.patch index 928a68c5b..e6e3d372d 100644 --- a/build/patches/Add-an-always-incognito-mode.patch +++ b/build/patches/Add-an-always-incognito-mode.patch @@ -48,15 +48,11 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../browser/tabmodel/TabPersistentStore.java | 9 + .../browser/toolbar/ToolbarManager.java | 4 +- .../webapps/WebappIntentDataProvider.java | 14 ++ - chrome/browser/about_flags.cc | 4 + .../browser/android/historical_tab_saver.cc | 24 ++- .../chrome_autocomplete_provider_client.cc | 9 + .../chrome_autocomplete_provider_client.h | 1 + .../remote_suggestions_service_factory.cc | 5 + .../host_content_settings_map_factory.cc | 22 ++- - chrome/browser/flag_descriptions.cc | 6 + - chrome/browser/flag_descriptions.h | 3 + - .../flags/android/chrome_feature_list.cc | 4 +- chrome/browser/history/history_tab_helper.cc | 20 +++ chrome/browser/history/history_tab_helper.h | 10 +- .../android/offline_page_bridge.cc | 11 +- @@ -80,17 +76,23 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../browser/content_settings_pref_provider.h | 2 + .../core/browser/host_content_settings_map.cc | 4 +- .../core/browser/host_content_settings_map.h | 3 + - .../core/offline_page_feature.cc | 3 + - .../offline_pages/core/offline_page_feature.h | 1 + .../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 +- - 67 files changed, 763 insertions(+), 94 deletions(-) + .../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, 762 insertions(+), 92 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 create mode 100644 chrome/browser/ui/messages/android/java/src/org/chromium/chrome/browser/ui/messages/snackbar/INeedSnackbarManager.java + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/add-an-always-incognito-mode.inc + create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/add-an-always-incognito-mode.inc + create mode 100644 cromite_flags/components/offline_pages/core/offline_page_feature_cc/add-an-always-incognito-mode.inc + create mode 100644 cromite_flags/components/offline_pages/core/offline_page_feature_h/add-an-always-incognito-mode.inc diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_java_resources.gni --- a/chrome/android/chrome_java_resources.gni @@ -1185,20 +1187,6 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappI @Override public @ScreenOrientationLockType.EnumType int getDefaultOrientation() { return mWebappExtras.orientation; -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 -@@ -5426,6 +5426,10 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kOfflinePagesLivePageSharingName, - flag_descriptions::kOfflinePagesLivePageSharingDescription, kOsAndroid, - FEATURE_VALUE_TYPE(offline_pages::kOfflinePagesLivePageSharingFeature)}, -+ {"offline-pages-auto-save", -+ flag_descriptions::kOfflinePagesAutoSaveFeatureName, -+ flag_descriptions::kOfflinePagesAutoSaveFeatureDescription, kOsAndroid, -+ FEATURE_VALUE_TYPE(offline_pages::kOfflinePagesAutoSaveFeature)}, - {"query-tiles", flag_descriptions::kQueryTilesName, - flag_descriptions::kQueryTilesDescription, kOsAndroid, - FEATURE_WITH_PARAMS_VALUE_TYPE(query_tiles::features::kQueryTiles, diff --git a/chrome/browser/android/historical_tab_saver.cc b/chrome/browser/android/historical_tab_saver.cc --- a/chrome/browser/android/historical_tab_saver.cc +++ b/chrome/browser/android/historical_tab_saver.cc @@ -1366,49 +1354,6 @@ diff --git a/chrome/browser/content_settings/host_content_settings_map_factory.c #if BUILDFLAG(ENABLE_EXTENSIONS) // These must be registered before before the HostSettings are passed over to // the IOThread. Simplest to do this on construction. -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 -@@ -4214,6 +4214,12 @@ const char kOfflinePagesLivePageSharingDescription[] = - "Enables to share current loaded page as offline page by saving as MHTML " - "first."; - -+const char kOfflinePagesAutoSaveFeatureName[] = -+ "Enables autosave of offline page"; -+const char kOfflinePagesAutoSaveFeatureDescription[] = -+ "Enables autosave of offline page, as automatic switching in case " -+ "the device goes offline."; -+ - const char kPageInfoHistoryName[] = "Page info history"; - const char kPageInfoHistoryDescription[] = - "Enable a history sub page to the page info menu, and a button to forget " -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 -@@ -2487,6 +2487,9 @@ extern const char kOmahaMinSdkVersionAndroidDescription[]; - extern const char kOmahaMinSdkVersionAndroidMinSdk1Description[]; - extern const char kOmahaMinSdkVersionAndroidMinSdk1000Description[]; - -+extern const char kOfflinePagesAutoSaveFeatureName[]; -+extern const char kOfflinePagesAutoSaveFeatureDescription[]; -+ - extern const char kPageInfoHistoryName[]; - extern const char kPageInfoHistoryDescription[]; - -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 -@@ -588,8 +588,8 @@ BASE_FEATURE(kCCTFeatureUsage, - BASE_FEATURE(kCCTIncognito, "CCTIncognito", base::FEATURE_ENABLED_BY_DEFAULT); - - BASE_FEATURE(kCCTIncognitoAvailableToThirdParty, -- "CCTIncognitoAvailableToThirdParty", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "CCTIncognitoAvailableToThirdParty", // must be enabled -+ base::FEATURE_ENABLED_BY_DEFAULT); // in Bromite - - BASE_FEATURE(kCCTIntentFeatureOverrides, - "CCTIntentFeatureOverrides", diff --git a/chrome/browser/history/history_tab_helper.cc b/chrome/browser/history/history_tab_helper.cc --- a/chrome/browser/history/history_tab_helper.cc +++ b/chrome/browser/history/history_tab_helper.cc @@ -2097,30 +2042,6 @@ diff --git a/components/content_settings/core/browser/host_content_settings_map. // Whether ContentSettings in the PrefProvider will store a last_modified // timestamp. bool store_last_modified_; -diff --git a/components/offline_pages/core/offline_page_feature.cc b/components/offline_pages/core/offline_page_feature.cc ---- a/components/offline_pages/core/offline_page_feature.cc -+++ b/components/offline_pages/core/offline_page_feature.cc -@@ -44,6 +44,9 @@ BASE_FEATURE(kOfflinePagesNetworkStateLikelyUnknown, - "OfflinePagesNetworkStateLikelyUnknown", - base::FEATURE_DISABLED_BY_DEFAULT); - -+const base::Feature kOfflinePagesAutoSaveFeature{ -+ "OfflinePagesAutoSaveEnabled", base::FEATURE_DISABLED_BY_DEFAULT}; -+ - const char kPrefetchingOfflinePagesExperimentsOption[] = "exp"; - - bool IsOfflinePagesCTEnabled() { -diff --git a/components/offline_pages/core/offline_page_feature.h b/components/offline_pages/core/offline_page_feature.h ---- a/components/offline_pages/core/offline_page_feature.h -+++ b/components/offline_pages/core/offline_page_feature.h -@@ -19,6 +19,7 @@ BASE_DECLARE_FEATURE(kOfflinePagesInDownloadHomeOpenInCctFeature); - BASE_DECLARE_FEATURE(kOfflinePagesDescriptiveFailStatusFeature); - BASE_DECLARE_FEATURE(kOnTheFlyMhtmlHashComputationFeature); - BASE_DECLARE_FEATURE(kOfflinePagesNetworkStateLikelyUnknown); -+extern const base::Feature kOfflinePagesAutoSaveFeature; - - // The parameter name used to find the experiment tag for prefetching offline - // pages. diff --git a/components/omnibox/browser/autocomplete_provider_client.cc b/components/omnibox/browser/autocomplete_provider_client.cc --- a/components/omnibox/browser/autocomplete_provider_client.cc +++ b/components/omnibox/browser/autocomplete_provider_client.cc @@ -2169,5 +2090,43 @@ 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())); +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 ++++ b/cromite_flags/chrome/browser/about_flags_cc/add-an-always-incognito-mode.inc +@@ -0,0 +1,13 @@ ++#ifdef FLAG_SECTION ++ ++#if BUILDFLAG(IS_ANDROID) ++ ++ {"offline-pages-auto-save", ++ "Enables autosave of offline page", ++ "Enables autosave of offline page, as automatic switching in case " ++ "the device goes offline.", kOsAndroid, ++ FEATURE_VALUE_TYPE(offline_pages::kOfflinePagesAutoSaveFeature)}, ++ ++#endif ++ ++#endif +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/add-an-always-incognito-mode.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/add-an-always-incognito-mode.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/add-an-always-incognito-mode.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_ENABLED(kCCTIncognitoAvailableToThirdParty); +diff --git a/cromite_flags/components/offline_pages/core/offline_page_feature_cc/add-an-always-incognito-mode.inc b/cromite_flags/components/offline_pages/core/offline_page_feature_cc/add-an-always-incognito-mode.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/components/offline_pages/core/offline_page_feature_cc/add-an-always-incognito-mode.inc +@@ -0,0 +1,3 @@ ++CROMITE_FEATURE(kOfflinePagesAutoSaveFeature, ++ "OfflinePagesAutoSaveEnabled", ++ base::FEATURE_DISABLED_BY_DEFAULT); +diff --git a/cromite_flags/components/offline_pages/core/offline_page_feature_h/add-an-always-incognito-mode.inc b/cromite_flags/components/offline_pages/core/offline_page_feature_h/add-an-always-incognito-mode.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/components/offline_pages/core/offline_page_feature_h/add-an-always-incognito-mode.inc +@@ -0,0 +1 @@ ++BASE_DECLARE_FEATURE(kOfflinePagesAutoSaveFeature); -- 2.25.1 diff --git a/build/patches/Add-bookmark-import-export-actions.patch b/build/patches/Add-bookmark-import-export-actions.patch index 6ded98bcf..87fd54056 100644 --- a/build/patches/Add-bookmark-import-export-actions.patch +++ b/build/patches/Add-bookmark-import-export-actions.patch @@ -26,16 +26,12 @@ 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 +- - chrome/browser/about_flags.cc | 8 + .../bookmarks/android/bookmark_bridge.cc | 283 ++++++++++++++++++ .../bookmarks/android/bookmark_bridge.h | 30 +- .../browser/bookmarks/bookmark_html_writer.cc | 11 + .../dialogs/DownloadLocationCustomView.java | 8 +- .../DownloadLocationDialogCoordinator.java | 8 +- - chrome/browser/flag_descriptions.cc | 5 + - chrome/browser/flag_descriptions.h | 3 + - .../flags/android/chrome_feature_list.cc | 6 + - .../flags/android/chrome_feature_list.h | 1 + + .../flags/android/chrome_feature_list.cc | 1 + .../browser/flags/ChromeFeatureList.java | 1 + chrome/browser/importer/profile_writer.cc | 12 + chrome/browser/importer/profile_writer.h | 6 + @@ -46,6 +42,9 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../utility/importer/bookmark_html_reader.cc | 28 +- .../utility/importer/bookmark_html_reader.h | 8 + .../headless_select_file_dialog.cc | 4 + + .../add-bookmark-import-export-actions.inc | 12 + + .../add-bookmark-import-export-actions.inc | 4 + + .../add-bookmark-import-export-actions.inc | 1 + .../chromium/ui/base/SelectFileDialog.java | 18 +- .../java/strings/android_ui_strings.grd | 3 + ui/shell_dialogs/select_file_dialog.h | 2 + @@ -54,7 +53,10 @@ 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 + - 44 files changed, 922 insertions(+), 29 deletions(-) + 43 files changed, 917 insertions(+), 29 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 diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml --- a/chrome/android/java/AndroidManifest.xml @@ -861,24 +863,6 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn "bookmarks/url_and_id.h", "cart/cart_db.cc", "cart/cart_db.h", -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 -@@ -9847,6 +9847,14 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(features::kForceOffTextAutosizing)}, - #endif - -+#if BUILDFLAG(IS_ANDROID) -+ {"export-bookmarks-use-saf", -+ flag_descriptions::kBookmarksExportUseSafName, -+ flag_descriptions::kBookmarksExportUseSafDescription, kOsAndroid, -+ FEATURE_VALUE_TYPE( -+ chrome::android::kBookmarksExportUseSaf)}, -+#endif -+ - #if BUILDFLAG(IS_CHROMEOS_ASH) - {"video-conference", flag_descriptions::kVideoConferenceName, - flag_descriptions::kVideoConferenceDescription, kOsCrOS, 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 @@ -1379,34 +1363,6 @@ diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browse // Already showing the dialog. if (mDialogModel != null) return; -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 -@@ -7763,6 +7763,11 @@ const char kEnableBoundSessionCredentialsDescription[] = - "prevent the usage of bound credentials outside of the user device."; - #endif // BUILDFLAG(ENABLE_BOUND_SESSION_CREDENTIALS) - -+const char kBookmarksExportUseSafName[] = "Use saf for bookmarks export"; -+const char kBookmarksExportUseSafDescription[] = -+ "When enabled user can choose where save the exported bookmarks " -+ "file."; -+ - // ============================================================================ - // Don't just add flags to the end, put them in the right section in - // alphabetical order just like the header file. -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 -@@ -4496,6 +4496,9 @@ extern const char kEnableBoundSessionCredentialsName[]; - extern const char kEnableBoundSessionCredentialsDescription[]; - #endif // BUILDFLAG(ENABLE_BOUND_SESSION_CREDENTIALS) - -+extern const char kBookmarksExportUseSafName[]; -+extern const char kBookmarksExportUseSafDescription[]; -+ - // ============================================================================ - // Don't just add flags to the end, put them in the right section in - // alphabetical order. See top instructions for more. 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 @@ -1418,28 +1374,6 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse &kCriticalPersistedTabData, &kCreateNewTabInitializeRenderer, &kCCTBackgroundTab, -@@ -1195,5 +1196,10 @@ BASE_FEATURE(kWebApkInstallService, - "WebApkInstallService", - base::FEATURE_DISABLED_BY_DEFAULT); - -+// disabled by default because of an issue on Android 6.0 -+BASE_FEATURE(kBookmarksExportUseSaf, -+ "BookmarksExportUseSaf", -+ base::FEATURE_DISABLED_BY_DEFAULT); -+ - } // namespace android - } // namespace chrome -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 -@@ -189,6 +189,7 @@ BASE_DECLARE_FEATURE(kTabStripRedesign); - BASE_DECLARE_FEATURE(kTabletToolbarReordering); - BASE_DECLARE_FEATURE(kTabStripStartupRefactoring); - BASE_DECLARE_FEATURE(kTabToGTSAnimation); -+BASE_DECLARE_FEATURE(kBookmarksExportUseSaf); - BASE_DECLARE_FEATURE(kTestDefaultDisabled); - BASE_DECLARE_FEATURE(kTestDefaultEnabled); - BASE_DECLARE_FEATURE(kThumbnailPlaceholder); 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 @@ -1709,6 +1643,38 @@ diff --git a/components/headless/select_file_dialog/headless_select_file_dialog. SelectFileDialogCallback callback_; }; +diff --git a/cromite_flags/chrome/browser/about_flags_cc/add-bookmark-import-export-actions.inc b/cromite_flags/chrome/browser/about_flags_cc/add-bookmark-import-export-actions.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/add-bookmark-import-export-actions.inc +@@ -0,0 +1,12 @@ ++#ifdef FLAG_SECTION ++ ++#if BUILDFLAG(IS_ANDROID) ++ {"export-bookmarks-use-saf", ++ "Use saf for bookmarks export", ++ "When enabled user can choose where save the exported bookmarks " ++ "file.", kOsAndroid, ++ FEATURE_VALUE_TYPE( ++ chrome::android::kBookmarksExportUseSaf)}, ++#endif ++ ++#endif +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/add-bookmark-import-export-actions.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/add-bookmark-import-export-actions.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/add-bookmark-import-export-actions.inc +@@ -0,0 +1,4 @@ ++// disabled by default because of an issue on Android 6.0 ++CROMITE_FEATURE(kBookmarksExportUseSaf, ++ "BookmarksExportUseSaf", ++ base::FEATURE_DISABLED_BY_DEFAULT); +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/add-bookmark-import-export-actions.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/add-bookmark-import-export-actions.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/add-bookmark-import-export-actions.inc +@@ -0,0 +1 @@ ++BASE_DECLARE_FEATURE(kBookmarksExportUseSaf); diff --git a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java b/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java --- a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java +++ b/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java diff --git a/build/patches/Add-custom-tab-intents-privacy-option.patch b/build/patches/Add-custom-tab-intents-privacy-option.patch index fde388a00..10a81604a 100644 --- a/build/patches/Add-custom-tab-intents-privacy-option.patch +++ b/build/patches/Add-custom-tab-intents-privacy-option.patch @@ -15,11 +15,12 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../browser/LaunchIntentDispatcher.java | 21 ++++++++++++++++ .../IncognitoCustomTabIntentDataProvider.java | 6 +++++ .../privacy/settings/PrivacySettings.java | 24 +++++++++++++++++++ - .../flags/android/chrome_feature_list.cc | 6 ++--- .../chrome/browser/tab/TabAssociatedApp.java | 6 ++++- .../strings/android_chrome_strings.grd | 14 +++++++++++ - .../core/common/language_experiments.cc | 4 ++-- - 8 files changed, 85 insertions(+), 6 deletions(-) + .../core/common/language_experiments.cc | 1 + + .../add-custom-tab-intents-privacy-option.inc | 2 ++ + 8 files changed, 83 insertions(+), 1 deletion(-) + create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/add-custom-tab-intents-privacy-option.inc diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml --- a/chrome/android/java/res/xml/privacy_preferences.xml @@ -171,29 +172,6 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting Preference doNotTrackPref = findPreference(PREF_DO_NOT_TRACK); if (doNotTrackPref != null) { doNotTrackPref.setSummary( -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 -@@ -592,8 +592,8 @@ BASE_FEATURE(kCCTIncognitoAvailableToThirdParty, - base::FEATURE_ENABLED_BY_DEFAULT); // in Bromite - - BASE_FEATURE(kCCTIntentFeatureOverrides, -- "CCTIntentFeatureOverrides", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "CCTIntentFeatureOverrides", // must be disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - - BASE_FEATURE(kCCTMinimized, "CCTMinimized", base::FEATURE_DISABLED_BY_DEFAULT); - -@@ -603,7 +603,7 @@ BASE_FEATURE(kCCTPageInsightsHub, - - BASE_FEATURE(kCCTPostMessageAPI, - "CCTPostMessageAPI", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ base::FEATURE_DISABLED_BY_DEFAULT); - - BASE_FEATURE(kCCTPrefetchDelayShowOnStart, - "CCTPrefetchDelayShowOnStart", diff --git a/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/TabAssociatedApp.java b/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/TabAssociatedApp.java --- a/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/TabAssociatedApp.java +++ b/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/TabAssociatedApp.java @@ -237,16 +215,18 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro diff --git a/components/language/core/common/language_experiments.cc b/components/language/core/common/language_experiments.cc --- a/components/language/core/common/language_experiments.cc +++ b/components/language/core/common/language_experiments.cc -@@ -18,8 +18,8 @@ BASE_FEATURE(kContentLanguagesInLanguagePicker, - "ContentLanguagesInLanguagePicker", - base::FEATURE_DISABLED_BY_DEFAULT); - BASE_FEATURE(kCctAutoTranslate, -- "CCTAutoTranslate", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "CCTAutoTranslate", // Always disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - +@@ -24,4 +24,5 @@ BASE_FEATURE(kCctAutoTranslate, // Params: const char kContentLanguagesDisableObserversParam[] = "disable_observers"; + ++SET_CROMITE_FEATURE_DISABLED(kCctAutoTranslate); + } // namespace language +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/add-custom-tab-intents-privacy-option.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/add-custom-tab-intents-privacy-option.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/add-custom-tab-intents-privacy-option.inc +@@ -0,0 +1,2 @@ ++SET_CROMITE_FEATURE_DISABLED(kCCTIntentFeatureOverrides); ++SET_CROMITE_FEATURE_DISABLED(kCCTPostMessageAPI); -- 2.25.1 diff --git a/build/patches/Add-flag-for-omnibox-autocomplete-filtering.patch b/build/patches/Add-flag-for-omnibox-autocomplete-filtering.patch index 4f0671c2a..1355753c9 100644 --- a/build/patches/Add-flag-for-omnibox-autocomplete-filtering.patch +++ b/build/patches/Add-flag-for-omnibox-autocomplete-filtering.patch @@ -7,52 +7,14 @@ and internal chrome:// pages will be used for the autocomplete results. License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/about_flags.cc | 22 ++++++++++++++++++- - .../browser/autocomplete_controller.cc | 10 +++++++++ - .../omnibox/browser/history_url_provider.cc | 3 +++ - components/omnibox/browser/search_provider.cc | 4 ++++ - components/url_formatter/url_fixer.cc | 4 ++++ - 5 files changed, 42 insertions(+), 1 deletion(-) + .../browser/autocomplete_controller.cc | 10 ++++++ + .../omnibox/browser/history_url_provider.cc | 3 ++ + components/omnibox/browser/search_provider.cc | 4 +++ + components/url_formatter/url_fixer.cc | 4 +++ + ...lag-for-omnibox-autocomplete-filtering.inc | 32 +++++++++++++++++++ + 5 files changed, 53 insertions(+) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Add-flag-for-omnibox-autocomplete-filtering.inc -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 -@@ -653,6 +653,22 @@ const FeatureEntry::FeatureVariation kReaderModeDiscoverabilityVariations[] = { - #endif // BUILDFLAG(IS_ANDROID) - - #if BUILDFLAG(IS_ANDROID) -+const FeatureEntry::Choice kOmniboxAutocompleteFiltering[] = { -+ {flags_ui::kGenericExperimentChoiceDefault, "", ""}, -+ {"Search suggestions only", -+ "omnibox-autocomplete-filtering", -+ "search"}, -+ {"Search suggestions and bookmarks", -+ "omnibox-autocomplete-filtering", -+ "search-bookmarks"}, -+ {"Search suggestions and internal chrome pages", -+ "omnibox-autocomplete-filtering", -+ "search-chrome"}, -+ {"Search suggestions, bookmarks, and internal chrome pages", -+ "omnibox-autocomplete-filtering", -+ "search-bookmarks-chrome"}, -+}; -+ - const FeatureEntry::FeatureParam kAdaptiveButton_AlwaysNone[] = { - {"mode", "always-none"}}; - const FeatureEntry::FeatureParam kAdaptiveButton_AlwaysNewTab[] = { -@@ -4986,7 +5002,11 @@ const FeatureEntry kFeatureEntries[] = { - kOsMac | kOsLinux | kOsWin, - FEATURE_VALUE_TYPE(features::kSystemNotifications)}, - #endif // BUILDFLAG(ENABLE_SYSTEM_NOTIFICATIONS) && !BUILDFLAG(IS_CHROMEOS_ASH) --#if BUILDFLAG(IS_ANDROID) -+#if BUILDFLAG(IS_ANDROID) // Bromite autocomplete filtering -+ {"omnibox-autocomplete-filtering", -+ "Omnibox Autocomplete Filtering", -+ "Restrict omnibox autocomplete results to a combination of search suggestions (if enabled), bookmarks, and internal chrome pages.", -+ kOsAll, MULTI_VALUE_TYPE(kOmniboxAutocompleteFiltering)}, - {"adaptive-button-in-top-toolbar", - flag_descriptions::kAdaptiveButtonInTopToolbarName, - flag_descriptions::kAdaptiveButtonInTopToolbarDescription, kOsAndroid, diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/omnibox/browser/autocomplete_controller.cc --- a/components/omnibox/browser/autocomplete_controller.cc +++ b/components/omnibox/browser/autocomplete_controller.cc @@ -135,5 +97,42 @@ diff --git a/components/url_formatter/url_fixer.cc b/components/url_formatter/ur url.append(kChromeUIDefaultHost); FixupPort(trimmed, parts.port, &url); FixupPath(trimmed, parts.path, &url); +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Add-flag-for-omnibox-autocomplete-filtering.inc b/cromite_flags/chrome/browser/about_flags_cc/Add-flag-for-omnibox-autocomplete-filtering.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Add-flag-for-omnibox-autocomplete-filtering.inc +@@ -0,0 +1,32 @@ ++#if BUILDFLAG(IS_ANDROID) ++ ++#ifdef FEATURE_PARAM_SECTION ++ ++const FeatureEntry::Choice kOmniboxAutocompleteFiltering[] = { ++ {flags_ui::kGenericExperimentChoiceDefault, "", ""}, ++ {"Search suggestions only", ++ "omnibox-autocomplete-filtering", ++ "search"}, ++ {"Search suggestions and bookmarks", ++ "omnibox-autocomplete-filtering", ++ "search-bookmarks"}, ++ {"Search suggestions and internal chrome pages", ++ "omnibox-autocomplete-filtering", ++ "search-chrome"}, ++ {"Search suggestions, bookmarks, and internal chrome pages", ++ "omnibox-autocomplete-filtering", ++ "search-bookmarks-chrome"}, ++}; ++ ++#endif ++ ++#ifdef FLAG_SECTION ++ ++ {"omnibox-autocomplete-filtering", ++ "Omnibox Autocomplete Filtering", ++ "Restrict omnibox autocomplete results to a combination of search suggestions (if enabled), bookmarks, and internal chrome pages.", ++ kOsAll, MULTI_VALUE_TYPE(kOmniboxAutocompleteFiltering)}, ++ ++#endif ++ ++#endif -- 2.25.1 diff --git a/build/patches/Add-flag-for-save-data-header.patch b/build/patches/Add-flag-for-save-data-header.patch index 875ec7200..3bdc1e9fa 100644 --- a/build/patches/Add-flag-for-save-data-header.patch +++ b/build/patches/Add-flag-for-save-data-header.patch @@ -4,56 +4,15 @@ Subject: Add flag for save-data-header License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/about_flags.cc | 5 ++++- - chrome/browser/flag_descriptions.cc | 4 ++++ - chrome/browser/flag_descriptions.h | 3 +++ - .../browser/loader/browser_initiated_resource_request.cc | 8 ++++++++ - services/network/public/cpp/features.cc | 5 +++++ - services/network/public/cpp/features.h | 2 ++ - 6 files changed, 26 insertions(+), 1 deletion(-) + .../loader/browser_initiated_resource_request.cc | 8 ++++++++ + .../about_flags_cc/Add-flag-for-save-data-header.inc | 10 ++++++++++ + .../cpp/features_cc/Add-flag-for-save-data-header.inc | 4 ++++ + .../cpp/features_h/Add-flag-for-save-data-header.inc | 1 + + 4 files changed, 23 insertions(+) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Add-flag-for-save-data-header.inc + create mode 100644 cromite_flags/services/network/public/cpp/features_cc/Add-flag-for-save-data-header.inc + create mode 100644 cromite_flags/services/network/public/cpp/features_h/Add-flag-for-save-data-header.inc -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 -@@ -5614,7 +5614,10 @@ const FeatureEntry kFeatureEntries[] = { - {"force-text-direction", flag_descriptions::kForceTextDirectionName, - flag_descriptions::kForceTextDirectionDescription, kOsAll, - MULTI_VALUE_TYPE(kForceTextDirectionChoices)}, --#if BUILDFLAG(IS_ANDROID) -+#if BUILDFLAG(IS_ANDROID) // Bromite save data header -+ {"enable-save-data-header", flag_descriptions::kEnableSaveDataHeaderName, -+ flag_descriptions::kEnableSaveDataHeaderDescription, kOsAndroid, -+ FEATURE_VALUE_TYPE(network::features::kEnableSaveDataHeader)}, - {"force-update-menu-type", flag_descriptions::kUpdateMenuTypeName, - flag_descriptions::kUpdateMenuTypeDescription, kOsAndroid, - MULTI_VALUE_TYPE(kForceUpdateMenuTypeChoices)}, -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 -@@ -1401,6 +1401,10 @@ const char kDeprecateAltBasedSixPackDescription[] = - "Show deprecation notifications and disable functionality for Alt based " - "six pack deprecations. The Search based versions continue to work."; - -+const char kEnableSaveDataHeaderName[] = "Enable save-data header"; -+const char kEnableSaveDataHeaderDescription[] = -+ "Enable save-data header without enabling Data Saver."; -+ - const char kDeprecateOldKeyboardShortcutsAcceleratorName[] = - "Enable deprecation notifications for Ctrl+Alt+/ to open Keyboard " - "shortcuts app"; -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 -@@ -726,6 +726,9 @@ extern const char kDeprecateAltBasedSixPackDescription[]; - extern const char kDeprecateOldKeyboardShortcutsAcceleratorName[]; - extern const char kDeprecateOldKeyboardShortcutsAcceleratorDescription[]; - -+extern const char kEnableSaveDataHeaderName[]; -+extern const char kEnableSaveDataHeaderDescription[]; -+ - extern const char kMemlogName[]; - extern const char kMemlogDescription[]; - extern const char kMemlogModeMinimal[]; diff --git a/content/browser/loader/browser_initiated_resource_request.cc b/content/browser/loader/browser_initiated_resource_request.cc --- a/content/browser/loader/browser_initiated_resource_request.cc +++ b/content/browser/loader/browser_initiated_resource_request.cc @@ -81,32 +40,35 @@ diff --git a/content/browser/loader/browser_initiated_resource_request.cc b/cont if (should_update_existing_headers) { headers->RemoveHeader("Save-Data"); } -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 -@@ -14,6 +14,11 @@ - - namespace network::features { - -+// Enable save-data header separately (without enabled data reduction service). -+BASE_FEATURE(kEnableSaveDataHeader, -+ "EnableSaveDataHeader", -+ base::FEATURE_DISABLED_BY_DEFAULT); +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Add-flag-for-save-data-header.inc b/cromite_flags/chrome/browser/about_flags_cc/Add-flag-for-save-data-header.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Add-flag-for-save-data-header.inc +@@ -0,0 +1,10 @@ + - BASE_FEATURE(kNetworkErrorLogging, - "NetworkErrorLogging", // disabled by default - base::FEATURE_DISABLED_BY_DEFAULT); // in bromite -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 -@@ -91,6 +91,8 @@ extern uint32_t GetLoaderChunkSize(); - COMPONENT_EXPORT(NETWORK_CPP) - BASE_DECLARE_FEATURE(kCorsNonWildcardRequestHeadersSupport); - -+COMPONENT_EXPORT(NETWORK_CPP) BASE_DECLARE_FEATURE(kEnableSaveDataHeader); ++#ifdef FLAG_SECTION + - COMPONENT_EXPORT(NETWORK_CPP) BASE_DECLARE_FEATURE(kNetworkServiceMemoryCache); - - COMPONENT_EXPORT(NETWORK_CPP) BASE_DECLARE_FEATURE(kOmitCorsClientCert); ++ // Bromite save data header ++ {"enable-save-data-header", ++ "Enable save-data header", ++ "Enable save-data header without enabling Data Saver.", kOsAll, ++ FEATURE_VALUE_TYPE(network::features::kEnableSaveDataHeader)}, ++ ++#endif +diff --git a/cromite_flags/services/network/public/cpp/features_cc/Add-flag-for-save-data-header.inc b/cromite_flags/services/network/public/cpp/features_cc/Add-flag-for-save-data-header.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/services/network/public/cpp/features_cc/Add-flag-for-save-data-header.inc +@@ -0,0 +1,4 @@ ++// Enable save-data header separately (without enabled data reduction service). ++CROMITE_FEATURE(kEnableSaveDataHeader, ++ "EnableSaveDataHeader", ++ base::FEATURE_DISABLED_BY_DEFAULT); +diff --git a/cromite_flags/services/network/public/cpp/features_h/Add-flag-for-save-data-header.inc b/cromite_flags/services/network/public/cpp/features_h/Add-flag-for-save-data-header.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/services/network/public/cpp/features_h/Add-flag-for-save-data-header.inc +@@ -0,0 +1 @@ ++COMPONENT_EXPORT(NETWORK_CPP) BASE_DECLARE_FEATURE(kEnableSaveDataHeader); -- 2.25.1 diff --git a/build/patches/Add-flag-to-configure-maximum-connections-per-host.patch b/build/patches/Add-flag-to-configure-maximum-connections-per-host.patch index cc619dfc9..b054ea13b 100644 --- a/build/patches/Add-flag-to-configure-maximum-connections-per-host.patch +++ b/build/patches/Add-flag-to-configure-maximum-connections-per-host.patch @@ -8,68 +8,15 @@ with limited CPU/memory resources and it is disabled by default. License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/about_flags.cc | 8 ++++++++ - chrome/browser/flag_descriptions.cc | 4 ++++ - chrome/browser/flag_descriptions.h | 3 +++ .../common/network_features.cc | 3 +++ .../common/network_features.h | 4 ++++ .../common/network_switch_list.h | 4 ++++ .../spoof_checks/top_domains/BUILD.gn | 1 + + ...o-configure-maximum-connections-per-host.inc | 17 +++++++++++++++++ net/socket/client_socket_pool_manager.cc | 17 +++++++++++++++++ - 8 files changed, 44 insertions(+) + 6 files changed, 46 insertions(+) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/add-flag-to-configure-maximum-connections-per-host.inc -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 -@@ -1287,6 +1287,11 @@ const FeatureEntry::Choice kForceColorProfileChoices[] = { - switches::kForceDisplayColorProfile, "hdr10"}, - }; - -+const FeatureEntry::Choice kMaxConnectionsPerHostChoices[] = { -+ {features::kMaxConnectionsPerHostChoiceDefault, "", ""}, -+ {features::kMaxConnectionsPerHostChoice15, switches::kMaxConnectionsPerHost, "15"}, -+}; -+ - const FeatureEntry::Choice kMemlogModeChoices[] = { - {flags_ui::kGenericExperimentChoiceDisabled, "", ""}, - {flag_descriptions::kMemlogModeMinimal, heap_profiling::kMemlogMode, -@@ -5508,6 +5513,9 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(chrome::android::kShareSheetCustomActionsPolish)}, - - #endif // BUILDFLAG(IS_ANDROID) -+ {"max-connections-per-host", flag_descriptions::kMaxConnectionsPerHostName, -+ flag_descriptions::kMaxConnectionsPerHostDescription, kOsAll, -+ MULTI_VALUE_TYPE(kMaxConnectionsPerHostChoices)}, - {"disallow-doc-written-script-loads", - flag_descriptions::kDisallowDocWrittenScriptsUiName, - flag_descriptions::kDisallowDocWrittenScriptsUiDescription, kOsAll, -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 -@@ -2231,6 +2231,10 @@ const char kUnthrottledNestedTimeoutDescription[] = - "websites abusing the API will still eventually have their setTimeouts " - "clamped."; - -+const char kMaxConnectionsPerHostName[] = "Maximum connections per host"; -+const char kMaxConnectionsPerHostDescription[] = -+ "Customize maximum allowed connections per host."; -+ - const char kMediaRouterCastAllowAllIPsName[] = - "Connect to Cast devices on all IP addresses"; - const char kMediaRouterCastAllowAllIPsDescription[] = -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 -@@ -1264,6 +1264,9 @@ extern const char kUndoAutofillDescription[]; - extern const char kUnthrottledNestedTimeoutName[]; - extern const char kUnthrottledNestedTimeoutDescription[]; - -+extern const char kMaxConnectionsPerHostName[]; -+extern const char kMaxConnectionsPerHostDescription[]; -+ - extern const char kMediaRouterCastAllowAllIPsName[]; - extern const char kMediaRouterCastAllowAllIPsDescription[]; - diff --git a/components/network_session_configurator/common/network_features.cc b/components/network_session_configurator/common/network_features.cc --- a/components/network_session_configurator/common/network_features.cc +++ b/components/network_session_configurator/common/network_features.cc @@ -120,6 +67,28 @@ diff --git a/components/url_formatter/spoof_checks/top_domains/BUILD.gn b/compon ] if (is_ios) { frameworks = [ "UIKit.framework" ] +diff --git a/cromite_flags/chrome/browser/about_flags_cc/add-flag-to-configure-maximum-connections-per-host.inc b/cromite_flags/chrome/browser/about_flags_cc/add-flag-to-configure-maximum-connections-per-host.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/add-flag-to-configure-maximum-connections-per-host.inc +@@ -0,0 +1,17 @@ ++#ifdef FEATURE_PARAM_SECTION ++ ++const FeatureEntry::Choice kMaxConnectionsPerHostChoices[] = { ++ {features::kMaxConnectionsPerHostChoiceDefault, "", ""}, ++ {features::kMaxConnectionsPerHostChoice15, switches::kMaxConnectionsPerHost, "15"}, ++}; ++ ++#endif ++ ++#ifdef FLAG_SECTION ++ ++ {"max-connections-per-host", ++ "Maximum connections per host", ++ "Customize maximum allowed connections per host.", kOsAll, ++ MULTI_VALUE_TYPE(kMaxConnectionsPerHostChoices)}, ++ ++#endif diff --git a/net/socket/client_socket_pool_manager.cc b/net/socket/client_socket_pool_manager.cc --- a/net/socket/client_socket_pool_manager.cc +++ b/net/socket/client_socket_pool_manager.cc diff --git a/build/patches/Add-flag-to-control-video-playback-resume-feature.patch b/build/patches/Add-flag-to-control-video-playback-resume-feature.patch index 3b4e10272..3d295070c 100644 --- a/build/patches/Add-flag-to-control-video-playback-resume-feature.patch +++ b/build/patches/Add-flag-to-control-video-playback-resume-feature.patch @@ -6,71 +6,35 @@ Disable it by default on Android as it is everywhere else License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/about_flags.cc | 4 ++++ - chrome/browser/flag_descriptions.cc | 5 +++++ - chrome/browser/flag_descriptions.h | 3 +++ - media/base/media_switches.cc | 8 ++------ - 4 files changed, 14 insertions(+), 6 deletions(-) + ...lag-to-control-video-playback-resume-feature.inc | 13 +++++++++++++ + ...lag-to-control-video-playback-resume-feature.inc | 1 + + 2 files changed, 14 insertions(+) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/add-flag-to-control-video-playback-resume-feature.inc + create mode 100644 cromite_flags/media/base/media_switches_cc/add-flag-to-control-video-playback-resume-feature.inc -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 -@@ -4209,6 +4209,10 @@ const FeatureEntry kFeatureEntries[] = { - chrome::android::kContextualSearchSuppressShortView, - kContextualSearchSuppressShortViewVariations, - "ContextualSearchSuppressShortView")}, +diff --git a/cromite_flags/chrome/browser/about_flags_cc/add-flag-to-control-video-playback-resume-feature.inc b/cromite_flags/chrome/browser/about_flags_cc/add-flag-to-control-video-playback-resume-feature.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/add-flag-to-control-video-playback-resume-feature.inc +@@ -0,0 +1,13 @@ ++#ifdef FLAG_SECTION ++ ++#if BUILDFLAG(IS_ANDROID) ++ + {"resume-background-video", -+ flag_descriptions::kResumeBackgroundVideoName, -+ flag_descriptions::kResumeBackgroundVideoDescription, kOsAll, ++ "Resume background video.", ++ "Resume background video playback when tab re-gains focus; additionally, " ++ "it will pause video playback every single time you switch tabs.", kOsAll, + FEATURE_VALUE_TYPE(media::kResumeBackgroundVideo)}, - {"related-searches", flag_descriptions::kRelatedSearchesName, - flag_descriptions::kRelatedSearchesDescription, kOsAndroid, - FEATURE_WITH_PARAMS_VALUE_TYPE(chrome::android::kRelatedSearches, -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 -@@ -1477,6 +1477,11 @@ const char kEnableManagedConfigurationWebApiDescription[] = - "Allows website to access a managed configuration provided by the device " - "administrator for the origin."; - -+const char kResumeBackgroundVideoName[] = "Resume background video."; -+const char kResumeBackgroundVideoDescription[] = -+ "Resume background video playback when tab re-gains focus; additionally, " -+ "it will pause video playback every single time you switch tabs."; + - const char kEnablePixelCanvasRecordingName[] = "Enable pixel canvas recording"; - const char kEnablePixelCanvasRecordingDescription[] = - "Pixel canvas recording allows the compositor to raster contents aligned " -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 -@@ -814,6 +814,9 @@ extern const char kEnablePenetratingImageSelectionDescription[]; - extern const char kEnablePerfettoSystemTracingName[]; - extern const char kEnablePerfettoSystemTracingDescription[]; - -+extern const char kResumeBackgroundVideoName[]; -+extern const char kResumeBackgroundVideoDescription[]; ++#endif // BUILDFLAG(IS_ANDROID) + - extern const char kEnablePeripheralCustomizationName[]; - extern const char kEnablePeripheralCustomizationDescription[]; - -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 -@@ -360,12 +360,8 @@ BASE_FEATURE(kPreloadMetadataLazyLoad, - // Let videos be resumed via remote controls (for example, the notification) - // when in background. - BASE_FEATURE(kResumeBackgroundVideo, -- "resume-background-video", --#if BUILDFLAG(IS_ANDROID) -- base::FEATURE_ENABLED_BY_DEFAULT --#else -- base::FEATURE_DISABLED_BY_DEFAULT --#endif -+ "resume-background-video", // disabled by default -+ base::FEATURE_DISABLED_BY_DEFAULT // in Bromite - ); - - #if BUILDFLAG(IS_MAC) ++#endif // ifdef FLAG_SECTION +diff --git a/cromite_flags/media/base/media_switches_cc/add-flag-to-control-video-playback-resume-feature.inc b/cromite_flags/media/base/media_switches_cc/add-flag-to-control-video-playback-resume-feature.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/media/base/media_switches_cc/add-flag-to-control-video-playback-resume-feature.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_DISABLED(kResumeBackgroundVideo); -- 2.25.1 diff --git a/build/patches/Add-flag-to-disable-IPv6-probes.patch b/build/patches/Add-flag-to-disable-IPv6-probes.patch index 11ef0f0c8..e9c227d3c 100644 --- a/build/patches/Add-flag-to-disable-IPv6-probes.patch +++ b/build/patches/Add-flag-to-disable-IPv6-probes.patch @@ -4,58 +4,44 @@ Subject: Add flag to disable IPv6 probes License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/about_flags.cc | 4 ++++ - chrome/browser/flag_descriptions.cc | 4 ++++ - chrome/browser/flag_descriptions.h | 3 +++ - net/BUILD.gn | 1 + - net/base/features.cc | 4 ++++ - net/base/features.h | 3 +++ - net/dns/host_resolver_manager.cc | 11 +++++++++++ - services/network/public/cpp/features.cc | 5 +++++ - services/network/public/cpp/features.h | 1 + - 9 files changed, 36 insertions(+) + .../add-flag-to-disable-IPv6-probes.inc | 8 ++++++++ + .../features_cc/add-flag-to-disable-IPv6-probes.inc | 3 +++ + .../features_h/add-flag-to-disable-IPv6-probes.inc | 2 ++ + net/BUILD.gn | 1 + + net/dns/host_resolver_manager.cc | 11 +++++++++++ + 5 files changed, 25 insertions(+) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/add-flag-to-disable-IPv6-probes.inc + create mode 100644 cromite_flags/net/base/features_cc/add-flag-to-disable-IPv6-probes.inc + create mode 100644 cromite_flags/net/base/features_h/add-flag-to-disable-IPv6-probes.inc -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 -@@ -6883,6 +6883,10 @@ const FeatureEntry kFeatureEntries[] = { - {"enable-reader-mode-in-cct", flag_descriptions::kReaderModeInCCTName, - flag_descriptions::kReaderModeInCCTDescription, kOsAndroid, - FEATURE_VALUE_TYPE(chrome::android::kReaderModeInCCT)}, +diff --git a/cromite_flags/chrome/browser/about_flags_cc/add-flag-to-disable-IPv6-probes.inc b/cromite_flags/chrome/browser/about_flags_cc/add-flag-to-disable-IPv6-probes.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/add-flag-to-disable-IPv6-probes.inc +@@ -0,0 +1,8 @@ ++#ifdef FLAG_SECTION ++ + {"ipv6-probing", -+ flag_descriptions::kIPv6ProbingName, -+ flag_descriptions::kIPv6ProbingDescription, kOsAll, ++ "Enable IPv6 probing.", ++ "Send IPv6 probes to a RIPE DNS address to verify IPv6 connectivity.", kOsAll, + FEATURE_VALUE_TYPE(net::features::kIPv6Probing)}, - #endif // BUILDFLAG(IS_ANDROID) - - {"shopping-collection", -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 -@@ -3956,6 +3956,10 @@ const char kAccountReauthenticationRecentTimeWindow0mins[] = "0 mins"; - const char kAccountReauthenticationRecentTimeWindow1mins[] = "1 mins"; - const char kAccountReauthenticationRecentTimeWindow5mins[] = "5 mins"; - -+const char kIPv6ProbingName[] = "Enable IPv6 probing."; -+const char kIPv6ProbingDescription[] = -+ "Send IPv6 probes to a RIPE DNS address to verify IPv6 connectivity."; -+ - const char kChimeAlwaysShowNotificationDescription[] = - "A debug flag to always show Chime notification after receiving a payload."; - const char kChimeAlwaysShowNotificationName[] = -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 -@@ -892,6 +892,9 @@ extern const char kEnableWasmStringrefName[]; - extern const char kEnableWasmStringrefDescription[]; - - extern const char kEnableWasmTieringName[]; -+extern const char kIPv6ProbingName[]; -+extern const char kIPv6ProbingDescription[]; + - extern const char kEnableWasmTieringDescription[]; - - extern const char kEvDetailsInPageInfoName[]; ++#endif // ifdef FLAG_SECTION +diff --git a/cromite_flags/net/base/features_cc/add-flag-to-disable-IPv6-probes.inc b/cromite_flags/net/base/features_cc/add-flag-to-disable-IPv6-probes.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/net/base/features_cc/add-flag-to-disable-IPv6-probes.inc +@@ -0,0 +1,3 @@ ++CROMITE_FEATURE(kIPv6Probing, ++ "IPv6Probing", ++ base::FEATURE_ENABLED_BY_DEFAULT); +diff --git a/cromite_flags/net/base/features_h/add-flag-to-disable-IPv6-probes.inc b/cromite_flags/net/base/features_h/add-flag-to-disable-IPv6-probes.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/net/base/features_h/add-flag-to-disable-IPv6-probes.inc +@@ -0,0 +1,2 @@ ++// Enable IPv6 ping probes to RIPE DNS. ++NET_EXPORT BASE_DECLARE_FEATURE(kIPv6Probing); diff --git a/net/BUILD.gn b/net/BUILD.gn --- a/net/BUILD.gn +++ b/net/BUILD.gn @@ -67,33 +53,6 @@ diff --git a/net/BUILD.gn b/net/BUILD.gn ] public_deps = [ -diff --git a/net/base/features.cc b/net/base/features.cc ---- a/net/base/features.cc -+++ b/net/base/features.cc -@@ -41,6 +41,10 @@ BASE_FEATURE(kUseDnsHttpsSvcb, - const base::FeatureParam kUseDnsHttpsSvcbEnforceSecureResponse{ - &kUseDnsHttpsSvcb, "UseDnsHttpsSvcbEnforceSecureResponse", false}; - -+BASE_FEATURE(kIPv6Probing, -+ "IPv6Probing", -+ base::FEATURE_ENABLED_BY_DEFAULT); -+ - const base::FeatureParam kUseDnsHttpsSvcbInsecureExtraTimeMax{ - &kUseDnsHttpsSvcb, "UseDnsHttpsSvcbInsecureExtraTimeMax", - base::Milliseconds(50)}; -diff --git a/net/base/features.h b/net/base/features.h ---- a/net/base/features.h -+++ b/net/base/features.h -@@ -52,6 +52,9 @@ NET_EXPORT BASE_DECLARE_FEATURE(kUseDnsHttpsSvcb); - NET_EXPORT extern const base::FeatureParam - kUseDnsHttpsSvcbEnforceSecureResponse; - -+// Enable IPv6 ping probes to RIPE DNS. -+NET_EXPORT BASE_DECLARE_FEATURE(kIPv6Probing); -+ - // If we are still waiting for an HTTPS transaction after all the - // other transactions in an insecure DnsTask have completed, we will compute a - // timeout for the remaining transaction. The timeout will be diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc --- a/net/dns/host_resolver_manager.cc +++ b/net/dns/host_resolver_manager.cc @@ -129,31 +88,5 @@ diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc if (probing_ipv6_) { ipv6_request_callbacks_.push_back(std::move(callback)); return ERR_IO_PENDING; -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 -@@ -32,6 +32,11 @@ BASE_FEATURE(kThrottleDelayable, - "ThrottleDelayable", - base::FEATURE_ENABLED_BY_DEFAULT); - -+// Enable IPv6 ping probes to RIPE DNS. -+BASE_FEATURE(kIPv6Probing, -+ "IPv6Probing", -+ base::FEATURE_ENABLED_BY_DEFAULT); -+ - // When kPriorityRequestsDelayableOnSlowConnections is enabled, HTTP - // requests fetched from a SPDY/QUIC/H2 proxies can be delayed by the - // ResourceScheduler just as HTTP/1.1 resources are. However, requests from such -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 -@@ -16,6 +16,7 @@ namespace features { - COMPONENT_EXPORT(NETWORK_CPP) BASE_DECLARE_FEATURE(kNetworkErrorLogging); - COMPONENT_EXPORT(NETWORK_CPP) BASE_DECLARE_FEATURE(kReporting); - COMPONENT_EXPORT(NETWORK_CPP) BASE_DECLARE_FEATURE(kThrottleDelayable); -+COMPONENT_EXPORT(NETWORK_CPP) BASE_DECLARE_FEATURE(kIPv6Probing); - COMPONENT_EXPORT(NETWORK_CPP) - BASE_DECLARE_FEATURE(kDelayRequestsOnMultiplexedConnections); - COMPONENT_EXPORT(NETWORK_CPP) -- 2.25.1 diff --git a/build/patches/Add-flag-to-disable-external-intent-requests.patch b/build/patches/Add-flag-to-disable-external-intent-requests.patch index 2d15f7456..8e37f8c7b 100644 --- a/build/patches/Add-flag-to-disable-external-intent-requests.patch +++ b/build/patches/Add-flag-to-disable-external-intent-requests.patch @@ -7,54 +7,27 @@ when flag is disabled no external intent will ever be allowed, for any URL. License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/about_flags.cc | 5 +++++ - chrome/browser/flag_descriptions.cc | 6 ++++++ - chrome/browser/flag_descriptions.h | 3 +++ - 3 files changed, 14 insertions(+) + ...Add-flag-to-disable-external-intent-requests.inc | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Add-flag-to-disable-external-intent-requests.inc -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 -@@ -4150,6 +4150,11 @@ const FeatureEntry kFeatureEntries[] = { - {"ui-disable-partial-swap", flag_descriptions::kUiPartialSwapName, - flag_descriptions::kUiPartialSwapDescription, kOsAll, - SINGLE_DISABLE_VALUE_TYPE(switches::kUIDisablePartialSwap)}, +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Add-flag-to-disable-external-intent-requests.inc b/cromite_flags/chrome/browser/about_flags_cc/Add-flag-to-disable-external-intent-requests.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Add-flag-to-disable-external-intent-requests.inc +@@ -0,0 +1,13 @@ +#if BUILDFLAG(IS_ANDROID) -+ {"allow-external-intent-requests", flag_descriptions::kDisableExternalIntentRequestsName, -+ flag_descriptions::kDisableExternalIntentRequestsDescription, kOsAll, ++ ++#ifdef FLAG_SECTION ++ ++ {"allow-external-intent-requests", ++ "Allow forward URL requests to external intents", ++ "If disabled, URL requests will never" ++ "allow for redirecting to an external intent.", kOsAndroid, + SINGLE_DISABLE_VALUE_TYPE("disable-external-intent-requests")}, -+#endif - {"disable-webrtc-hw-decoding", flag_descriptions::kWebrtcHwDecodingName, - flag_descriptions::kWebrtcHwDecodingDescription, kOsAndroid | kOsCrOS, - SINGLE_DISABLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding)}, -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 -@@ -4276,6 +4276,12 @@ const char kPolicyLogsPageAndroidDescription[] = - "Enable the new chrome://policy-logs page containing logs for debugging " - "policy related issues on Android."; - -+const char kDisableExternalIntentRequestsName[] = -+ "Allow forward URL requests to external intents"; -+const char kDisableExternalIntentRequestsDescription[] = -+ "If disabled, URL requests will never" -+ "allow for redirecting to an external intent."; + - const char kQueryTilesName[] = "Show query tiles"; - const char kQueryTilesDescription[] = "Shows query tiles in Chrome"; - const char kQueryTilesNTPName[] = "Show query tiles in NTP"; -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 -@@ -2537,6 +2537,9 @@ extern const char kQueryTilesNTPDescription[]; - extern const char kQueryTilesOnStartName[]; - extern const char kQueryTilesOnStartDescription[]; - extern const char kQueryTilesSingleTierName[]; -+extern const char kDisableExternalIntentRequestsName[]; -+extern const char kDisableExternalIntentRequestsDescription[]; ++#endif + - extern const char kQueryTilesSingleTierDescription[]; - extern const char kQueryTilesEnableQueryEditingName[]; - extern const char kQueryTilesEnableQueryEditingDescription[]; ++#endif -- 2.25.1 diff --git a/build/patches/Add-flag-to-disable-vibration.patch b/build/patches/Add-flag-to-disable-vibration.patch index 71d179ca7..42e332d4a 100644 --- a/build/patches/Add-flag-to-disable-vibration.patch +++ b/build/patches/Add-flag-to-disable-vibration.patch @@ -4,57 +4,19 @@ Subject: Add flag to disable vibration License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/about_flags.cc | 4 ++++ - chrome/browser/flag_descriptions.cc | 3 +++ - chrome/browser/flag_descriptions.h | 2 ++ - content/child/runtime_features.cc | 1 + - content/public/common/content_features.cc | 5 +++++ - content/public/common/content_features.h | 2 ++ - third_party/blink/public/platform/web_runtime_features.h | 1 + - .../blink/renderer/modules/vibration/vibration_controller.cc | 3 +++ - .../blink/renderer/platform/exported/web_runtime_features.cc | 4 ++++ - .../blink/renderer/platform/runtime_enabled_features.json5 | 4 ++++ - 10 files changed, 29 insertions(+) + content/child/runtime_features.cc | 1 + + .../about_flags_cc/Add-flag-to-disable-vibration.inc | 8 ++++++++ + .../content_features_cc/Add-flag-to-disable-vibration.inc | 4 ++++ + .../content_features_h/Add-flag-to-disable-vibration.inc | 1 + + third_party/blink/public/platform/web_runtime_features.h | 1 + + .../renderer/modules/vibration/vibration_controller.cc | 3 +++ + .../renderer/platform/exported/web_runtime_features.cc | 4 ++++ + .../renderer/platform/runtime_enabled_features.json5 | 4 ++++ + 8 files changed, 26 insertions(+) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Add-flag-to-disable-vibration.inc + create mode 100644 cromite_flags/content/public/common/content_features_cc/Add-flag-to-disable-vibration.inc + create mode 100644 cromite_flags/content/public/common/content_features_h/Add-flag-to-disable-vibration.inc -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 -@@ -8451,6 +8451,10 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(features::kNewMacNotificationAPI)}, - #endif - -+ {"enable-vibration", flag_descriptions::kEnableVibrationName, -+ flag_descriptions::kEnableVibrationDescription, kOsAll, -+ FEATURE_VALUE_TYPE(features::kVibration)}, -+ - #if BUILDFLAG(IS_CHROMEOS_ASH) - {"exo-consumed-by-ime-by-flag", - flag_descriptions::kExoConsumedByImeByFlagName, -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 -@@ -7343,6 +7343,9 @@ const char kLacrosMergeIcuDataFileDescription[] = - "Enables sharing common areas of icudtl.dat between Ash and Lacros."; - #endif // #if BUILDFLAG(IS_CHROMEOS_LACROS) - -+const char kEnableVibrationName[] = "Vibration"; -+const char kEnableVibrationDescription[] = "Enable vibration API; an user gesture will still be needed."; -+ - #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) - const char kGetAllScreensMediaName[] = "GetAllScreensMedia API"; - const char kGetAllScreensMediaDescription[] = -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 -@@ -4469,6 +4469,8 @@ extern const char kWebUITabStripContextMenuAfterTapName[]; - extern const char kWebUITabStripContextMenuAfterTapDescription[]; - #endif // BUILDFLAG(ENABLE_WEBUI_TAB_STRIP) - -+extern const char kEnableVibrationName[]; -+extern const char kEnableVibrationDescription[]; - #if defined(TOOLKIT_VIEWS) || BUILDFLAG(IS_ANDROID) - - extern const char kAutofillCreditCardUploadName[]; diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc --- a/content/child/runtime_features.cc +++ b/content/child/runtime_features.cc @@ -66,33 +28,34 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features. #endif #if BUILDFLAG(IS_ANDROID) -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 -@@ -106,6 +106,11 @@ BASE_FEATURE(kBackForwardCacheMemoryControls, - #endif - ); - -+// Enables vibration; an user gesture will still be required if enabled. -+BASE_FEATURE(kVibration, -+ "VibrationEnabled", -+ base::FEATURE_DISABLED_BY_DEFAULT); +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Add-flag-to-disable-vibration.inc b/cromite_flags/chrome/browser/about_flags_cc/Add-flag-to-disable-vibration.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Add-flag-to-disable-vibration.inc +@@ -0,0 +1,8 @@ ++#ifdef FLAG_SECTION + - // When this feature is enabled, private network requests initiated from - // non-secure contexts in the `public` address space are blocked. - // -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 -@@ -311,6 +311,8 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kForceOffTextAutosizing); - CONTENT_EXPORT BASE_DECLARE_FEATURE(kUserMediaScreenCapturing); - CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebNfc); - #endif // BUILDFLAG(IS_ANDROID) -+CONTENT_EXPORT BASE_DECLARE_FEATURE(kVibration); ++ {"enable-vibration", ++ "Vibration", ++ "Enable vibration API; an user gesture will still be needed.", kOsAll, ++ FEATURE_VALUE_TYPE(features::kVibration)}, + - - #if BUILDFLAG(IS_MAC) - CONTENT_EXPORT BASE_DECLARE_FEATURE(kMacAllowBackgroundingRenderProcesses); ++#endif +diff --git a/cromite_flags/content/public/common/content_features_cc/Add-flag-to-disable-vibration.inc b/cromite_flags/content/public/common/content_features_cc/Add-flag-to-disable-vibration.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/content/public/common/content_features_cc/Add-flag-to-disable-vibration.inc +@@ -0,0 +1,4 @@ ++// Enables vibration; an user gesture will still be required if enabled. ++CROMITE_FEATURE(kVibration, ++ "VibrationEnabled", ++ base::FEATURE_DISABLED_BY_DEFAULT); +diff --git a/cromite_flags/content/public/common/content_features_h/Add-flag-to-disable-vibration.inc b/cromite_flags/content/public/common/content_features_h/Add-flag-to-disable-vibration.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/content/public/common/content_features_h/Add-flag-to-disable-vibration.inc +@@ -0,0 +1 @@ ++CONTENT_EXPORT BASE_DECLARE_FEATURE(kVibration); diff --git a/third_party/blink/public/platform/web_runtime_features.h b/third_party/blink/public/platform/web_runtime_features.h --- a/third_party/blink/public/platform/web_runtime_features.h +++ b/third_party/blink/public/platform/web_runtime_features.h diff --git a/build/patches/Add-site-engagement-flag.patch b/build/patches/Add-site-engagement-flag.patch index 529462207..f9105f723 100644 --- a/build/patches/Add-site-engagement-flag.patch +++ b/build/patches/Add-site-engagement-flag.patch @@ -7,16 +7,16 @@ Disabled by default. Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/about_flags.cc | 6 ++++ - chrome/browser/flag_descriptions.cc | 5 +++ - chrome/browser/flag_descriptions.h | 3 ++ + chrome/browser/about_flags.cc | 1 + .../content/site_engagement_score.cc | 5 +++ components/site_engagement/core/BUILD.gn | 6 ++++ - components/site_engagement/core/features.cc | 29 ++++++++++++++++ + components/site_engagement/core/features.cc | 30 ++++++++++++++++ components/site_engagement/core/features.h | 34 +++++++++++++++++++ - 7 files changed, 88 insertions(+) + .../Add-site-engagement-flag.inc | 10 ++++++ + 6 files changed, 86 insertions(+) create mode 100644 components/site_engagement/core/features.cc create mode 100644 components/site_engagement/core/features.h + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Add-site-engagement-flag.inc diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc @@ -29,46 +29,6 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc #include "components/shared_highlighting/core/common/shared_highlighting_features.h" #include "components/signin/core/browser/dice_account_reconcilor_delegate.h" #include "components/signin/public/base/signin_buildflags.h" -@@ -9936,6 +9937,11 @@ const FeatureEntry kFeatureEntries[] = { - kLargeFaviconFromGoogleVariations, - "LargeFaviconFromGoogle")}, - -+ {"site-engagement", -+ flag_descriptions::kSiteEngagementName, -+ flag_descriptions::kSiteEngagementDescription, kOsAll, -+ FEATURE_VALUE_TYPE(site_engagement::features::kSiteEngagement)}, -+ - #if BUILDFLAG(IS_ANDROID) - {"force-off-text-autosizing", - flag_descriptions::kForceOffTextAutosizingName, -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 -@@ -3820,6 +3820,11 @@ const char kSkipServiceWorkerFetchHandlerDescription[] = - "Skips starting the service worker and run the fetch handler if the fetch " - "handler is recognized as skippable."; - -+const char kSiteEngagementName[] = -+ "Enable site engagement feature"; -+const char kSiteEngagementDescription[] = -+ "Site Engagement Service provides information about how engaged a user is with a origin; this affects which NTP tiles are automatically created."; -+ - const char kWebSQLAccessName[] = "Allows access to WebSQL APIs"; - const char kWebSQLAccessDescription[] = - "The WebSQL API is disabled by default, but can be enabled here."; -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 -@@ -2234,6 +2234,9 @@ extern const char kReduceAcceptLanguageDescription[]; - extern const char kSkipServiceWorkerFetchHandlerName[]; - extern const char kSkipServiceWorkerFetchHandlerDescription[]; - -+extern const char kSiteEngagementName[]; -+extern const char kSiteEngagementDescription[]; -+ - extern const char kWebSQLAccessName[]; - extern const char kWebSQLAccessDescription[]; - diff --git a/components/site_engagement/content/site_engagement_score.cc b/components/site_engagement/content/site_engagement_score.cc --- a/components/site_engagement/content/site_engagement_score.cc +++ b/components/site_engagement/content/site_engagement_score.cc @@ -113,7 +73,7 @@ diff --git a/components/site_engagement/core/features.cc b/components/site_engag new file mode 100644 --- /dev/null +++ b/components/site_engagement/core/features.cc -@@ -0,0 +1,29 @@ +@@ -0,0 +1,30 @@ +/* + This file is part of Bromite. + @@ -138,8 +98,9 @@ new file mode 100644 +namespace site_engagement { +namespace features { + -+const base::Feature kSiteEngagement{"SiteEngagement", -+ base::FEATURE_DISABLED_BY_DEFAULT}; ++CROMITE_FEATURE(kSiteEngagement, ++ "SiteEngagement", ++ base::FEATURE_DISABLED_BY_DEFAULT); + +} // namespace features +} // namespace site_engagement @@ -176,11 +137,26 @@ new file mode 100644 +namespace features { + +// Enable site engagement -+extern const base::Feature kSiteEngagement; ++BASE_DECLARE_FEATURE(kSiteEngagement); + +} // namespace features +} // namespace site_engagement + +#endif // SITE_ENGAGEMENT_CORE_FEATURES_H_ +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Add-site-engagement-flag.inc b/cromite_flags/chrome/browser/about_flags_cc/Add-site-engagement-flag.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Add-site-engagement-flag.inc +@@ -0,0 +1,10 @@ ++#ifdef FLAG_SECTION ++ ++ {"site-engagement", ++ "Enable site engagement feature", ++ "Site Engagement Service provides information about how " ++ "engaged a user is with a origin; this affects which NTP " ++ "tiles are automatically created.", kOsAll, ++ FEATURE_VALUE_TYPE(site_engagement::features::kSiteEngagement)}, ++ ++#endif -- 2.25.1 diff --git a/build/patches/Allow-building-without-enable_reporting.patch b/build/patches/Allow-building-without-enable_reporting.patch index 4ddc862d0..c0f6ae5c2 100644 --- a/build/patches/Allow-building-without-enable_reporting.patch +++ b/build/patches/Allow-building-without-enable_reporting.patch @@ -12,10 +12,10 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../renderer_host/render_frame_host_impl.cc | 6 ------ .../web_package/signed_exchange_reporter.cc | 2 ++ ...content_switch_dependent_feature_overrides.cc | 1 + - net/base/features.cc | 2 +- + .../Allow-building-without-enable_reporting.inc | 2 ++ + net/base/features.cc | 1 + net/reporting/reporting_service.cc | 6 ++++++ services/network/network_context.h | 4 ++-- - services/network/public/cpp/features.cc | 6 +++--- services/network/public/mojom/BUILD.gn | 1 - .../network/public/mojom/network_context.mojom | 2 ++ .../core/frame/csp/content_security_policy.cc | 3 +++ @@ -24,7 +24,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../renderer/core/frame/reporting_context.cc | 9 +++++++++ .../renderer/core/frame/reporting_context.h | 7 +++++-- .../renderer/core/frame/reporting_observer.cc | 3 +-- - 20 files changed, 59 insertions(+), 31 deletions(-) + 20 files changed, 58 insertions(+), 27 deletions(-) + create mode 100644 cromite_flags/services/network/public/cpp/features_cc/Allow-building-without-enable_reporting.inc diff --git a/chrome/browser/net/chrome_report_sender.cc b/chrome/browser/net/chrome_report_sender.cc --- a/chrome/browser/net/chrome_report_sender.cc @@ -243,18 +244,24 @@ diff --git a/content/public/common/content_switch_dependent_feature_overrides.cc #include "services/network/public/cpp/features.h" #include "services/network/public/cpp/network_switches.h" #include "third_party/blink/public/common/features.h" +diff --git a/cromite_flags/services/network/public/cpp/features_cc/Allow-building-without-enable_reporting.inc b/cromite_flags/services/network/public/cpp/features_cc/Allow-building-without-enable_reporting.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/services/network/public/cpp/features_cc/Allow-building-without-enable_reporting.inc +@@ -0,0 +1,2 @@ ++SET_CROMITE_FEATURE_DISABLED(kNetworkErrorLogging); ++SET_CROMITE_FEATURE_DISABLED(kReporting); diff --git a/net/base/features.cc b/net/base/features.cc --- a/net/base/features.cc +++ b/net/base/features.cc -@@ -234,7 +234,7 @@ extern const base::FeatureParam kTimeoutTcpConnectAttemptMax( +@@ -224,6 +224,7 @@ extern const base::FeatureParam kTimeoutTcpConnectAttemptMax( + base::Seconds(30)); + #if BUILDFLAG(ENABLE_REPORTING) ++#error Attempting to build with enable_reporting BASE_FEATURE(kDocumentReporting, "DocumentReporting", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ base::FEATURE_DISABLED_BY_DEFAULT); - #endif // BUILDFLAG(ENABLE_REPORTING) - - #if BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) + base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/net/reporting/reporting_service.cc b/net/reporting/reporting_service.cc --- a/net/reporting/reporting_service.cc +++ b/net/reporting/reporting_service.cc @@ -287,23 +294,6 @@ diff --git a/services/network/network_context.h b/services/network/network_conte void AddDomainReliabilityContextForTesting( const url::Origin& origin, const GURL& upload_url, -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 -@@ -15,10 +15,10 @@ - namespace network::features { - - BASE_FEATURE(kNetworkErrorLogging, -- "NetworkErrorLogging", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "NetworkErrorLogging", // disabled by default -+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite - --BASE_FEATURE(kReporting, "Reporting", base::FEATURE_ENABLED_BY_DEFAULT); -+BASE_FEATURE(kReporting, "Reporting", base::FEATURE_DISABLED_BY_DEFAULT); // disabled by default - - // Based on the field trial parameters, this feature will override the value of - // the maximum number of delayable requests allowed in flight. The number of 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 diff --git a/build/patches/Always-use-new-tab-page-for-default-home-page.patch b/build/patches/Always-use-new-tab-page-for-default-home-page.patch index 640ee825b..4df336597 100644 --- a/build/patches/Always-use-new-tab-page-for-default-home-page.patch +++ b/build/patches/Always-use-new-tab-page-for-default-home-page.patch @@ -6,12 +6,13 @@ Ignore any partner-provided home page. License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - .../chromium/chrome/browser/homepage/HomepageManager.java | 4 ---- - chrome/browser/flags/android/chrome_feature_list.cc | 8 ++++---- - .../PartnerBrowserCustomizations.java | 2 +- - .../chromium/components/search_engines/TemplateUrl.java | 1 + - .../android/template_url_service_android.cc | 1 + - 5 files changed, 7 insertions(+), 9 deletions(-) + .../org/chromium/chrome/browser/homepage/HomepageManager.java | 4 ---- + .../partnercustomizations/PartnerBrowserCustomizations.java | 2 +- + .../org/chromium/components/search_engines/TemplateUrl.java | 1 + + .../search_engines/android/template_url_service_android.cc | 1 + + .../always-use-new-tab-page-for-default-home-page.inc | 2 ++ + 5 files changed, 5 insertions(+), 5 deletions(-) + create mode 100755 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/always-use-new-tab-page-for-default-home-page.inc diff --git a/chrome/android/java/src/org/chromium/chrome/browser/homepage/HomepageManager.java b/chrome/android/java/src/org/chromium/chrome/browser/homepage/HomepageManager.java --- a/chrome/android/java/src/org/chromium/chrome/browser/homepage/HomepageManager.java @@ -27,31 +28,6 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/homepage/Homepa String homepagePartnerDefaultGurlSerialized = SharedPreferencesManager.getInstance().readString( ChromePreferenceKeys.HOMEPAGE_PARTNER_CUSTOMIZED_DEFAULT_GURL, ""); -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 -@@ -832,8 +832,8 @@ BASE_FEATURE(kInfobarScrollOptimization, - BASE_FEATURE(kInstantStart, "InstantStart", base::FEATURE_DISABLED_BY_DEFAULT); - - BASE_FEATURE(kNewTabSearchEngineUrlAndroid, -- "NewTabSearchEngineUrlAndroid", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "NewTabSearchEngineUrlAndroid", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - - BASE_FEATURE(kNotificationPermissionVariant, - "NotificationPermissionVariant", -@@ -900,8 +900,8 @@ BASE_FEATURE(kOmniboxWarmRecycledViewPool, - base::FEATURE_ENABLED_BY_DEFAULT); - - BASE_FEATURE(kPartnerCustomizationsUma, -- "PartnerCustomizationsUma", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "PartnerCustomizationsUma", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - BASE_FEATURE(kProbabilisticCryptidRenderer, - "ProbabilisticCryptidRenderer", - base::FEATURE_DISABLED_BY_DEFAULT); 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 @@ -86,5 +62,12 @@ diff --git a/components/search_engines/android/template_url_service_android.cc b // Check if there is already a search engine created from Play API. TemplateURLService::TemplateURLVector template_urls = template_url_service_->GetTemplateURLs(); +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/always-use-new-tab-page-for-default-home-page.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/always-use-new-tab-page-for-default-home-page.inc +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/always-use-new-tab-page-for-default-home-page.inc +@@ -0,0 +1,2 @@ ++SET_CROMITE_FEATURE_DISABLED(kNewTabSearchEngineUrlAndroid); ++SET_CROMITE_FEATURE_DISABLED(kPartnerCustomizationsUma); -- 2.25.1 diff --git a/build/patches/AudioBuffer-AnalyserNode-fp-mitigations.patch b/build/patches/AudioBuffer-AnalyserNode-fp-mitigations.patch index 05c357165..c8677db76 100644 --- a/build/patches/AudioBuffer-AnalyserNode-fp-mitigations.patch +++ b/build/patches/AudioBuffer-AnalyserNode-fp-mitigations.patch @@ -6,11 +6,9 @@ Truncate base latency precision to two digits License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/about_flags.cc | 4 ++++ - chrome/browser/flag_descriptions.cc | 5 +++++ - chrome/browser/flag_descriptions.h | 3 +++ - third_party/blink/common/features.cc | 4 ++++ - third_party/blink/public/common/features.h | 2 ++ + .../AudioBuffer-AnalyserNode-fp-mitigations.inc | 8 ++++++++ + .../AudioBuffer-AnalyserNode-fp-mitigations.inc | 3 +++ + .../AudioBuffer-AnalyserNode-fp-mitigations.inc | 1 + .../renderer/modules/webaudio/audio_buffer.cc | 14 ++++++++++++++ .../blink/renderer/modules/webaudio/audio_buffer.h | 2 ++ .../renderer/modules/webaudio/audio_context.cc | 5 ++++- @@ -18,76 +16,38 @@ 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 +++++++ - 12 files changed, 60 insertions(+), 1 deletion(-) + 10 files changed, 54 insertions(+), 1 deletion(-) + 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 -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 -@@ -4185,6 +4185,10 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kKioskEnableAppServiceDescription, kOsCrOS, - FEATURE_VALUE_TYPE(features::kKioskEnableAppService)}, - #endif // BUILDFLAG(IS_CHROMEOS) +diff --git a/cromite_flags/chrome/browser/about_flags_cc/AudioBuffer-AnalyserNode-fp-mitigations.inc b/cromite_flags/chrome/browser/about_flags_cc/AudioBuffer-AnalyserNode-fp-mitigations.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/AudioBuffer-AnalyserNode-fp-mitigations.inc +@@ -0,0 +1,8 @@ ++#ifdef FLAG_SECTION ++ + {"fingerprinting-audio-context-data-noise", -+ flag_descriptions::kAudioContextShuffleEnabledName, -+ flag_descriptions::kAudioContextShuffleEnabledDescription, kOsAll, ++ "Enable Audio Context fingerprint deception", ++ "Scale the output values of rendered data with a randomly selected factor.", kOsAll, + FEATURE_VALUE_TYPE(blink::features::kAudioContextShuffleEnabled)}, - #if !BUILDFLAG(IS_ANDROID) - {"enable-webrtc-remote-event-log", - flag_descriptions::kWebRtcRemoteEventLogName, -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 -@@ -3740,6 +3740,11 @@ const char kWebTransportDeveloperModeDescription[] = - "When enabled, removes the requirement that all certificates used for " - "WebTransport over HTTP/3 are issued by a known certificate root."; - -+const char kAudioContextShuffleEnabledName[] = -+ "Enable Audio Context fingerprint deception"; -+const char kAudioContextShuffleEnabledDescription[] = -+ "Scale the output values of rendered data with a randomly selected factor."; -+ - const char kWebUsbDeviceDetectionName[] = - "Automatic detection of WebUSB-compatible devices"; - const char kWebUsbDeviceDetectionDescription[] = -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 -@@ -2174,6 +2174,9 @@ extern const char kWebRtcRemoteEventLogDescription[]; - extern const char kWebrtcUseMinMaxVEADimensionsName[]; - extern const char kWebrtcUseMinMaxVEADimensionsDescription[]; - -+extern const char kAudioContextShuffleEnabledName[]; -+extern const char kAudioContextShuffleEnabledDescription[]; -+ - extern const char kWebTransportDeveloperModeName[]; - extern const char kWebTransportDeveloperModeDescription[]; - -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 -@@ -258,6 +258,10 @@ BASE_FEATURE(kBiddingAndScoringDebugReportingAPI, - "BiddingAndScoringDebugReportingAPI", - base::FEATURE_DISABLED_BY_DEFAULT); - -+BASE_FEATURE(kAudioContextShuffleEnabled, -+ "AudioContextShuffleEnabled", -+ base::FEATURE_ENABLED_BY_DEFAULT); + - // Blink garbage collection. - // Enables compaction of backing stores on Blink's heap. - BASE_FEATURE(kBlinkHeapCompaction, -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 -@@ -158,6 +158,8 @@ BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kBlinkHeapConcurrentSweeping); - BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kBlinkHeapIncrementalMarking); - BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kBlinkHeapIncrementalMarkingStress); - ++#endif +diff --git a/cromite_flags/third_party/blink/common/features_cc/AudioBuffer-AnalyserNode-fp-mitigations.inc b/cromite_flags/third_party/blink/common/features_cc/AudioBuffer-AnalyserNode-fp-mitigations.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/third_party/blink/common/features_cc/AudioBuffer-AnalyserNode-fp-mitigations.inc +@@ -0,0 +1,3 @@ ++CROMITE_FEATURE(kAudioContextShuffleEnabled, ++ "AudioContextShuffleEnabled", ++ base::FEATURE_ENABLED_BY_DEFAULT); +diff --git a/cromite_flags/third_party/blink/common/features_h/AudioBuffer-AnalyserNode-fp-mitigations.inc b/cromite_flags/third_party/blink/common/features_h/AudioBuffer-AnalyserNode-fp-mitigations.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/third_party/blink/common/features_h/AudioBuffer-AnalyserNode-fp-mitigations.inc +@@ -0,0 +1 @@ +BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kAudioContextShuffleEnabled); -+ - BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE( - kBlockingDownloadsInAdFrameWithoutUserActivation); - diff --git a/third_party/blink/renderer/modules/webaudio/audio_buffer.cc b/third_party/blink/renderer/modules/webaudio/audio_buffer.cc --- a/third_party/blink/renderer/modules/webaudio/audio_buffer.cc +++ b/third_party/blink/renderer/modules/webaudio/audio_buffer.cc diff --git a/build/patches/Bromite-auto-updater.patch b/build/patches/Bromite-auto-updater.patch index 0144f7bec..36c8e272b 100644 --- a/build/patches/Bromite-auto-updater.patch +++ b/build/patches/Bromite-auto-updater.patch @@ -25,17 +25,20 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../endpoint_fetcher_android.cc | 50 ++++ .../endpoint_fetcher/EndpointFetcher.java | 26 +- .../EndpointHeaderResponse.java | 31 ++ - .../flags/android/chrome_feature_list.cc | 5 + - .../flags/android/chrome_feature_list.h | 1 + + .../flags/android/chrome_feature_list.cc | 1 + .../browser/flags/ChromeFeatureList.java | 1 + .../strings/android_chrome_strings.grd | 23 +- .../endpoint_fetcher/endpoint_fetcher.cc | 103 ++++++- .../endpoint_fetcher/endpoint_fetcher.h | 23 +- - 23 files changed, 933 insertions(+), 50 deletions(-) + .../Bromite-auto-updater.inc | 3 + + .../Bromite-auto-updater.inc | 1 + + 24 files changed, 932 insertions(+), 50 deletions(-) create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/omaha/inline/BromiteInlineUpdateController.java create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/omaha/inline/InlineUpdateController.java create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/omaha/inline/InlineUpdateControllerFactory.java create mode 100644 chrome/browser/endpoint_fetcher/java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointHeaderResponse.java + create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Bromite-auto-updater.inc + create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Bromite-auto-updater.inc diff --git a/build/android/java/templates/BuildConfig.template b/build/android/java/templates/BuildConfig.template --- a/build/android/java/templates/BuildConfig.template @@ -1291,28 +1294,6 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse &kBookmarksImprovedSaveFlow, &kBookmarksRefresh, &kOmahaMinSdkVersionAndroid, -@@ -722,6 +723,10 @@ BASE_FEATURE(kContextMenuTranslateWithGoogleLens, - "ContextMenuTranslateWithGoogleLens", - base::FEATURE_DISABLED_BY_DEFAULT); - -+BASE_FEATURE(kInlineUpdateFlow, -+ "InlineUpdateFlow", -+ base::FEATURE_ENABLED_BY_DEFAULT); -+ - BASE_FEATURE(kLensCameraAssistedSearch, - "LensCameraAssistedSearch", - base::FEATURE_ENABLED_BY_DEFAULT); -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 -@@ -118,6 +118,7 @@ BASE_DECLARE_FEATURE(kGridTabSwitcherLandscapeAspectRatioPhones); - BASE_DECLARE_FEATURE(kHideTabOnTabSwitcher); - BASE_DECLARE_FEATURE(kImprovedIncognitoScreenshot); - BASE_DECLARE_FEATURE(kIncognitoReauthenticationForAndroid); -+BASE_DECLARE_FEATURE(kInlineUpdateFlow); - BASE_DECLARE_FEATURE(kIncognitoScreenshot); - BASE_DECLARE_FEATURE(kInfobarScrollOptimization); - BASE_DECLARE_FEATURE(kImprovedA2HS); 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 @@ -1626,5 +1607,19 @@ diff --git a/components/endpoint_fetcher/endpoint_fetcher.h b/components/endpoin base::WeakPtrFactory weak_ptr_factory_{this}; }; +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Bromite-auto-updater.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Bromite-auto-updater.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Bromite-auto-updater.inc +@@ -0,0 +1,3 @@ ++CROMITE_FEATURE(kInlineUpdateFlow, ++ "InlineUpdateFlow", ++ base::FEATURE_ENABLED_BY_DEFAULT); +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Bromite-auto-updater.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Bromite-auto-updater.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Bromite-auto-updater.inc +@@ -0,0 +1 @@ ++BASE_DECLARE_FEATURE(kInlineUpdateFlow); -- 2.25.1 diff --git a/build/patches/Bromite-subresource-adblocker.patch b/build/patches/Bromite-subresource-adblocker.patch index 12cd7f2d2..b503443dd 100644 --- a/build/patches/Bromite-subresource-adblocker.patch +++ b/build/patches/Bromite-subresource-adblocker.patch @@ -51,8 +51,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../browser/verified_ruleset_dealer.cc | 4 + .../browser/subresource_filter_features.cc | 116 +------- .../core/common/indexed_ruleset.cc | 5 +- - third_party/blink/common/features.cc | 12 +- - 40 files changed, 1211 insertions(+), 135 deletions(-) + .../Bromite-subresource-adblocker.inc | 3 + + 40 files changed, 1208 insertions(+), 129 deletions(-) create mode 100644 chrome/android/java/res/layout/adblock_editor.xml create mode 100644 chrome/android/java/res/xml/adblock_preferences.xml create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/settings/AdBlockEditor.java @@ -63,6 +63,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html create mode 100644 components/component_updater/adblock_updater_service.h create mode 100644 components/component_updater/download_filters_task.cc create mode 100644 components/component_updater/download_filters_task.h + create mode 100644 cromite_flags/third_party/blink/common/features_cc/Bromite-subresource-adblocker.inc diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn @@ -1945,41 +1946,13 @@ diff --git a/components/subresource_filter/core/common/indexed_ruleset.cc b/comp return flat::VerifyIndexedRulesetBuffer(verifier) ? VerifyStatus::kChecksumFailVerifierPass : VerifyStatus::kChecksumFailVerifierFail; -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 -@@ -158,8 +158,8 @@ BASE_FEATURE(kAutofillUseDomNodeIdForRendererId, - // Apply lazy-loading to ad frames which have embeds likely impacting Core Web - // Vitals. - BASE_FEATURE(kAutomaticLazyFrameLoadingToAds, -- "AutomaticLazyFrameLoadingToAds", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "AutomaticLazyFrameLoadingToAds", // must be enabled -+ base::FEATURE_ENABLED_BY_DEFAULT); // in Bromite - - // The timeout value that forces loading iframes that are lazy loaded by - // LazyAds. After this timeout, the frame loading is triggered even when the -@@ -179,8 +179,8 @@ const base::FeatureParam kSkipFrameCountForLazyAds( - // Apply lazy-loading to frames which have embeds likely impacting Core Web - // Vitals. - BASE_FEATURE(kAutomaticLazyFrameLoadingToEmbeds, -- "AutomaticLazyFrameLoadingToEmbeds", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "AutomaticLazyFrameLoadingToEmbeds", // must be enabled -+ base::FEATURE_ENABLED_BY_DEFAULT); // in Bromite - - // The timeout value that forces loading iframes that are lazy loaded by - // LazyEmbeds. After this timeout, the frame loading is triggered even when the -@@ -202,8 +202,8 @@ const base::FeatureParam kSkipFrameCountForLazyEmbeds( - // to gather Blink.AutomaticLazyLoadFrame.LazyEmbedFrameCount UKM data even when - // kAutomaticLazyFrameLoadingToEmbeds is disabled. - BASE_FEATURE(kAutomaticLazyFrameLoadingToEmbedUrls, -- "AutomaticLazyFrameLoadingToEmbedUrls", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "AutomaticLazyFrameLoadingToEmbedUrls", // must be disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - - // Define the strategy for LazyEmbeds to decide which frames we apply - // lazy-loading or not. If the loading strategy is kAllowList, the detection +diff --git a/cromite_flags/third_party/blink/common/features_cc/Bromite-subresource-adblocker.inc b/cromite_flags/third_party/blink/common/features_cc/Bromite-subresource-adblocker.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/third_party/blink/common/features_cc/Bromite-subresource-adblocker.inc +@@ -0,0 +1,3 @@ ++SET_CROMITE_FEATURE_ENABLED(kAutomaticLazyFrameLoadingToAds); ++SET_CROMITE_FEATURE_DISABLED(kAutomaticLazyFrameLoadingToEmbeds); ++SET_CROMITE_FEATURE_DISABLED(kAutomaticLazyFrameLoadingToEmbedUrls); -- 2.25.1 diff --git a/build/patches/Client-hints-overrides.patch b/build/patches/Client-hints-overrides.patch index bebbcf1f9..b67f5af69 100644 --- a/build/patches/Client-hints-overrides.patch +++ b/build/patches/Client-hints-overrides.patch @@ -10,14 +10,16 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html components/embedder_support/user_agent_utils.cc | 4 +--- content/browser/client_hints/client_hints.cc | 3 ++- content/browser/loader/navigation_url_loader_impl.cc | 5 +++++ - content/common/features.cc | 4 ++-- + .../content/common/features_cc/Client-hints-overrides.inc | 1 + + .../public/cpp/features_cc/Client-hints-overrides.inc | 1 + net/http/http_network_transaction.cc | 1 + services/network/public/cpp/client_hints.cc | 1 + - services/network/public/cpp/features.cc | 2 +- third_party/blink/common/client_hints/client_hints.cc | 1 + .../blink/common/client_hints/enabled_client_hints.cc | 4 +++- .../blink/renderer/platform/runtime_enabled_features.json5 | 4 ++-- - 10 files changed, 19 insertions(+), 10 deletions(-) + 10 files changed, 18 insertions(+), 7 deletions(-) + create mode 100644 cromite_flags/content/common/features_cc/Client-hints-overrides.inc + create mode 100644 cromite_flags/services/network/public/cpp/features_cc/Client-hints-overrides.inc diff --git a/components/embedder_support/user_agent_utils.cc b/components/embedder_support/user_agent_utils.cc --- a/components/embedder_support/user_agent_utils.cc @@ -61,20 +63,18 @@ diff --git a/content/browser/loader/navigation_url_loader_impl.cc b/content/brow LogAcceptCHFrameStatus(AcceptCHFrameRestart::kFramePresent); // Given that this is happening in the middle of navigation, there should -diff --git a/content/common/features.cc b/content/common/features.cc ---- a/content/common/features.cc -+++ b/content/common/features.cc -@@ -114,8 +114,8 @@ BASE_FEATURE(kConsolidatedMovementXY, - // Enables support for the `Critical-CH` response header. - // https://github.com/WICG/client-hints-infrastructure/blob/master/reliability.md#critical-ch - BASE_FEATURE(kCriticalClientHint, -- "CriticalClientHint", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "CriticalClientHint", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - - // Enable changing source dynamically for desktop capture. - BASE_FEATURE(kDesktopCaptureChangeSource, +diff --git a/cromite_flags/content/common/features_cc/Client-hints-overrides.inc b/cromite_flags/content/common/features_cc/Client-hints-overrides.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/content/common/features_cc/Client-hints-overrides.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_DISABLED(kCriticalClientHint); +diff --git a/cromite_flags/services/network/public/cpp/features_cc/Client-hints-overrides.inc b/cromite_flags/services/network/public/cpp/features_cc/Client-hints-overrides.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/services/network/public/cpp/features_cc/Client-hints-overrides.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_DISABLED(kAcceptCHFrame); diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc @@ -97,18 +97,6 @@ diff --git a/services/network/public/cpp/client_hints.cc b/services/network/publ // Accept-CH is an sh-list of tokens; see: // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-header-structure-19#section-3.1 absl::optional maybe_list = -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 -@@ -207,7 +207,7 @@ BASE_FEATURE(kWebSocketReassembleShortMessages, - // Enable support for ACCEPT_CH H2/3 frame as part of Client Hint Reliability. - // See: - // https://tools.ietf.org/html/draft-davidben-http-client-hint-reliability-02#section-4.3 --BASE_FEATURE(kAcceptCHFrame, "AcceptCHFrame", base::FEATURE_ENABLED_BY_DEFAULT); -+BASE_FEATURE(kAcceptCHFrame, "AcceptCHFrame", base::FEATURE_DISABLED_BY_DEFAULT); // disabled by default in Bromite - - // Enable - BASE_FEATURE(kGetCookiesStringUma, diff --git a/third_party/blink/common/client_hints/client_hints.cc b/third_party/blink/common/client_hints/client_hints.cc --- a/third_party/blink/common/client_hints/client_hints.cc +++ b/third_party/blink/common/client_hints/client_hints.cc diff --git a/build/patches/Disable-AsyncDNS-by-default.patch b/build/patches/Disable-AsyncDNS-by-default.patch index 4a240166d..8a4455e7b 100644 --- a/build/patches/Disable-AsyncDNS-by-default.patch +++ b/build/patches/Disable-AsyncDNS-by-default.patch @@ -7,27 +7,15 @@ This feature is detrimental to privacy, see also: License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/common/chrome_features.cc | 9 ++------- - 1 file changed, 2 insertions(+), 7 deletions(-) + .../common/chrome_features_cc/Disable-AsyncDNS-by-default.inc | 1 + + 1 file changed, 1 insertion(+) + create mode 100644 cromite_flags/chrome/common/chrome_features_cc/Disable-AsyncDNS-by-default.inc -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 -@@ -74,13 +74,8 @@ BASE_FEATURE(kAppShimNotificationAttribution, - - // Enables the built-in DNS resolver. - BASE_FEATURE(kAsyncDns, -- "AsyncDns", --#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || \ -- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -- base::FEATURE_ENABLED_BY_DEFAULT --#else -- base::FEATURE_DISABLED_BY_DEFAULT --#endif -+ "AsyncDns", // disabled by default -+ base::FEATURE_DISABLED_BY_DEFAULT // in Bromite - ); - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +diff --git a/cromite_flags/chrome/common/chrome_features_cc/Disable-AsyncDNS-by-default.inc b/cromite_flags/chrome/common/chrome_features_cc/Disable-AsyncDNS-by-default.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/common/chrome_features_cc/Disable-AsyncDNS-by-default.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_DISABLED(kAsyncDns); -- 2.25.1 diff --git a/build/patches/Disable-DRM-media-origin-IDs-preprovisioning.patch b/build/patches/Disable-DRM-media-origin-IDs-preprovisioning.patch index dede612d2..0725132e6 100644 --- a/build/patches/Disable-DRM-media-origin-IDs-preprovisioning.patch +++ b/build/patches/Disable-DRM-media-origin-IDs-preprovisioning.patch @@ -4,22 +4,19 @@ Subject: Disable DRM media origin IDs preprovisioning License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - media/base/media_switches.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + .../disable-DRM-media-origin-IDs-preprovisioning.inc | 5 +++++ + 1 file changed, 5 insertions(+) + create mode 100644 cromite_flags/media/base/media_switches_cc/disable-DRM-media-origin-IDs-preprovisioning.inc -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 -@@ -1135,8 +1135,8 @@ BASE_FEATURE(kMediaDrmPersistentLicense, - // MediaDrmBridge. If disabled, MediaDrmBridge will get unprovisioned origin IDs - // which will trigger provisioning process after MediaDrmBridge is created. - BASE_FEATURE(kMediaDrmPreprovisioning, -- "MediaDrmPreprovisioning", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "MediaDrmPreprovisioning", // must be disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - - // Determines if MediaDrmOriginIdManager should attempt to pre-provision origin - // IDs at startup (whenever a profile is loaded). Also used by tests that +diff --git a/cromite_flags/media/base/media_switches_cc/disable-DRM-media-origin-IDs-preprovisioning.inc b/cromite_flags/media/base/media_switches_cc/disable-DRM-media-origin-IDs-preprovisioning.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/media/base/media_switches_cc/disable-DRM-media-origin-IDs-preprovisioning.inc +@@ -0,0 +1,5 @@ ++#if BUILDFLAG(IS_ANDROID) ++ ++SET_CROMITE_FEATURE_DISABLED(kMediaDrmPreprovisioning); ++ ++#endif -- 2.25.1 diff --git a/build/patches/Disable-FLoC-and-privacy-sandbox.patch b/build/patches/Disable-FLoC-and-privacy-sandbox.patch index 94669cd89..43201006f 100644 --- a/build/patches/Disable-FLoC-and-privacy-sandbox.patch +++ b/build/patches/Disable-FLoC-and-privacy-sandbox.patch @@ -16,10 +16,10 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../privacy_sandbox/privacy_sandbox_prompt.cc | 1 + .../history/core/browser/history_backend.cc | 13 +--------- .../privacy_sandbox_attestations.cc | 1 + - .../privacy_sandbox_features.cc | 14 +++++------ + .../privacy_sandbox_features.cc | 4 ++++ .../privacy_sandbox/privacy_sandbox_prefs.cc | 2 +- .../privacy_sandbox_settings_impl.cc | 24 +++++++++++++------ - 9 files changed, 33 insertions(+), 27 deletions(-) + 9 files changed, 30 insertions(+), 20 deletions(-) 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 @@ -104,48 +104,15 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_attestations/privacy_san diff --git a/components/privacy_sandbox/privacy_sandbox_features.cc b/components/privacy_sandbox/privacy_sandbox_features.cc --- a/components/privacy_sandbox/privacy_sandbox_features.cc +++ b/components/privacy_sandbox/privacy_sandbox_features.cc -@@ -12,8 +12,8 @@ BASE_FEATURE(kPrivacySandboxSuppressDialogOnNonNormalBrowsers, - base::FEATURE_ENABLED_BY_DEFAULT); - - BASE_FEATURE(kPrivacySandboxSettings4, -- "PrivacySandboxSettings4", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "PrivacySandboxSettings4", // must be disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite - - const char kPrivacySandboxSettings4ConsentRequiredName[] = "consent-required"; - const char kPrivacySandboxSettings4NoticeRequiredName[] = "notice-required"; -@@ -74,8 +74,8 @@ const base::FeatureParam kPrivacySandboxSettings4CloseAllPrompts{ - &kPrivacySandboxSettings4, "close-all-prompts", true}; - - BASE_FEATURE(kPrivacySandboxSettings3, -- "PrivacySandboxSettings3", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "PrivacySandboxSettings3", // must be disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite - const base::FeatureParam kPrivacySandboxSettings3ConsentRequired{ - &kPrivacySandboxSettings3, "consent-required", false}; - const base::FeatureParam kPrivacySandboxSettings3NoticeRequired{ -@@ -98,7 +98,7 @@ BASE_FEATURE(kOverridePrivacySandboxSettingsLocalTesting, - - BASE_FEATURE(kDisablePrivacySandboxPrompts, - "DisablePrivacySandboxPrompts", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ base::FEATURE_ENABLED_BY_DEFAULT); - - BASE_FEATURE(kPrivacySandboxFirstPartySetsUI, - "PrivacySandboxFirstPartySetsUI", -@@ -107,8 +107,8 @@ const base::FeatureParam kPrivacySandboxFirstPartySetsUISampleSets{ - &kPrivacySandboxFirstPartySetsUI, "use-sample-sets", false}; - - BASE_FEATURE(kEnforcePrivacySandboxAttestations, -- "EnforcePrivacySandboxAttestations", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "EnforcePrivacySandboxAttestations", // if enabled -+ base::FEATURE_ENABLED_BY_DEFAULT); // log to console - - const char kPrivacySandboxEnrollmentOverrides[] = - "privacy-sandbox-enrollment-overrides"; +@@ -126,4 +126,8 @@ BASE_FEATURE(kTrackingProtectionOnboardingForceEligibility, + "TrackingProtectionOnboardingForceEligibility", + base::FEATURE_DISABLED_BY_DEFAULT); + ++SET_CROMITE_FEATURE_DISABLED(kPrivacySandboxSettings4); ++SET_CROMITE_FEATURE_DISABLED(kPrivacySandboxSettings3); ++SET_CROMITE_FEATURE_ENABLED(kDisablePrivacySandboxPrompts); ++SET_CROMITE_FEATURE_ENABLED(kEnforcePrivacySandboxAttestations); // if enabled log to console + } // namespace privacy_sandbox diff --git a/components/privacy_sandbox/privacy_sandbox_prefs.cc b/components/privacy_sandbox/privacy_sandbox_prefs.cc --- a/components/privacy_sandbox/privacy_sandbox_prefs.cc +++ b/components/privacy_sandbox/privacy_sandbox_prefs.cc diff --git a/build/patches/Disable-PrivacyGuide.patch b/build/patches/Disable-PrivacyGuide.patch index a038df872..75bc13396 100644 --- a/build/patches/Disable-PrivacyGuide.patch +++ b/build/patches/Disable-PrivacyGuide.patch @@ -4,9 +4,10 @@ Subject: Disable PrivacyGuide License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - .../browser/ui/webui/settings/settings_ui.cc | 2 +- - chrome/common/chrome_features.cc | 20 +++++++++---------- - 2 files changed, 11 insertions(+), 11 deletions(-) + chrome/browser/ui/webui/settings/settings_ui.cc | 2 +- + .../common/chrome_features_cc/Disable-PrivacyGuide.inc | 10 ++++++++++ + 2 files changed, 11 insertions(+), 1 deletion(-) + create mode 100644 cromite_flags/chrome/common/chrome_features_cc/Disable-PrivacyGuide.inc 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 @@ -20,54 +21,20 @@ diff --git a/chrome/browser/ui/webui/settings/settings_ui.cc b/chrome/browser/ui html_source->AddBoolean("showPrivacyGuide", show_privacy_guide); html_source->AddBoolean("enablePrivacyGuide3", base::FeatureList::IsEnabled( -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 -@@ -475,26 +475,26 @@ BASE_FEATURE(kGeoLanguage, "GeoLanguage", base::FEATURE_DISABLED_BY_DEFAULT); - // Enables or disables the Privacy Guide v3 update of the Privacy Guide feature - // in Chrome Settings. - BASE_FEATURE(kPrivacyGuide3, -- "PrivacyGuide3", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "PrivacyGuide3", // always disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - - // Enables or disables the Privacy Guide preload card update of the Privacy - // Guide feature in Chrome Settings. Also, this requires the PrivacyGuide3 - // feature to be enabled as well. - BASE_FEATURE(kPrivacyGuidePreload, -- "PrivacyGuidePreload", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "PrivacyGuidePreload", // always disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - - #if BUILDFLAG(IS_ANDROID) - BASE_FEATURE(kPrivacyGuideAndroid3, -- "PrivacyGuideAndroid3", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "PrivacyGuideAndroid3", // always disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - #endif - - #if BUILDFLAG(IS_ANDROID) - BASE_FEATURE(kPrivacyGuidePreloadAndroid, -- "PrivacyGuidePreloadAndroid", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "PrivacyGuidePreloadAndroid", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - #endif - - #if !BUILDFLAG(IS_ANDROID) -@@ -1050,8 +1050,8 @@ BASE_FEATURE(kPrintPreviewSetupAssistance, - - #if BUILDFLAG(IS_ANDROID) - BASE_FEATURE(kPrivacyGuideAndroid, -- "PrivacyGuideAndroid", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "PrivacyGuideAndroid", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - - BASE_FEATURE(kPrivacyGuideAndroidPostMVP, - "PrivacyGuideAndroidPostMVP", +diff --git a/cromite_flags/chrome/common/chrome_features_cc/Disable-PrivacyGuide.inc b/cromite_flags/chrome/common/chrome_features_cc/Disable-PrivacyGuide.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/common/chrome_features_cc/Disable-PrivacyGuide.inc +@@ -0,0 +1,10 @@ ++SET_CROMITE_FEATURE_DISABLED(kPrivacyGuide3); ++SET_CROMITE_FEATURE_DISABLED(kPrivacyGuidePreload); ++ ++#if BUILDFLAG(IS_ANDROID) ++ ++SET_CROMITE_FEATURE_DISABLED(kPrivacyGuideAndroid3); ++SET_CROMITE_FEATURE_DISABLED(kPrivacyGuidePreloadAndroid); ++SET_CROMITE_FEATURE_DISABLED(kPrivacyGuideAndroid); ++ ++#endif -- 2.25.1 diff --git a/build/patches/Disable-StartSurface-feature.patch b/build/patches/Disable-StartSurface-feature.patch index 98f6037e8..42b096cff 100644 --- a/build/patches/Disable-StartSurface-feature.patch +++ b/build/patches/Disable-StartSurface-feature.patch @@ -6,24 +6,11 @@ This feature would normally show a search box but leads to crashes. License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/flags/android/chrome_feature_list.cc | 4 ++-- - .../org/chromium/chrome/browser/flags/ChromeFeatureList.java | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) + .../org/chromium/chrome/browser/flags/ChromeFeatureList.java | 2 +- + .../chrome_feature_list_cc/Disable-StartSurface-feature.inc | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Disable-StartSurface-feature.inc -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 -@@ -1145,8 +1145,8 @@ BASE_FEATURE(kSearchEnginesPromoV3, - BASE_FEATURE(kSpareTab, "SpareTab", base::FEATURE_ENABLED_BY_DEFAULT); - - BASE_FEATURE(kStartSurfaceAndroid, -- "StartSurfaceAndroid", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "StartSurfaceAndroid", // must be disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - - BASE_FEATURE(kFeedPositionAndroid, - "FeedPositionAndroid", 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 @@ -36,5 +23,11 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f public static final CachedFlag sStartSurfaceDisabledFeedImprovement = new CachedFlag(START_SURFACE_DISABLED_FEED_IMPROVEMENT, false); public static final CachedFlag sStartSurfaceOnTablet = +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Disable-StartSurface-feature.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Disable-StartSurface-feature.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Disable-StartSurface-feature.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_DISABLED(kStartSurfaceAndroid); -- 2.25.1 diff --git a/build/patches/Disable-TLS-resumption.patch b/build/patches/Disable-TLS-resumption.patch index 1fb8882ff..2f2aee25d 100644 --- a/build/patches/Disable-TLS-resumption.patch +++ b/build/patches/Disable-TLS-resumption.patch @@ -25,101 +25,57 @@ See also: Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/about_flags.cc | 6 +++ - chrome/browser/flag_descriptions.cc | 8 ++++ - chrome/browser/flag_descriptions.h | 6 +++ - net/base/features.cc | 8 ++++ - net/base/features.h | 6 +++ - net/http/http_network_session.cc | 1 + - net/quic/quic_stream_factory.cc | 35 ++++++++++++++++- - net/socket/ssl_client_socket_impl.cc | 59 ++++++++++++++++++++++++++++ - net/socket/ssl_client_socket_impl.h | 2 + - 9 files changed, 130 insertions(+), 1 deletion(-) + .../about_flags_cc/Disable-TLS-resumption.inc | 12 ++++ + .../features_cc/Disable-TLS-resumption.inc | 7 +++ + .../features_h/Disable-TLS-resumption.inc | 5 ++ + net/http/http_network_session.cc | 1 + + net/quic/quic_stream_factory.cc | 35 ++++++++++- + net/socket/ssl_client_socket_impl.cc | 59 +++++++++++++++++++ + net/socket/ssl_client_socket_impl.h | 2 + + 7 files changed, 120 insertions(+), 1 deletion(-) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Disable-TLS-resumption.inc + create mode 100644 cromite_flags/net/base/features_cc/Disable-TLS-resumption.inc + create mode 100644 cromite_flags/net/base/features_h/Disable-TLS-resumption.inc -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 -@@ -5652,6 +5652,12 @@ const FeatureEntry kFeatureEntries[] = { - {"enable-tls13-kyber", flag_descriptions::kEnableTLS13KyberName, - flag_descriptions::kEnableTLS13KyberDescription, kOsAll, - FEATURE_VALUE_TYPE(net::features::kPostQuantumKyber)}, -+ {"disable-tls-resumption", flag_descriptions::kDisableTLSResumptionName, -+ flag_descriptions::kDisableTLSResumptionDescription, kOsAll, +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Disable-TLS-resumption.inc b/cromite_flags/chrome/browser/about_flags_cc/Disable-TLS-resumption.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Disable-TLS-resumption.inc +@@ -0,0 +1,12 @@ ++#ifdef FLAG_SECTION ++ ++ {"disable-tls-resumption", ++ "Disable TLS Session Resumption", ++ "Disable TLS session resumption.", kOsAll, + FEATURE_VALUE_TYPE(net::features::kDisableTLSResumption)}, -+ {"log-tls-resumption", flag_descriptions::kLogTLSResumptionName, -+ flag_descriptions::kLogTLSResumptionDescription, kOsAll, ++ {"log-tls-resumption", ++ "Log TLS Session Resumption", ++ "Log TLS Session Resumption", kOsAll, + FEATURE_VALUE_TYPE(net::features::kLogTLSResumption)}, - #if BUILDFLAG(IS_ANDROID) - {"feed-back-to-top", flag_descriptions::kFeedBackToTopName, - flag_descriptions::kFeedBackToTopDescription, kOsAndroid, -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 -@@ -1116,6 +1116,14 @@ const char kAccessibilityAcceleratorNotificationsTimeoutDescription[] = - "shortcut (docked magnifier, screen magnifier and high contrast) to time " - "out instead of remaining pinned."; - -+const char kDisableTLSResumptionName[] = "Disable TLS Session Resumption"; -+const char kDisableTLSResumptionDescription[] = -+ "Disable TLS session resumption."; -+ -+const char kLogTLSResumptionName[] = "Log TLS Session Resumption"; -+const char kLogTLSResumptionDescription[] = -+ "Log TLS session resumption"; -+ - const char kAccessibilityServiceName[] = "Experimental Accessibility Service"; - const char kAccessibilityServiceDescription[] = - "This option enables the experimental Accessibility Service and runs some " -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 -@@ -644,6 +644,12 @@ extern const char kDevicePostureDescription[]; - extern const char kEnableTLS13EarlyDataName[]; - extern const char kEnableTLS13EarlyDataDescription[]; - -+extern const char kDisableTLSResumptionName[]; -+extern const char kDisableTLSResumptionDescription[]; -+ -+extern const char kLogTLSResumptionName[]; -+extern const char kLogTLSResumptionDescription[]; + - extern const char kEnableTLS13KyberName[]; - extern const char kEnableTLS13KyberDescription[]; - -diff --git a/net/base/features.cc b/net/base/features.cc ---- a/net/base/features.cc -+++ b/net/base/features.cc -@@ -67,6 +67,14 @@ const base::FeatureParam kUseDnsHttpsSvcbSecureExtraTimeMin{ - &kUseDnsHttpsSvcb, "UseDnsHttpsSvcbSecureExtraTimeMin", - base::Milliseconds(5)}; - -+BASE_FEATURE(kDisableTLSResumption, -+ "DisableTLSResumption", -+ base::FEATURE_ENABLED_BY_DEFAULT); -+ -+BASE_FEATURE(kLogTLSResumption, -+ "LogTLSResumption", -+ base::FEATURE_DISABLED_BY_DEFAULT); -+ - BASE_FEATURE(kUseDnsHttpsSvcbAlpn, - "UseDnsHttpsSvcbAlpn", - base::FEATURE_ENABLED_BY_DEFAULT); -diff --git a/net/base/features.h b/net/base/features.h ---- a/net/base/features.h -+++ b/net/base/features.h -@@ -107,6 +107,12 @@ NET_EXPORT BASE_DECLARE_FEATURE(kSHA1ServerSignature); - // Enables TLS 1.3 early data. - NET_EXPORT BASE_DECLARE_FEATURE(kEnableTLS13EarlyData); - ++#endif +diff --git a/cromite_flags/net/base/features_cc/Disable-TLS-resumption.inc b/cromite_flags/net/base/features_cc/Disable-TLS-resumption.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/net/base/features_cc/Disable-TLS-resumption.inc +@@ -0,0 +1,7 @@ ++CROMITE_FEATURE(kDisableTLSResumption, ++ "DisableTLSResumption", ++ base::FEATURE_ENABLED_BY_DEFAULT); ++ ++CROMITE_FEATURE(kLogTLSResumption, ++ "LogTLSResumption", ++ base::FEATURE_DISABLED_BY_DEFAULT); +diff --git a/cromite_flags/net/base/features_h/Disable-TLS-resumption.inc b/cromite_flags/net/base/features_h/Disable-TLS-resumption.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/net/base/features_h/Disable-TLS-resumption.inc +@@ -0,0 +1,5 @@ +// Disables TLS resumption. +NET_EXPORT BASE_DECLARE_FEATURE(kDisableTLSResumption); + +// Log TLS resumption. +NET_EXPORT BASE_DECLARE_FEATURE(kLogTLSResumption); -+ - // Enables the TLS Encrypted ClientHello feature. - // https://datatracker.ietf.org/doc/html/draft-ietf-tls-esni-13 - NET_EXPORT BASE_DECLARE_FEATURE(kEncryptedClientHello); diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc --- a/net/http/http_network_session.cc +++ b/net/http/http_network_session.cc diff --git a/build/patches/Disable-all-predictors-code.patch b/build/patches/Disable-all-predictors-code.patch index bf073aa86..436dcb285 100644 --- a/build/patches/Disable-all-predictors-code.patch +++ b/build/patches/Disable-all-predictors-code.patch @@ -15,7 +15,6 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../browser/predictors/loading_predictor.cc | 4 +- .../predictors/loading_predictor_config.cc | 4 +- .../browser/predictors/predictors_features.cc | 14 +--- - chrome/common/chrome_features.cc | 6 +- .../browser/autofill_optimization_guide.cc | 5 +- .../optimization_guide/core/hints_fetcher.cc | 1 + .../optimization_guide/core/hints_manager.cc | 5 ++ @@ -23,10 +22,14 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../core/prediction_model_download_manager.cc | 6 +- .../core/prediction_model_fetcher_impl.cc | 1 + components/optimization_guide/features.gni | 3 +- - components/permissions/features.cc | 16 ++-- - third_party/blink/common/features.cc | 12 +-- + .../Disable-all-predictors-code.inc | 7 ++ + .../Disable-all-predictors-code.inc | 4 + + .../Disable-all-predictors-code.inc | 2 + .../platform/runtime_enabled_features.json5 | 2 +- - 21 files changed, 82 insertions(+), 112 deletions(-) + 21 files changed, 80 insertions(+), 93 deletions(-) + create mode 100644 cromite_flags/chrome/common/chrome_features_cc/Disable-all-predictors-code.inc + create mode 100644 cromite_flags/components/permissions/features_cc/Disable-all-predictors-code.inc + create mode 100644 cromite_flags/third_party/blink/common/features_cc/Disable-all-predictors-code.inc diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn @@ -221,29 +224,6 @@ diff --git a/chrome/browser/predictors/predictors_features.cc b/chrome/browser/p // Modifies loading predictor so that it does prefetches of subresources instead // of preconnects. -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 -@@ -1044,7 +1044,7 @@ BASE_FEATURE(kPluginVm, "PluginVm", base::FEATURE_DISABLED_BY_DEFAULT); - // Allows Chrome to do preconnect when prerender fails. - BASE_FEATURE(kPrerenderFallbackToPreconnect, - "PrerenderFallbackToPreconnect", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ base::FEATURE_DISABLED_BY_DEFAULT); - - #if BUILDFLAG(IS_CHROMEOS) - // Enable improved printer state and error state messaging for Print Preview. -@@ -1105,8 +1105,8 @@ BASE_FEATURE(kSafetyCheckExtensions, - - // Enables notification permission module in Safety Check. - BASE_FEATURE(kSafetyCheckNotificationPermissions, -- "SafetyCheckNotificationPermissions", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "SafetyCheckNotificationPermissions", // disabled by default -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - - const base::FeatureParam - kSafetyCheckNotificationPermissionsMinEnagementLimit{ diff --git a/components/autofill/core/browser/autofill_optimization_guide.cc b/components/autofill/core/browser/autofill_optimization_guide.cc --- a/components/autofill/core/browser/autofill_optimization_guide.cc +++ b/components/autofill/core/browser/autofill_optimization_guide.cc @@ -538,75 +518,38 @@ diff --git a/components/optimization_guide/features.gni b/components/optimizatio } declare_args() { -diff --git a/components/permissions/features.cc b/components/permissions/features.cc ---- a/components/permissions/features.cc -+++ b/components/permissions/features.cc -@@ -93,24 +93,24 @@ BASE_FEATURE(kFailFastQuietChip, - // When enabled, use the value of the `service_url` FeatureParam as the url - // for the Web Permission Predictions Service. - BASE_FEATURE(kPermissionPredictionServiceUseUrlOverride, -- "kPermissionPredictionServiceUseUrlOverride", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "kPermissionPredictionServiceUseUrlOverride", // disabled by default -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - - BASE_FEATURE(kPermissionOnDeviceNotificationPredictions, -- "PermissionOnDeviceNotificationPredictions", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "PermissionOnDeviceNotificationPredictions", // disabled by default -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - - BASE_FEATURE(kPermissionOnDeviceGeolocationPredictions, -- "PermissionOnDeviceGeolocationPredictions", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "PermissionOnDeviceGeolocationPredictions", // disabled by default -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - - BASE_FEATURE(kPermissionDedicatedCpssSetting, - "PermissionDedicatedCpssSettings", - base::FEATURE_DISABLED_BY_DEFAULT); - - BASE_FEATURE(kPermissionPredictionsV2, -- "PermissionPredictionsV2", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "PermissionPredictionsV2", // disabled by default -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - - #if BUILDFLAG(IS_ANDROID) - -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 -@@ -1217,12 +1217,8 @@ BASE_FEATURE(kMemoryCacheStrongReferenceSingleUnload, - // in the first viewport after the page load and the metrics of the clicked - // anchor element will be extracted and recorded. - BASE_FEATURE(kNavigationPredictor, -- "NavigationPredictor", --#if BUILDFLAG(IS_ANDROID) -- base::FEATURE_ENABLED_BY_DEFAULT --#else -- base::FEATURE_DISABLED_BY_DEFAULT --#endif -+ "NavigationPredictor", // disabled by default -+ base::FEATURE_DISABLED_BY_DEFAULT // in Bromite - ); - - BASE_FEATURE(kNewBaseUrlInheritanceBehavior, -@@ -1359,8 +1355,8 @@ BASE_FEATURE(kPrefetchPrivacyChanges, - base::FEATURE_ENABLED_BY_DEFAULT); // in Bromite - - BASE_FEATURE(kPreloadingHeuristicsMLModel, -- "PreloadingHeuristicsMLModel", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "PreloadingHeuristicsMLModel", // must be disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in cromite - - BASE_FEATURE(kPrerender2InNewTab, - "Prerender2InNewTab", +diff --git a/cromite_flags/chrome/common/chrome_features_cc/Disable-all-predictors-code.inc b/cromite_flags/chrome/common/chrome_features_cc/Disable-all-predictors-code.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/common/chrome_features_cc/Disable-all-predictors-code.inc +@@ -0,0 +1,7 @@ ++SET_CROMITE_FEATURE_DISABLED(kPrerenderFallbackToPreconnect); ++ ++#if !BUILDFLAG(IS_ANDROID) ++ ++SET_CROMITE_FEATURE_DISABLED(kSafetyCheckNotificationPermissions); ++ ++#endif +diff --git a/cromite_flags/components/permissions/features_cc/Disable-all-predictors-code.inc b/cromite_flags/components/permissions/features_cc/Disable-all-predictors-code.inc +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); ++SET_CROMITE_FEATURE_DISABLED(kPermissionOnDeviceNotificationPredictions); ++SET_CROMITE_FEATURE_DISABLED(kPermissionOnDeviceGeolocationPredictions); ++SET_CROMITE_FEATURE_DISABLED(kPermissionPredictionsV2); +diff --git a/cromite_flags/third_party/blink/common/features_cc/Disable-all-predictors-code.inc b/cromite_flags/third_party/blink/common/features_cc/Disable-all-predictors-code.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/third_party/blink/common/features_cc/Disable-all-predictors-code.inc +@@ -0,0 +1,2 @@ ++SET_CROMITE_FEATURE_DISABLED(kNavigationPredictor); ++SET_CROMITE_FEATURE_DISABLED(kPreloadingHeuristicsMLModel); 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 -@@ -3014,7 +3014,7 @@ +@@ -3007,7 +3007,7 @@ { // https://crbug.com/1126305 name: "Prerender2", diff --git a/build/patches/Disable-all-promo-dialogs.patch b/build/patches/Disable-all-promo-dialogs.patch index 0a014c909..c98ce1a6a 100644 --- a/build/patches/Disable-all-promo-dialogs.patch +++ b/build/patches/Disable-all-promo-dialogs.patch @@ -6,11 +6,12 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- .../chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java | 1 + chrome/browser/ui/browser_ui_prefs.cc | 2 +- - chrome/browser/ui/ui_features.cc | 2 +- .../ui/views/user_education/browser_feature_promo_controller.cc | 1 + .../chrome/browser/user_education/UserEducationHelper.java | 1 + components/user_education/common/feature_promo_registry.cc | 1 + - 6 files changed, 6 insertions(+), 2 deletions(-) + .../browser/ui/ui_features_cc/Disable-all-promo-dialogs.inc | 1 + + 6 files changed, 6 insertions(+), 1 deletion(-) + create mode 100755 cromite_flags/chrome/browser/ui/ui_features_cc/Disable-all-promo-dialogs.inc 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 @@ -35,18 +36,6 @@ diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_u registry->RegisterBooleanPref( prefs::kExternalProtocolDialogShowAlwaysOpenCheckbox, true); registry->RegisterBooleanPref(prefs::kScreenCaptureAllowed, true); -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 -@@ -30,7 +30,7 @@ BASE_FEATURE(kAllowEyeDropperWGCScreenCapture, - ); - - // Enables Chrome Labs menu in the toolbar. See https://crbug.com/1145666 --BASE_FEATURE(kChromeLabs, "ChromeLabs", base::FEATURE_ENABLED_BY_DEFAULT); -+BASE_FEATURE(kChromeLabs, "ChromeLabs", base::FEATURE_DISABLED_BY_DEFAULT); - const char kChromeLabsActivationParameterName[] = - "chrome_labs_activation_percentage"; - const base::FeatureParam kChromeLabsActivationPercentage{ 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 @@ -80,5 +69,11 @@ diff --git a/components/user_education/common/feature_promo_registry.cc b/compon const base::Feature* const iph_feature = spec.feature(); CHECK(iph_feature); const auto result = feature_promo_data_.emplace(iph_feature, std::move(spec)); +diff --git a/cromite_flags/chrome/browser/ui/ui_features_cc/Disable-all-promo-dialogs.inc b/cromite_flags/chrome/browser/ui/ui_features_cc/Disable-all-promo-dialogs.inc +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/chrome/browser/ui/ui_features_cc/Disable-all-promo-dialogs.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_DISABLED(kChromeLabs); -- 2.25.1 diff --git a/build/patches/Disable-conversion-measurement-api.patch b/build/patches/Disable-conversion-measurement-api.patch index 0e057c988..c5f6fc57b 100644 --- a/build/patches/Disable-conversion-measurement-api.patch +++ b/build/patches/Disable-conversion-measurement-api.patch @@ -12,11 +12,11 @@ Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later. License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- chrome/android/java/AndroidManifest.xml | 1 - - components/attribution_reporting/features.cc | 4 +- - .../origin_trials/features.cc | 8 +- + components/attribution_reporting/features.cc | 1 + + .../origin_trials/features.cc | 2 + .../render_view_context_menu_base.cc | 3 - .../aggregatable_report_sender.cc | 15 +- - .../aggregation_service_features.cc | 4 +- + .../aggregation_service_features.cc | 1 + .../attribution_data_host_manager_impl.cc | 5 + .../attribution_reporting/attribution_host.cc | 1 + .../attribution_os_level_manager.cc | 1 + @@ -27,16 +27,17 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../browser/AttributionOsLevelManager.java | 218 +----------------- .../public/browser/content_browser_client.cc | 6 +- .../public/browser/navigation_controller.cc | 1 - - content/public/common/content_features.cc | 4 +- content/renderer/render_thread_impl.cc | 5 +- + .../Disable-conversion-measurement-api.inc | 1 + + .../Disable-conversion-measurement-api.inc | 1 + + .../Disable-conversion-measurement-api.inc | 9 + .../attribution/request_headers_internal.cc | 1 + .../network/public/cpp/attribution_utils.cc | 2 + - services/network/public/cpp/features.cc | 6 +- - third_party/blink/common/features.cc | 38 +-- - .../platform/runtime_enabled_features.json5 | 7 + - ui/base/ui_base_features.cc | 2 +- ui/events/android/motion_event_android.cc | 6 +- - 25 files changed, 92 insertions(+), 274 deletions(-) + 23 files changed, 67 insertions(+), 241 deletions(-) + create mode 100644 cromite_flags/content/public/common/content_features_cc/Disable-conversion-measurement-api.inc + 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/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml --- a/chrome/android/java/AndroidManifest.xml @@ -52,35 +53,21 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro diff --git a/components/attribution_reporting/features.cc b/components/attribution_reporting/features.cc --- a/components/attribution_reporting/features.cc +++ b/components/attribution_reporting/features.cc -@@ -10,8 +10,8 @@ namespace attribution_reporting::features { - - // Controls whether the Conversion Measurement API infrastructure is enabled. - BASE_FEATURE(kConversionMeasurement, -- "ConversionMeasurement", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "ConversionMeasurement", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - - BASE_FEATURE(kAttributionReportingNullAggregatableReports, +@@ -17,4 +17,5 @@ BASE_FEATURE(kAttributionReportingNullAggregatableReports, "AttributionReportingNullAggregatableReports", + base::FEATURE_ENABLED_BY_DEFAULT); + ++SET_CROMITE_FEATURE_DISABLED(kConversionMeasurement); + } // namespace attribution_reporting::features diff --git a/components/embedder_support/origin_trials/features.cc b/components/embedder_support/origin_trials/features.cc --- a/components/embedder_support/origin_trials/features.cc +++ b/components/embedder_support/origin_trials/features.cc -@@ -14,11 +14,11 @@ namespace embedder_support { - // Users from control group will have the feature disabled, excluding them - // from the origin trial. - BASE_FEATURE(kOriginTrialsSampleAPIThirdPartyAlternativeUsage, -- "OriginTrialsSampleAPIThirdPartyAlternativeUsage", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "OriginTrialsSampleAPIThirdPartyAlternativeUsage", // must be disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - - BASE_FEATURE(kConversionMeasurementAPIAlternativeUsage, -- "ConversionMeasurementAPIAlternativeUsage", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "ConversionMeasurementAPIAlternativeUsage", // must be disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite +@@ -21,4 +21,6 @@ BASE_FEATURE(kConversionMeasurementAPIAlternativeUsage, + "ConversionMeasurementAPIAlternativeUsage", + base::FEATURE_ENABLED_BY_DEFAULT); ++SET_CROMITE_FEATURE_DISABLED(kOriginTrialsSampleAPIThirdPartyAlternativeUsage); ++SET_CROMITE_FEATURE_DISABLED(kConversionMeasurementAPIAlternativeUsage); } // namespace embedder_support diff --git a/components/renderer_context_menu/render_view_context_menu_base.cc b/components/renderer_context_menu/render_view_context_menu_base.cc --- a/components/renderer_context_menu/render_view_context_menu_base.cc @@ -128,17 +115,12 @@ diff --git a/content/browser/aggregation_service/aggregatable_report_sender.cc b diff --git a/content/browser/aggregation_service/aggregation_service_features.cc b/content/browser/aggregation_service/aggregation_service_features.cc --- a/content/browser/aggregation_service/aggregation_service_features.cc +++ b/content/browser/aggregation_service/aggregation_service_features.cc -@@ -7,8 +7,8 @@ - namespace content { - - BASE_FEATURE(kPrivacySandboxAggregationService, -- "PrivacySandboxAggregationService", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "PrivacySandboxAggregationService", // disabled by default -+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite +@@ -20,4 +20,5 @@ BASE_FEATURE(kPrivacySandboxAggregationServiceReportPadding, + "PrivacySandboxAggregationServiceReportPadding", + base::FEATURE_ENABLED_BY_DEFAULT); - const base::FeatureParam - kPrivacySandboxAggregationServiceTrustedServerUrlAwsParam{ ++SET_CROMITE_FEATURE_DISABLED(kPrivacySandboxAggregationService); + } // namespace content diff --git a/content/browser/attribution_reporting/attribution_data_host_manager_impl.cc b/content/browser/attribution_reporting/attribution_data_host_manager_impl.cc --- a/content/browser/attribution_reporting/attribution_data_host_manager_impl.cc +++ b/content/browser/attribution_reporting/attribution_data_host_manager_impl.cc @@ -592,20 +574,6 @@ diff --git a/content/public/browser/navigation_controller.cc b/content/public/br is_pdf(input.is_pdf) { #if DCHECK_IS_ON() DCHECK(input.Valid()); -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 -@@ -648,8 +648,8 @@ BASE_FEATURE(kPrefetchNewLimits, - // FLEDGE, Topics, along with a number of other features actively in development - // within these APIs. - BASE_FEATURE(kPrivacySandboxAdsAPIsOverride, -- "PrivacySandboxAdsAPIsOverride", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "PrivacySandboxAdsAPIsOverride", // must be disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite - - // Enables Private Network Access checks for all types of web workers. - // diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc @@ -628,6 +596,32 @@ diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_th } std::unique_ptr RenderThreadImpl::CreateMediaCodecFactory( +diff --git a/cromite_flags/content/public/common/content_features_cc/Disable-conversion-measurement-api.inc b/cromite_flags/content/public/common/content_features_cc/Disable-conversion-measurement-api.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/content/public/common/content_features_cc/Disable-conversion-measurement-api.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_DISABLED(kPrivacySandboxAdsAPIsOverride); +diff --git a/cromite_flags/services/network/public/cpp/features_cc/Disable-conversion-measurement-api.inc b/cromite_flags/services/network/public/cpp/features_cc/Disable-conversion-measurement-api.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/services/network/public/cpp/features_cc/Disable-conversion-measurement-api.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_DISABLED(kAttributionReportingCrossAppWeb); +diff --git a/cromite_flags/third_party/blink/common/features_cc/Disable-conversion-measurement-api.inc b/cromite_flags/third_party/blink/common/features_cc/Disable-conversion-measurement-api.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/third_party/blink/common/features_cc/Disable-conversion-measurement-api.inc +@@ -0,0 +1,9 @@ ++SET_CROMITE_FEATURE_DISABLED(kAdAuctionReportingWithMacroApi); ++SET_CROMITE_FEATURE_DISABLED(kAdAuctionSignals); ++SET_CROMITE_FEATURE_DISABLED(kBrowsingTopics); ++SET_CROMITE_FEATURE_DISABLED(kBrowsingTopicsDocumentAPI); ++SET_CROMITE_FEATURE_DISABLED(kBrowsingTopicsParameters); ++SET_CROMITE_FEATURE_DISABLED(kFledgeBiddingAndAuctionServer); ++SET_CROMITE_FEATURE_DISABLED(kInterestGroupStorage); ++SET_CROMITE_FEATURE_DISABLED(kPrivacySandboxAdsAPIs); ++SET_CROMITE_FEATURE_DISABLED(kPrivateAggregationApi); diff --git a/services/network/attribution/request_headers_internal.cc b/services/network/attribution/request_headers_internal.cc --- a/services/network/attribution/request_headers_internal.cc +++ b/services/network/attribution/request_headers_internal.cc @@ -658,147 +652,6 @@ diff --git a/services/network/public/cpp/attribution_utils.cc b/services/network switch (attribution_support) { case mojom::AttributionSupport::kWeb: case mojom::AttributionSupport::kWebAndOs: -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 -@@ -155,9 +155,9 @@ BASE_FEATURE(kAttributionReportingReportVerification, - - // Gate access to Attribution Reporting cross app and web APIs that allow - // registering with a native attribution API. --BASE_FEATURE(kAttributionReportingCrossAppWeb, -- "AttributionReportingCrossAppWeb", -- base::FEATURE_DISABLED_BY_DEFAULT); -+BASE_FEATURE(kAttributionReportingCrossAppWeb, // in bromite -+ "AttributionReportingCrossAppWeb", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - - // Enables preprocessing requests with the Private State Tokens API Fetch flags - // set, and handling their responses, according to the protocol. -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 -@@ -36,14 +36,14 @@ BASE_FEATURE(kAcceleratedStaticBitmapImageSerialization, - - // Enable the Protected Audience's reporting with ad macro API. - BASE_FEATURE(kAdAuctionReportingWithMacroApi, -- "AdAuctionReportingWithMacroApi", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "AdAuctionReportingWithMacroApi", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - - // Controls the capturing of the Ad-Auction-Signals header, and the maximum - // allowed Ad-Auction-Signals header value. - BASE_FEATURE(kAdAuctionSignals, -- "AdAuctionSignals", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "AdAuctionSignals", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - const base::FeatureParam kAdAuctionSignalsMaxSizeBytes{ - &kAdAuctionSignals, "ad-auction-signals-max-size-bytes", 10000}; - -@@ -308,8 +308,8 @@ const base::FeatureParam kBoostImagePriorityTightMediumLimit{ - // https://github.com/patcg-individual-drafts/topics - // Kill switch for the Topics API. - BASE_FEATURE(kBrowsingTopics, -- "BrowsingTopics", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "BrowsingTopics", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - - // If enabled, the check for whether the IP address is publicly routable will be - // bypassed when determining the eligibility for a page to be included in topics -@@ -324,14 +324,14 @@ BASE_FEATURE(kBrowsingTopicsBypassIPIsPubliclyRoutableCheck, - // either a valid Origin Trial token exists or `kPrivacySandboxAdsAPIsOverride` - // is enabled.) - BASE_FEATURE(kBrowsingTopicsDocumentAPI, -- "BrowsingTopicsDocumentAPI", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "BrowsingTopicsDocumentAPI", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - - // Decoupled with the main `kBrowsingTopics` feature, so it allows us to - // decouple the server side configs. - BASE_FEATURE(kBrowsingTopicsParameters, -- "BrowsingTopicsParameters", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "BrowsingTopicsParameters", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - // The number of epochs from where to calculate the topics to give to a - // requesting contexts. - const base::FeatureParam kBrowsingTopicsNumberOfEpochsToExpose{ -@@ -807,8 +807,8 @@ BASE_FEATURE(kFledge, "Fledge", base::FEATURE_DISABLED_BY_DEFAULT); - // See - // https://github.com/WICG/turtledove/blob/main/FLEDGE_browser_bidding_and_auction_API.md - BASE_FEATURE(kFledgeBiddingAndAuctionServer, -- "FledgeBiddingAndAuctionServer", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "FledgeBiddingAndAuctionServer", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - const base::FeatureParam kFledgeBiddingAndAuctionKeyURL{ - &kFledgeBiddingAndAuctionServer, "FledgeBiddingAndAuctionKeyURL", ""}; - -@@ -973,8 +973,8 @@ const char kIntensiveWakeUpThrottling_GracePeriodSeconds_Name[] = - // Kill switch for the Interest Group API, i.e. if disabled, the - // API exposure will be disabled regardless of the OT config. - BASE_FEATURE(kInterestGroupStorage, -- "InterestGroupStorage", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "InterestGroupStorage", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - // TODO(crbug.com/1197209): Adjust these limits in response to usage. - const base::FeatureParam kInterestGroupStorageMaxOwners{ - &kInterestGroupStorage, "max_owners", 1000}; -@@ -1403,16 +1403,16 @@ const base::FeatureParam kPrewarmFantasy = {&kPrewarmDefaultFontFamilies, - "prewarm_fantasy", false}; - #endif - --BASE_FEATURE(kPrivacySandboxAdsAPIs, -- "PrivacySandboxAdsAPIs", -- base::FEATURE_DISABLED_BY_DEFAULT); -+BASE_FEATURE(kPrivacySandboxAdsAPIs, // disabled -+ "PrivacySandboxAdsAPIs", // by default -+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite - - // Enables the Private Aggregation API. Note that this API also requires the - // `kPrivacySandboxAggregationService` to be enabled to successfully send - // reports. - BASE_FEATURE(kPrivateAggregationApi, -- "PrivateAggregationApi", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "PrivateAggregationApi", // disabled by default -+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite - - // Selectively allows the JavaScript API to be disabled in just one of the - // contexts. The Protected Audience param's name has not been updated (from -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 -@@ -198,6 +198,13 @@ - }, - - data: [ -+ { -+ // disable by default features by marking as -+ // depends_on: ["DisabledForBromite"] -+ // to work is needed to remove "origin_trial_feature_name" -+ // and "origin_trial_allows_third_party" -+ name: "DisabledForBromite", -+ }, - { - name: "AbortSignalAny", - status: "stable", -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 -@@ -626,7 +626,7 @@ BASE_FEATURE(kMacClipboardWriteImageWithPng, - // We want to experiment with disabling it to align with CR2023 designs. - BASE_FEATURE(kCr2023MacFontSmoothing, - "Cr2023MacFontSmoothing", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ base::FEATURE_DISABLED_BY_DEFAULT); - #endif - - } // namespace features diff --git a/ui/events/android/motion_event_android.cc b/ui/events/android/motion_event_android.cc --- a/ui/events/android/motion_event_android.cc +++ b/ui/events/android/motion_event_android.cc diff --git a/build/patches/Disable-crash-reporting.patch b/build/patches/Disable-crash-reporting.patch index 619a8bd13..18df3661a 100644 --- a/build/patches/Disable-crash-reporting.patch +++ b/build/patches/Disable-crash-reporting.patch @@ -3,9 +3,10 @@ Date: Sat, 9 Apr 2022 21:43:35 +0200 Subject: Disable crash reporting --- - chrome/browser/chrome_content_browser_client.cc | 1 + - content/public/common/content_features.cc | 4 ++-- - 2 files changed, 3 insertions(+), 2 deletions(-) + chrome/browser/chrome_content_browser_client.cc | 1 + + .../common/content_features_cc/Disable-crash-reporting.inc | 1 + + 2 files changed, 2 insertions(+) + create mode 100644 cromite_flags/content/public/common/content_features_cc/Disable-crash-reporting.inc 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 @@ -18,19 +19,11 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch if (enable_crash_reporter) { std::string switch_value; std::unique_ptr client_info = -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 -@@ -215,8 +215,8 @@ BASE_FEATURE(kCooperativeScheduling, - // Enables crash reporting via Reporting API. - // https://www.w3.org/TR/reporting/#crash-report - BASE_FEATURE(kCrashReporting, -- "CrashReporting", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "CrashReporting", // disabled by default -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - - // Enable the device posture API. - // Tracking bug for enabling device posture API: https://crbug.com/1066842. +diff --git a/cromite_flags/content/public/common/content_features_cc/Disable-crash-reporting.inc b/cromite_flags/content/public/common/content_features_cc/Disable-crash-reporting.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/content/public/common/content_features_cc/Disable-crash-reporting.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_DISABLED(kCrashReporting); -- 2.25.1 diff --git a/build/patches/Disable-feeds-support-by-default.patch b/build/patches/Disable-feeds-support-by-default.patch index 83449ae44..71fad0314 100644 --- a/build/patches/Disable-feeds-support-by-default.patch +++ b/build/patches/Disable-feeds-support-by-default.patch @@ -7,8 +7,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../chromium/chrome/browser/feed/FeedFeatures.java | 8 +------- chrome/browser/prefs/browser_prefs.cc | 4 ++-- components/feed/core/common/pref_names.cc | 13 +------------ - components/feed/feed_feature_list.cc | 4 ++-- - 4 files changed, 6 insertions(+), 23 deletions(-) + components/feed/feed_feature_list.cc | 2 ++ + 4 files changed, 6 insertions(+), 21 deletions(-) diff --git a/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedFeatures.java b/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedFeatures.java --- a/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedFeatures.java @@ -70,16 +70,12 @@ diff --git a/components/feed/core/common/pref_names.cc b/components/feed/core/co diff --git a/components/feed/feed_feature_list.cc b/components/feed/feed_feature_list.cc --- a/components/feed/feed_feature_list.cc +++ b/components/feed/feed_feature_list.cc -@@ -20,8 +20,8 @@ namespace feed { - // InterestFeedV2 is cached in ChromeCachedFlags. If the default value here is - // changed, please update the cached one's default value in CachedFeatureFlags. - BASE_FEATURE(kInterestFeedV2, -- "InterestFeedV2", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "InterestFeedV2", // must be disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default in Bromite +@@ -163,4 +163,6 @@ BASE_FEATURE(kFeedSportsCard, + "FeedSportsCard", + base::FEATURE_DISABLED_BY_DEFAULT); - BASE_FEATURE(kInterestFeedV2Autoplay, - "InterestFeedV2Autoplay", ++SET_CROMITE_FEATURE_DISABLED(kInterestFeedV2); ++SET_CROMITE_FEATURE_DISABLED(kWebFeed); + } // namespace feed -- 2.25.1 diff --git a/build/patches/Disable-fetching-of-all-field-trials.patch b/build/patches/Disable-fetching-of-all-field-trials.patch index 7de8532fc..c96e40a93 100644 --- a/build/patches/Disable-fetching-of-all-field-trials.patch +++ b/build/patches/Disable-fetching-of-all-field-trials.patch @@ -22,10 +22,11 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../variations/service/variations_service.cc | 15 ++------- .../browser/loader/url_loader_throttles.cc | 7 ---- .../origin_trials/origin_trials_utils.cc | 2 +- - content/public/common/content_features.cc | 4 +-- .../variations_render_thread_observer.cc | 9 ------ + .../Disable-fetching-of-all-field-trials.inc | 1 + .../renderer/core/loader/document_loader.cc | 7 ---- - 18 files changed, 29 insertions(+), 82 deletions(-) + 18 files changed, 28 insertions(+), 80 deletions(-) + create mode 100644 cromite_flags/content/public/common/content_features_cc/Disable-fetching-of-all-field-trials.inc diff --git a/android_webview/common/aw_features.cc b/android_webview/common/aw_features.cc --- a/android_webview/common/aw_features.cc @@ -327,20 +328,6 @@ diff --git a/content/browser/origin_trials/origin_trials_utils.cc b/content/brow return {}; } size_t iter = 0; -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 -@@ -630,8 +630,8 @@ BASE_FEATURE(kPepperCrossOriginRedirectRestriction, - // things before receiving the response, for instance it can affect the next - // navigation's network request. - BASE_FEATURE(kPersistentOriginTrials, -- "PersistentOriginTrials", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "PersistentOriginTrials", // always disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite - - // If enabled, then an updated prefetch request limit policy will be used that - // separates eager and non-eager prefetches, and allows for evictions. diff --git a/content/renderer/variations_render_thread_observer.cc b/content/renderer/variations_render_thread_observer.cc --- a/content/renderer/variations_render_thread_observer.cc +++ b/content/renderer/variations_render_thread_observer.cc @@ -360,6 +347,12 @@ diff --git a/content/renderer/variations_render_thread_observer.cc b/content/ren } void VariationsRenderThreadObserver::RegisterMojoInterfaces( +diff --git a/cromite_flags/content/public/common/content_features_cc/Disable-fetching-of-all-field-trials.inc b/cromite_flags/content/public/common/content_features_cc/Disable-fetching-of-all-field-trials.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/content/public/common/content_features_cc/Disable-fetching-of-all-field-trials.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_DISABLED(kPersistentOriginTrials); diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc --- a/third_party/blink/renderer/core/loader/document_loader.cc +++ b/third_party/blink/renderer/core/loader/document_loader.cc diff --git a/build/patches/Disable-idle-detection.patch b/build/patches/Disable-idle-detection.patch index 63e0bb821..0e5eca201 100644 --- a/build/patches/Disable-idle-detection.patch +++ b/build/patches/Disable-idle-detection.patch @@ -4,26 +4,21 @@ Subject: Disable idle detection License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - content/public/common/content_features.cc | 2 +- + .../common/content_features_cc/Disable-idle-detection.inc | 1 + .../blink/renderer/platform/runtime_enabled_features.json5 | 7 +++---- - 2 files changed, 4 insertions(+), 5 deletions(-) + 2 files changed, 4 insertions(+), 4 deletions(-) + create mode 100644 cromite_flags/content/public/common/content_features_cc/Disable-idle-detection.inc -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 -@@ -448,7 +448,7 @@ BASE_FEATURE(kGreaseUACH, "GreaseUACH", base::FEATURE_ENABLED_BY_DEFAULT); - // This is intended as a kill switch for the Idle Detection feature. To enable - // this feature, the experimental web platform features flag should be set, - // or the site should obtain an Origin Trial token. --BASE_FEATURE(kIdleDetection, "IdleDetection", base::FEATURE_ENABLED_BY_DEFAULT); -+BASE_FEATURE(kIdleDetection, "IdleDetection", base::FEATURE_DISABLED_BY_DEFAULT); - - // Kill switch for the GetInstalledRelatedApps API. - BASE_FEATURE(kInstalledApp, "InstalledApp", base::FEATURE_ENABLED_BY_DEFAULT); +diff --git a/cromite_flags/content/public/common/content_features_cc/Disable-idle-detection.inc b/cromite_flags/content/public/common/content_features_cc/Disable-idle-detection.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/content/public/common/content_features_cc/Disable-idle-detection.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_DISABLED(kIdleDetection); 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 -@@ -2075,10 +2075,9 @@ +@@ -2068,10 +2068,9 @@ base_feature: "none", }, { diff --git a/build/patches/Disable-media-router-and-remoting-by-default.patch b/build/patches/Disable-media-router-and-remoting-by-default.patch index deb30a543..04c3b024d 100644 --- a/build/patches/Disable-media-router-and-remoting-by-default.patch +++ b/build/patches/Disable-media-router-and-remoting-by-default.patch @@ -5,23 +5,14 @@ Subject: Disable media router and remoting by default Original License: MIT - https://spdx.org/licenses/MIT.html License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/media/router/media_router_feature.cc | 5 +++-- - chrome/browser/profiles/profile_impl.cc | 2 +- - .../blink/renderer/modules/remoteplayback/remote_playback.cc | 2 +- - 3 files changed, 5 insertions(+), 4 deletions(-) + chrome/browser/media/router/media_router_feature.cc | 6 +++++- + chrome/browser/profiles/profile_impl.cc | 2 +- + .../renderer/modules/remoteplayback/remote_playback.cc | 2 +- + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/chrome/browser/media/router/media_router_feature.cc b/chrome/browser/media/router/media_router_feature.cc --- a/chrome/browser/media/router/media_router_feature.cc +++ b/chrome/browser/media/router/media_router_feature.cc -@@ -38,7 +38,7 @@ - namespace media_router { - - #if !BUILDFLAG(IS_ANDROID) --BASE_FEATURE(kMediaRouter, "MediaRouter", base::FEATURE_ENABLED_BY_DEFAULT); -+BASE_FEATURE(kMediaRouter, "MediaRouter", base::FEATURE_DISABLED_BY_DEFAULT); - BASE_FEATURE(kCastAllowAllIPsFeature, - "CastAllowAllIPs", - base::FEATURE_DISABLED_BY_DEFAULT); @@ -106,6 +106,7 @@ void ClearMediaRouterStoredPrefsForTesting() { } @@ -39,6 +30,14 @@ diff --git a/chrome/browser/media/router/media_router_feature.cc b/chrome/browse registry->RegisterBooleanPref( media_router::prefs::kMediaRouterShowCastSessionsStartedByOtherDevices, true); +@@ -218,4 +219,7 @@ absl::optional GetCastMirroringPlayoutDelay() { + + #endif // !BUILDFLAG(IS_ANDROID) + ++#if !BUILDFLAG(IS_ANDROID) ++SET_CROMITE_FEATURE_DISABLED(kMediaRouter); ++#endif + } // namespace media_router 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 diff --git a/build/patches/Disable-offline-pages-in-CCT.patch b/build/patches/Disable-offline-pages-in-CCT.patch index 78b6cc65e..9d361f5e8 100644 --- a/build/patches/Disable-offline-pages-in-CCT.patch +++ b/build/patches/Disable-offline-pages-in-CCT.patch @@ -4,22 +4,15 @@ Subject: Disable offline pages in CCT License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - components/offline_pages/core/offline_page_feature.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + .../offline_page_feature_cc/Disable-offline-pages-in-CCT.inc | 1 + + 1 file changed, 1 insertion(+) + create mode 100644 cromite_flags/components/offline_pages/core/offline_page_feature_cc/Disable-offline-pages-in-CCT.inc -diff --git a/components/offline_pages/core/offline_page_feature.cc b/components/offline_pages/core/offline_page_feature.cc ---- a/components/offline_pages/core/offline_page_feature.cc -+++ b/components/offline_pages/core/offline_page_feature.cc -@@ -37,8 +37,8 @@ BASE_FEATURE(kOfflinePagesDescriptivePendingStatusFeature, - base::FEATURE_ENABLED_BY_DEFAULT); - - BASE_FEATURE(kOfflinePagesInDownloadHomeOpenInCctFeature, -- "OfflinePagesInDownloadHomeOpenInCct", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "OfflinePagesInDownloadHomeOpenInCct", // disabled by default -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - - BASE_FEATURE(kOfflinePagesNetworkStateLikelyUnknown, - "OfflinePagesNetworkStateLikelyUnknown", +diff --git a/cromite_flags/components/offline_pages/core/offline_page_feature_cc/Disable-offline-pages-in-CCT.inc b/cromite_flags/components/offline_pages/core/offline_page_feature_cc/Disable-offline-pages-in-CCT.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/components/offline_pages/core/offline_page_feature_cc/Disable-offline-pages-in-CCT.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_DISABLED(kOfflinePagesInDownloadHomeOpenInCctFeature); -- 2.25.1 diff --git a/build/patches/Disable-omission-of-URL-elements-in-Omnibox.patch b/build/patches/Disable-omission-of-URL-elements-in-Omnibox.patch index 0c4c8124e..cb573f7e1 100644 --- a/build/patches/Disable-omission-of-URL-elements-in-Omnibox.patch +++ b/build/patches/Disable-omission-of-URL-elements-in-Omnibox.patch @@ -7,25 +7,12 @@ a corresponding user option to individually disable their usage. License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - .../browser/flags/android/chrome_feature_list.cc | 4 ++-- .../toolbar/chrome_location_bar_model_delegate.cc | 2 +- components/url_formatter/url_formatter.cc | 14 +++++++------- - 3 files changed, 10 insertions(+), 10 deletions(-) + ...disable-omission-of-URL-elements-in-Omnibox.inc | 1 + + 3 files changed, 9 insertions(+), 8 deletions(-) + create mode 100755 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/disable-omission-of-URL-elements-in-Omnibox.inc -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 -@@ -496,8 +496,8 @@ BASE_FEATURE(kAndroidNoVisibleHintForTablets, - base::FEATURE_DISABLED_BY_DEFAULT); - - BASE_FEATURE(kAndroidVisibleUrlTruncation, -- "AndroidVisibleUrlTruncation", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "AndroidVisibleUrlTruncation", // must be -+ base::FEATURE_DISABLED_BY_DEFAULT); // disabled - - BASE_FEATURE(kAnimatedImageDragShadow, - "AnimatedImageDragShadow", diff --git a/chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.cc b/chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.cc --- a/chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.cc +++ b/chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.cc @@ -60,5 +47,11 @@ diff --git a/components/url_formatter/url_formatter.cc b/components/url_formatte const FormatUrlType kFormatUrlOmitMailToScheme = 1 << 8; const FormatUrlType kFormatUrlOmitMobilePrefix = 1 << 9; +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/disable-omission-of-URL-elements-in-Omnibox.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/disable-omission-of-URL-elements-in-Omnibox.inc +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/disable-omission-of-URL-elements-in-Omnibox.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_DISABLED(kAndroidVisibleUrlTruncation); -- 2.25.1 diff --git a/build/patches/Disable-smart-selection-by-default.patch b/build/patches/Disable-smart-selection-by-default.patch index c0edffdea..4bf90ca25 100644 --- a/build/patches/Disable-smart-selection-by-default.patch +++ b/build/patches/Disable-smart-selection-by-default.patch @@ -10,13 +10,15 @@ the ChromeSmartSelection feature flag. License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - .../contextualsearch/SelectionClientManager.java | 4 +++- - .../browser/flags/android/chrome_feature_list.cc | 5 +++++ - .../browser/flags/android/chrome_feature_list.h | 1 + - .../chrome/browser/flags/ChromeFeatureList.java | 1 + - .../selection/SelectionPopupControllerImpl.java | 2 +- - testing/variations/fieldtrial_testing_config.json | 15 +++++++++++++++ - 6 files changed, 26 insertions(+), 2 deletions(-) + .../browser/contextualsearch/SelectionClientManager.java | 4 +++- + chrome/browser/flags/android/chrome_feature_list.cc | 1 + + .../org/chromium/chrome/browser/flags/ChromeFeatureList.java | 1 + + .../browser/selection/SelectionPopupControllerImpl.java | 2 +- + .../disable-smart-selection-by-default.inc | 3 +++ + .../disable-smart-selection-by-default.inc | 1 + + 6 files changed, 10 insertions(+), 2 deletions(-) + create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/disable-smart-selection-by-default.inc + create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/disable-smart-selection-by-default.inc diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/SelectionClientManager.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/SelectionClientManager.java --- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/SelectionClientManager.java @@ -50,28 +52,6 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse &kCCTIncognitoAvailableToThirdParty, &kCCTIntentFeatureOverrides, &kCCTMinimized, -@@ -1059,6 +1060,10 @@ BASE_FEATURE(kTabEngagementReportingAndroid, - "TabEngagementReportingAndroid", - base::FEATURE_DISABLED_BY_DEFAULT); - -+BASE_FEATURE(kChromeSmartSelection, -+ "ChromeSmartSelection", -+ base::FEATURE_DISABLED_BY_DEFAULT); -+ - BASE_FEATURE(kTabStripRedesign, - "TabStripRedesign", - base::FEATURE_DISABLED_BY_DEFAULT); -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 -@@ -78,6 +78,7 @@ BASE_DECLARE_FEATURE(kCCTToolbarCustomizations); - BASE_DECLARE_FEATURE(kDontAutoHideBrowserControls); - BASE_DECLARE_FEATURE(kCacheDeprecatedSystemLocationSetting); - BASE_DECLARE_FEATURE(kChromeNewDownloadTab); -+BASE_DECLARE_FEATURE(kChromeSmartSelection); - BASE_DECLARE_FEATURE(kChromeShareScreenshot); - BASE_DECLARE_FEATURE(kChromeSharingHub); - BASE_DECLARE_FEATURE(kChromeSharingHubLaunchAdjacent); 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 @@ -95,30 +75,19 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/select && isSelectActionModeAllowed(MENU_ITEM_WEB_SEARCH); } -diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json ---- a/testing/variations/fieldtrial_testing_config.json -+++ b/testing/variations/fieldtrial_testing_config.json -@@ -4088,6 +4088,21 @@ - ] - } - ], -+ "ChromeSmartSelection": [ -+ { -+ "platforms": [ -+ "android" -+ ], -+ "experiments": [ -+ { -+ "name": "Enabled_Launch", -+ "enable_features": [ -+ "ChromeSmartSelection" -+ ] -+ } -+ ] -+ } -+ ], - "CommerceHintAndroid": [ - { - "platforms": [ +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/disable-smart-selection-by-default.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/disable-smart-selection-by-default.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/disable-smart-selection-by-default.inc +@@ -0,0 +1,3 @@ ++CROMITE_FEATURE(kChromeSmartSelection, ++ "ChromeSmartSelection", ++ base::FEATURE_DISABLED_BY_DEFAULT); +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/disable-smart-selection-by-default.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/disable-smart-selection-by-default.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/disable-smart-selection-by-default.inc +@@ -0,0 +1 @@ ++BASE_DECLARE_FEATURE(kChromeSmartSelection); -- 2.25.1 diff --git a/build/patches/Disable-some-signed-exchange-features.patch b/build/patches/Disable-some-signed-exchange-features.patch index e44508ff1..c72e3a22e 100644 --- a/build/patches/Disable-some-signed-exchange-features.patch +++ b/build/patches/Disable-some-signed-exchange-features.patch @@ -4,37 +4,23 @@ Subject: Disable some signed exchange features License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - content/common/features.cc | 4 ++-- - content/public/common/content_features.cc | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) + .../common/features_cc/Disable-some-signed-exchange-features.inc | 1 + + .../Disable-some-signed-exchange-features.inc | 1 + + 2 files changed, 2 insertions(+) + create mode 100644 cromite_flags/content/common/features_cc/Disable-some-signed-exchange-features.inc + create mode 100644 cromite_flags/content/public/common/content_features_cc/Disable-some-signed-exchange-features.inc -diff --git a/content/common/features.cc b/content/common/features.cc ---- a/content/common/features.cc -+++ b/content/common/features.cc -@@ -432,8 +432,8 @@ const base::FeatureParam - // Signed Exchange Reporting for distributors - // https://www.chromestatus.com/feature/5687904902840320 - BASE_FEATURE(kSignedExchangeReportingForDistributors, -- "SignedExchangeReportingForDistributors", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "SignedExchangeReportingForDistributors", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - - // When enabled, ensures that an unlocked process cannot access data for - // sites that require a dedicated process. -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 -@@ -934,8 +934,8 @@ BASE_FEATURE(kShouldAllowFirstPartyStorageKeyOverrideFromEmbedder, - // Origin-Signed HTTP Exchanges (for WebPackage Loading) - // https://www.chromestatus.com/feature/5745285984681984 - BASE_FEATURE(kSignedHTTPExchange, -- "SignedHTTPExchange", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "SignedHTTPExchange", // must be disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - - // If enabled, GetUserMedia API will only work when the concerned tab is in - // focus +diff --git a/cromite_flags/content/common/features_cc/Disable-some-signed-exchange-features.inc b/cromite_flags/content/common/features_cc/Disable-some-signed-exchange-features.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/content/common/features_cc/Disable-some-signed-exchange-features.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_DISABLED(kSignedExchangeReportingForDistributors); +diff --git a/cromite_flags/content/public/common/content_features_cc/Disable-some-signed-exchange-features.inc b/cromite_flags/content/public/common/content_features_cc/Disable-some-signed-exchange-features.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/content/public/common/content_features_cc/Disable-some-signed-exchange-features.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_DISABLED(kSignedHTTPExchange); -- 2.25.1 diff --git a/build/patches/Disable-text-fragments-by-default.patch b/build/patches/Disable-text-fragments-by-default.patch index fe57801c6..13a3ed7ee 100644 --- a/build/patches/Disable-text-fragments-by-default.patch +++ b/build/patches/Disable-text-fragments-by-default.patch @@ -7,75 +7,18 @@ Revert "[Text Fragment] Unflag fragment directive removal." Original License: BSD-3-Clause - https://spdx.org/licenses/BSD-3-Clause.html License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/about_flags.cc | 5 +++++ - chrome/browser/flag-metadata.json | 5 +++++ - chrome/browser/flag_descriptions.cc | 4 ++++ - chrome/browser/flag_descriptions.h | 3 +++ - chrome/browser/ui/prefs/prefs_tab_helper.cc | 2 +- - content/child/runtime_features.cc | 2 ++ - third_party/blink/common/features.cc | 5 +++++ - third_party/blink/public/common/features.h | 1 + - third_party/blink/renderer/core/dom/document.cc | 5 +++++ - .../blink/renderer/platform/runtime_enabled_features.json5 | 5 ++--- - 10 files changed, 33 insertions(+), 4 deletions(-) + chrome/browser/ui/prefs/prefs_tab_helper.cc | 2 +- + content/child/runtime_features.cc | 2 ++ + .../about_flags_cc/Disable-text-fragments-by-default.inc | 8 ++++++++ + .../features_cc/Disable-text-fragments-by-default.inc | 4 ++++ + .../features_h/Disable-text-fragments-by-default.inc | 1 + + third_party/blink/renderer/core/dom/document.cc | 5 +++++ + .../renderer/platform/runtime_enabled_features.json5 | 5 ++--- + 7 files changed, 23 insertions(+), 4 deletions(-) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Disable-text-fragments-by-default.inc + create mode 100644 cromite_flags/third_party/blink/common/features_cc/Disable-text-fragments-by-default.inc + create mode 100644 cromite_flags/third_party/blink/common/features_h/Disable-text-fragments-by-default.inc -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 -@@ -7235,6 +7235,11 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kLegacyTechReportTopLevelUrlDescription, kOsAll, - FEATURE_VALUE_TYPE(features::kLegacyTechReportTopLevelUrl)}, - -+ {"enable-text-fragment-anchor", -+ flag_descriptions::kEnableTextFragmentAnchorName, -+ flag_descriptions::kEnableTextFragmentAnchorDescription, kOsAll, -+ FEATURE_VALUE_TYPE(blink::features::kTextFragmentAnchor)}, -+ - #if BUILDFLAG(IS_CHROMEOS_ASH) - {"enable-web-authentication-chromeos-authenticator", - flag_descriptions::kEnableWebAuthenticationChromeOSAuthenticatorName, -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 -@@ -3255,6 +3255,11 @@ - "owners": [ "robsc", "napper", "alanlxl" ], - "expiry_milestone": 130 - }, -+ { -+ "name": "enable-text-fragment-anchor", -+ "owners": [ "bokan", "input-dev" ], -+ "expiry_milestone": -1 -+ }, - { - "name": "enable-neural-stylus-palm-rejection", - "owners": [ "robsc", "napper", "adlr" ], -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 -@@ -1501,6 +1501,10 @@ const char kDropInputEventsBeforeFirstPaintDescription[] = - "intentionally interact with elements on that page. By dropping the events " - "we prevent accidental interaction with a page the user has not seen yet."; - -+const char kEnableTextFragmentAnchorName[] = "Enable Text Fragment Anchor."; -+const char kEnableTextFragmentAnchorDescription[] = -+ "Enables scrolling to text specified in URL's fragment."; -+ - const char kEnableCssSelectorFragmentAnchorName[] = - "Enables CSS selector fragment anchors"; - const char kEnableCssSelectorFragmentAnchorDescription[] = -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 -@@ -843,6 +843,9 @@ extern const char kExperimentalRgbKeyboardPatternsDescription[]; - - extern const char kRetailCouponsName[]; - extern const char kRetailCouponsDescription[]; -+extern const char kEnableTextFragmentAnchorName[]; -+extern const char kEnableTextFragmentAnchorDescription[]; -+ - - extern const char kDropInputEventsBeforeFirstPaintName[]; - extern const char kDropInputEventsBeforeFirstPaintDescription[]; diff --git a/chrome/browser/ui/prefs/prefs_tab_helper.cc b/chrome/browser/ui/prefs/prefs_tab_helper.cc --- a/chrome/browser/ui/prefs/prefs_tab_helper.cc +++ b/chrome/browser/ui/prefs/prefs_tab_helper.cc @@ -100,32 +43,34 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features. {wf::EnableUserActivationSameOriginVisibility, raw_ref(features::kUserActivationSameOriginVisibility)}, {wf::EnableVideoPlaybackQuality, raw_ref(features::kVideoPlaybackQuality)}, -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 -@@ -767,6 +767,11 @@ BASE_FEATURE(kFencedFramesM119Features, - "FencedFramesM119Features", - base::FEATURE_DISABLED_BY_DEFAULT); - -+// Enable text snippets in URL fragments. https://crbug.com/919204. -+BASE_FEATURE(kTextFragmentAnchor, -+ "TextFragmentAnchor", -+ base::FEATURE_DISABLED_BY_DEFAULT); +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 ++++ b/cromite_flags/chrome/browser/about_flags_cc/Disable-text-fragments-by-default.inc +@@ -0,0 +1,8 @@ ++#ifdef FLAG_SECTION + - // File handling icons. https://crbug.com/1218213 - BASE_FEATURE(kFileHandlingIcons, - "FileHandlingIcons", -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 -@@ -351,6 +351,7 @@ BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kDispatchBeforeUnloadOnFreeze); - BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kDisplayLocking); - - BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kDropInputEventsBeforeFirstPaint); ++ {"enable-text-fragment-anchor", ++ "Enable Text Fragment Anchor.", ++ "Enables scrolling to text specified in URL's fragment.", kOsAll, ++ FEATURE_VALUE_TYPE(blink::features::kTextFragmentAnchor)}, ++ ++#endif +diff --git a/cromite_flags/third_party/blink/common/features_cc/Disable-text-fragments-by-default.inc b/cromite_flags/third_party/blink/common/features_cc/Disable-text-fragments-by-default.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/third_party/blink/common/features_cc/Disable-text-fragments-by-default.inc +@@ -0,0 +1,4 @@ ++// Enable text snippets in URL fragments. https://crbug.com/919204. ++CROMITE_FEATURE(kTextFragmentAnchor, ++ "TextFragmentAnchor", ++ base::FEATURE_DISABLED_BY_DEFAULT); +diff --git a/cromite_flags/third_party/blink/common/features_h/Disable-text-fragments-by-default.inc b/cromite_flags/third_party/blink/common/features_h/Disable-text-fragments-by-default.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/third_party/blink/common/features_h/Disable-text-fragments-by-default.inc +@@ -0,0 +1 @@ +BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kTextFragmentAnchor); - - BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kDroppedTouchSequenceIncludesTouchEnd); - 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 diff --git a/build/patches/Disable-various-metrics.patch b/build/patches/Disable-various-metrics.patch index ed20896d8..73725cf34 100644 --- a/build/patches/Disable-various-metrics.patch +++ b/build/patches/Disable-various-metrics.patch @@ -13,13 +13,13 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../android/ntp/most_visited_sites_bridge.cc | 17 ----------------- chrome/browser/browser_process_impl.cc | 2 +- chrome/browser/chrome_content_browser_client.cc | 15 --------------- - .../chrome_metrics_services_manager_client.cc | 8 ++++---- + .../chrome_metrics_services_manager_client.cc | 4 ++++ .../browser/ui/search/ntp_user_data_logger.cc | 4 ---- components/ntp_tiles/BUILD.gn | 3 --- .../ntp_tiles/custom_links_manager_impl.cc | 1 - components/ntp_tiles/most_visited_sites.cc | 2 -- - services/metrics/public/cpp/ukm_recorder.cc | 2 +- - 10 files changed, 7 insertions(+), 49 deletions(-) + services/metrics/public/cpp/ukm_recorder.cc | 1 + + 10 files changed, 7 insertions(+), 44 deletions(-) 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 @@ -142,28 +142,17 @@ 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 -@@ -75,8 +75,8 @@ namespace internal { - // recording and reporting are enabled. If the feature is enabled, but no - // consent is given, then there will be no recording or reporting. - BASE_FEATURE(kMetricsReportingFeature, -- "MetricsReporting", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "MetricsReporting", // disabled by default -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - - #if BUILDFLAG(IS_ANDROID) - // Same as |kMetricsReportingFeature|, but this feature is associated with a -@@ -85,8 +85,8 @@ BASE_FEATURE(kMetricsReportingFeature, - // the fix to not affect the overall sampling rate, this new feature was - // created. See crbug/1306481. - BASE_FEATURE(kPostFREFixMetricsReportingFeature, -- "PostFREFixMetricsReporting", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "PostFREFixMetricsReporting", // disabled by deault -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - #endif // BUILDFLAG(IS_ANDROID) - +@@ -92,6 +92,10 @@ BASE_FEATURE(kPostFREFixMetricsReportingFeature, // Name of the variations param that defines the sampling rate. + const char kRateParamName[] = "sampling_rate_per_mille"; + ++SET_CROMITE_FEATURE_DISABLED(kMetricsReportingFeature); ++#if BUILDFLAG(IS_ANDROID) ++SET_CROMITE_FEATURE_DISABLED(kPostFREFixMetricsReportingFeature); ++#endif // BUILDFLAG(IS_ANDROID) + } // namespace internal + } // namespace metrics + diff --git a/chrome/browser/ui/search/ntp_user_data_logger.cc b/chrome/browser/ui/search/ntp_user_data_logger.cc --- a/chrome/browser/ui/search/ntp_user_data_logger.cc +++ b/chrome/browser/ui/search/ntp_user_data_logger.cc @@ -233,14 +222,11 @@ diff --git a/components/ntp_tiles/most_visited_sites.cc b/components/ntp_tiles/m diff --git a/services/metrics/public/cpp/ukm_recorder.cc b/services/metrics/public/cpp/ukm_recorder.cc --- a/services/metrics/public/cpp/ukm_recorder.cc +++ b/services/metrics/public/cpp/ukm_recorder.cc -@@ -14,7 +14,7 @@ - - namespace ukm { - --BASE_FEATURE(kUkmFeature, "Ukm", base::FEATURE_ENABLED_BY_DEFAULT); -+BASE_FEATURE(kUkmFeature, "Ukm", base::FEATURE_DISABLED_BY_DEFAULT); // disabled in Bromite +@@ -116,4 +116,5 @@ ukm::SourceId UkmRecorder::GetSourceIdFromScopeImpl(const GURL& scope_url, + return source_id; + } - BASE_FEATURE(kUkmReduceAddEntryIPC, - "UkmReduceAddEntryIPC", ++SET_CROMITE_FEATURE_DISABLED(kUkmFeature); + } // namespace ukm -- 2.25.1 diff --git a/build/patches/Enable-Certificate-Transparency.patch b/build/patches/Enable-Certificate-Transparency.patch index 0e75ac667..a73682255 100644 --- a/build/patches/Enable-Certificate-Transparency.patch +++ b/build/patches/Enable-Certificate-Transparency.patch @@ -8,65 +8,21 @@ by default. License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/about_flags.cc | 5 +++++ - chrome/browser/browser_features.cc | 13 +++++++------ - chrome/browser/browser_features.h | 1 + - chrome/browser/flag_descriptions.cc | 6 +++++- - chrome/browser/flag_descriptions.h | 5 ++++- - .../browser/net/system_network_context_manager.cc | 6 +----- - chrome/browser/ssl/sct_reporting_service.cc | 5 +++++ - chrome/common/chrome_features.cc | 10 ++-------- - net/http/transport_security_state.cc | 5 +++-- - net/url_request/report_sender.cc | 3 ++- - services/network/network_context.cc | 2 +- - .../network/sct_auditing/sct_auditing_handler.cc | 2 ++ - 12 files changed, 38 insertions(+), 25 deletions(-) + chrome/browser/browser_features.h | 1 + + chrome/browser/net/system_network_context_manager.cc | 6 +----- + chrome/browser/ssl/sct_reporting_service.cc | 5 +++++ + .../about_flags_cc/Enable-Certificate-Transparency.inc | 9 +++++++++ + .../Enable-Certificate-Transparency.inc | 6 ++++++ + .../Enable-Certificate-Transparency.inc | 2 ++ + net/http/transport_security_state.cc | 5 +++-- + net/url_request/report_sender.cc | 3 ++- + services/network/network_context.cc | 2 +- + services/network/sct_auditing/sct_auditing_handler.cc | 2 ++ + 10 files changed, 32 insertions(+), 9 deletions(-) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Enable-Certificate-Transparency.inc + create mode 100644 cromite_flags/chrome/browser/browser_features_cc/Enable-Certificate-Transparency.inc + create mode 100644 cromite_flags/chrome/common/chrome_features_cc/Enable-Certificate-Transparency.inc -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 -@@ -9899,6 +9899,11 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kWebMidiDescription, kOsAll, - FEATURE_VALUE_TYPE(features::kWebMidi)}, - -+ {"certificate-transparency-enabled", -+ flag_descriptions::kCTEnabledName, -+ flag_descriptions::kCTEnabledDescription, kOsAll, -+ FEATURE_VALUE_TYPE(features::kCertificateTransparency)}, -+ - #if BUILDFLAG(IS_CHROMEOS_ASH) - {"dns-over-https-with-identifiers-reuse-old-policy", - flag_descriptions::kDnsOverHttpsWithIdentifiersReuseOldPolicyName, -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 -@@ -77,6 +77,11 @@ BASE_FEATURE(kEnableUniveralLinks, - base::FEATURE_ENABLED_BY_DEFAULT); - #endif - -+// Enables Certificate Transparency -+BASE_FEATURE(kCertificateTransparency, -+ "CertificateTransparency", // must be enabled -+ base::FEATURE_ENABLED_BY_DEFAULT); // in Bromite -+ - #if BUILDFLAG(IS_CHROMEOS_ASH) - // Enables reading and writing PWA notification permissions from quick settings - // menu. -@@ -177,12 +182,8 @@ BASE_FEATURE(kWebUsbDeviceDetection, - // update the list of accepted logs. Embedders who are planning to enable this - // should first reach out to chrome-certificate-transparency@google.com. - BASE_FEATURE(kCertificateTransparencyAskBeforeEnabling, -- "CertificateTransparencyAskBeforeEnabling", --#if BUILDFLAG(GOOGLE_CHROME_BRANDING) -- base::FEATURE_ENABLED_BY_DEFAULT); --#else -- base::FEATURE_DISABLED_BY_DEFAULT); --#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) -+ "CertificateTransparencyAskBeforeEnabling", // enabled -+ base::FEATURE_ENABLED_BY_DEFAULT); // by default - - BASE_FEATURE(kLargeFaviconFromGoogle, - "LargeFaviconFromGoogle", 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 @@ -78,37 +34,6 @@ diff --git a/chrome/browser/browser_features.h b/chrome/browser/browser_features BASE_DECLARE_FEATURE(kCertificateTransparencyAskBeforeEnabling); BASE_DECLARE_FEATURE(kLargeFaviconFromGoogle); -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 -@@ -7766,7 +7766,11 @@ const char kAutofillCreditCardUploadDescription[] = - - #endif // defined(TOOLKIT_VIEWS) || BUILDFLAG(IS_ANDROID) - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) -+const char kCTEnabledName[] = "Enable Certificate Transparency"; -+const char kCTEnabledDescription[] = -+ "Enables compliance against the Certificate Transparency Policy, with reporting disabled."; -+ - const char kElasticOverscrollName[] = "Elastic Overscroll"; - const char kElasticOverscrollDescription[] = - "Enables Elastic Overscrolling on touchscreens and precision touchpads."; -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 -@@ -4499,7 +4499,10 @@ extern const char kAutofillCreditCardUploadDescription[]; - - #endif // defined(TOOLKIT_VIEWS) || BUILDFLAG(IS_ANDROID) - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) -+extern const char kCTEnabledName[]; -+extern const char kCTEnabledDescription[]; -+ - extern const char kElasticOverscrollName[]; - extern const char kElasticOverscrollDescription[]; - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) 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 @@ -147,36 +72,38 @@ diff --git a/chrome/browser/ssl/sct_reporting_service.cc b/chrome/browser/ssl/sc if (profile_->IsOffTheRecord() || !base::FeatureList::IsEnabled(features::kSCTAuditing)) { return network::mojom::SCTAuditingMode::kDisabled; -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 -@@ -1127,15 +1127,9 @@ BASE_FEATURE(kSchedulerConfiguration, - base::FEATURE_DISABLED_BY_DEFAULT); - #endif // BUILDFLAG(IS_CHROMEOS_ASH) - --// Controls whether SCT audit reports are queued and the rate at which they --// should be sampled. Default sampling rate is 1/10,000 certificates. --#if BUILDFLAG(GOOGLE_CHROME_BRANDING) && !BUILDFLAG(IS_ANDROID) --BASE_FEATURE(kSCTAuditing, "SCTAuditing", base::FEATURE_ENABLED_BY_DEFAULT); --#else - // This requires backend infrastructure and a data collection policy. - // Non-Chrome builds should not use Chrome's infrastructure. - BASE_FEATURE(kSCTAuditing, "SCTAuditing", base::FEATURE_DISABLED_BY_DEFAULT); --#endif - constexpr base::FeatureParam kSCTAuditingSamplingRate{ - &kSCTAuditing, "sampling_rate", 0.0001}; - -@@ -1144,8 +1138,8 @@ constexpr base::FeatureParam kSCTAuditingSamplingRate{ - // about an SCT seen in the wild. If it hasn't been seen, then it is considered - // a security incident and uploaded to Google. - BASE_FEATURE(kSCTAuditingHashdance, -- "SCTAuditingHashdance", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "SCTAuditingHashdance", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - - // An estimated high bound for the time it takes Google to ingest updates to an - // SCT log. Chrome will wait for at least this time plus the Log's Maximum Merge +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Enable-Certificate-Transparency.inc b/cromite_flags/chrome/browser/about_flags_cc/Enable-Certificate-Transparency.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Enable-Certificate-Transparency.inc +@@ -0,0 +1,9 @@ ++#ifdef FLAG_SECTION ++ ++ {"certificate-transparency-enabled", ++ "Enable Certificate Transparency", ++ "Enables compliance against the Certificate Transparency " ++ "Policy, with reporting disabled.", kOsAll, ++ FEATURE_VALUE_TYPE(features::kCertificateTransparency)}, ++ ++#endif +diff --git a/cromite_flags/chrome/browser/browser_features_cc/Enable-Certificate-Transparency.inc b/cromite_flags/chrome/browser/browser_features_cc/Enable-Certificate-Transparency.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/browser_features_cc/Enable-Certificate-Transparency.inc +@@ -0,0 +1,6 @@ ++SET_CROMITE_FEATURE_ENABLED(kCertificateTransparencyAskBeforeEnabling); ++ ++// Enables Certificate Transparency ++CROMITE_FEATURE(kCertificateTransparency, ++ "CertificateTransparency", ++ base::FEATURE_ENABLED_BY_DEFAULT); +diff --git a/cromite_flags/chrome/common/chrome_features_cc/Enable-Certificate-Transparency.inc b/cromite_flags/chrome/common/chrome_features_cc/Enable-Certificate-Transparency.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/common/chrome_features_cc/Enable-Certificate-Transparency.inc +@@ -0,0 +1,2 @@ ++SET_CROMITE_FEATURE_DISABLED(kSCTAuditing); ++SET_CROMITE_FEATURE_DISABLED(kSCTAuditingHashdance); diff --git a/net/http/transport_security_state.cc b/net/http/transport_security_state.cc --- a/net/http/transport_security_state.cc +++ b/net/http/transport_security_state.cc diff --git a/build/patches/Enable-ECH-by-default.patch b/build/patches/Enable-ECH-by-default.patch index ceda433b2..be75b2683 100644 --- a/build/patches/Enable-ECH-by-default.patch +++ b/build/patches/Enable-ECH-by-default.patch @@ -4,28 +4,16 @@ Subject: Enable ECH by default License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - net/base/features.cc | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) + cromite_flags/net/base/features_cc/Enable-ECH-by-default.inc | 2 ++ + 1 file changed, 2 insertions(+) + create mode 100644 cromite_flags/net/base/features_cc/Enable-ECH-by-default.inc -diff --git a/net/base/features.cc b/net/base/features.cc ---- a/net/base/features.cc -+++ b/net/base/features.cc -@@ -96,12 +96,12 @@ BASE_FEATURE(kEnableTLS13EarlyData, - base::FEATURE_DISABLED_BY_DEFAULT); - - BASE_FEATURE(kEncryptedClientHello, -- "EncryptedClientHello", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "EncryptedClientHello", // enabled -+ base::FEATURE_ENABLED_BY_DEFAULT); // in Bromite - - BASE_FEATURE(kEncryptedClientHelloQuic, -- "EncryptedClientHelloQuic", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "EncryptedClientHelloQuic", // enabled -+ base::FEATURE_ENABLED_BY_DEFAULT); // in Bromite - - // TODO(crbug.com/795089): Enable this feature. - BASE_FEATURE(kRSAKeyUsageForLocalAnchors, +diff --git a/cromite_flags/net/base/features_cc/Enable-ECH-by-default.inc b/cromite_flags/net/base/features_cc/Enable-ECH-by-default.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/net/base/features_cc/Enable-ECH-by-default.inc +@@ -0,0 +1,2 @@ ++SET_CROMITE_FEATURE_ENABLED(kEncryptedClientHello); ++SET_CROMITE_FEATURE_ENABLED(kEncryptedClientHelloQuic); -- 2.25.1 diff --git a/build/patches/Enable-PermuteTLSExtensions-by-default.patch b/build/patches/Enable-PermuteTLSExtensions-by-default.patch index 303ec0c47..d26df4c12 100644 --- a/build/patches/Enable-PermuteTLSExtensions-by-default.patch +++ b/build/patches/Enable-PermuteTLSExtensions-by-default.patch @@ -4,22 +4,15 @@ Subject: Enable PermuteTLSExtensions by default License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - net/base/features.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + .../base/features_cc/Enable-PermuteTLSExtensions-by-default.inc | 1 + + 1 file changed, 1 insertion(+) + create mode 100644 cromite_flags/net/base/features_cc/Enable-PermuteTLSExtensions-by-default.inc -diff --git a/net/base/features.cc b/net/base/features.cc ---- a/net/base/features.cc -+++ b/net/base/features.cc -@@ -163,8 +163,8 @@ BASE_FEATURE(kTLS13KeyUpdate, - base::FEATURE_DISABLED_BY_DEFAULT); - - BASE_FEATURE(kPermuteTLSExtensions, -- "PermuteTLSExtensions", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "PermuteTLSExtensions", // enabled by default -+ base::FEATURE_ENABLED_BY_DEFAULT); // in Bromite - - BASE_FEATURE(kPostQuantumKyber, - "PostQuantumKyber", +diff --git a/cromite_flags/net/base/features_cc/Enable-PermuteTLSExtensions-by-default.inc b/cromite_flags/net/base/features_cc/Enable-PermuteTLSExtensions-by-default.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/net/base/features_cc/Enable-PermuteTLSExtensions-by-default.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_ENABLED(kPermuteTLSExtensions); -- 2.25.1 diff --git a/build/patches/Enable-StrictOriginIsolation-and-SitePerProcess.patch b/build/patches/Enable-StrictOriginIsolation-and-SitePerProcess.patch index a25ea6fb1..ba808a21e 100644 --- a/build/patches/Enable-StrictOriginIsolation-and-SitePerProcess.patch +++ b/build/patches/Enable-StrictOriginIsolation-and-SitePerProcess.patch @@ -9,26 +9,14 @@ SitePerProcess: always consider enterprise policies applicable. Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/about_flags.cc | 3 --- - chrome/browser/chrome_content_browser_client.cc | 4 ++-- - chrome/common/chrome_features.cc | 8 ++------ - components/site_isolation/site_isolation_policy.cc | 3 +++ - content/public/common/content_features.cc | 4 ++-- - 5 files changed, 9 insertions(+), 13 deletions(-) + chrome/browser/chrome_content_browser_client.cc | 4 ++-- + components/site_isolation/site_isolation_policy.cc | 3 +++ + .../Enable-StrictOriginIsolation-and-SitePerProcess.inc | 1 + + .../Enable-StrictOriginIsolation-and-SitePerProcess.inc | 1 + + 4 files changed, 7 insertions(+), 2 deletions(-) + create mode 100644 cromite_flags/chrome/common/chrome_features_cc/Enable-StrictOriginIsolation-and-SitePerProcess.inc + create mode 100644 cromite_flags/content/public/common/content_features_cc/Enable-StrictOriginIsolation-and-SitePerProcess.inc -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 -@@ -5116,9 +5116,6 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kSiteIsolationForPasswordSitesDescription, kOsAndroid, - FEATURE_VALUE_TYPE( - site_isolation::features::kSiteIsolationForPasswordSites)}, -- {"enable-site-per-process", flag_descriptions::kStrictSiteIsolationName, -- flag_descriptions::kStrictSiteIsolationDescription, kOsAndroid, -- SINGLE_VALUE_TYPE(switches::kSitePerProcess)}, - #endif - {"enable-isolated-web-apps", flag_descriptions::kEnableIsolatedWebAppsName, - flag_descriptions::kEnableIsolatedWebAppsDescription, kOsDesktop, 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 @@ -50,24 +38,6 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch registry->RegisterListPref( site_isolation::prefs::kUserTriggeredIsolatedOrigins); registry->RegisterDictionaryPref( -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 -@@ -1177,12 +1177,8 @@ const base::FeatureParam kSCTLogMaxIngestionRandomDelay{ - // TODO(alexmos): Move this and the other site isolation features below to - // browser_features, as they are only used on the browser side. - BASE_FEATURE(kSitePerProcess, -- "SitePerProcess", --#if BUILDFLAG(IS_ANDROID) -- base::FEATURE_DISABLED_BY_DEFAULT --#else -- base::FEATURE_ENABLED_BY_DEFAULT --#endif -+ "SitePerProcess", // enabled by default -+ base::FEATURE_ENABLED_BY_DEFAULT // in Bromite - ); - - #if BUILDFLAG(IS_CHROMEOS_ASH) diff --git a/components/site_isolation/site_isolation_policy.cc b/components/site_isolation/site_isolation_policy.cc --- a/components/site_isolation/site_isolation_policy.cc +++ b/components/site_isolation/site_isolation_policy.cc @@ -95,19 +65,17 @@ diff --git a/components/site_isolation/site_isolation_policy.cc b/components/sit if (!g_disallow_memory_threshold_caching_for_testing) { return CachedDisableSiteIsolation(site_isolation_mode); } -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 -@@ -1008,8 +1008,8 @@ BASE_FEATURE(kSpareRendererForSitePerProcess, - // Controls whether site isolation should use origins instead of scheme and - // eTLD+1. - BASE_FEATURE(kStrictOriginIsolation, -- "StrictOriginIsolation", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "StrictOriginIsolation", // must be enabled -+ base::FEATURE_ENABLED_BY_DEFAULT); // in Bromite - - // Disallows window.{alert, prompt, confirm} if triggered inside a subframe that - // is not same origin with the main frame. +diff --git a/cromite_flags/chrome/common/chrome_features_cc/Enable-StrictOriginIsolation-and-SitePerProcess.inc b/cromite_flags/chrome/common/chrome_features_cc/Enable-StrictOriginIsolation-and-SitePerProcess.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/common/chrome_features_cc/Enable-StrictOriginIsolation-and-SitePerProcess.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_ENABLED(kSitePerProcess); +diff --git a/cromite_flags/content/public/common/content_features_cc/Enable-StrictOriginIsolation-and-SitePerProcess.inc b/cromite_flags/content/public/common/content_features_cc/Enable-StrictOriginIsolation-and-SitePerProcess.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/content/public/common/content_features_cc/Enable-StrictOriginIsolation-and-SitePerProcess.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_ENABLED(kStrictOriginIsolation); -- 2.25.1 diff --git a/build/patches/Enable-darken-websites-checkbox-in-themes.patch b/build/patches/Enable-darken-websites-checkbox-in-themes.patch index bd0df3491..eb9a44c84 100644 --- a/build/patches/Enable-darken-websites-checkbox-in-themes.patch +++ b/build/patches/Enable-darken-websites-checkbox-in-themes.patch @@ -6,9 +6,10 @@ Unexpire #darken-websites-checkbox-in-themes-setting License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/flag-metadata.json | 6 +++--- - components/content_settings/core/common/features.cc | 4 ++-- - 2 files changed, 5 insertions(+), 5 deletions(-) + chrome/browser/flag-metadata.json | 6 +++--- + .../Enable-darken-websites-checkbox-in-themes.inc | 5 +++++ + 2 files changed, 8 insertions(+), 3 deletions(-) + create mode 100644 cromite_flags/components/content_settings/core/common/features_cc/Enable-darken-websites-checkbox-in-themes.inc diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json --- a/chrome/browser/flag-metadata.json @@ -26,19 +27,15 @@ diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.js }, { "name": "data-retention-policies-disable-sync-types-needed", -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 -@@ -19,8 +19,8 @@ BASE_FEATURE(kImprovedCookieControls, - // Enables auto dark feature in theme settings. - #if BUILDFLAG(IS_ANDROID) - BASE_FEATURE(kDarkenWebsitesCheckboxInThemesSetting, -- "DarkenWebsitesCheckboxInThemesSetting", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "DarkenWebsitesCheckboxInThemesSetting", // must be enabled -+ base::FEATURE_ENABLED_BY_DEFAULT); // in Bromite - constexpr base::FeatureParam kDarkenWebsitesCheckboxOptOut{ - &kDarkenWebsitesCheckboxInThemesSetting, "opt_out", true}; - #endif // BUILDFLAG(IS_ANDROID) +diff --git a/cromite_flags/components/content_settings/core/common/features_cc/Enable-darken-websites-checkbox-in-themes.inc b/cromite_flags/components/content_settings/core/common/features_cc/Enable-darken-websites-checkbox-in-themes.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/components/content_settings/core/common/features_cc/Enable-darken-websites-checkbox-in-themes.inc +@@ -0,0 +1,5 @@ ++#if BUILDFLAG(IS_ANDROID) ++ ++SET_CROMITE_FEATURE_ENABLED(kDarkenWebsitesCheckboxInThemesSetting); ++ ++#endif // BUILDFLAG(IS_ANDROID) -- 2.25.1 diff --git a/build/patches/Enable-native-Android-autofill.patch b/build/patches/Enable-native-Android-autofill.patch index 325924dc3..ac5d5ae37 100644 --- a/build/patches/Enable-native-Android-autofill.patch +++ b/build/patches/Enable-native-Android-autofill.patch @@ -47,7 +47,7 @@ diff --git a/android_webview/browser/aw_contents.cc b/android_webview/browser/aw WebContents* web_contents) { - return AwContents::FromWebContents(web_contents); + return AwContents::FromWebContents(web_contents, -+ /*enable_secondary_autofill_manager*/ false); ++ /*enable_secondary_autofill_manager*/ false); } // static @@ -58,7 +58,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn "//chrome/browser/ui/android/hats:message_ui_delegate_java", "//chrome/browser/ui/android/layouts:java", "//chrome/browser/ui/android/layouts/glue:java", -+ "//components/android_autofill/browser:java", ++ "//components/android_autofill/browser:java", "//chrome/browser/ui/android/logo:java", "//chrome/browser/ui/android/management:java", "//chrome/browser/ui/android/multiwindow:java", diff --git a/build/patches/Enable-network-isolation-features.patch b/build/patches/Enable-network-isolation-features.patch index 3c1ff0862..a600388f2 100644 --- a/build/patches/Enable-network-isolation-features.patch +++ b/build/patches/Enable-network-isolation-features.patch @@ -9,99 +9,32 @@ PartitionNelAndReportingByNetworkIsolationKey License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - net/base/features.cc | 68 ++++++++++++------------- - services/network/public/cpp/features.cc | 2 +- - 2 files changed, 35 insertions(+), 35 deletions(-) + .../features_cc/Enable-network-isolation-features.inc | 10 ++++++++++ + .../features_cc/Enable-network-isolation-features.inc | 1 + + 2 files changed, 11 insertions(+) + create mode 100644 cromite_flags/net/base/features_cc/Enable-network-isolation-features.inc + create mode 100644 cromite_flags/services/network/public/cpp/features_cc/Enable-network-isolation-features.inc -diff --git a/net/base/features.cc b/net/base/features.cc ---- a/net/base/features.cc -+++ b/net/base/features.cc -@@ -108,40 +108,40 @@ BASE_FEATURE(kSplitCacheByIncludeCredentials, - "SplitCacheByIncludeCredentials", - base::FEATURE_DISABLED_BY_DEFAULT); - --BASE_FEATURE(kSplitCacheByNetworkIsolationKey, -- "SplitCacheByNetworkIsolationKey", -- base::FEATURE_DISABLED_BY_DEFAULT); -- --BASE_FEATURE(kSplitCodeCacheByNetworkIsolationKey, -- "SplitCodeCacheByNetworkIsolationKey", -- base::FEATURE_DISABLED_BY_DEFAULT); -- --BASE_FEATURE(kSplitHostCacheByNetworkIsolationKey, -- "SplitHostCacheByNetworkIsolationKey", -- base::FEATURE_DISABLED_BY_DEFAULT); -- --BASE_FEATURE(kPartitionConnectionsByNetworkIsolationKey, -- "PartitionConnectionsByNetworkIsolationKey", -- base::FEATURE_DISABLED_BY_DEFAULT); -- --BASE_FEATURE(kPartitionHttpServerPropertiesByNetworkIsolationKey, -- "PartitionHttpServerPropertiesByNetworkIsolationKey", -- base::FEATURE_DISABLED_BY_DEFAULT); -- --BASE_FEATURE(kPartitionSSLSessionsByNetworkIsolationKey, -- "PartitionSSLSessionsByNetworkIsolationKey", -- base::FEATURE_DISABLED_BY_DEFAULT); -- --BASE_FEATURE(kPartitionNelAndReportingByNetworkIsolationKey, -- "PartitionNelAndReportingByNetworkIsolationKey", -- base::FEATURE_DISABLED_BY_DEFAULT); -- --BASE_FEATURE(kEnableCrossSiteFlagNetworkIsolationKey, -- "EnableCrossSiteFlagNetworkIsolationKey", -- base::FEATURE_DISABLED_BY_DEFAULT); --BASE_FEATURE(kEnableFrameSiteSharedOpaqueNetworkIsolationKey, -- "EnableFrameSiteSharedOpaqueNetworkIsolationKey", -- base::FEATURE_DISABLED_BY_DEFAULT); -+BASE_FEATURE(kSplitCacheByNetworkIsolationKey, // must be enabled -+ "SplitCacheByNetworkIsolationKey", // enabled -+ base::FEATURE_ENABLED_BY_DEFAULT); // in Bromite +diff --git a/cromite_flags/net/base/features_cc/Enable-network-isolation-features.inc b/cromite_flags/net/base/features_cc/Enable-network-isolation-features.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/net/base/features_cc/Enable-network-isolation-features.inc +@@ -0,0 +1,10 @@ ++SET_CROMITE_FEATURE_ENABLED(kSplitCacheByNetworkIsolationKey); ++SET_CROMITE_FEATURE_ENABLED(kSplitCodeCacheByNetworkIsolationKey); ++SET_CROMITE_FEATURE_ENABLED(kSplitHostCacheByNetworkIsolationKey); ++SET_CROMITE_FEATURE_ENABLED(kPartitionConnectionsByNetworkIsolationKey); ++SET_CROMITE_FEATURE_ENABLED(kPartitionHttpServerPropertiesByNetworkIsolationKey); ++SET_CROMITE_FEATURE_ENABLED(kPartitionSSLSessionsByNetworkIsolationKey); ++SET_CROMITE_FEATURE_ENABLED(kPartitionNelAndReportingByNetworkIsolationKey); + -+BASE_FEATURE(kSplitCodeCacheByNetworkIsolationKey, // must be enabled -+ "SplitCodeCacheByNetworkIsolationKey", // enabled -+ base::FEATURE_ENABLED_BY_DEFAULT); // in Bromite -+ -+BASE_FEATURE(kSplitHostCacheByNetworkIsolationKey, // must be -+ "SplitHostCacheByNetworkIsolationKey", // enabled -+ base::FEATURE_ENABLED_BY_DEFAULT); // in Bromite -+ -+BASE_FEATURE(kPartitionConnectionsByNetworkIsolationKey, // must be -+ "PartitionConnectionsByNetworkIsolationKey", // enabled -+ base::FEATURE_ENABLED_BY_DEFAULT); // in Bromite -+ -+BASE_FEATURE(kPartitionHttpServerPropertiesByNetworkIsolationKey, // must be -+ "PartitionHttpServerPropertiesByNetworkIsolationKey", // enabled -+ base::FEATURE_ENABLED_BY_DEFAULT); // in Bromite -+ -+BASE_FEATURE(kPartitionSSLSessionsByNetworkIsolationKey, // must be -+ "PartitionSSLSessionsByNetworkIsolationKey", // enabled -+ base::FEATURE_ENABLED_BY_DEFAULT); // in Bromite -+ -+BASE_FEATURE(kPartitionNelAndReportingByNetworkIsolationKey, // must be -+ "PartitionNelAndReportingByNetworkIsolationKey", // enabled -+ base::FEATURE_ENABLED_BY_DEFAULT); // in Bromite -+ -+BASE_FEATURE(kEnableCrossSiteFlagNetworkIsolationKey, // must be -+ "EnableCrossSiteFlagNetworkIsolationKey", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite -+BASE_FEATURE(kEnableFrameSiteSharedOpaqueNetworkIsolationKey, // must be -+ "EnableFrameSiteSharedOpaqueNetworkIsolationKey", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - BASE_FEATURE(kHttpCacheKeyingExperimentControlGroup, - "HttpCacheKeyingExperimentControlGroup", - base::FEATURE_DISABLED_BY_DEFAULT); -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 -@@ -96,7 +96,7 @@ BASE_FEATURE(kCoopRestrictPropertiesOriginTrial, - // HttpAuthCache. - BASE_FEATURE(kSplitAuthCacheByNetworkIsolationKey, - "SplitAuthCacheByNetworkIsolationKey", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ base::FEATURE_ENABLED_BY_DEFAULT); - - // Enable usage of hardcoded DoH upgrade mapping for use in automatic mode. - BASE_FEATURE(kDnsOverHttpsUpgrade, ++SET_CROMITE_FEATURE_DISABLED(kEnableCrossSiteFlagNetworkIsolationKey); ++SET_CROMITE_FEATURE_DISABLED(kEnableFrameSiteSharedOpaqueNetworkIsolationKey); +diff --git a/cromite_flags/services/network/public/cpp/features_cc/Enable-network-isolation-features.inc b/cromite_flags/services/network/public/cpp/features_cc/Enable-network-isolation-features.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/services/network/public/cpp/features_cc/Enable-network-isolation-features.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_ENABLED(kSplitAuthCacheByNetworkIsolationKey); -- 2.25.1 diff --git a/build/patches/Enable-prefetch-privacy-changes-by-default.patch b/build/patches/Enable-prefetch-privacy-changes-by-default.patch index 2bb169c37..427ab601d 100644 --- a/build/patches/Enable-prefetch-privacy-changes-by-default.patch +++ b/build/patches/Enable-prefetch-privacy-changes-by-default.patch @@ -4,22 +4,15 @@ Subject: Enable prefetch-privacy-changes by default License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - third_party/blink/common/features.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + .../features_cc/Enable-prefetch-privacy-changes-by-default.inc | 1 + + 1 file changed, 1 insertion(+) + create mode 100644 cromite_flags/third_party/blink/common/features_cc/Enable-prefetch-privacy-changes-by-default.inc -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 -@@ -1350,8 +1350,8 @@ BASE_FEATURE(kPrefetchFontLookupTables, - // Prefetch request properties are updated to be privacy-preserving. See - // crbug.com/988956. - BASE_FEATURE(kPrefetchPrivacyChanges, -- "PrefetchPrivacyChanges", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "PrefetchPrivacyChanges", // must be enabled -+ base::FEATURE_ENABLED_BY_DEFAULT); // in Bromite - - BASE_FEATURE(kPreloadingHeuristicsMLModel, - "PreloadingHeuristicsMLModel", +diff --git a/cromite_flags/third_party/blink/common/features_cc/Enable-prefetch-privacy-changes-by-default.inc b/cromite_flags/third_party/blink/common/features_cc/Enable-prefetch-privacy-changes-by-default.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/third_party/blink/common/features_cc/Enable-prefetch-privacy-changes-by-default.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_ENABLED(kPrefetchPrivacyChanges); -- 2.25.1 diff --git a/build/patches/Enable-share-intent.patch b/build/patches/Enable-share-intent.patch index 2a3020589..a33fa8890 100644 --- a/build/patches/Enable-share-intent.patch +++ b/build/patches/Enable-share-intent.patch @@ -18,16 +18,18 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../browser/LaunchIntentDispatcher.java | 2 +- .../init/ProcessInitializationHandler.java | 3 + .../SharedIntentShareActivity.java | 119 ++++++++++++++++++ - chrome/browser/about_flags.cc | 4 + - chrome/browser/flag_descriptions.cc | 5 + - chrome/browser/flag_descriptions.h | 3 + - .../flags/android/chrome_feature_list.cc | 5 + - .../flags/android/chrome_feature_list.h | 1 + + .../flags/android/chrome_feature_list.cc | 1 + .../browser/flags/ChromeFeatureList.java | 1 + .../strings/android_chrome_strings.grd | 13 ++ - 15 files changed, 277 insertions(+), 8 deletions(-) + .../about_flags_cc/Enable-share-intent.inc | 12 ++ + .../Enable-share-intent.inc | 3 + + .../Enable-share-intent.inc | 1 + + 14 files changed, 276 insertions(+), 8 deletions(-) create mode 100644 chrome/android/java/res/layout/sharing_intent_content.xml create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/sharing/shared_intent/SharedIntentShareActivity.java + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Enable-share-intent.inc + create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Enable-share-intent.inc + create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Enable-share-intent.inc diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_java_resources.gni --- a/chrome/android/chrome_java_resources.gni @@ -381,48 +383,6 @@ new file mode 100644 + return false; + } +} -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 -@@ -10255,6 +10255,10 @@ const FeatureEntry kFeatureEntries[] = { - features::kBrokerFileOperationsOnDiskCacheInNetworkService)}, - - #if BUILDFLAG(IS_ANDROID) -+ {"shared-intent-ui", flag_descriptions::kSharedIntentUIName, -+ flag_descriptions::kSharedIntentUIDescription, kOsAll, -+ FEATURE_VALUE_TYPE(chrome::android::kSharedIntentUI)}, -+ - {"enable-commerce-hint-android", - flag_descriptions::kCommerceHintAndroidName, - flag_descriptions::kCommerceHintAndroidDescription, kOsAndroid, -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 -@@ -3220,6 +3220,11 @@ const char kIsolateOriginsDescription[] = - "Requires dedicated processes for an additional set of origins, " - "specified as a comma-separated list."; - -+const char kSharedIntentUIName[] = -+ "Enable shared feature"; -+const char kSharedIntentUIDescription[] = -+ "Enables shared feature"; -+ - const char kIsolationByDefaultName[] = - "Change web-facing behaviors that prevent origin-level isolation"; - const char kIsolationByDefaultDescription[] = -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 -@@ -1866,6 +1866,9 @@ extern const char kIsolateOriginsDescription[]; - - extern const char kIsolationByDefaultName[]; - extern const char kIsolationByDefaultDescription[]; -+extern const char kSharedIntentUIName[]; -+extern const char kSharedIntentUIDescription[]; -+ - - extern const char kSiteIsolationOptOutName[]; - extern const char kSiteIsolationOptOutDescription[]; 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 @@ -434,28 +394,6 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse &kReportParentalControlSitesChild, &kRequestDesktopSiteDefaults, &kRequestDesktopSiteDefaultsControl, -@@ -1035,6 +1036,10 @@ BASE_FEATURE(kScrollToTLDOptimization, - "ScrollToTLDOptimization", - base::FEATURE_DISABLED_BY_DEFAULT); - -+BASE_FEATURE(kSharedIntentUI, -+ "SharedIntentUI", -+ base::FEATURE_ENABLED_BY_DEFAULT); -+ - BASE_FEATURE(kShowScrollableMVTOnNTPAndroid, - "ShowScrollableMVTOnNTPAndroid", - base::FEATURE_DISABLED_BY_DEFAULT); -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 -@@ -176,6 +176,7 @@ BASE_DECLARE_FEATURE(kRequestDesktopSiteDefaultsLogging); - BASE_DECLARE_FEATURE(kRestoreTabsOnFRE); - BASE_DECLARE_FEATURE(kSearchEnginesPromoV3); - BASE_DECLARE_FEATURE(kSearchReadyOmniboxFeature); -+BASE_DECLARE_FEATURE(kSharedIntentUI); - BASE_DECLARE_FEATURE(kSharingHubLinkToggle); - BASE_DECLARE_FEATURE(kShowScrollableMVTOnNTPAndroid); - BASE_DECLARE_FEATURE(kFeedPositionAndroid); 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 @@ -490,5 +428,36 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro Submit %1$s123 on %2$sZoe's Macbook? +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Enable-share-intent.inc b/cromite_flags/chrome/browser/about_flags_cc/Enable-share-intent.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Enable-share-intent.inc +@@ -0,0 +1,12 @@ ++#if BUILDFLAG(IS_ANDROID) ++ ++#ifdef FLAG_SECTION ++ ++ {"share-intent-ui", ++ "Enable share feature", ++ "Enables share feature", kOsAndroid, ++ FEATURE_VALUE_TYPE(chrome::android::kSharedIntentUI)}, ++ ++#endif ++ ++#endif +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Enable-share-intent.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Enable-share-intent.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Enable-share-intent.inc +@@ -0,0 +1,3 @@ ++CROMITE_FEATURE(kSharedIntentUI, ++ "SharedIntentUI", ++ base::FEATURE_ENABLED_BY_DEFAULT); +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Enable-share-intent.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Enable-share-intent.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Enable-share-intent.inc +@@ -0,0 +1 @@ ++BASE_DECLARE_FEATURE(kSharedIntentUI); -- 2.25.1 diff --git a/build/patches/Enable-third-party-storage-partitioning.patch b/build/patches/Enable-third-party-storage-partitioning.patch index bcf0f8056..6f0230ed7 100644 --- a/build/patches/Enable-third-party-storage-partitioning.patch +++ b/build/patches/Enable-third-party-storage-partitioning.patch @@ -4,22 +4,15 @@ Subject: Enable third-party storage partitioning License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - net/base/features.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + .../base/features_cc/Enable-third-party-storage-partitioning.inc | 1 + + 1 file changed, 1 insertion(+) + create mode 100644 cromite_flags/net/base/features_cc/Enable-third-party-storage-partitioning.inc -diff --git a/net/base/features.cc b/net/base/features.cc ---- a/net/base/features.cc -+++ b/net/base/features.cc -@@ -278,8 +278,8 @@ BASE_FEATURE(kCookieDomainRejectNonASCII, - // Enables partitioning of third party storage (IndexedDB, CacheStorage, etc.) - // by the top level site to reduce fingerprinting. - BASE_FEATURE(kThirdPartyStoragePartitioning, -- "ThirdPartyStoragePartitioning", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "ThirdPartyStoragePartitioning", // must be enabled -+ base::FEATURE_ENABLED_BY_DEFAULT); // in Bromite - - // Whether to use the new code paths needed to support partitioning Blob URLs. - // This exists as a kill-switch in case an issue is identified with the Blob +diff --git a/cromite_flags/net/base/features_cc/Enable-third-party-storage-partitioning.inc b/cromite_flags/net/base/features_cc/Enable-third-party-storage-partitioning.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/net/base/features_cc/Enable-third-party-storage-partitioning.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_ENABLED(kThirdPartyStoragePartitioning); -- 2.25.1 diff --git a/build/patches/Experimental-user-scripts-support.patch b/build/patches/Experimental-user-scripts-support.patch index f243aa974..fb6e984d7 100644 --- a/build/patches/Experimental-user-scripts-support.patch +++ b/build/patches/Experimental-user-scripts-support.patch @@ -33,9 +33,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../init/ProcessInitializationHandler.java | 3 + chrome/android/java_sources.gni | 3 + chrome/browser/BUILD.gn | 7 + - chrome/browser/about_flags.cc | 7 + - chrome/browser/flag_descriptions.cc | 5 + - chrome/browser/flag_descriptions.h | 3 + + chrome/browser/about_flags.cc | 1 + chrome/browser/prefs/browser_prefs.cc | 4 + chrome/browser/profiles/BUILD.gn | 3 + ...hrome_browser_main_extra_parts_profiles.cc | 7 + @@ -134,8 +132,9 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../renderer/web_ui_injection_host.cc | 40 + .../renderer/web_ui_injection_host.h | 27 + .../strings/userscripts_strings.grdp | 54 ++ + .../Experimental-user-scripts-support.inc | 13 + tools/gritsettings/resource_ids.spec | 6 + - 108 files changed, 9491 insertions(+), 2 deletions(-) + 107 files changed, 9490 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 @@ -221,6 +220,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html create mode 100755 components/user_scripts/renderer/web_ui_injection_host.cc create mode 100755 components/user_scripts/renderer/web_ui_injection_host.h create mode 100755 components/user_scripts/strings/userscripts_strings.grdp + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Experimental-user-scripts-support.inc diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn @@ -349,47 +349,6 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc #include "components/version_info/version_info.h" #include "components/viz/common/features.h" #include "components/viz/common/switches.h" -@@ -8643,6 +8644,12 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(ash::features::kClipboardHistoryWebContentsPaste)}, - #endif // BUILDFLAG(IS_CHROMEOS_ASH) - -+#if BUILDFLAG(IS_ANDROID) -+ {"enable-userscripts-log", flag_descriptions::kEnableLoggingUserScriptsName, -+ flag_descriptions::kEnableLoggingUserScriptsDescription, kOsDesktop | kOsAndroid, -+ FEATURE_VALUE_TYPE(user_scripts::features::kEnableLoggingUserScripts)}, -+#endif -+ - #if BUILDFLAG(IS_WIN) - {"enable-media-foundation-video-capture", - flag_descriptions::kEnableMediaFoundationVideoCaptureName, -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 -@@ -7604,6 +7604,11 @@ const char kUseOutOfProcessVideoDecodingDescription[] = - "enabled in ash-chrome)."; - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) - -+const char kEnableLoggingUserScriptsName[] = "Enable logging user scripts component"; -+const char kEnableLoggingUserScriptsDescription[] = -+ "Enables logging for troubleshooting feature. " -+ "Enabling logs may make browsing slower."; -+ - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) - const char kWebShareName[] = "Web Share"; - const char kWebShareDescription[] = -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 -@@ -4361,6 +4361,9 @@ extern const char kQuickCommandsDescription[]; - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || - // defined (OS_FUCHSIA) - -+extern const char kEnableLoggingUserScriptsName[]; -+extern const char kEnableLoggingUserScriptsDescription[]; -+ - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) - extern const char kWebShareName[]; - extern const char kWebShareDescription[]; 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 @@ -10490,6 +10449,24 @@ new file mode 100755 + + + +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Experimental-user-scripts-support.inc b/cromite_flags/chrome/browser/about_flags_cc/Experimental-user-scripts-support.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Experimental-user-scripts-support.inc +@@ -0,0 +1,13 @@ ++#if BUILDFLAG(IS_ANDROID) ++ ++#ifdef FLAG_SECTION ++ ++ {"enable-userscripts-log", ++ "Enable logging user scripts component", ++ "Enables logging for troubleshooting feature. " ++ "Enabling logs may make browsing slower.", kOsAndroid, ++ FEATURE_VALUE_TYPE(user_scripts::features::kEnableLoggingUserScripts)}, ++ ++#endif ++ ++#endif 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 diff --git a/build/patches/Guard-for-user-agent-reduction.patch b/build/patches/Guard-for-user-agent-reduction.patch index 7e975389f..df633a2c4 100644 --- a/build/patches/Guard-for-user-agent-reduction.patch +++ b/build/patches/Guard-for-user-agent-reduction.patch @@ -6,9 +6,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- chrome/browser/chrome_content_browser_client.cc | 2 +- content/common/user_agent.cc | 13 +++++-------- - third_party/blink/common/features.cc | 4 ++-- .../platform/runtime_enabled_features.json5 | 16 ++++++++-------- - 4 files changed, 16 insertions(+), 19 deletions(-) + 3 files changed, 14 insertions(+), 17 deletions(-) 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 @@ -52,20 +51,6 @@ diff --git a/content/common/user_agent.cc b/content/common/user_agent.cc // Send information about the device. bool semicolon_inserted = false; if (include_android_model == IncludeAndroidModel::Include) { -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 -@@ -1501,8 +1501,8 @@ BASE_FEATURE(kReducedReferrerGranularity, - const base::FeatureParam kUserAgentFrozenBuildVersion{ - &kReduceUserAgentMinorVersion, "build_version", "0"}; - --const base::FeatureParam kAllExceptLegacyWindowsPlatform = { -- &kReduceUserAgentPlatformOsCpu, "all_except_legacy_windows_platform", true}; -+const base::FeatureParam kAllExceptLegacyWindowsPlatform = { // must be enabled -+ &kReduceUserAgentPlatformOsCpu, "all_except_legacy_windows_platform", true}; // in Bromite - const base::FeatureParam kLegacyWindowsPlatform = { - &kReduceUserAgentPlatformOsCpu, "legacy_windows_platform", true}; - 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 diff --git a/build/patches/Modify-default-preferences.patch b/build/patches/Modify-default-preferences.patch index ee78e0b0f..403b22409 100644 --- a/build/patches/Modify-default-preferences.patch +++ b/build/patches/Modify-default-preferences.patch @@ -4,28 +4,29 @@ Subject: Modify default preferences License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/about_flags.cc | 6 ++++++ + chrome/browser/about_flags.cc | 1 + .../background/background_mode_manager.cc | 2 +- .../browser/chrome_content_browser_client.cc | 2 +- - chrome/browser/flag_descriptions.cc | 5 +++++ - chrome/browser/flag_descriptions.h | 3 +++ chrome/browser/preloading/preloading_prefs.h | 2 +- chrome/browser/profiles/profile.cc | 2 +- .../reset_page/reset_profile_dialog.html | 2 +- chrome/browser/ui/browser_ui_prefs.cc | 4 ++-- components/bookmarks/browser/BUILD.gn | 2 ++ components/bookmarks/browser/bookmark_utils.cc | 7 +++++-- - components/bookmarks/browser/features.cc | 16 ++++++++++++++++ + components/bookmarks/browser/features.cc | 17 +++++++++++++++++ components/bookmarks/browser/features.h | 18 ++++++++++++++++++ .../core/browser/content_settings_registry.cc | 4 ++-- .../core/browser/cookie_settings.cc | 2 +- components/payments/core/payment_prefs.cc | 2 +- .../core/common/safe_browsing_prefs.cc | 4 ++-- .../primary_account_manager.cc | 4 ++-- - third_party/blink/common/features.cc | 4 ++-- - 19 files changed, 72 insertions(+), 19 deletions(-) + .../Modify-default-preferences.inc | 8 ++++++++ + .../features_cc/Modify-default-preferences.inc | 1 + + 18 files changed, 67 insertions(+), 17 deletions(-) create mode 100644 components/bookmarks/browser/features.cc create mode 100644 components/bookmarks/browser/features.h + create mode 100755 cromite_flags/chrome/browser/about_flags_cc/Modify-default-preferences.inc + create mode 100755 cromite_flags/third_party/blink/common/features_cc/Modify-default-preferences.inc diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc @@ -38,18 +39,6 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc #include "components/browser_sync/browser_sync_switches.h" #include "components/browsing_data/core/features.h" #include "components/commerce/core/commerce_feature_list.h" -@@ -6792,6 +6793,11 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(features::kQuickSettingsPWANotifications)}, - #endif // BUILDFLAG(IS_CHROMEOS_ASH) - -+ {"apps-shortcut-default-off", -+ flag_descriptions::kAppsShortcutDefaultOffName, -+ flag_descriptions::kAppsShortcutDefaultOffDescription, kOsDesktop, -+ FEATURE_VALUE_TYPE(bookmarks::features::kAppsShortcutDefaultOff)}, -+ - {flag_descriptions::kTabGroupsSaveId, flag_descriptions::kTabGroupsSaveName, - flag_descriptions::kTabGroupsSaveDescription, kOsDesktop, - FEATURE_VALUE_TYPE(features::kTabGroupsSave)}, diff --git a/chrome/browser/background/background_mode_manager.cc b/chrome/browser/background/background_mode_manager.cc --- a/chrome/browser/background/background_mode_manager.cc +++ b/chrome/browser/background/background_mode_manager.cc @@ -74,34 +63,6 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch // Register user prefs for mapping SitePerProcess and IsolateOrigins in // user policy in addition to the same named ones in Local State (which are // used for mapping the command-line flags). -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 -@@ -3316,6 +3316,11 @@ const char kCommerceMerchantViewerAndroidDescription[] = - "Allows users to view merchant trust signals on eligible pages."; - - const char kTabGroupsSaveId[] = "tab-groups-save"; -+ -+const char kAppsShortcutDefaultOffName[] = "Apps Shortcut Default Off"; -+const char kAppsShortcutDefaultOffDescription[] = -+ "Changes the apps shortcut on the bookmarks bar to default to off."; -+ - const char kTabGroupsSaveName[] = "Tab Groups Save and Sync"; - const char kTabGroupsSaveDescription[] = - "Enable saving and recalling of tab groups. Right click a tab group to " -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 -@@ -1911,6 +1911,9 @@ extern const char kCommerceMerchantViewerAndroidName[]; - extern const char kCommerceMerchantViewerAndroidDescription[]; - - extern const char kTabGroupsSaveId[]; -+extern const char kAppsShortcutDefaultOffName[]; -+extern const char kAppsShortcutDefaultOffDescription[]; -+ - extern const char kTabGroupsSaveName[]; - extern const char kTabGroupsSaveDescription[]; - diff --git a/chrome/browser/preloading/preloading_prefs.h b/chrome/browser/preloading/preloading_prefs.h --- a/chrome/browser/preloading/preloading_prefs.h +++ b/chrome/browser/preloading/preloading_prefs.h @@ -204,7 +165,7 @@ diff --git a/components/bookmarks/browser/features.cc b/components/bookmarks/bro new file mode 100644 --- /dev/null +++ b/components/bookmarks/browser/features.cc -@@ -0,0 +1,16 @@ +@@ -0,0 +1,17 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -216,8 +177,9 @@ new file mode 100644 + +// Changes the apps shortcut on the bookmarks bar to default to off. +// https://crbug.com/1236793 -+const base::Feature kAppsShortcutDefaultOff{"AppsShortcutDefaultOff", -+ base::FEATURE_ENABLED_BY_DEFAULT}; ++CROMITE_FEATURE(kAppsShortcutDefaultOff, ++ "AppsShortcutDefaultOff", ++ base::FEATURE_ENABLED_BY_DEFAULT); + +} // namespace features +} // namespace bookmarks @@ -238,7 +200,7 @@ new file mode 100644 +namespace bookmarks { +namespace features { + -+extern const base::Feature kAppsShortcutDefaultOff; ++BASE_DECLARE_FEATURE(kAppsShortcutDefaultOff); + +} // namespace features +} // namespace bookmarks @@ -323,19 +285,24 @@ diff --git a/components/signin/internal/identity_manager/primary_account_manager registry->RegisterBooleanPref(prefs::kSignedInWithCredentialProvider, false); } -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 -@@ -987,8 +987,8 @@ const base::FeatureParam kInterestGroupStorageMaxOpsBeforeMaintenance{ - // the attribute. Note: At present, only iframes with origin-restricted - // sandboxes are isolated. - BASE_FEATURE(kIsolateSandboxedIframes, -- "IsolateSandboxedIframes", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "IsolateSandboxedIframes", // enabled by default -+ base::FEATURE_ENABLED_BY_DEFAULT); // in Bromite - const base::FeatureParam::Option - isolated_sandboxed_iframes_grouping_types[] = { - {IsolateSandboxedIframesGrouping::kPerSite, "per-site"}, +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Modify-default-preferences.inc b/cromite_flags/chrome/browser/about_flags_cc/Modify-default-preferences.inc +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Modify-default-preferences.inc +@@ -0,0 +1,8 @@ ++#ifdef FLAG_SECTION ++ ++ {"apps-shortcut-default-off", ++ "Apps Shortcut Default Off", ++ "Changes the apps shortcut on the bookmarks bar to default to off.", kOsDesktop, ++ FEATURE_VALUE_TYPE(bookmarks::features::kAppsShortcutDefaultOff)}, ++ ++#endif +diff --git a/cromite_flags/third_party/blink/common/features_cc/Modify-default-preferences.inc b/cromite_flags/third_party/blink/common/features_cc/Modify-default-preferences.inc +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/third_party/blink/common/features_cc/Modify-default-preferences.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_ENABLED(kIsolateSandboxedIframes); -- 2.25.1 diff --git a/build/patches/Move-navigation-bar-to-bottom.patch b/build/patches/Move-navigation-bar-to-bottom.patch index 94eb9689d..2cf1f404b 100644 --- a/build/patches/Move-navigation-bar-to-bottom.patch +++ b/build/patches/Move-navigation-bar-to-bottom.patch @@ -50,12 +50,9 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../browser/toolbar/ToolbarManager.java | 36 +++++++-- .../chrome/browser/ui/BottomContainer.java | 18 +++++ .../ui/system/StatusBarColorController.java | 9 +++ - chrome/browser/about_flags.cc | 5 ++ .../scene_layer/tab_strip_scene_layer.cc | 16 +++- .../BrowserControlsMarginSupplier.java | 5 ++ .../BrowserControlsStateProvider.java | 6 ++ - chrome/browser/flag_descriptions.cc | 4 + - chrome/browser/flag_descriptions.h | 3 + .../flags/android/chrome_feature_list.cc | 2 + .../chrome/browser/flags/CachedFlag.java | 6 ++ .../browser/flags/ChromeFeatureList.java | 5 ++ @@ -87,7 +84,9 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../accessibility/AccessibilitySettings.java | 16 ++++ .../AccessibilitySettingsDelegate.java | 6 ++ .../render_widget_host_view_android.cc | 3 + - 74 files changed, 835 insertions(+), 66 deletions(-) + .../Move-navigation-bar-to-bottom.inc | 12 +++ + 72 files changed, 835 insertions(+), 66 deletions(-) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Move-navigation-bar-to-bottom.inc diff --git a/cc/base/features.cc b/cc/base/features.cc --- a/cc/base/features.cc @@ -1578,21 +1577,6 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/system/Statu } /** -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 -@@ -8412,6 +8412,11 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kWindowsScrollingPersonalityDescription, kOsAll, - FEATURE_VALUE_TYPE(features::kWindowsScrollingPersonality)}, - -+ {"move-top-toolbar-to-bottom", -+ flag_descriptions::kMoveTopToolbarToBottomName, -+ flag_descriptions::kMoveTopToolbarToBottomDescription, kOsAndroid, -+ FEATURE_VALUE_TYPE(features::kMoveTopToolbarToBottom)}, -+ - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) - {"elastic-overscroll", flag_descriptions::kElasticOverscrollName, - flag_descriptions::kElasticOverscrollDescription, kOsWin | kOsAndroid, diff --git a/chrome/browser/android/compositor/scene_layer/tab_strip_scene_layer.cc b/chrome/browser/android/compositor/scene_layer/tab_strip_scene_layer.cc --- a/chrome/browser/android/compositor/scene_layer/tab_strip_scene_layer.cc +++ b/chrome/browser/android/compositor/scene_layer/tab_strip_scene_layer.cc @@ -1676,33 +1660,6 @@ diff --git a/chrome/browser/browser_controls/android/java/src/org/chromium/chrom /** * @return The minimum visible height top controls can have in pixels. */ -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 -@@ -2043,6 +2043,10 @@ const char kImprovedKeyboardShortcutsDescription[] = - "Ensure keyboard shortcuts work consistently with international keyboard " - "layouts and deprecate legacy shortcuts."; - -+const char kMoveTopToolbarToBottomName[] = "Move top toolbar to bottom"; -+const char kMoveTopToolbarToBottomDescription[] = -+ "Move the top toolbar to the bottom."; -+ - const char kIncognitoDownloadsWarningName[] = - "Enable Incognito downloads warning"; - const char kIncognitoDownloadsWarningDescription[] = -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 -@@ -1156,6 +1156,9 @@ extern const char kImprovedIncognitoScreenshotDescription[]; - extern const char kImprovedKeyboardShortcutsName[]; - extern const char kImprovedKeyboardShortcutsDescription[]; - -+extern const char kMoveTopToolbarToBottomName[]; -+extern const char kMoveTopToolbarToBottomDescription[]; -+ - extern const char kIncognitoReauthenticationForAndroidName[]; - extern const char kIncognitoReauthenticationForAndroidDescription[]; - 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 @@ -2676,5 +2633,22 @@ diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/ float top_shown_pix = top_content_offset; if (ime_adapter_android_) { +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Move-navigation-bar-to-bottom.inc b/cromite_flags/chrome/browser/about_flags_cc/Move-navigation-bar-to-bottom.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Move-navigation-bar-to-bottom.inc +@@ -0,0 +1,12 @@ ++#if BUILDFLAG(IS_ANDROID) ++ ++#ifdef FLAG_SECTION ++ ++ {"move-top-toolbar-to-bottom", ++ "Move top toolbar to bottom", ++ "Move the top toolbar to the bottom.", kOsAndroid, ++ FEATURE_VALUE_TYPE(features::kMoveTopToolbarToBottom)}, ++ ++#endif ++ ++#endif -- 2.25.1 diff --git a/build/patches/Multiple-fingerprinting-mitigations.patch b/build/patches/Multiple-fingerprinting-mitigations.patch index ef3c3f61c..3b405bcfc 100644 --- a/build/patches/Multiple-fingerprinting-mitigations.patch +++ b/build/patches/Multiple-fingerprinting-mitigations.patch @@ -27,11 +27,12 @@ Add noise also to SVGs (credits to uazo) License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- chrome/browser/BUILD.gn | 1 + - chrome/browser/about_flags.cc | 16 ++ + chrome/browser/about_flags.cc | 2 + content/browser/BUILD.gn | 1 + .../renderer_host/render_process_host_impl.cc | 4 + content/child/BUILD.gn | 1 + content/child/runtime_features.cc | 8 + + .../Multiple-fingerprinting-mitigations.inc | 16 ++ .../public/platform/web_runtime_features.h | 3 + .../blink/renderer/core/dom/document.cc | 20 +++ .../blink/renderer/core/dom/document.h | 7 + @@ -52,7 +53,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html third_party/ungoogled/BUILD.gn | 10 ++ third_party/ungoogled/ungoogled_switches.cc | 18 ++ third_party/ungoogled/ungoogled_switches.h | 18 ++ - 26 files changed, 388 insertions(+), 8 deletions(-) + 27 files changed, 390 insertions(+), 8 deletions(-) + create mode 100755 cromite_flags/chrome/browser/about_flags_cc/Multiple-fingerprinting-mitigations.inc create mode 100644 third_party/ungoogled/BUILD.gn create mode 100644 third_party/ungoogled/ungoogled_switches.cc create mode 100644 third_party/ungoogled/ungoogled_switches.h @@ -80,27 +82,6 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #include "base/allocator/buildflags.h" #endif -@@ -4177,6 +4179,20 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kWebrtcUseMinMaxVEADimensionsName, - flag_descriptions::kWebrtcUseMinMaxVEADimensionsDescription, kOsAll, - FEATURE_VALUE_TYPE(blink::features::kWebRtcUseMinMaxVEADimensions)}, -+ -+ {"fingerprinting-canvas-image-data-noise", -+ "Disable Canvas image data fingerprint deception", -+ "Slightly modifies at most 20 pixels in Canvas image data extracted via JS APIs", -+ kOsAll, SINGLE_DISABLE_VALUE_TYPE(switches::kFingerprintingCanvasImageDataNoise)}, -+ {"fingerprinting-client-rects-noise", -+ "Disable get*ClientRects() fingerprint deception", -+ "Scale the output values of Range::getClientRects() and Element::getBoundingClientRect() with a randomly selected factor in the range -0.0003% to 0.0003%, which are recomputed on every document initialization.", -+ kOsAll, SINGLE_DISABLE_VALUE_TYPE(switches::kFingerprintingClientRectsNoise)}, -+ {"fingerprinting-canvas-measuretext-noise", -+ "Disable Canvas::measureText() fingerprint deception", -+ "Scale the output values of Canvas::measureText() with a randomly selected factor in the range -0.0003% to 0.0003%, which are recomputed on every document initialization.", -+ kOsAll, SINGLE_DISABLE_VALUE_TYPE(switches::kFingerprintingCanvasMeasureTextNoise)}, -+ - #if BUILDFLAG(ENABLE_NACL) - {"enable-nacl", flag_descriptions::kNaclName, - flag_descriptions::kNaclDescription, kOsAll, diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn @@ -169,6 +150,27 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features. // CAUTION: Only add custom enabling logic here if it cannot // be covered by the other functions. +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Multiple-fingerprinting-mitigations.inc b/cromite_flags/chrome/browser/about_flags_cc/Multiple-fingerprinting-mitigations.inc +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Multiple-fingerprinting-mitigations.inc +@@ -0,0 +1,16 @@ ++#ifdef FLAG_SECTION ++ ++ {"fingerprinting-canvas-image-data-noise", ++ "Disable Canvas image data fingerprint deception", ++ "Slightly modifies at most 20 pixels in Canvas image data extracted via JS APIs", ++ kOsAll, SINGLE_DISABLE_VALUE_TYPE(switches::kFingerprintingCanvasImageDataNoise)}, ++ {"fingerprinting-client-rects-noise", ++ "Disable get*ClientRects() fingerprint deception", ++ "Scale the output values of Range::getClientRects() and Element::getBoundingClientRect() with a randomly selected factor in the range -0.0003% to 0.0003%, which are recomputed on every document initialization.", ++ kOsAll, SINGLE_DISABLE_VALUE_TYPE(switches::kFingerprintingClientRectsNoise)}, ++ {"fingerprinting-canvas-measuretext-noise", ++ "Disable Canvas::measureText() fingerprint deception", ++ "Scale the output values of Canvas::measureText() with a randomly selected factor in the range -0.0003% to 0.0003%, which are recomputed on every document initialization.", ++ kOsAll, SINGLE_DISABLE_VALUE_TYPE(switches::kFingerprintingCanvasMeasureTextNoise)}, ++ ++#endif diff --git a/third_party/blink/public/platform/web_runtime_features.h b/third_party/blink/public/platform/web_runtime_features.h --- a/third_party/blink/public/platform/web_runtime_features.h +++ b/third_party/blink/public/platform/web_runtime_features.h diff --git a/build/patches/Re-introduce-modal-dialog-flag-to-close-all-tabs.patch b/build/patches/Re-introduce-modal-dialog-flag-to-close-all-tabs.patch index 4965dc194..70c340f1b 100644 --- a/build/patches/Re-introduce-modal-dialog-flag-to-close-all-tabs.patch +++ b/build/patches/Re-introduce-modal-dialog-flag-to-close-all-tabs.patch @@ -8,14 +8,16 @@ This reverts commit 614a998c5af5dcd36baffa6d65090c0b8decb03f. License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - .../browser/tasks/tab_management/CloseAllTabsDialog.java | 6 ++++++ - chrome/browser/about_flags.cc | 7 +++++++ - chrome/browser/flag_descriptions.cc | 5 +++++ - chrome/browser/flag_descriptions.h | 3 +++ - chrome/browser/flags/android/chrome_feature_list.cc | 9 +++++++-- - chrome/browser/flags/android/chrome_feature_list.h | 1 + - .../chromium/chrome/browser/flags/ChromeFeatureList.java | 1 + - 7 files changed, 30 insertions(+), 2 deletions(-) + .../tasks/tab_management/CloseAllTabsDialog.java | 6 ++++++ + chrome/browser/flags/android/chrome_feature_list.cc | 1 + + .../chrome/browser/flags/ChromeFeatureList.java | 1 + + ...ntroduce-modal-dialog-flag-to-close-all-tabs.inc | 13 +++++++++++++ + ...ntroduce-modal-dialog-flag-to-close-all-tabs.inc | 9 +++++++++ + ...ntroduce-modal-dialog-flag-to-close-all-tabs.inc | 5 +++++ + 6 files changed, 35 insertions(+) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Re-introduce-modal-dialog-flag-to-close-all-tabs.inc + create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Re-introduce-modal-dialog-flag-to-close-all-tabs.inc + create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Re-introduce-modal-dialog-flag-to-close-all-tabs.inc diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/CloseAllTabsDialog.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/CloseAllTabsDialog.java --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/CloseAllTabsDialog.java @@ -40,51 +42,6 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser assert modalDialogManagerSupplier.hasValue(); final ModalDialogManager manager = modalDialogManagerSupplier.get(); final boolean isIncognito = tabModelSelector.getCurrentModel().isIncognito(); -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 -@@ -9960,6 +9960,13 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(base::i18n::kLacrosMergeIcuDataFile)}, - #endif - -+#if BUILDFLAG(IS_ANDROID) -+ {"close-all-tabs-modal-dialog", -+ flag_descriptions::kCloseAllTabsModalDialogName, -+ flag_descriptions::kCloseAllTabsModalDialogDescription, kOsAndroid, -+ FEATURE_VALUE_TYPE(chrome::android::kCloseAllTabsModalDialog)}, -+#endif // BUILDFLAG(IS_ANDROID) -+ - #if !BUILDFLAG(IS_ANDROID) - // TODO(https://crbug.com/1443349): Add Windows once library supports it. - {"layout-extraction", flag_descriptions::kLayoutExtractionName, -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 -@@ -3981,6 +3981,11 @@ const char kChimeAndroidSdkDescription[] = - "Enable Chime SDK to receive push notification."; - const char kChimeAndroidSdkName[] = "Use Chime SDK"; - -+const char kCloseAllTabsModalDialogName[] = "Close all tabs modal dialog"; -+const char kCloseAllTabsModalDialogDescription[] = -+ "Shows a confirmation modal dialog when clicking 'Close all tabs' in the" -+ "app menu."; -+ - const char kCloseTabSuggestionsName[] = "Suggest to close Tabs"; - const char kCloseTabSuggestionsDescription[] = - "Suggests to the user to close Tabs that haven't been used beyond a " -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 -@@ -46,6 +46,9 @@ namespace flag_descriptions { - extern const char kAccelerated2dCanvasName[]; - extern const char kAccelerated2dCanvasDescription[]; - -+extern const char kCloseAllTabsModalDialogName[]; -+extern const char kCloseAllTabsModalDialogDescription[]; -+ - extern const char kAcceleratedVideoDecodeName[]; - extern const char kAcceleratedVideoDecodeDescription[]; - 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 @@ -96,39 +53,6 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse &kBackgroundThreadPool, &kBaselineGM3SurfaceColors, &kBlockIntentsWhileLocked, -@@ -536,6 +537,10 @@ BASE_FEATURE(kCacheActivityTaskID, - "CacheActivityTaskID", - base::FEATURE_ENABLED_BY_DEFAULT); - -+BASE_FEATURE(kCloseAllTabsModalDialog, -+ "CloseAllTabsModalDialog", -+ base::FEATURE_ENABLED_BY_DEFAULT); -+ - // Used in downstream code. - BASE_FEATURE(kCastDeviceFilter, - "CastDeviceFilter", -@@ -546,8 +551,8 @@ BASE_FEATURE(kClearOmniboxFocusAfterNavigation, - base::FEATURE_ENABLED_BY_DEFAULT); - - BASE_FEATURE(kCloseTabSuggestions, -- "CloseTabSuggestions", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "CloseTabSuggestions", // must be enabled -+ base::FEATURE_ENABLED_BY_DEFAULT); // in Bromite - - BASE_FEATURE(kCloseTabSaveTabList, - "CloseTabSaveTabList", -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 -@@ -41,6 +41,7 @@ BASE_DECLARE_FEATURE(kBaselineGM3SurfaceColors); - BASE_DECLARE_FEATURE(kBlockIntentsWhileLocked); - BASE_DECLARE_FEATURE(kCacheActivityTaskID); - BASE_DECLARE_FEATURE(kClearOmniboxFocusAfterNavigation); -+BASE_DECLARE_FEATURE(kCloseAllTabsModalDialog); - BASE_DECLARE_FEATURE(kCloseTabSuggestions); - BASE_DECLARE_FEATURE(kCloseTabSaveTabList); - BASE_DECLARE_FEATURE(kCreateNewTabInitializeRenderer); 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 @@ -140,5 +64,47 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f public static final String CCT_RESIZABLE_FOR_THIRD_PARTIES = "CCTResizableForThirdParties"; public static final String CCT_RESIZABLE_SIDE_SHEET = "CCTResizableSideSheet"; public static final String CCT_RESIZABLE_SIDE_SHEET_FOR_THIRD_PARTIES = +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Re-introduce-modal-dialog-flag-to-close-all-tabs.inc b/cromite_flags/chrome/browser/about_flags_cc/Re-introduce-modal-dialog-flag-to-close-all-tabs.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Re-introduce-modal-dialog-flag-to-close-all-tabs.inc +@@ -0,0 +1,13 @@ ++#if BUILDFLAG(IS_ANDROID) ++ ++#ifdef FLAG_SECTION ++ ++ {"close-all-tabs-modal-dialog", ++ "Close all tabs modal dialog", ++ "Shows a confirmation modal dialog when clicking 'Close all tabs' in the" ++ "app menu.", kOsAndroid, ++ FEATURE_VALUE_TYPE(chrome::android::kCloseAllTabsModalDialog)}, ++ ++#endif ++ ++#endif +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Re-introduce-modal-dialog-flag-to-close-all-tabs.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Re-introduce-modal-dialog-flag-to-close-all-tabs.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Re-introduce-modal-dialog-flag-to-close-all-tabs.inc +@@ -0,0 +1,9 @@ ++#if BUILDFLAG(IS_ANDROID) ++ ++CROMITE_FEATURE(kCloseAllTabsModalDialog, ++ "CloseAllTabsModalDialog", ++ base::FEATURE_ENABLED_BY_DEFAULT); ++ ++SET_CROMITE_FEATURE_ENABLED(kCloseTabSuggestions); ++ ++#endif +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Re-introduce-modal-dialog-flag-to-close-all-tabs.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Re-introduce-modal-dialog-flag-to-close-all-tabs.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Re-introduce-modal-dialog-flag-to-close-all-tabs.inc +@@ -0,0 +1,5 @@ ++#if BUILDFLAG(IS_ANDROID) ++ ++BASE_DECLARE_FEATURE(kCloseAllTabsModalDialog); ++ ++#endif -- 2.25.1 diff --git a/build/patches/Remove-blocklisted-URLs-upon-bookmark-creation.patch b/build/patches/Remove-blocklisted-URLs-upon-bookmark-creation.patch index 1fab963e2..75a54ed5d 100644 --- a/build/patches/Remove-blocklisted-URLs-upon-bookmark-creation.patch +++ b/build/patches/Remove-blocklisted-URLs-upon-bookmark-creation.patch @@ -30,10 +30,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/TabBo /** * Constructor. -@@ -98,6 +104,13 @@ public class TabBookmarker { +@@ -96,6 +102,13 @@ public class TabBookmarker { + return; + } - // Defense in depth against the UI being erroneously enabled. - final BookmarkModel bookmarkModel = mBookmarkModelSupplier.get(); + // remove blocklisted URL from most visited sites + if (mMostVisitedSites == null) { + mMostVisitedSites = @@ -41,8 +41,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/TabBo + } + mMostVisitedSites.removeBlocklistedUrl(tabToBookmark.getOriginalUrl()); + + // Defense in depth against the UI being erroneously enabled. + final BookmarkModel bookmarkModel = mBookmarkModelSupplier.get(); if (bookmarkModel == null || !bookmarkModel.isEditBookmarksEnabled()) { - assert false; - return; -- 2.25.1 diff --git a/build/patches/Remove-window-name-on-cross-origin-navigation.patch b/build/patches/Remove-window-name-on-cross-origin-navigation.patch index ab2a4920f..dc70ed888 100644 --- a/build/patches/Remove-window-name-on-cross-origin-navigation.patch +++ b/build/patches/Remove-window-name-on-cross-origin-navigation.patch @@ -7,24 +7,17 @@ See also: https://trac.webkit.org/changeset/209076/webkit Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - content/public/common/content_features.cc | 4 ++-- - third_party/blink/renderer/core/loader/document_loader.cc | 3 ++- - 2 files changed, 4 insertions(+), 3 deletions(-) + .../Remove-window-name-on-cross-origin-navigation.inc | 1 + + third_party/blink/renderer/core/loader/document_loader.cc | 3 ++- + 2 files changed, 3 insertions(+), 1 deletion(-) + create mode 100644 cromite_flags/content/public/common/content_features_cc/Remove-window-name-on-cross-origin-navigation.inc -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 -@@ -175,8 +175,8 @@ BASE_FEATURE(kCdmStorageDatabaseMigration, - // Clear the window.name property for the top-level cross-site navigations that - // swap BrowsingContextGroups(BrowsingInstances). - BASE_FEATURE(kClearCrossSiteCrossBrowsingContextGroupWindowName, -- "ClearCrossSiteCrossBrowsingContextGroupWindowName", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "ClearCrossSiteCrossBrowsingContextGroupWindowName", // enabled -+ base::FEATURE_ENABLED_BY_DEFAULT); // by default - - BASE_FEATURE(kCompositeBGColorAnimation, - "CompositeBGColorAnimation", +diff --git a/cromite_flags/content/public/common/content_features_cc/Remove-window-name-on-cross-origin-navigation.inc b/cromite_flags/content/public/common/content_features_cc/Remove-window-name-on-cross-origin-navigation.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/content/public/common/content_features_cc/Remove-window-name-on-cross-origin-navigation.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_ENABLED(kClearCrossSiteCrossBrowsingContextGroupWindowName); diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc --- a/third_party/blink/renderer/core/loader/document_loader.cc +++ b/third_party/blink/renderer/core/loader/document_loader.cc diff --git a/build/patches/Restore-Search-Ready-Omnibox-flag.patch b/build/patches/Restore-Search-Ready-Omnibox-flag.patch index a5ac9cf03..e9e4970ea 100644 --- a/build/patches/Restore-Search-Ready-Omnibox-flag.patch +++ b/build/patches/Restore-Search-Ready-Omnibox-flag.patch @@ -9,74 +9,17 @@ Disable search-ready omnibox by default License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/about_flags.cc | 5 +++++ - chrome/browser/flag-metadata.json | 5 +++++ - chrome/browser/flag_descriptions.cc | 5 +++++ - chrome/browser/flag_descriptions.h | 3 +++ - chrome/browser/flags/android/chrome_feature_list.cc | 5 +++++ - chrome/browser/flags/android/chrome_feature_list.h | 1 + - .../chrome/browser/flags/ChromeFeatureList.java | 1 + - .../suggestions/DropdownItemViewInfoListBuilder.java | 11 +++++++++-- - 8 files changed, 34 insertions(+), 2 deletions(-) + chrome/browser/flags/android/chrome_feature_list.cc | 1 + + .../chrome/browser/flags/ChromeFeatureList.java | 1 + + .../DropdownItemViewInfoListBuilder.java | 11 +++++++++-- + .../restore-Search-Ready-Omnibox-flag.inc | 13 +++++++++++++ + .../restore-Search-Ready-Omnibox-flag.inc | 3 +++ + .../restore-Search-Ready-Omnibox-flag.inc | 1 + + 6 files changed, 28 insertions(+), 2 deletions(-) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/restore-Search-Ready-Omnibox-flag.inc + create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/restore-Search-Ready-Omnibox-flag.inc + create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/restore-Search-Ready-Omnibox-flag.inc -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 -@@ -9837,6 +9837,11 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kDesksTemplatesDescription, kOsCrOS, - FEATURE_VALUE_TYPE(ash::features::kDesksTemplates)}, - #endif -+#if BUILDFLAG(IS_ANDROID) -+ {"enable-search-ready-omnibox", flag_descriptions::kSearchReadyOmniboxName, -+ flag_descriptions::kSearchReadyOmniboxDescription, kOsAndroid, -+ FEATURE_VALUE_TYPE(chrome::android::kSearchReadyOmniboxFeature)}, -+#endif - - {"large-favicon-from-google", - flag_descriptions::kLargeFaviconFromGoogleName, -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 -@@ -3334,6 +3334,11 @@ - // Added feature, for testing. expiry deep in future. - "expiry_milestone": 116 - }, -+ { -+ "name": "enable-search-ready-omnibox", -+ "owners": [ "mdjones" ], -+ "expiry_milestone": -1 -+ }, - { - "name": "enable-parallel-downloading", - "owners": [ "qinmin", "xingliu", "dtrainor" ], -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 -@@ -4425,6 +4425,11 @@ const char kSendTabToSelfV2Description[] = - "Enables new received tab " - "UI shown next to the profile icon instead of using system notifications."; - -+const char kSearchReadyOmniboxName[] = "Search Ready Omnibox"; -+const char kSearchReadyOmniboxDescription[] = -+ "Clears the omnibox and adds a suggestion item to share, copy, or edit the " -+ "URL."; -+ - const char kSetMarketUrlForTestingName[] = "Set market URL for testing"; - const char kSetMarketUrlForTestingDescription[] = - "When enabled, sets the market URL for use in testing the update menu " -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 -@@ -2601,6 +2601,9 @@ extern const char kShowScrollableMVTOnNTPAndroidDescription[]; - extern const char kSendTabToSelfV2Name[]; - extern const char kSendTabToSelfV2Description[]; - -+extern const char kSearchReadyOmniboxName[]; -+extern const char kSearchReadyOmniboxDescription[]; -+ - extern const char kSetMarketUrlForTestingName[]; - extern const char kSetMarketUrlForTestingDescription[]; - 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 @@ -88,28 +31,6 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse &kRelatedSearches, &kReportParentalControlSitesChild, &kRequestDesktopSiteDefaults, -@@ -468,6 +469,10 @@ BASE_FEATURE(kAvoidSelectedTabFocusOnLayoutDoneShowing, - "AvoidSelectedTabFocusOnLayoutDoneShowing", - base::FEATURE_ENABLED_BY_DEFAULT); - -+BASE_FEATURE(kSearchReadyOmniboxFeature, -+ "SearchReadyOmnibox", -+ base::FEATURE_DISABLED_BY_DEFAULT); -+ - BASE_FEATURE(kFocusOmniboxInIncognitoTabIntents, - "FocusOmniboxInIncognitoTabIntents", - base::FEATURE_ENABLED_BY_DEFAULT); -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 -@@ -170,6 +170,7 @@ BASE_DECLARE_FEATURE(kRequestDesktopSiteDefaultsDowngrade); - BASE_DECLARE_FEATURE(kRequestDesktopSiteDefaultsLogging); - BASE_DECLARE_FEATURE(kRestoreTabsOnFRE); - BASE_DECLARE_FEATURE(kSearchEnginesPromoV3); -+BASE_DECLARE_FEATURE(kSearchReadyOmniboxFeature); - BASE_DECLARE_FEATURE(kSharingHubLinkToggle); - BASE_DECLARE_FEATURE(kShowScrollableMVTOnNTPAndroid); - BASE_DECLARE_FEATURE(kFeedPositionAndroid); 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 @@ -163,5 +84,37 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow for (int index = 0; index < mPriorityOrderedSuggestionProcessors.size(); index++) { mPriorityOrderedSuggestionProcessors.get(index).onNativeInitialized(); } +diff --git a/cromite_flags/chrome/browser/about_flags_cc/restore-Search-Ready-Omnibox-flag.inc b/cromite_flags/chrome/browser/about_flags_cc/restore-Search-Ready-Omnibox-flag.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/restore-Search-Ready-Omnibox-flag.inc +@@ -0,0 +1,13 @@ ++#if BUILDFLAG(IS_ANDROID) ++ ++#ifdef FLAG_SECTION ++ ++ {"enable-search-ready-omnibox", ++ "Search Ready Omnibox", ++ "Clears the omnibox and adds a suggestion item to share, copy, or edit the " ++ "URL.", kOsAndroid, ++ FEATURE_VALUE_TYPE(chrome::android::kSearchReadyOmniboxFeature)}, ++ ++#endif ++ ++#endif +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/restore-Search-Ready-Omnibox-flag.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/restore-Search-Ready-Omnibox-flag.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/restore-Search-Ready-Omnibox-flag.inc +@@ -0,0 +1,3 @@ ++CROMITE_FEATURE(kSearchReadyOmniboxFeature, ++ "SearchReadyOmnibox", ++ base::FEATURE_DISABLED_BY_DEFAULT); +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/restore-Search-Ready-Omnibox-flag.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/restore-Search-Ready-Omnibox-flag.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/restore-Search-Ready-Omnibox-flag.inc +@@ -0,0 +1 @@ ++BASE_DECLARE_FEATURE(kSearchReadyOmniboxFeature); -- 2.25.1 diff --git a/build/patches/Restore-Simplified-NTP-launch.patch b/build/patches/Restore-Simplified-NTP-launch.patch index f3868751b..2a92b5656 100644 --- a/build/patches/Restore-Simplified-NTP-launch.patch +++ b/build/patches/Restore-Simplified-NTP-launch.patch @@ -15,17 +15,18 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../NativePageNavigationDelegateImpl.java | 4 +- .../chrome/browser/ntp/NewTabPageLayout.java | 30 ++++++++- .../SuggestionsNavigationDelegate.java | 17 +++++ - chrome/browser/about_flags.cc | 3 + - chrome/browser/flag_descriptions.cc | 3 + - chrome/browser/flag_descriptions.h | 3 + - .../flags/android/chrome_feature_list.cc | 5 ++ - .../flags/android/chrome_feature_list.h | 1 + + .../flags/android/chrome_feature_list.cc | 1 + .../browser/flags/ChromeFeatureList.java | 1 + - .../signin/public/base/signin_switches.cc | 2 +- - .../variations/fieldtrial_testing_config.json | 18 +++++ - 17 files changed, 195 insertions(+), 5 deletions(-) + .../signin/public/base/signin_switches.cc | 3 + + .../Restore-Simplified-NTP-launch.inc | 12 ++++ + .../Restore-Simplified-NTP-launch.inc | 3 + + .../Restore-Simplified-NTP-launch.inc | 1 + + 15 files changed, 181 insertions(+), 4 deletions(-) create mode 100644 chrome/android/java/res/layout/ntp_shortcuts.xml create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/feedback/SimplifiedNtpFeedbackSource.java + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Restore-Simplified-NTP-launch.inc + create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Restore-Simplified-NTP-launch.inc + create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Restore-Simplified-NTP-launch.inc diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_java_resources.gni --- a/chrome/android/chrome_java_resources.gni @@ -315,45 +316,6 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/Sug /** * Opens the suggestions page without recording metrics. * -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 -@@ -5581,6 +5581,9 @@ const FeatureEntry kFeatureEntries[] = { - SINGLE_VALUE_TYPE_AND_VALUE( - switches::kForceShowUpdateMenuItemCustomSummary, - "Custom Summary")}, -+ {"simplified-ntp", flag_descriptions::kSimplifiedNtpName, -+ flag_descriptions::kSimplifiedNtpDescription, kOsAndroid, -+ FEATURE_VALUE_TYPE(chrome::android::kSimplifiedNTP)}, - {"force-show-update-menu-badge", flag_descriptions::kUpdateMenuBadgeName, - flag_descriptions::kUpdateMenuBadgeDescription, kOsAndroid, - SINGLE_VALUE_TYPE(switches::kForceShowUpdateMenuBadge)}, -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 -@@ -4507,6 +4507,9 @@ const char kStartSurfaceWithAccessibilityName[] = - const char kStartSurfaceWithAccessibilityDescription[] = - "Enable Start Surface with Accessibility."; - -+const char kSimplifiedNtpName[] = "Simplified NTP"; -+const char kSimplifiedNtpDescription[] = "Show a simplified New Tab Page."; -+ - const char kStrictSiteIsolationName[] = "Strict site isolation"; - const char kStrictSiteIsolationDescription[] = - "Security mode that enables site isolation for all sites (SitePerProcess). " -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 -@@ -2628,6 +2628,9 @@ extern const char kSmartZoomDescription[]; - extern const char kSmartSuggestionForLargeDownloadsName[]; - extern const char kSmartSuggestionForLargeDownloadsDescription[]; - -+extern const char kSimplifiedNtpName[]; -+extern const char kSimplifiedNtpDescription[]; -+ - extern const char kStartSurfaceAndroidName[]; - extern const char kStartSurfaceAndroidDescription[]; - 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 @@ -365,28 +327,6 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse &kInstanceSwitcher, &kInstantStart, &kLensCameraAssistedSearch, -@@ -859,6 +860,10 @@ BASE_FEATURE(kInstanceSwitcher, - "InstanceSwitcher", - base::FEATURE_ENABLED_BY_DEFAULT); - -+BASE_FEATURE(kSimplifiedNTP, -+ "SimplifiedNTP", -+ base::FEATURE_ENABLED_BY_DEFAULT); -+ - BASE_FEATURE(kPageAnnotationsService, - "PageAnnotationsService", - base::FEATURE_DISABLED_BY_DEFAULT); -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 -@@ -141,6 +141,7 @@ BASE_DECLARE_FEATURE(kOmniboxModernizeVisualUpdate); - BASE_DECLARE_FEATURE(kOmniboxWarmRecycledViewPool); - BASE_DECLARE_FEATURE(kOptimizeGeolocationHeaderGeneration); - BASE_DECLARE_FEATURE(kPageAnnotationsService); -+BASE_DECLARE_FEATURE(kSimplifiedNTP); - BASE_DECLARE_FEATURE(kPreconnectOnTabCreation); - BASE_DECLARE_FEATURE(kBookmarksImprovedSaveFlow); - BASE_DECLARE_FEATURE(kBookmarksRefresh); 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 @@ -401,42 +341,44 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f diff --git a/components/signin/public/base/signin_switches.cc b/components/signin/public/base/signin_switches.cc --- a/components/signin/public/base/signin_switches.cc +++ b/components/signin/public/base/signin_switches.cc -@@ -14,7 +14,7 @@ namespace switches { - // Feature to add a signed-out avatar on the NTP. - BASE_FEATURE(kIdentityStatusConsistency, - "IdentityStatusConsistency", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ base::FEATURE_DISABLED_BY_DEFAULT); - #endif +@@ -84,4 +84,7 @@ BASE_FEATURE(kSearchEngineChoiceFre, - // Clears the token service before using it. This allows simulating the -diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json ---- a/testing/variations/fieldtrial_testing_config.json -+++ b/testing/variations/fieldtrial_testing_config.json -@@ -7994,6 +7994,24 @@ - ] - } - ], -+ "SimplifiedNTP": [ -+ { -+ "platforms": [ -+ "android" -+ ], -+ "experiments": [ -+ { -+ "name": "Enabled_NoScrollToLoad", -+ "enable_features": [ -+ "SimplifiedNTP" -+ ], -+ "disable_features": [ -+ "ContentSuggestionsScrollToLoad" -+ ] -+ } -+ ] -+ } -+ ], - "HelpAppLauncherSearch": [ - { - "platforms": [ + BASE_FEATURE(kUnoDesktop, "UnoDesktop", base::FEATURE_DISABLED_BY_DEFAULT); + ++#if BUILDFLAG(IS_ANDROID) ++SET_CROMITE_FEATURE_DISABLED(kIdentityStatusConsistency); ++#endif + } // namespace switches +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Restore-Simplified-NTP-launch.inc b/cromite_flags/chrome/browser/about_flags_cc/Restore-Simplified-NTP-launch.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Restore-Simplified-NTP-launch.inc +@@ -0,0 +1,12 @@ ++#if BUILDFLAG(IS_ANDROID) ++ ++#ifdef FLAG_SECTION ++ ++ {"simplified-ntp", ++ "Simplified NTP", ++ "Show a simplified New Tab Page.", kOsAndroid, ++ FEATURE_VALUE_TYPE(chrome::android::kSimplifiedNTP)}, ++ ++#endif ++ ++#endif +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Restore-Simplified-NTP-launch.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Restore-Simplified-NTP-launch.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Restore-Simplified-NTP-launch.inc +@@ -0,0 +1,3 @@ ++CROMITE_FEATURE(kSimplifiedNTP, ++ "SimplifiedNTP", ++ base::FEATURE_ENABLED_BY_DEFAULT); +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Restore-Simplified-NTP-launch.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Restore-Simplified-NTP-launch.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Restore-Simplified-NTP-launch.inc +@@ -0,0 +1 @@ ++BASE_DECLARE_FEATURE(kSimplifiedNTP); -- 2.25.1 diff --git a/build/patches/Restore-adaptive-button-in-top-toolbar-customization.patch b/build/patches/Restore-adaptive-button-in-top-toolbar-customization.patch index a5040d365..289c758eb 100644 --- a/build/patches/Restore-adaptive-button-in-top-toolbar-customization.patch +++ b/build/patches/Restore-adaptive-button-in-top-toolbar-customization.patch @@ -89,7 +89,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/share/ShareButt 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 -@@ -702,18 +702,12 @@ const FeatureEntry::FeatureParam kAdaptiveButtonCustomization_Share[] = { +@@ -675,18 +675,12 @@ const FeatureEntry::FeatureParam kAdaptiveButtonCustomization_Share[] = { {"default_segment", "share"}, {"show_ui_only_after_ready", "false"}, {"ignore_segmentation_results", "true"}}; diff --git a/build/patches/Restore-offline-indicator-v2-flag.patch b/build/patches/Restore-offline-indicator-v2-flag.patch index 0662781e3..f5e9710fb 100644 --- a/build/patches/Restore-offline-indicator-v2-flag.patch +++ b/build/patches/Restore-offline-indicator-v2-flag.patch @@ -8,14 +8,15 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- .../indicator/OfflineDetector.java | 38 ++++++++++++++++++- .../tabbed_mode/TabbedRootUiCoordinator.java | 8 +++- - chrome/browser/about_flags.cc | 3 ++ - chrome/browser/flag-metadata.json | 5 +++ - chrome/browser/flag_descriptions.cc | 4 ++ - chrome/browser/flag_descriptions.h | 3 ++ - .../flags/android/chrome_feature_list.cc | 5 +++ - .../flags/android/chrome_feature_list.h | 1 + + .../flags/android/chrome_feature_list.cc | 1 + .../browser/flags/ChromeFeatureList.java | 1 + - 9 files changed, 65 insertions(+), 3 deletions(-) + .../Restore-offline-indicator-v2-flag.inc | 12 ++++++ + .../Restore-offline-indicator-v2-flag.inc | 3 ++ + .../Restore-offline-indicator-v2-flag.inc | 1 + + 7 files changed, 61 insertions(+), 3 deletions(-) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Restore-offline-indicator-v2-flag.inc + create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Restore-offline-indicator-v2-flag.inc + create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Restore-offline-indicator-v2-flag.inc diff --git a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/indicator/OfflineDetector.java b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/indicator/OfflineDetector.java --- a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/indicator/OfflineDetector.java @@ -111,61 +112,6 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/Tab ObservableSupplierImpl isUrlBarFocusedSupplier = new ObservableSupplierImpl<>(); isUrlBarFocusedSupplier.set(mToolbarManager.isUrlBarFocused()); mUrlFocusChangeListener = new UrlFocusChangeListener() { -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 -@@ -5467,6 +5467,9 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kOfflinePagesLivePageSharingName, - flag_descriptions::kOfflinePagesLivePageSharingDescription, kOsAndroid, - FEATURE_VALUE_TYPE(offline_pages::kOfflinePagesLivePageSharingFeature)}, -+ {"offline-indicator-v2", flag_descriptions::kOfflineIndicatorV2Name, -+ flag_descriptions::kOfflineIndicatorV2Description, kOsAndroid, -+ FEATURE_VALUE_TYPE(chrome::android::kOfflineIndicatorV2)}, - {"offline-pages-auto-save", - flag_descriptions::kOfflinePagesAutoSaveFeatureName, - flag_descriptions::kOfflinePagesAutoSaveFeatureDescription, kOsAndroid, -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 -@@ -6052,6 +6052,11 @@ - "owners": [ "dom" ], - "expiry_milestone": 125 - }, -+ { -+ "name": "offline-indicator-v2", -+ "owners": [ "sinansahin@google.com", "twellington", "offline-dev" ], -+ "expiry_milestone": -1 -+ }, - { - "name": "offline-pages-live-page-sharing", - "owners": [ "sclittle", "srsudar", "offline-dev" ], -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 -@@ -4249,6 +4249,10 @@ const char kNotificationPermissionRationaleBottomSheetDescription[] = - "flow. " - "Only works with builds targeting Android T+."; - -+const char kOfflineIndicatorV2Name[] = "Offline indicator V2"; -+const char kOfflineIndicatorV2Description[] = -+ "Show a persistent offline indicator when offline."; -+ - const char kOfflinePagesLivePageSharingName[] = - "Enables live page sharing of offline pages"; - const char kOfflinePagesLivePageSharingDescription[] = -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 -@@ -2504,6 +2504,9 @@ extern const char kNewTabSearchEngineUrlAndroidDescription[]; - extern const char kNotificationPermissionRationaleName[]; - extern const char kNotificationPermissionRationaleDescription[]; - -+extern const char kOfflineIndicatorV2Name[]; -+extern const char kOfflineIndicatorV2Description[]; -+ - extern const char kNotificationPermissionRationaleBottomSheetName[]; - extern const char kNotificationPermissionRationaleBottomSheetDescription[]; - 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 @@ -177,28 +123,6 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse &kPageAnnotationsService, &kPreconnectOnTabCreation, &kInlineUpdateFlow, -@@ -818,6 +819,10 @@ BASE_FEATURE(kEarlyInitializeStartupMetrics, - - BASE_FEATURE(kEmptyStates, "EmptyStates", base::FEATURE_ENABLED_BY_DEFAULT); - -+BASE_FEATURE(kOfflineIndicatorV2, -+ "OfflineIndicatorV2", -+ base::FEATURE_ENABLED_BY_DEFAULT); -+ - BASE_FEATURE(kExperimentsForAgsa, - "ExperimentsForAgsa", - base::FEATURE_ENABLED_BY_DEFAULT); -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 -@@ -132,6 +132,7 @@ BASE_DECLARE_FEATURE(kLensCameraAssistedSearch); - BASE_DECLARE_FEATURE(kLensOnQuickActionSearchWidget); - BASE_DECLARE_FEATURE(kLocationBarModelOptimizations); - BASE_DECLARE_FEATURE(kNewTabSearchEngineUrlAndroid); -+BASE_DECLARE_FEATURE(kOfflineIndicatorV2); - BASE_DECLARE_FEATURE(kNotificationPermissionVariant); - BASE_DECLARE_FEATURE(kNotificationPermissionBottomSheet); - BASE_DECLARE_FEATURE(kOmahaMinSdkVersionAndroid); 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 @@ -210,5 +134,36 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f public static final String OFFLINE_PAGES_DESCRIPTIVE_FAIL_STATUS = "OfflinePagesDescriptiveFailStatus"; public static final String OFFLINE_PAGES_DESCRIPTIVE_PENDING_STATUS = +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Restore-offline-indicator-v2-flag.inc b/cromite_flags/chrome/browser/about_flags_cc/Restore-offline-indicator-v2-flag.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Restore-offline-indicator-v2-flag.inc +@@ -0,0 +1,12 @@ ++#if BUILDFLAG(IS_ANDROID) ++ ++#ifdef FLAG_SECTION ++ ++ {"offline-indicator-v2", ++ "Offline indicator V2", ++ "Show a persistent offline indicator when offline.", kOsAndroid, ++ FEATURE_VALUE_TYPE(chrome::android::kOfflineIndicatorV2)}, ++ ++#endif ++ ++#endif +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Restore-offline-indicator-v2-flag.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Restore-offline-indicator-v2-flag.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Restore-offline-indicator-v2-flag.inc +@@ -0,0 +1,3 @@ ++CROMITE_FEATURE(kOfflineIndicatorV2, ++ "OfflineIndicatorV2", ++ base::FEATURE_ENABLED_BY_DEFAULT); +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Restore-offline-indicator-v2-flag.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Restore-offline-indicator-v2-flag.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Restore-offline-indicator-v2-flag.inc +@@ -0,0 +1 @@ ++BASE_DECLARE_FEATURE(kOfflineIndicatorV2); -- 2.25.1 diff --git a/build/patches/Revert-Delete-block-external-form-redirects.patch b/build/patches/Revert-Delete-block-external-form-redirects.patch index f04b62438..7ed50bed3 100644 --- a/build/patches/Revert-Delete-block-external-form-redirects.patch +++ b/build/patches/Revert-Delete-block-external-form-redirects.patch @@ -7,76 +7,14 @@ enables IntentBlockExternalFormRedirectsNoGesture. License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/about_flags.cc | 6 ++++++ - chrome/browser/flag-metadata.json | 5 +++++ - chrome/browser/flag_descriptions.cc | 6 ++++++ - chrome/browser/flag_descriptions.h | 3 +++ .../android/external_intents_features.cc | 7 ++++++- .../android/external_intents_features.h | 1 + .../ExternalIntentsFeatures.java | 6 ++++++ .../ExternalNavigationHandler.java | 21 +++++++++++++++++++ - 8 files changed, 54 insertions(+), 1 deletion(-) + ...t-Delete-block-external-form-redirects.inc | 15 +++++++++++++ + 5 files changed, 49 insertions(+), 1 deletion(-) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Revert-Delete-block-external-form-redirects.inc -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 -@@ -10411,6 +10411,12 @@ const FeatureEntry kFeatureEntries[] = { - "ServiceWorkerSkipIgnorableFetchHandler")}, - - #if BUILDFLAG(IS_ANDROID) -+ {"block-external-form-redirects-no-gesture", -+ flag_descriptions::kIntentBlockExternalFormRedirectsNoGestureName, -+ flag_descriptions::kIntentBlockExternalFormRedirectsNoGestureDescription, -+ kOsAndroid, -+ FEATURE_VALUE_TYPE( -+ external_intents::kIntentBlockExternalFormRedirectsNoGesture)}, - {"external-navigation-debug-logs", - flag_descriptions::kExternalNavigationDebugLogsName, - flag_descriptions::kExternalNavigationDebugLogsDescription, kOsAndroid, -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 -@@ -841,6 +841,11 @@ - "owners": ["ortuno", "cros-apps-platform-core@google.com" ], - "expiry_milestone": 132 - }, -+ { -+ "name": "block-external-form-redirects-no-gesture", -+ "owners": [ "jochen", "tedchoc" ], -+ "expiry_milestone": -1 -+ }, - { - "name": "block-insecure-private-network-requests", - "owners": [ "lyf", "phao", "chrome-security-owp-team@google.com" ], -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 -@@ -4150,6 +4150,12 @@ const char kInstantStartName[] = "Instant start"; - const char kInstantStartDescription[] = - "Show start surface before native library is loaded."; - -+const char kIntentBlockExternalFormRedirectsNoGestureName[] = -+ "Block intents from form submissions without user gesture"; -+const char kIntentBlockExternalFormRedirectsNoGestureDescription[] = -+ "Require a user gesture that triggered a form submission in order to " -+ "allow for redirecting to an external intent."; -+ - const char kInterestFeedV2Name[] = "Interest Feed v2"; - const char kInterestFeedV2Description[] = - "Show content suggestions on the New Tab Page and Start Surface using the " -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 -@@ -2447,6 +2447,9 @@ extern const char kInstanceSwitcherDescription[]; - extern const char kInstantStartName[]; - extern const char kInstantStartDescription[]; - -+extern const char kIntentBlockExternalFormRedirectsNoGestureName[]; -+extern const char kIntentBlockExternalFormRedirectsNoGestureDescription[]; -+ - extern const char kInterestFeedV2Name[]; - extern const char kInterestFeedV2Description[]; - diff --git a/components/external_intents/android/external_intents_features.cc b/components/external_intents/android/external_intents_features.cc --- a/components/external_intents/android/external_intents_features.cc +++ b/components/external_intents/android/external_intents_features.cc @@ -92,9 +30,9 @@ diff --git a/components/external_intents/android/external_intents_features.cc b/ "TrustedClientGestureBypass", base::FEATURE_ENABLED_BY_DEFAULT); -+BASE_FEATURE(kIntentBlockExternalFormRedirectsNoGesture, -+ "IntentBlockExternalFormRedirectsNoGesture", -+ base::FEATURE_ENABLED_BY_DEFAULT); ++CROMITE_FEATURE(kIntentBlockExternalFormRedirectsNoGesture, ++ "IntentBlockExternalFormRedirectsNoGesture", ++ base::FEATURE_ENABLED_BY_DEFAULT); + static jlong JNI_ExternalIntentsFeatures_GetFeature(JNIEnv* env, jint ordinal) { + if (ordinal == -1) @@ -167,5 +105,25 @@ diff --git a/components/external_intents/android/java/src/org/chromium/component if (hasInternalScheme(params.getUrl(), targetIntent) || hasContentScheme(params.getUrl(), targetIntent) || hasFileSchemeInIntentURI(params.getUrl(), targetIntent)) { +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Revert-Delete-block-external-form-redirects.inc b/cromite_flags/chrome/browser/about_flags_cc/Revert-Delete-block-external-form-redirects.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Revert-Delete-block-external-form-redirects.inc +@@ -0,0 +1,15 @@ ++#if BUILDFLAG(IS_ANDROID) ++ ++#ifdef FLAG_SECTION ++ ++ {"block-external-form-redirects-no-gesture", ++ "Block intents from form submissions without user gesture", ++ "Require a user gesture that triggered a form submission in order to " ++ "allow for redirecting to an external intent.", ++ kOsAndroid, ++ FEATURE_VALUE_TYPE( ++ external_intents::kIntentBlockExternalFormRedirectsNoGesture)}, ++ ++#endif ++ ++#endif -- 2.25.1 diff --git a/build/patches/Revert-flags-remove-disable-pull-to-refresh-effect.patch b/build/patches/Revert-flags-remove-disable-pull-to-refresh-effect.patch index 12314486b..a0491f394 100644 --- a/build/patches/Revert-flags-remove-disable-pull-to-refresh-effect.patch +++ b/build/patches/Revert-flags-remove-disable-pull-to-refresh-effect.patch @@ -7,26 +7,11 @@ This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f. Original License: BSD-3-Clause - https://spdx.org/licenses/BSD-3-Clause.html License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/about_flags.cc | 4 ++++ - chrome/browser/flag-metadata.json | 4 ++++ - chrome/browser/flag_descriptions.cc | 4 ++++ - chrome/browser/flag_descriptions.h | 3 +++ - 4 files changed, 15 insertions(+) + chrome/browser/flag-metadata.json | 4 ++++ + ...t-flags-remove-disable-pull-to-refresh-effect.inc | 12 ++++++++++++ + 2 files changed, 16 insertions(+) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Revert-flags-remove-disable-pull-to-refresh-effect.inc -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 -@@ -4957,6 +4957,10 @@ const FeatureEntry kFeatureEntries[] = { - kOsWin | kOsLinux | kOsAndroid | kOsCrOS, - FEATURE_VALUE_TYPE(features::kVulkan)}, - #if BUILDFLAG(IS_ANDROID) -+ {switches::kDisablePullToRefreshEffect, -+ flag_descriptions::kDisablePullToRefreshEffectName, -+ flag_descriptions::kDisablePullToRefreshEffectDescription, kOsAndroid, -+ SINGLE_DISABLE_VALUE_TYPE(switches::kDisablePullToRefreshEffect)}, - {"translate-message-ui", flag_descriptions::kTranslateMessageUIName, - flag_descriptions::kTranslateMessageUIDescription, kOsAndroid, - FEATURE_WITH_PARAMS_VALUE_TYPE(translate::kTranslateMessageUI, 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 @@ -41,32 +26,22 @@ diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.js { "name": "disable-quick-answers-v2-translation", "owners": [ "croissant-eng" ], -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 -@@ -4302,6 +4302,10 @@ const char kReadLaterDescription[] = - "Allow users to save tabs for later. Enables a new button and menu for " - "accessing tabs saved for later."; - -+const char kDisablePullToRefreshEffectName[] = "The pull-to-refresh effect"; -+const char kDisablePullToRefreshEffectDescription[] = -+ "Page reloads triggered by vertically overscrolling content."; +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Revert-flags-remove-disable-pull-to-refresh-effect.inc b/cromite_flags/chrome/browser/about_flags_cc/Revert-flags-remove-disable-pull-to-refresh-effect.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Revert-flags-remove-disable-pull-to-refresh-effect.inc +@@ -0,0 +1,12 @@ ++#if BUILDFLAG(IS_ANDROID) ++ ++#ifdef FLAG_SECTION ++ ++ {switches::kDisablePullToRefreshEffect, ++ "The pull-to-refresh effect", ++ "Page reloads triggered by vertically overscrolling content.", kOsAndroid, ++ SINGLE_DISABLE_VALUE_TYPE(switches::kDisablePullToRefreshEffect)}, + - const char kReaderModeHeuristicsName[] = "Reader Mode triggering"; - const char kReaderModeHeuristicsDescription[] = - "Determines what pages the Reader Mode infobar is shown on."; -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 -@@ -2541,6 +2541,9 @@ extern const char kQueryTilesSwapTrendingDescription[]; - extern const char kReadAloudName[]; - extern const char kReadAloudDescription[]; - -+extern const char kDisablePullToRefreshEffectName[]; -+extern const char kDisablePullToRefreshEffectDescription[]; ++#endif + - extern const char kReaderModeHeuristicsName[]; - extern const char kReaderModeHeuristicsDescription[]; - extern const char kReaderModeHeuristicsMarkup[]; ++#endif -- 2.25.1 diff --git a/build/patches/Revert-flags-remove-num-raster-threads.patch b/build/patches/Revert-flags-remove-num-raster-threads.patch index cc74b5b93..4c13d85df 100644 --- a/build/patches/Revert-flags-remove-num-raster-threads.patch +++ b/build/patches/Revert-flags-remove-num-raster-threads.patch @@ -6,91 +6,37 @@ This reverts commit 2a51528a1737e9038f7f96f29403032a6a845a25. License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/about_flags.cc | 14 ++++++++++++++ - chrome/browser/flag-metadata.json | 4 ++++ - chrome/browser/flag_descriptions.cc | 8 ++++++++ - chrome/browser/flag_descriptions.h | 7 +++++++ - 4 files changed, 33 insertions(+) + ...Revert-flags-remove-num-raster-threads.inc | 23 +++++++++++++++++++ + 1 file changed, 23 insertions(+) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Revert-flags-remove-num-raster-threads.inc -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 -@@ -398,6 +398,17 @@ const FeatureEntry::Choice kOverlayStrategiesChoices[] = { - "single-fullscreen,single-on-top,underlay"}, - }; - +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Revert-flags-remove-num-raster-threads.inc b/cromite_flags/chrome/browser/about_flags_cc/Revert-flags-remove-num-raster-threads.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Revert-flags-remove-num-raster-threads.inc +@@ -0,0 +1,23 @@ +#if BUILDFLAG(IS_ANDROID) ++ ++#ifdef FEATURE_PARAM_SECTION ++ +const FeatureEntry::Choice kNumRasterThreadsChoices[] = { + {flags_ui::kGenericExperimentChoiceDefault, "", ""}, -+ {flag_descriptions::kNumRasterThreadsOne, cc::switches::kNumRasterThreads, "1"}, -+ {flag_descriptions::kNumRasterThreadsTwo, cc::switches::kNumRasterThreads, "2"}, -+ {flag_descriptions::kNumRasterThreadsThree, cc::switches::kNumRasterThreads, -+ "3"}, -+ {flag_descriptions::kNumRasterThreadsFour, cc::switches::kNumRasterThreads, -+ "4"}}; ++ {"1", cc::switches::kNumRasterThreads, "1"}, ++ {"2", cc::switches::kNumRasterThreads, "2"}, ++ {"3", cc::switches::kNumRasterThreads, "3"}, ++ {"4", cc::switches::kNumRasterThreads, "4"}}; ++ +#endif + - const FeatureEntry::Choice kTouchTextSelectionStrategyChoices[] = { - {flags_ui::kGenericExperimentChoiceDefault, "", ""}, - {flag_descriptions::kTouchSelectionStrategyCharacter, -@@ -5115,6 +5126,9 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(mojo::core::kMojoLinuxChannelSharedMem)}, - #endif - #if BUILDFLAG(IS_ANDROID) -+ {"num-raster-threads", flag_descriptions::kNumRasterThreadsName, -+ flag_descriptions::kNumRasterThreadsDescription, kOsAll, ++#ifdef FLAG_SECTION ++ ++ {"num-raster-threads", ++ "Number of raster threads", ++ "Specify the number of raster threads.", kOsAll, + MULTI_VALUE_TYPE(kNumRasterThreadsChoices)}, - {"enable-site-isolation-for-password-sites", - flag_descriptions::kSiteIsolationForPasswordSitesName, - flag_descriptions::kSiteIsolationForPasswordSitesDescription, kOsAndroid, -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 -@@ -5658,6 +5658,10 @@ - "owners": [ "lazzzis", "aishwaryarj" ], - "expiry_milestone": 120 - }, -+ { -+ "name": "num-raster-threads", -+ "expiry_milestone": -1 -+ }, - { - "name": "messages-for-android-offer-notification", - "owners": [ "vishwasuppoor", "siashah" ], -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 -@@ -2312,6 +2312,14 @@ const char kOmniboxActionsInSuggestDescription[] = - "Actions in Suggest permits optional Action Chips to be attached to " - "Entity suggestions."; - -+const char kNumRasterThreadsName[] = "Number of raster threads"; -+const char kNumRasterThreadsDescription[] = -+ "Specify the number of raster threads."; -+const char kNumRasterThreadsOne[] = "1"; -+const char kNumRasterThreadsTwo[] = "2"; -+const char kNumRasterThreadsThree[] = "3"; -+const char kNumRasterThreadsFour[] = "4"; + - const char kOmniboxAdaptiveSuggestionsCountName[] = - "Adaptive Omnibox Suggestions count"; - const char kOmniboxAdaptiveSuggestionsCountDescription[] = -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 -@@ -1325,6 +1325,13 @@ extern const char kOmitCorsClientCertDescription[]; - extern const char kOmniboxActionsInSuggestName[]; - extern const char kOmniboxActionsInSuggestDescription[]; - -+extern const char kNumRasterThreadsName[]; -+extern const char kNumRasterThreadsDescription[]; -+extern const char kNumRasterThreadsOne[]; -+extern const char kNumRasterThreadsTwo[]; -+extern const char kNumRasterThreadsThree[]; -+extern const char kNumRasterThreadsFour[]; ++#endif + - extern const char kOmniboxAdaptiveSuggestionsCountName[]; - extern const char kOmniboxAdaptiveSuggestionsCountDescription[]; - ++#endif -- 2.25.1 diff --git a/build/patches/Revert-removal-of-execution-context-address-space.patch b/build/patches/Revert-removal-of-execution-context-address-space.patch index b14936daf..50079dc5e 100644 --- a/build/patches/Revert-removal-of-execution-context-address-space.patch +++ b/build/patches/Revert-removal-of-execution-context-address-space.patch @@ -17,7 +17,7 @@ This reverts commit 11f6a3e29bee9a6590a4fd56b28e8048200c18d0. Original License: BSD-3-Clause - https://spdx.org/licenses/BSD-3-Clause.html License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - content/public/common/content_features.cc | 2 +- + ...val-of-execution-context-address-space.inc | 2 ++ .../execution_context/execution_context.cc | 9 +++++ .../execution_context/execution_context.h | 4 +++ .../core/exported/web_shared_worker_impl.cc | 1 + @@ -53,20 +53,16 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../audio_worklet_global_scope_test.cc | 1 + .../webaudio/audio_worklet_thread_test.cc | 1 + .../worklet/worklet_thread_test_common.cc | 2 +- - 36 files changed, 189 insertions(+), 25 deletions(-) + 36 files changed, 190 insertions(+), 24 deletions(-) + create mode 100644 cromite_flags/content/public/common/content_features_cc/Revert-removal-of-execution-context-address-space.inc -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 -@@ -125,7 +125,7 @@ BASE_FEATURE(kBlockInsecurePrivateNetworkRequests, - // - kBlockInsecurePrivateNetworkRequests - BASE_FEATURE(kBlockInsecurePrivateNetworkRequestsFromPrivate, - "BlockInsecurePrivateNetworkRequestsFromPrivate", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ base::FEATURE_ENABLED_BY_DEFAULT); - - // Enables use of the PrivateNetworkAccessNonSecureContextsAllowed deprecation - // trial. This is a necessary yet insufficient condition: documents that wish to +diff --git a/cromite_flags/content/public/common/content_features_cc/Revert-removal-of-execution-context-address-space.inc b/cromite_flags/content/public/common/content_features_cc/Revert-removal-of-execution-context-address-space.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/content/public/common/content_features_cc/Revert-removal-of-execution-context-address-space.inc +@@ -0,0 +1,2 @@ ++SET_CROMITE_FEATURE_ENABLED(kBlockInsecurePrivateNetworkRequests); ++SET_CROMITE_FEATURE_ENABLED(kBlockInsecurePrivateNetworkRequestsFromPrivate); diff --git a/third_party/blink/renderer/core/execution_context/execution_context.cc b/third_party/blink/renderer/core/execution_context/execution_context.cc --- a/third_party/blink/renderer/core/execution_context/execution_context.cc +++ b/third_party/blink/renderer/core/execution_context/execution_context.cc diff --git a/build/patches/Viewport-Protection-Site-Setting.patch b/build/patches/Viewport-Protection-Site-Setting.patch index d01ec71f6..612552403 100644 --- a/build/patches/Viewport-Protection-Site-Setting.patch +++ b/build/patches/Viewport-Protection-Site-Setting.patch @@ -8,10 +8,9 @@ Require: Content-settings-infrastructure.patch .../bromite_content_settings/viewport.grdp | 27 ++++++ .../bromite_content_settings/viewport.inc | 22 +++++ .../bromite_content_settings/VIEWPORT.inc | 1 + - third_party/blink/common/features.cc | 2 +- .../renderer/core/frame/local_dom_window.cc | 2 + third_party/blink/renderer/core/page/page.cc | 3 + - 7 files changed, 149 insertions(+), 1 deletion(-) + 6 files changed, 148 insertions(+) create mode 100644 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/impl/BromiteViewportContentSetting.java create mode 100644 components/browser_ui/strings/bromite_content_settings/viewport.grdp create mode 100644 components/content_settings/core/browser/bromite_content_settings/viewport.inc @@ -180,18 +179,6 @@ new file mode 100644 +++ b/components/content_settings/core/common/bromite_content_settings/VIEWPORT.inc @@ -0,0 +1 @@ + VIEWPORT, -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 -@@ -1445,7 +1445,7 @@ constexpr base::FeatureParam kPrivateAggregationApiDebugModeEnabledAtAll{ - - BASE_FEATURE(kViewportProtection, - "ViewportProtection", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ base::FEATURE_DISABLED_BY_DEFAULT); - - BASE_FEATURE(kProcessHtmlDataImmediately, - "ProcessHtmlDataImmediately", diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc diff --git a/build/patches/Viewport-Protection-flag.patch b/build/patches/Viewport-Protection-flag.patch index 00afca99b..c2fcecfc5 100644 --- a/build/patches/Viewport-Protection-flag.patch +++ b/build/patches/Viewport-Protection-flag.patch @@ -7,11 +7,9 @@ prevent coordinate-based fingerprinting scripts. The factor is changed at each change of origin. The feature is controlled by a feature flag (default enabled) --- - chrome/browser/about_flags.cc | 5 ++ - chrome/browser/flag_descriptions.cc | 6 ++ - chrome/browser/flag_descriptions.h | 3 + - third_party/blink/common/features.cc | 4 + - third_party/blink/public/common/features.h | 3 + + .../Viewport-Protection-flag.inc | 10 +++ + .../features_cc/Viewport-Protection-flag.inc | 3 + + .../features_h/Viewport-Protection-flag.inc | 2 + .../common/widget/device_emulation_params.h | 6 +- .../blink/renderer/core/css/media_values.cc | 2 +- .../core/css/resolver/style_resolver.cc | 7 +- @@ -28,79 +26,41 @@ The feature is controlled by a feature flag (default enabled) .../blink/renderer/core/input/touch.cc | 17 ++++- third_party/blink/renderer/core/page/page.cc | 76 +++++++++++++++++++ third_party/blink/renderer/core/page/page.h | 7 ++ - 21 files changed, 251 insertions(+), 19 deletions(-) + 19 files changed, 245 insertions(+), 19 deletions(-) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Viewport-Protection-flag.inc + create mode 100644 cromite_flags/third_party/blink/common/features_cc/Viewport-Protection-flag.inc + create mode 100644 cromite_flags/third_party/blink/common/features_h/Viewport-Protection-flag.inc -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 -@@ -10479,6 +10479,11 @@ const FeatureEntry kFeatureEntries[] = { - kServiceWorkerSkipIgnorableFetchHandlerVariations, - "ServiceWorkerSkipIgnorableFetchHandler")}, - +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Viewport-Protection-flag.inc b/cromite_flags/chrome/browser/about_flags_cc/Viewport-Protection-flag.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Viewport-Protection-flag.inc +@@ -0,0 +1,10 @@ ++#ifdef FLAG_SECTION ++ + {"viewport-protection", -+ flag_descriptions::kViewportProtectionName, -+ flag_descriptions::kViewportProtectionDescription, kOsAll, ++ "Viewport Protection", ++ "Scale the viewport and the screen by a random factor to prevent " ++ "coordinate-based fingerprinting scripts. The factor is changed at each " ++ "change of origin.", kOsAll, + FEATURE_VALUE_TYPE(blink::features::kViewportProtection)}, + - #if BUILDFLAG(IS_ANDROID) - {"block-external-form-redirects-no-gesture", - flag_descriptions::kIntentBlockExternalFormRedirectsNoGestureName, -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 -@@ -7767,6 +7767,12 @@ const char kWebXrInternalsDescription[] = - "debug issues with the WebXR Device API."; - #endif // #if defined(ENABLE_VR) - -+const char kViewportProtectionName[] = "Viewport Protection"; -+const char kViewportProtectionDescription[] = -+ "Scale the viewport and the screen by a random factor to prevent " -+ "coordinate-based fingerprinting scripts. The factor is changed at each " -+ "change of origin."; -+ - #if BUILDFLAG(ENABLE_WEBUI_TAB_STRIP) - const char kWebUITabStripFlagId[] = "webui-tab-strip"; - const char kWebUITabStripName[] = "WebUI tab strip"; -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 -@@ -4491,6 +4491,9 @@ extern const char kPaintPreviewDemoName[]; - extern const char kPaintPreviewDemoDescription[]; - #endif // ENABLE_PAINT_PREVIEW && BUILDFLAG(IS_ANDROID) - -+extern const char kViewportProtectionName[]; -+extern const char kViewportProtectionDescription[]; -+ - #if BUILDFLAG(ENABLE_VR) - extern const char kWebXrInternalsName[]; - extern const char kWebXrInternalsDescription[]; -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 -@@ -1443,6 +1443,10 @@ constexpr base::FeatureParam kPrivateAggregationApiDebugModeEnabledAtAll{ - &kPrivateAggregationApi, "debug_mode_enabled_at_all", - /*default_value=*/true}; - -+BASE_FEATURE(kViewportProtection, -+ "ViewportProtection", -+ base::FEATURE_ENABLED_BY_DEFAULT); -+ - BASE_FEATURE(kProcessHtmlDataImmediately, - "ProcessHtmlDataImmediately", - base::FEATURE_DISABLED_BY_DEFAULT); -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 -@@ -1363,6 +1363,9 @@ BLINK_COMMON_EXPORT bool IsFencedFramesEnabled(); - - BLINK_COMMON_EXPORT bool IsMaxUnthrottledTimeoutNestingLevelEnabled(); - ++#endif +diff --git a/cromite_flags/third_party/blink/common/features_cc/Viewport-Protection-flag.inc b/cromite_flags/third_party/blink/common/features_cc/Viewport-Protection-flag.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/third_party/blink/common/features_cc/Viewport-Protection-flag.inc +@@ -0,0 +1,3 @@ ++CROMITE_FEATURE(kViewportProtection, ++ "ViewportProtection", ++ base::FEATURE_DISABLED_BY_DEFAULT); +diff --git a/cromite_flags/third_party/blink/common/features_h/Viewport-Protection-flag.inc b/cromite_flags/third_party/blink/common/features_h/Viewport-Protection-flag.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/third_party/blink/common/features_h/Viewport-Protection-flag.inc +@@ -0,0 +1,2 @@ +// Enable blink viewport protection +BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kViewportProtection); -+ - // This function checks both kNewBaseUrlInheritanceBehavior and - // kIsolateSandboxedIframes and returns true if either is enabled. - BLINK_COMMON_EXPORT bool IsNewBaseUrlInheritanceBehaviorEnabled(); diff --git a/third_party/blink/public/common/widget/device_emulation_params.h b/third_party/blink/public/common/widget/device_emulation_params.h --- a/third_party/blink/public/common/widget/device_emulation_params.h +++ b/third_party/blink/public/common/widget/device_emulation_params.h diff --git a/build/patches/autofill-miscellaneous.patch b/build/patches/autofill-miscellaneous.patch index 5fc50c89a..c70b10131 100644 --- a/build/patches/autofill-miscellaneous.patch +++ b/build/patches/autofill-miscellaneous.patch @@ -15,10 +15,10 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../core/browser/autofill_download_manager.cc | 43 +++---------------- .../core/browser/autofill_download_manager.h | 2 - .../core/browser/browser_autofill_manager.h | 4 +- - .../autofill/core/common/autofill_features.cc | 4 +- + .../autofill/core/common/autofill_features.cc | 1 + .../autofill/core/common/autofill_prefs.cc | 10 ++--- .../password_generation_frame_helper.cc | 4 -- - 8 files changed, 20 insertions(+), 60 deletions(-) + 8 files changed, 19 insertions(+), 58 deletions(-) diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc --- a/chrome/browser/prefs/browser_prefs.cc @@ -163,17 +163,14 @@ 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 -@@ -797,8 +797,8 @@ BASE_FEATURE(kAutofillLogToTerminal, - // "upload" resources. - // i.e., https://other.autofill.server:port/tbproxy/af/ - BASE_FEATURE(kAutofillServerCommunication, -- "AutofillServerCommunication", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "AutofillServerCommunication", // disabled by default -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - - // Controls attaching the autofill type predictions to their respective - // element in the DOM. +@@ -811,6 +811,7 @@ BASE_FEATURE(kAutofillUploadThrottling, + "AutofillUploadThrottling", + base::FEATURE_ENABLED_BY_DEFAULT); + ++SET_CROMITE_FEATURE_DISABLED(kAutofillServerCommunication); + } // namespace test + + } // namespace autofill::features 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 diff --git a/build/patches/ungoogled-chromium-no-special-hosts-domains.patch b/build/patches/ungoogled-chromium-no-special-hosts-domains.patch index b9cb5adcf..0d85c7a8a 100644 --- a/build/patches/ungoogled-chromium-no-special-hosts-domains.patch +++ b/build/patches/ungoogled-chromium-no-special-hosts-domains.patch @@ -55,11 +55,13 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html components/search_provider_logos/BUILD.gn | 2 - .../logo_service_impl.cc | 16 +- components/url_matcher/url_util.cc | 83 ----- - content/common/features.cc | 4 +- - content/public/common/content_features.cc | 6 +- + ...gled-chromium-no-special-hosts-domains.inc | 1 + + ...gled-chromium-no-special-hosts-domains.inc | 1 + net/base/url_util.cc | 21 -- services/network/network_context.cc | 2 +- - 52 files changed, 60 insertions(+), 805 deletions(-) + 52 files changed, 57 insertions(+), 800 deletions(-) + create mode 100644 cromite_flags/content/common/features_cc/ungoogled-chromium-no-special-hosts-domains.inc + create mode 100644 cromite_flags/content/public/common/content_features_cc/ungoogled-chromium-no-special-hosts-domains.inc diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn @@ -1629,36 +1631,18 @@ diff --git a/components/url_matcher/url_util.cc b/components/url_matcher/url_uti return GURL(); } -diff --git a/content/common/features.cc b/content/common/features.cc ---- a/content/common/features.cc -+++ b/content/common/features.cc -@@ -178,8 +178,8 @@ BASE_FEATURE(kExperimentalContentSecurityPolicyFeatures, - // parsing the signin status HTTP headers. - // kFedCmIdpSigninStatusEnabled takes precedence over this feature flag. - BASE_FEATURE(kFedCmIdpSigninStatusMetrics, -- "FedCmIdpSigninStatusMetrics", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "FedCmIdpSigninStatusMetrics", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - - // If enabled, limits the number of FLEDGE auctions that can be run between page - // load and unload -- any attempt to run more than this number of auctions will -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 -@@ -380,9 +380,9 @@ BASE_FEATURE(kFedCmSelectiveDisclosure, - - // Enables the IDP signin status API for use with FedCM, including avoiding - // network requests when not signed in and mismatch handling. --BASE_FEATURE(kFedCmIdpSigninStatusEnabled, -- "FedCmIdpSigninStatusEnabled", -- base::FEATURE_DISABLED_BY_DEFAULT); -+BASE_FEATURE(kFedCmIdpSigninStatusEnabled, // disabled -+ "FedCmIdpSigninStatusEnabled", // by default -+ base::FEATURE_DISABLED_BY_DEFAULT); // on bromite - - // Enables bypassing the well-known file enforcement. - BASE_FEATURE(kFedCmWithoutWellKnownEnforcement, +diff --git a/cromite_flags/content/common/features_cc/ungoogled-chromium-no-special-hosts-domains.inc b/cromite_flags/content/common/features_cc/ungoogled-chromium-no-special-hosts-domains.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/content/common/features_cc/ungoogled-chromium-no-special-hosts-domains.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_DISABLED(kFedCmIdpSigninStatusMetrics); +diff --git a/cromite_flags/content/public/common/content_features_cc/ungoogled-chromium-no-special-hosts-domains.inc b/cromite_flags/content/public/common/content_features_cc/ungoogled-chromium-no-special-hosts-domains.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/content/public/common/content_features_cc/ungoogled-chromium-no-special-hosts-domains.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_DISABLED(kFedCmIdpSigninStatusEnabled); diff --git a/net/base/url_util.cc b/net/base/url_util.cc --- a/net/base/url_util.cc +++ b/net/base/url_util.cc