Files
cromite/build/patches/Add-DuckDuckGo-Lite-search-engine.patch
T
2019-03-03 08:25:32 +01:00

626 lines
15 KiB
Diff

From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Thu, 12 Oct 2017 11:06:18 +0200
Subject: Add DuckDuckGo Lite search engine
---
.../search_engines/prepopulated_engines.json | 10 ++
components/search_engines/search_engine_type.h | 1 +
.../template_url_prepopulate_data.cc | 129 +++++++++++----------
3 files changed, 76 insertions(+), 64 deletions(-)
diff --git a/components/search_engines/prepopulated_engines.json b/components/search_engines/prepopulated_engines.json
--- a/components/search_engines/prepopulated_engines.json
+++ b/components/search_engines/prepopulated_engines.json
@@ -95,6 +95,16 @@
"id": 68
},
+ "duckduckgo_light": {
+ "name": "DuckDuckGo Light",
+ "keyword": "duckduckgo.com/lite",
+ "favicon_url": "https://duckduckgo.com/favicon.ico",
+ "search_url": "https://duckduckgo.com/lite/?q={searchTerms}",
+ "suggest_url": "https://duckduckgo.com/ac/?q={searchTerms}&type=list",
+ "type": "SEARCH_ENGINE_DUCKDUCKGOLIGHT",
+ "id": 12
+ },
+
"duckduckgo": {
"name": "DuckDuckGo",
"keyword": "duckduckgo.com",
diff --git a/components/search_engines/search_engine_type.h b/components/search_engines/search_engine_type.h
--- a/components/search_engines/search_engine_type.h
+++ b/components/search_engines/search_engine_type.h
@@ -65,6 +65,7 @@ enum SearchEngineType {
SEARCH_ENGINE_360,
SEARCH_ENGINE_COCCOC,
SEARCH_ENGINE_DUCKDUCKGO,
+ SEARCH_ENGINE_DUCKDUCKGOLIGHT,
SEARCH_ENGINE_PARSIJOO,
SEARCH_ENGINE_QWANT,
SEARCH_ENGINE_STARTPAGE,
diff --git a/components/search_engines/template_url_prepopulate_data.cc b/components/search_engines/template_url_prepopulate_data.cc
--- a/components/search_engines/template_url_prepopulate_data.cc
+++ b/components/search_engines/template_url_prepopulate_data.cc
@@ -35,6 +35,7 @@ const PrepopulatedEngine* const engines_default[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
+ &duckduckgo, &duckduckgo_light,
};
// Note, the below entries are sorted by country code, not the name in comment.
@@ -44,7 +45,7 @@ const PrepopulatedEngine* const engines_AE[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Albania
@@ -60,7 +61,7 @@ const PrepopulatedEngine* const engines_AR[] = {
&googleen, &google, &startpage,
&bing,
&yahoo_ar,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Austria
@@ -68,7 +69,7 @@ const PrepopulatedEngine* const engines_AT[] = {
&googleen, &google, &startpage,
&bing,
&yahoo_at,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Australia
@@ -76,7 +77,7 @@ const PrepopulatedEngine* const engines_AU[] = {
&googleen, &google, &startpage,
&bing,
&yahoo_au,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Bosnia and Herzegovina
@@ -92,7 +93,7 @@ const PrepopulatedEngine* const engines_BE[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Bulgaria
@@ -124,7 +125,7 @@ const PrepopulatedEngine* const engines_BN[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Bolivia
@@ -132,7 +133,7 @@ const PrepopulatedEngine* const engines_BO[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Brazil
@@ -140,7 +141,7 @@ const PrepopulatedEngine* const engines_BR[] = {
&googleen, &google, &startpage,
&bing,
&yahoo_br,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Belarus
@@ -156,19 +157,19 @@ const PrepopulatedEngine* const engines_BZ[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Canada
const PrepopulatedEngine* const engines_CA[] = {
- &googleen, &google, &startpage, &bing, &yahoo_ca, &yahoo_qc, &duckduckgo,
+ &googleen, &google, &startpage, &bing, &yahoo_ca, &yahoo_qc, &duckduckgo, &duckduckgo_light,
};
// Switzerland
const PrepopulatedEngine* const engines_CH[] = {
&googleen, &google, &startpage,
&bing,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
&yahoo_ch,
};
@@ -177,7 +178,7 @@ const PrepopulatedEngine* const engines_CL[] = {
&googleen, &google, &startpage,
&bing,
&yahoo_cl,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// China
@@ -190,7 +191,7 @@ const PrepopulatedEngine* const engines_CO[] = {
&googleen, &google, &startpage,
&yahoo_co,
&bing,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Costa Rica
@@ -198,7 +199,7 @@ const PrepopulatedEngine* const engines_CR[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Czech Republic
@@ -214,7 +215,7 @@ const PrepopulatedEngine* const engines_DE[] = {
&googleen, &google, &startpage,
&bing,
&yahoo_de,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Denmark
@@ -222,7 +223,7 @@ const PrepopulatedEngine* const engines_DK[] = {
&googleen, &google, &startpage,
&bing,
&yahoo_dk,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Dominican Republic
@@ -230,7 +231,7 @@ const PrepopulatedEngine* const engines_DO[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Algeria
@@ -246,7 +247,7 @@ const PrepopulatedEngine* const engines_EC[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Estonia
@@ -270,7 +271,7 @@ const PrepopulatedEngine* const engines_ES[] = {
&googleen, &google, &startpage,
&bing,
&yahoo_es,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Finland
@@ -278,7 +279,7 @@ const PrepopulatedEngine* const engines_FI[] = {
&googleen, &google, &startpage,
&bing,
&yahoo_fi,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Faroe Islands
@@ -286,7 +287,7 @@ const PrepopulatedEngine* const engines_FO[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// France
@@ -302,7 +303,7 @@ const PrepopulatedEngine* const engines_GB[] = {
&googleen, &google, &startpage,
&bing,
&yahoo_uk,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Greece
@@ -310,7 +311,7 @@ const PrepopulatedEngine* const engines_GR[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Guatemala
@@ -318,7 +319,7 @@ const PrepopulatedEngine* const engines_GT[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Hong Kong
@@ -334,7 +335,7 @@ const PrepopulatedEngine* const engines_HN[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Croatia
@@ -342,7 +343,7 @@ const PrepopulatedEngine* const engines_HR[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Hungary
@@ -350,7 +351,7 @@ const PrepopulatedEngine* const engines_HU[] = {
&googleen, &google, &startpage,
&yahoo,
&bing,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Indonesia
@@ -358,7 +359,7 @@ const PrepopulatedEngine* const engines_ID[] = {
&googleen, &google, &startpage,
&yahoo_id,
&bing,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Ireland
@@ -366,7 +367,7 @@ const PrepopulatedEngine* const engines_IE[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Israel
@@ -382,7 +383,7 @@ const PrepopulatedEngine* const engines_IN[] = {
&googleen, &google, &startpage,
&yahoo_in,
&bing,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Iraq
@@ -406,7 +407,7 @@ const PrepopulatedEngine* const engines_IS[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Italy
@@ -414,7 +415,7 @@ const PrepopulatedEngine* const engines_IT[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Jamaica
@@ -422,7 +423,7 @@ const PrepopulatedEngine* const engines_JM[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Jordan
@@ -446,7 +447,7 @@ const PrepopulatedEngine* const engines_KE[] = {
&googleen, &google, &startpage,
&yahoo,
&bing,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// South Korea
@@ -478,14 +479,14 @@ const PrepopulatedEngine* const engines_LB[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Liechtenstein
const PrepopulatedEngine* const engines_LI[] = {
&googleen, &google, &startpage,
&bing,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
&yahoo,
};
@@ -501,7 +502,7 @@ const PrepopulatedEngine* const engines_LT[] = {
const PrepopulatedEngine* const engines_LU[] = {
&googleen, &google, &startpage,
&bing,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
&yahoo,
};
@@ -534,7 +535,7 @@ const PrepopulatedEngine* const engines_MC[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Moldova
@@ -542,7 +543,7 @@ const PrepopulatedEngine* const engines_MD[] = {
&googleen, &google, &startpage,
&yandex_ru,
&mail_ru,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Montenegro
@@ -558,7 +559,7 @@ const PrepopulatedEngine* const engines_MK[] = {
&googleen, &google, &startpage,
&yahoo,
&bing,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Mexico
@@ -566,7 +567,7 @@ const PrepopulatedEngine* const engines_MX[] = {
&googleen, &google, &startpage,
&bing,
&yahoo_mx,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Malaysia
@@ -582,7 +583,7 @@ const PrepopulatedEngine* const engines_NI[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Netherlands
@@ -590,7 +591,7 @@ const PrepopulatedEngine* const engines_NL[] = {
&googleen, &google, &startpage,
&bing,
&yahoo_nl,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Norway
@@ -598,14 +599,14 @@ const PrepopulatedEngine* const engines_NO[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// New Zealand
const PrepopulatedEngine* const engines_NZ[] = {
&googleen, &google, &startpage,
&bing,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
&yahoo_nz,
};
@@ -622,7 +623,7 @@ const PrepopulatedEngine* const engines_PA[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Peru
@@ -630,7 +631,7 @@ const PrepopulatedEngine* const engines_PE[] = {
&googleen, &google, &startpage,
&yahoo_pe,
&bing,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Philippines
@@ -638,7 +639,7 @@ const PrepopulatedEngine* const engines_PH[] = {
&googleen, &google, &startpage,
&yahoo_ph,
&bing,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Pakistan
@@ -654,7 +655,7 @@ const PrepopulatedEngine* const engines_PL[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Puerto Rico
@@ -662,7 +663,7 @@ const PrepopulatedEngine* const engines_PR[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Portugal
@@ -670,7 +671,7 @@ const PrepopulatedEngine* const engines_PT[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Paraguay
@@ -678,7 +679,7 @@ const PrepopulatedEngine* const engines_PY[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Qatar
@@ -694,7 +695,7 @@ const PrepopulatedEngine* const engines_RO[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Serbia
@@ -702,7 +703,7 @@ const PrepopulatedEngine* const engines_RS[] = {
&googleen, &google, &startpage,
&yahoo,
&bing,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Russia
@@ -734,7 +735,7 @@ const PrepopulatedEngine* const engines_SE[] = {
&googleen, &google, &startpage,
&bing,
&yahoo_se,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Singapore
@@ -750,7 +751,7 @@ const PrepopulatedEngine* const engines_SI[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Slovakia
@@ -758,7 +759,7 @@ const PrepopulatedEngine* const engines_SK[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// El Salvador
@@ -766,7 +767,7 @@ const PrepopulatedEngine* const engines_SV[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Syria
@@ -806,7 +807,7 @@ const PrepopulatedEngine* const engines_TT[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Taiwan
@@ -838,7 +839,7 @@ const PrepopulatedEngine* const engines_US[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Uruguay
@@ -846,7 +847,7 @@ const PrepopulatedEngine* const engines_UY[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Venezuela
@@ -854,7 +855,7 @@ const PrepopulatedEngine* const engines_VE[] = {
&googleen, &google, &startpage,
&yahoo_ve,
&bing,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Vietnam
@@ -878,7 +879,7 @@ const PrepopulatedEngine* const engines_ZA[] = {
&googleen, &google, &startpage,
&bing,
&yahoo,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
};
// Zimbabwe
@@ -898,7 +899,7 @@ const PrepopulatedEngine* const kAllEngines[] = {
&bing,
&coccoc,
&daum,
- &duckduckgo,
+ &duckduckgo, &duckduckgo_light,
&googleen, &google, &startpage,
&mail_ru,
&naver,
--
2.11.0