diff options
Diffstat (limited to 'www/chromium-uc/patches/extra/ungoogled-chromium/prepopulated-search-engines.patch')
| -rw-r--r-- | www/chromium-uc/patches/extra/ungoogled-chromium/prepopulated-search-engines.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/prepopulated-search-engines.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/prepopulated-search-engines.patch new file mode 100644 index 0000000..58e1587 --- /dev/null +++ b/www/chromium-uc/patches/extra/ungoogled-chromium/prepopulated-search-engines.patch | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | ## template_url_prepopulate_data.cc | ||
| 2 | # Appends search engines to the returned list of prepopulated search engines. | ||
| 3 | # Only add DDG if it hasn't already been included. | ||
| 4 | # | ||
| 5 | ## util.cc | ||
| 6 | # Only snyc the prepoulated search engines when initializing the database. | ||
| 7 | # Prevents search engines from being overridden in future updates. | ||
| 8 | # | ||
| 9 | --- components/search_engines/template_url_prepopulate_data.cc.orig | ||
| 10 | +++ components/search_engines/template_url_prepopulate_data.cc | ||
| 11 | @@ -1325,6 +1325,9 @@ std::vector<std::unique_ptr<TemplateURLD | ||
| 12 | std::vector<std::unique_ptr<TemplateURLData>> t_urls; | ||
| 13 | for (size_t i = 0; i < num_engines; ++i) | ||
| 14 | t_urls.push_back(TemplateURLDataFromPrepopulatedEngine(*engines[i])); | ||
| 15 | + if (std::find(engines, engines + num_engines, &duckduckgo) == engines + num_engines) { | ||
| 16 | + t_urls.push_back(TemplateURLDataFromPrepopulatedEngine(duckduckgo)); | ||
| 17 | + } | ||
| 18 | return t_urls; | ||
| 19 | } | ||
| 20 | |||
| 21 | --- components/search_engines/util.cc.orig | ||
| 22 | +++ components/search_engines/util.cc | ||
| 23 | @@ -396,7 +396,7 @@ void GetSearchProvidersUsingLoadedEngine | ||
| 24 | |||
| 25 | const int prepopulate_resource_keyword_version = | ||
| 26 | TemplateURLPrepopulateData::GetDataVersion(prefs); | ||
| 27 | - if (*resource_keyword_version < prepopulate_resource_keyword_version) { | ||
| 28 | + if (*resource_keyword_version == 0) { | ||
| 29 | MergeEnginesFromPrepopulateData(service, &prepopulated_urls, template_urls, | ||
| 30 | default_search_provider, | ||
| 31 | removed_keyword_guids); | ||
