68 lines
3.1 KiB
Diff
68 lines
3.1 KiB
Diff
From: uazo <uazo@users.noreply.github.com>
|
|
Date: Mon, 17 Jul 2023 15:24:16 +0000
|
|
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 | 6 ++++++
|
|
chrome/browser/ui/side_search/side_search_prefs.cc | 2 +-
|
|
components/search_engines/template_url.cc | 2 +-
|
|
.../ui_features_cc/Keep-Side-Panel-Companion-disabled.inc | 1 +
|
|
4 files changed, 9 insertions(+), 2 deletions(-)
|
|
create mode 100755 cromite_flags/chrome/browser/ui/ui_features_cc/Keep-Side-Panel-Companion-disabled.inc
|
|
|
|
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
|
|
@@ -59,6 +59,11 @@ BASE_FEATURE(kCompanionEnableNewBadgesInContextMenu,
|
|
BASE_FEATURE(kCompanionEnablePageContent,
|
|
"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 {
|
|
@@ -69,6 +74,7 @@ const char kDisableCheckUserPermissionsForCompanion[] =
|
|
const char kForceCompanionPinnedState[] = "force-companion-pinned-state";
|
|
|
|
bool ShouldOverrideCheckingUserPermissionsForCompanion() {
|
|
+ if ((true)) return false;
|
|
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
|
|
return command_line->HasSwitch(kDisableCheckUserPermissionsForCompanion);
|
|
}
|
|
diff --git a/chrome/browser/ui/side_search/side_search_prefs.cc b/chrome/browser/ui/side_search/side_search_prefs.cc
|
|
--- a/chrome/browser/ui/side_search/side_search_prefs.cc
|
|
+++ b/chrome/browser/ui/side_search/side_search_prefs.cc
|
|
@@ -13,7 +13,7 @@ namespace side_search_prefs {
|
|
const char kSideSearchEnabled[] = "side_search.enabled";
|
|
|
|
void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
|
|
- registry->RegisterBooleanPref(kSideSearchEnabled, true);
|
|
+ registry->RegisterBooleanPref(kSideSearchEnabled, false);
|
|
}
|
|
|
|
} // namespace side_search_prefs
|
|
diff --git a/components/search_engines/template_url.cc b/components/search_engines/template_url.cc
|
|
--- a/components/search_engines/template_url.cc
|
|
+++ b/components/search_engines/template_url.cc
|
|
@@ -1861,7 +1861,7 @@ GURL TemplateURL::GenerateSuggestionURL(
|
|
}
|
|
|
|
bool TemplateURL::IsSideSearchSupported() const {
|
|
- return !side_search_param().empty();
|
|
+ return false;
|
|
}
|
|
|
|
bool TemplateURL::IsSideImageSearchSupported() const {
|
|
diff --git a/cromite_flags/chrome/browser/ui/ui_features_cc/Keep-Side-Panel-Companion-disabled.inc b/cromite_flags/chrome/browser/ui/ui_features_cc/Keep-Side-Panel-Companion-disabled.inc
|
|
new file mode 100755
|
|
--- /dev/null
|
|
+++ b/cromite_flags/chrome/browser/ui/ui_features_cc/Keep-Side-Panel-Companion-disabled.inc
|
|
@@ -0,0 +1 @@
|
|
+SET_CROMITE_FEATURE_DISABLED(kSideSearch);
|
|
--
|