Skip to content

Commit

Permalink
Add Ecosia as an alternative search in several regions
Browse files Browse the repository at this point in the history
  • Loading branch information
bsclifton committed Jan 15, 2021
1 parent 97b3b1c commit 7fd5003
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,16 @@ const std::vector<BravePrepopulatedEngineID> brave_engines_FR = {
PREPOPULATED_ENGINE_ID_ECOSIA,
};

const std::vector<BravePrepopulatedEngineID> brave_engines_AU_NZ_IE = {
const std::vector<BravePrepopulatedEngineID> brave_engines_AU_IE = {
PREPOPULATED_ENGINE_ID_DUCKDUCKGO_AU_NZ_IE,
PREPOPULATED_ENGINE_ID_GOOGLE,
PREPOPULATED_ENGINE_ID_QWANT,
PREPOPULATED_ENGINE_ID_BING,
PREPOPULATED_ENGINE_ID_STARTPAGE,
PREPOPULATED_ENGINE_ID_ECOSIA,
};

const std::vector<BravePrepopulatedEngineID> brave_engines_NZ = {
PREPOPULATED_ENGINE_ID_DUCKDUCKGO_AU_NZ_IE,
PREPOPULATED_ENGINE_ID_GOOGLE,
PREPOPULATED_ENGINE_ID_QWANT,
Expand All @@ -96,32 +105,54 @@ const std::map<int, const std::vector<BravePrepopulatedEngineID>*>
default_engines_by_country_id_map = {
{country_codes::CountryCharsToCountryID('A', 'M'),
&brave_engines_with_yandex},
{country_codes::CountryCharsToCountryID('A', 'T'),
&brave_engines_with_ecosia},
{country_codes::CountryCharsToCountryID('A', 'U'),
&brave_engines_AU_IE},
{country_codes::CountryCharsToCountryID('A', 'Z'),
&brave_engines_with_yandex},
{country_codes::CountryCharsToCountryID('A', 'U'),
&brave_engines_AU_NZ_IE},
{country_codes::CountryCharsToCountryID('B', 'E'),
&brave_engines_with_ecosia},
{country_codes::CountryCharsToCountryID('B', 'Y'),
&brave_engines_with_yandex},
{country_codes::CountryCharsToCountryID('C', 'A'),
&brave_engines_with_ecosia},
{country_codes::CountryCharsToCountryID('C', 'H'),
&brave_engines_with_ecosia},
{country_codes::CountryCharsToCountryID('D', 'E'), &brave_engines_DE},
{country_codes::CountryCharsToCountryID('D', 'K'),
&brave_engines_with_ecosia},
{country_codes::CountryCharsToCountryID('E', 'S'),
&brave_engines_with_ecosia},
{country_codes::CountryCharsToCountryID('F', 'I'),
&brave_engines_with_ecosia},
{country_codes::CountryCharsToCountryID('F', 'R'), &brave_engines_FR},
{country_codes::CountryCharsToCountryID('G', 'B'),
&brave_engines_with_ecosia},
{country_codes::CountryCharsToCountryID('G', 'R'),
&brave_engines_with_ecosia},
{country_codes::CountryCharsToCountryID('H', 'U'),
&brave_engines_with_ecosia},
{country_codes::CountryCharsToCountryID('I', 'E'),
&brave_engines_AU_NZ_IE},
&brave_engines_AU_IE},
{country_codes::CountryCharsToCountryID('I', 'T'),
&brave_engines_with_ecosia},
{country_codes::CountryCharsToCountryID('K', 'G'),
&brave_engines_with_yandex},
{country_codes::CountryCharsToCountryID('K', 'Z'),
&brave_engines_with_yandex},
{country_codes::CountryCharsToCountryID('L', 'U'),
&brave_engines_with_ecosia},
{country_codes::CountryCharsToCountryID('M', 'D'),
&brave_engines_with_yandex},
{country_codes::CountryCharsToCountryID('N', 'L'),
&brave_engines_with_ecosia},
{country_codes::CountryCharsToCountryID('N', 'O'),
&brave_engines_with_ecosia},
{country_codes::CountryCharsToCountryID('N', 'Z'),
&brave_engines_AU_NZ_IE},
&brave_engines_NZ},
{country_codes::CountryCharsToCountryID('P', 'T'),
&brave_engines_with_ecosia},
{country_codes::CountryCharsToCountryID('R', 'U'),
&brave_engines_with_yandex},
{country_codes::CountryCharsToCountryID('S', 'E'),
Expand Down
2 changes: 1 addition & 1 deletion components/search_engines/brave_prepopulated_engines.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace TemplateURLPrepopulateData {

// IMPORTANT! Make sure to bump this value if you make changes to the
// engines below or add/remove engines.
const int kBraveCurrentDataVersion = 11;
const int kBraveCurrentDataVersion = 12;
// DO NOT CHANGE THIS ONE. Used for backfilling kBraveDefaultSearchVersion.
const int kBraveFirstTrackedDataVersion = 6;

Expand Down

0 comments on commit 7fd5003

Please sign in to comment.