79 lines
2.9 KiB
Diff
79 lines
2.9 KiB
Diff
From: uazo <uazo@users.noreply.github.com>
|
|
Date: Mon, 26 Feb 2024 16:35:16 +0000
|
|
Subject: Disable Compose feature
|
|
|
|
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
|
---
|
|
chrome/browser/BUILD.gn | 9 +++++++--
|
|
chrome/browser/ui/webui/settings/settings_ui.cc | 2 +-
|
|
components/compose/core/browser/compose_features.cc | 2 ++
|
|
components/compose/features.gni | 2 +-
|
|
4 files changed, 11 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
|
--- a/chrome/browser/BUILD.gn
|
|
+++ b/chrome/browser/BUILD.gn
|
|
@@ -8407,6 +8407,12 @@ static_library("browser") {
|
|
deps += [ "//components/segmentation_platform/internal:optimization_guide_segmentation_handler" ]
|
|
}
|
|
|
|
+ if (!is_android) {
|
|
+ deps += [
|
|
+ ":compose_optimization_guide_proto",
|
|
+ ]
|
|
+ }
|
|
+
|
|
if (enable_compose) {
|
|
sources += [
|
|
"compose/chrome_compose_client.cc",
|
|
@@ -8422,7 +8428,6 @@ static_library("browser") {
|
|
]
|
|
|
|
deps += [
|
|
- ":compose_optimization_guide_proto",
|
|
"//chrome/common/compose",
|
|
"//chrome/common/compose:mojo_bindings",
|
|
"//components/autofill/content/browser:browser",
|
|
@@ -8869,7 +8874,7 @@ source_set("font_pref") {
|
|
deps = [ "//chrome/common" ]
|
|
}
|
|
|
|
-if (enable_compose) {
|
|
+if (!is_android) {
|
|
proto_library("compose_optimization_guide_proto") {
|
|
sources = [ "compose/proto/compose_optimization_guide.proto" ]
|
|
cc_generator_options = "lite=true:"
|
|
diff --git a/chrome/browser/ui/webui/settings/settings_ui.cc b/chrome/browser/ui/webui/settings/settings_ui.cc
|
|
--- a/chrome/browser/ui/webui/settings/settings_ui.cc
|
|
+++ b/chrome/browser/ui/webui/settings/settings_ui.cc
|
|
@@ -389,7 +389,7 @@ SettingsUI::SettingsUI(content::WebUI* web_ui)
|
|
base::FeatureList::IsEnabled(features::kLinkedServicesSetting));
|
|
|
|
#if BUILDFLAG(ENABLE_COMPOSE)
|
|
- const bool compose_enabled = ComposeEnabling::IsEnabledForProfile(profile);
|
|
+ const bool compose_enabled = false;
|
|
#else
|
|
const bool compose_enabled = false;
|
|
#endif // BUILDFLAG(ENABLE_COMPOSE)
|
|
diff --git a/components/compose/core/browser/compose_features.cc b/components/compose/core/browser/compose_features.cc
|
|
--- a/components/compose/core/browser/compose_features.cc
|
|
+++ b/components/compose/core/browser/compose_features.cc
|
|
@@ -104,4 +104,6 @@ BASE_FEATURE(kComposeUpfrontInputModes,
|
|
"ComposeUpfrontInputModes",
|
|
base::FEATURE_DISABLED_BY_DEFAULT);
|
|
|
|
+SET_CROMITE_FEATURE_DISABLED(kEnableCompose);
|
|
+SET_CROMITE_FEATURE_DISABLED(kComposeEligible);
|
|
} // namespace compose::features
|
|
diff --git a/components/compose/features.gni b/components/compose/features.gni
|
|
--- a/components/compose/features.gni
|
|
+++ b/components/compose/features.gni
|
|
@@ -6,5 +6,5 @@ import("//build/config/chromeos/ui_mode.gni")
|
|
|
|
declare_args() {
|
|
# Whether Compose is enabled in the build.
|
|
- enable_compose = is_mac || is_win || is_linux || is_chromeos_ash
|
|
+ enable_compose = false
|
|
}
|
|
--
|