forked from bromite/bromite
-
Notifications
You must be signed in to change notification settings - Fork 114
/
Copy pathDisable-Compose-feature.patch
78 lines (70 loc) · 2.92 KB
/
Disable-Compose-feature.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
From: uazo <[email protected]>
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
@@ -8180,6 +8180,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",
@@ -8195,7 +8201,6 @@ static_library("browser") {
]
deps += [
- ":compose_optimization_guide_proto",
"//chrome/common/compose",
"//chrome/common/compose:mojo_bindings",
"//components/autofill/content/browser:browser",
@@ -8640,7 +8645,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
@@ -382,7 +382,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;
const bool compose_visible = ComposeEnabling::IsSettingVisible(profile);
#else
const bool compose_enabled = false;
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_ENABLED_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
@@ -4,5 +4,5 @@
declare_args() {
# Whether Compose is enabled in the build.
- enable_compose = is_mac || is_win || is_linux || is_chromeos
+ enable_compose = false
}
--