mirror of
https://github.com/morgan9e/helium
synced 2026-04-14 00:14:20 +09:00
helium: consolidate search engine patches
- move all search patches together in series - extract google re-config into separate patch - merge kagi + ddg patch into consolidated "search engine defaults" patch
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
--- a/third_party/search_engines_data/resources/definitions/regional_settings.json
|
||||
+++ b/third_party/search_engines_data/resources/definitions/regional_settings.json
|
||||
@@ -10,7 +10,8 @@
|
||||
"&ecosia",
|
||||
"&bing",
|
||||
"&break_stuff_google",
|
||||
- "&qwant"
|
||||
+ "&qwant",
|
||||
+ "&kagi"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -676,7 +676,7 @@
|
||||
|
||||
--- a/components/search_engines/template_url.cc
|
||||
+++ b/components/search_engines/template_url.cc
|
||||
@@ -1689,6 +1689,8 @@ bool TemplateURL::IsBetterThanConflictin
|
||||
@@ -1685,6 +1685,8 @@ bool TemplateURL::IsBetterThanConflictin
|
||||
: base::Time(),
|
||||
// Prefer engines that CANNOT be auto-replaced.
|
||||
!engine->safe_for_autoreplace(),
|
||||
@@ -722,7 +722,7 @@
|
||||
COMPONENT_EXPORT(HELIUM) GURL GetDummyURL();
|
||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
@@ -1958,6 +1958,9 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
@@ -1956,6 +1956,9 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
{"heliumServicesToggle", IDS_SETTINGS_HELIUM_SERVICES_TOGGLE},
|
||||
{"heliumServicesToggleDescription",
|
||||
IDS_SETTINGS_HELIUM_SERVICES_TOGGLE_DESCRIPTION},
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "components/safe_browsing/core/common/features.h"
|
||||
#include "components/safe_browsing/core/common/hashprefix_realtime/hash_realtime_utils.h"
|
||||
#include "components/saved_tab_groups/public/features.h"
|
||||
@@ -2484,14 +2482,9 @@ void AddSearchStrings(content::WebUIData
|
||||
@@ -2477,14 +2475,9 @@ void AddSearchStrings(content::WebUIData
|
||||
html_source->AddString("searchExplanationLearnMoreURL",
|
||||
chrome::kOmniboxLearnMoreURL);
|
||||
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
</div>
|
||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
@@ -1958,6 +1958,10 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
@@ -1956,6 +1956,10 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
{"heliumServicesToggle", IDS_SETTINGS_HELIUM_SERVICES_TOGGLE},
|
||||
{"heliumServicesToggleDescription",
|
||||
IDS_SETTINGS_HELIUM_SERVICES_TOGGLE_DESCRIPTION},
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
namespace {
|
||||
|
||||
const bool kEnableBuiltinSearchProviderAssets =
|
||||
@@ -1856,18 +1852,6 @@ std::string TemplateURL::GetBuiltinDescr
|
||||
@@ -1854,18 +1850,6 @@ std::string TemplateURL::GetBuiltinDescr
|
||||
}
|
||||
|
||||
std::optional<std::u16string> TemplateURL::GetBuiltinMarketingSnippet() const {
|
||||
|
||||
@@ -35,17 +35,6 @@
|
||||
"id": 1
|
||||
},
|
||||
|
||||
--- a/components/search_engines/template_url_prepopulate_data.cc
|
||||
+++ b/components/search_engines/template_url_prepopulate_data.cc
|
||||
@@ -235,7 +235,7 @@ std::unique_ptr<TemplateURLData> GetPrep
|
||||
std::vector<const TemplateURLPrepopulateData::PrepopulatedEngine*>
|
||||
regional_prepopulated_engines) {
|
||||
return FindPrepopulatedEngineInternal(prefs, regional_prepopulated_engines,
|
||||
- google.id,
|
||||
+ duckduckgo.id,
|
||||
/*use_first_as_fallback=*/true);
|
||||
}
|
||||
|
||||
--- a/components/search_engines/search_engine_utils.cc
|
||||
+++ b/components/search_engines/search_engine_utils.cc
|
||||
@@ -35,7 +35,7 @@ SearchEngineType GetEngineType(const GUR
|
||||
@@ -57,34 +46,3 @@
|
||||
|
||||
// Now check the rest of the prepopulate data.
|
||||
for (const auto* engine : TemplateURLPrepopulateData::kAllEngines) {
|
||||
--- a/third_party/search_engines_data/resources/definitions/regional_settings.json
|
||||
+++ b/third_party/search_engines_data/resources/definitions/regional_settings.json
|
||||
@@ -3,6 +3,18 @@
|
||||
// found in the LICENSE file.
|
||||
{
|
||||
"elements": {
|
||||
+ "ZZ": {
|
||||
+ // Default
|
||||
+ "search_engines": [
|
||||
+ "&duckduckgo",
|
||||
+ "&ecosia",
|
||||
+ "&bing",
|
||||
+ "&break_stuff_google",
|
||||
+ "&qwant"
|
||||
+ ]
|
||||
+ }
|
||||
+ },
|
||||
+ "elements_ignored": {
|
||||
"AE": {
|
||||
// United Arab Emirates
|
||||
"search_engines": [
|
||||
@@ -1183,7 +1195,8 @@
|
||||
"name": "kRegionalSettings",
|
||||
"export_items": false,
|
||||
"map_key_type": "country_codes::CountryId",
|
||||
- "map_aliases": {
|
||||
+ "map_aliases": {},
|
||||
+ "map_aliases_ignored": {
|
||||
"AD": "ES", // Andorra
|
||||
"AF": "ZZ", // Afghanistan
|
||||
"AG": "ZZ", // Antigua and Barbuda
|
||||
43
patches/helium/core/search-engine-defaults.patch
Normal file
43
patches/helium/core/search-engine-defaults.patch
Normal file
@@ -0,0 +1,43 @@
|
||||
--- a/components/search_engines/template_url_prepopulate_data.cc
|
||||
+++ b/components/search_engines/template_url_prepopulate_data.cc
|
||||
@@ -235,7 +235,7 @@ std::unique_ptr<TemplateURLData> GetPrep
|
||||
std::vector<const TemplateURLPrepopulateData::PrepopulatedEngine*>
|
||||
regional_prepopulated_engines) {
|
||||
return FindPrepopulatedEngineInternal(prefs, regional_prepopulated_engines,
|
||||
- google.id,
|
||||
+ duckduckgo.id,
|
||||
/*use_first_as_fallback=*/true);
|
||||
}
|
||||
|
||||
--- a/third_party/search_engines_data/resources/definitions/regional_settings.json
|
||||
+++ b/third_party/search_engines_data/resources/definitions/regional_settings.json
|
||||
@@ -3,6 +3,19 @@
|
||||
// found in the LICENSE file.
|
||||
{
|
||||
"elements": {
|
||||
+ "ZZ": {
|
||||
+ // Default
|
||||
+ "search_engines": [
|
||||
+ "&duckduckgo",
|
||||
+ "&ecosia",
|
||||
+ "&bing",
|
||||
+ "&break_stuff_google",
|
||||
+ "&qwant",
|
||||
+ "&kagi"
|
||||
+ ]
|
||||
+ }
|
||||
+ },
|
||||
+ "elements_ignored": {
|
||||
"AE": {
|
||||
// United Arab Emirates
|
||||
"search_engines": [
|
||||
@@ -1183,7 +1196,8 @@
|
||||
"name": "kRegionalSettings",
|
||||
"export_items": false,
|
||||
"map_key_type": "country_codes::CountryId",
|
||||
- "map_aliases": {
|
||||
+ "map_aliases": {},
|
||||
+ "map_aliases_ignored": {
|
||||
"AD": "ES", // Andorra
|
||||
"AF": "ZZ", // Afghanistan
|
||||
"AG": "ZZ", // Antigua and Barbuda
|
||||
@@ -116,15 +116,16 @@ helium/core/override-chrome-protocol.patch
|
||||
helium/core/onboarding-page.patch
|
||||
helium/core/change-chromium-branding.patch
|
||||
helium/core/scan-chrome-native-messaging-hosts.patch
|
||||
helium/core/make-ddg-default.patch
|
||||
helium/core/add-kagi-search.patch
|
||||
helium/core/restore-google-search-engine.patch
|
||||
helium/core/search-engine-defaults.patch
|
||||
helium/core/fix-search-engine-icons.patch
|
||||
helium/core/force-eu-search-features.patch
|
||||
helium/core/remove-search-desc-snippet-deps.patch
|
||||
helium/core/copy-page-url-shortcut.patch
|
||||
helium/core/update-default-browser-prefs.patch
|
||||
helium/core/proxy-extension-downloads.patch
|
||||
helium/core/reenable-update-checks.patch
|
||||
helium/core/fix-search-engine-icons.patch
|
||||
helium/core/add-native-bangs.patch
|
||||
helium/core/force-eu-search-features.patch
|
||||
helium/core/disable-bookmarks-bar.patch
|
||||
helium/core/reenable-spellcheck-downloads.patch
|
||||
helium/core/prefer-https-by-default.patch
|
||||
@@ -163,7 +164,6 @@ helium/core/ublock-reconfigure-defaults.patch
|
||||
helium/core/ublock-migrate-prefs.patch
|
||||
helium/core/ublock-helium-services.patch
|
||||
helium/core/clean-omnibox-suggestions.patch
|
||||
helium/core/remove-search-desc-snippet-deps.patch
|
||||
helium/core/increase-incognito-storage-quota.patch
|
||||
helium/core/mitigate-fingerprinting-canvas.patch
|
||||
helium/core/mitigate-fingerprinting-audio-context.patch
|
||||
|
||||
Reference in New Issue
Block a user