浏览代码

Release 73.0.3683.79

csagan5 6 年之前
父节点
当前提交
e012e0aa9f

+ 5 - 0
CHANGELOG.md

@@ -1,3 +1,8 @@
+# 73.0.3683.79
+* add missing Qwant engine from default engines list (fixes https://github.com/bromite/bromite/issues/262)
+* DoH: include upstream patch for DNS secure mode
+* DoH: enable DNS secure mode by default
+
 # 73.0.3683.70
 
 # 73.0.3683.61

文件差异内容过多而无法显示
+ 107 - 20
build/filters/adblock_entries.h


+ 1011 - 0
build/patches/Add-Qwant-search-engine.patch

@@ -0,0 +1,1011 @@
+From: csagan5 <32685696+csagan5@users.noreply.github.com>
+Date: Mon, 12 Mar 2018 20:31:44 +0100
+Subject: Add Qwant search engine
+
+Specify image URL in upstream engine definition
+Make search engine selectable in default list
+---
+ .../search_engines/prepopulated_engines.json       |   3 +-
+ .../template_url_prepopulate_data.cc               | 218 ++++++++++-----------
+ 2 files changed, 111 insertions(+), 110 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
+@@ -28,7 +28,7 @@
+     // Increment this if you change the data in ways that mean users with
+     // existing data should get a new version. Otherwise, existing data may
+     // continue to be used and updates made here will not always appear.
+-    "kCurrentDataVersion": 112
++    "kCurrentDataVersion": 113
+   },
+ 
+   // The following engines are included in country lists and are added to the
+@@ -196,6 +196,7 @@
+       "favicon_url": "https://www.qwant.com/favicon.ico",
+       "search_url": "https://www.qwant.com/?q={searchTerms}&client=opensearch",
+       "suggest_url": "https://api.qwant.com/api/suggest/?q={searchTerms}&client=opensearch",
++      "image_url": "https://www.qwant.com/?t=images&q={searchTerms}",
+       "type": "SEARCH_ENGINE_QWANT",
+       "id": 94
+     },
+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
+@@ -32,7 +32,7 @@ namespace {
+ 
+ // Default (for countries with no better engine set)
+ const PrepopulatedEngine* const engines_default[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -42,7 +42,7 @@ const PrepopulatedEngine* const engines_default[] = {
+ // Engine selection by country ------------------------------------------------
+ // United Arab Emirates
+ const PrepopulatedEngine* const engines_AE[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -50,7 +50,7 @@ const PrepopulatedEngine* const engines_AE[] = {
+ 
+ // Albania
+ const PrepopulatedEngine* const engines_AL[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yahoo,
+     &bing,
+     &ask,
+@@ -58,7 +58,7 @@ const PrepopulatedEngine* const engines_AL[] = {
+ 
+ // Argentina
+ const PrepopulatedEngine* const engines_AR[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo_ar,
+     &duckduckgo, &duckduckgo_light,
+@@ -66,7 +66,7 @@ const PrepopulatedEngine* const engines_AR[] = {
+ 
+ // Austria
+ const PrepopulatedEngine* const engines_AT[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo_at,
+     &duckduckgo, &duckduckgo_light,
+@@ -74,7 +74,7 @@ const PrepopulatedEngine* const engines_AT[] = {
+ 
+ // Australia
+ const PrepopulatedEngine* const engines_AU[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo_au,
+     &duckduckgo, &duckduckgo_light,
+@@ -82,7 +82,7 @@ const PrepopulatedEngine* const engines_AU[] = {
+ 
+ // Bosnia and Herzegovina
+ const PrepopulatedEngine* const engines_BA[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yahoo,
+     &bing,
+     &ask,
+@@ -90,7 +90,7 @@ const PrepopulatedEngine* const engines_BA[] = {
+ 
+ // Belgium
+ const PrepopulatedEngine* const engines_BE[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -98,7 +98,7 @@ const PrepopulatedEngine* const engines_BE[] = {
+ 
+ // Bulgaria
+ const PrepopulatedEngine* const engines_BG[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &yandex_ru,
+@@ -106,7 +106,7 @@ const PrepopulatedEngine* const engines_BG[] = {
+ 
+ // Bahrain
+ const PrepopulatedEngine* const engines_BH[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &ask,
+@@ -114,7 +114,7 @@ const PrepopulatedEngine* const engines_BH[] = {
+ 
+ // Burundi
+ const PrepopulatedEngine* const engines_BI[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &yandex_ru,
+@@ -122,7 +122,7 @@ const PrepopulatedEngine* const engines_BI[] = {
+ 
+ // Brunei
+ const PrepopulatedEngine* const engines_BN[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -130,7 +130,7 @@ const PrepopulatedEngine* const engines_BN[] = {
+ 
+ // Bolivia
+ const PrepopulatedEngine* const engines_BO[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -138,7 +138,7 @@ const PrepopulatedEngine* const engines_BO[] = {
+ 
+ // Brazil
+ const PrepopulatedEngine* const engines_BR[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo_br,
+     &duckduckgo, &duckduckgo_light,
+@@ -146,7 +146,7 @@ const PrepopulatedEngine* const engines_BR[] = {
+ 
+ // Belarus
+ const PrepopulatedEngine* const engines_BY[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yandex_by,
+     &mail_ru,
+     &bing,
+@@ -154,7 +154,7 @@ const PrepopulatedEngine* const engines_BY[] = {
+ 
+ // Belize
+ const PrepopulatedEngine* const engines_BZ[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -162,12 +162,12 @@ const PrepopulatedEngine* const engines_BZ[] = {
+ 
+ // Canada
+ const PrepopulatedEngine* const engines_CA[] = {
+-    &googleen, &google, &startpage, &bing, &yahoo_ca, &yahoo_qc, &duckduckgo, &duckduckgo_light,
++    &googleen, &google, &startpage, &qwant, &bing, &yahoo_ca, &yahoo_qc, &duckduckgo, &duckduckgo_light,
+ };
+ 
+ // Switzerland
+ const PrepopulatedEngine* const engines_CH[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &duckduckgo, &duckduckgo_light,
+     &yahoo_ch,
+@@ -175,7 +175,7 @@ const PrepopulatedEngine* const engines_CH[] = {
+ 
+ // Chile
+ const PrepopulatedEngine* const engines_CL[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo_cl,
+     &duckduckgo, &duckduckgo_light,
+@@ -183,12 +183,12 @@ const PrepopulatedEngine* const engines_CL[] = {
+ 
+ // China
+ const PrepopulatedEngine* const engines_CN[] = {
+-    &baidu, &so_360, &googleen, &google, &startpage, &sogou, &bing,
++    &baidu, &so_360, &googleen, &google, &startpage, &qwant, &sogou, &bing,
+ };
+ 
+ // Colombia
+ const PrepopulatedEngine* const engines_CO[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yahoo_co,
+     &bing,
+     &duckduckgo, &duckduckgo_light,
+@@ -196,7 +196,7 @@ const PrepopulatedEngine* const engines_CO[] = {
+ 
+ // Costa Rica
+ const PrepopulatedEngine* const engines_CR[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -204,7 +204,7 @@ const PrepopulatedEngine* const engines_CR[] = {
+ 
+ // Czech Republic
+ const PrepopulatedEngine* const engines_CZ[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &seznam,
+     &bing,
+     &yahoo,
+@@ -212,7 +212,7 @@ const PrepopulatedEngine* const engines_CZ[] = {
+ 
+ // Germany
+ const PrepopulatedEngine* const engines_DE[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo_de,
+     &duckduckgo, &duckduckgo_light,
+@@ -220,7 +220,7 @@ const PrepopulatedEngine* const engines_DE[] = {
+ 
+ // Denmark
+ const PrepopulatedEngine* const engines_DK[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo_dk,
+     &duckduckgo, &duckduckgo_light,
+@@ -228,7 +228,7 @@ const PrepopulatedEngine* const engines_DK[] = {
+ 
+ // Dominican Republic
+ const PrepopulatedEngine* const engines_DO[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -236,7 +236,7 @@ const PrepopulatedEngine* const engines_DO[] = {
+ 
+ // Algeria
+ const PrepopulatedEngine* const engines_DZ[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yahoo,
+     &bing,
+     &yandex_ru,
+@@ -244,7 +244,7 @@ const PrepopulatedEngine* const engines_DZ[] = {
+ 
+ // Ecuador
+ const PrepopulatedEngine* const engines_EC[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -252,7 +252,7 @@ const PrepopulatedEngine* const engines_EC[] = {
+ 
+ // Estonia
+ const PrepopulatedEngine* const engines_EE[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yandex_ru,
+     &neti,
+@@ -260,7 +260,7 @@ const PrepopulatedEngine* const engines_EE[] = {
+ 
+ // Egypt
+ const PrepopulatedEngine* const engines_EG[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yahoo,
+     &bing,
+     &yandex_ru,
+@@ -268,7 +268,7 @@ const PrepopulatedEngine* const engines_EG[] = {
+ 
+ // Spain
+ const PrepopulatedEngine* const engines_ES[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo_es,
+     &duckduckgo, &duckduckgo_light,
+@@ -276,7 +276,7 @@ const PrepopulatedEngine* const engines_ES[] = {
+ 
+ // Finland
+ const PrepopulatedEngine* const engines_FI[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo_fi,
+     &duckduckgo, &duckduckgo_light,
+@@ -284,7 +284,7 @@ const PrepopulatedEngine* const engines_FI[] = {
+ 
+ // Faroe Islands
+ const PrepopulatedEngine* const engines_FO[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -292,7 +292,7 @@ const PrepopulatedEngine* const engines_FO[] = {
+ 
+ // France
+ const PrepopulatedEngine* const engines_FR[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo_fr,
+     &qwant,
+@@ -300,7 +300,7 @@ const PrepopulatedEngine* const engines_FR[] = {
+ 
+ // United Kingdom
+ const PrepopulatedEngine* const engines_GB[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo_uk,
+     &duckduckgo, &duckduckgo_light,
+@@ -308,7 +308,7 @@ const PrepopulatedEngine* const engines_GB[] = {
+ 
+ // Greece
+ const PrepopulatedEngine* const engines_GR[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -316,7 +316,7 @@ const PrepopulatedEngine* const engines_GR[] = {
+ 
+ // Guatemala
+ const PrepopulatedEngine* const engines_GT[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -324,7 +324,7 @@ const PrepopulatedEngine* const engines_GT[] = {
+ 
+ // Hong Kong
+ const PrepopulatedEngine* const engines_HK[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yahoo_hk,
+     &bing,
+     &baidu,
+@@ -332,7 +332,7 @@ const PrepopulatedEngine* const engines_HK[] = {
+ 
+ // Honduras
+ const PrepopulatedEngine* const engines_HN[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -340,7 +340,7 @@ const PrepopulatedEngine* const engines_HN[] = {
+ 
+ // Croatia
+ const PrepopulatedEngine* const engines_HR[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -348,7 +348,7 @@ const PrepopulatedEngine* const engines_HR[] = {
+ 
+ // Hungary
+ const PrepopulatedEngine* const engines_HU[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yahoo,
+     &bing,
+     &duckduckgo, &duckduckgo_light,
+@@ -356,7 +356,7 @@ const PrepopulatedEngine* const engines_HU[] = {
+ 
+ // Indonesia
+ const PrepopulatedEngine* const engines_ID[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yahoo_id,
+     &bing,
+     &duckduckgo, &duckduckgo_light,
+@@ -364,7 +364,7 @@ const PrepopulatedEngine* const engines_ID[] = {
+ 
+ // Ireland
+ const PrepopulatedEngine* const engines_IE[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -372,7 +372,7 @@ const PrepopulatedEngine* const engines_IE[] = {
+ 
+ // Israel
+ const PrepopulatedEngine* const engines_IL[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &yandex_ru,
+@@ -380,7 +380,7 @@ const PrepopulatedEngine* const engines_IL[] = {
+ 
+ // India
+ const PrepopulatedEngine* const engines_IN[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yahoo_in,
+     &bing,
+     &duckduckgo, &duckduckgo_light,
+@@ -388,7 +388,7 @@ const PrepopulatedEngine* const engines_IN[] = {
+ 
+ // Iraq
+ const PrepopulatedEngine* const engines_IQ[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yahoo,
+     &bing,
+     &yandex_ru,
+@@ -396,7 +396,7 @@ const PrepopulatedEngine* const engines_IQ[] = {
+ 
+ // Iran
+ const PrepopulatedEngine* const engines_IR[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &parsijoo,
+@@ -404,7 +404,7 @@ const PrepopulatedEngine* const engines_IR[] = {
+ 
+ // Iceland
+ const PrepopulatedEngine* const engines_IS[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -412,7 +412,7 @@ const PrepopulatedEngine* const engines_IS[] = {
+ 
+ // Italy
+ const PrepopulatedEngine* const engines_IT[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -420,7 +420,7 @@ const PrepopulatedEngine* const engines_IT[] = {
+ 
+ // Jamaica
+ const PrepopulatedEngine* const engines_JM[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -428,7 +428,7 @@ const PrepopulatedEngine* const engines_JM[] = {
+ 
+ // Jordan
+ const PrepopulatedEngine* const engines_JO[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yahoo,
+     &bing,
+     &yandex_ru,
+@@ -436,7 +436,7 @@ const PrepopulatedEngine* const engines_JO[] = {
+ 
+ // Japan
+ const PrepopulatedEngine* const engines_JP[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yahoo_jp,
+     &bing,
+     &baidu,
+@@ -444,7 +444,7 @@ const PrepopulatedEngine* const engines_JP[] = {
+ 
+ // Kenya
+ const PrepopulatedEngine* const engines_KE[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yahoo,
+     &bing,
+     &duckduckgo, &duckduckgo_light,
+@@ -452,7 +452,7 @@ const PrepopulatedEngine* const engines_KE[] = {
+ 
+ // South Korea
+ const PrepopulatedEngine* const engines_KR[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &naver,
+     &daum,
+     &bing,
+@@ -460,7 +460,7 @@ const PrepopulatedEngine* const engines_KR[] = {
+ 
+ // Kuwait
+ const PrepopulatedEngine* const engines_KW[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &ask,
+@@ -468,7 +468,7 @@ const PrepopulatedEngine* const engines_KW[] = {
+ 
+ // Kazakhstan
+ const PrepopulatedEngine* const engines_KZ[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yandex_kz,
+     &mail_ru,
+     &bing,
+@@ -476,7 +476,7 @@ const PrepopulatedEngine* const engines_KZ[] = {
+ 
+ // Lebanon
+ const PrepopulatedEngine* const engines_LB[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -484,7 +484,7 @@ const PrepopulatedEngine* const engines_LB[] = {
+ 
+ // Liechtenstein
+ const PrepopulatedEngine* const engines_LI[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &duckduckgo, &duckduckgo_light,
+     &yahoo,
+@@ -492,7 +492,7 @@ const PrepopulatedEngine* const engines_LI[] = {
+ 
+ // Lithuania
+ const PrepopulatedEngine* const engines_LT[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &yandex_ru,
+@@ -500,7 +500,7 @@ const PrepopulatedEngine* const engines_LT[] = {
+ 
+ // Luxembourg
+ const PrepopulatedEngine* const engines_LU[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &duckduckgo, &duckduckgo_light,
+     &yahoo,
+@@ -508,7 +508,7 @@ const PrepopulatedEngine* const engines_LU[] = {
+ 
+ // Latvia
+ const PrepopulatedEngine* const engines_LV[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yandex_ru,
+     &yahoo,
+@@ -516,7 +516,7 @@ const PrepopulatedEngine* const engines_LV[] = {
+ 
+ // Libya
+ const PrepopulatedEngine* const engines_LY[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yahoo,
+     &bing,
+     &yandex_com,
+@@ -524,7 +524,7 @@ const PrepopulatedEngine* const engines_LY[] = {
+ 
+ // Morocco
+ const PrepopulatedEngine* const engines_MA[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yahoo,
+     &bing,
+     &yandex_ru,
+@@ -532,7 +532,7 @@ const PrepopulatedEngine* const engines_MA[] = {
+ 
+ // Monaco
+ const PrepopulatedEngine* const engines_MC[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -540,7 +540,7 @@ const PrepopulatedEngine* const engines_MC[] = {
+ 
+ // Moldova
+ const PrepopulatedEngine* const engines_MD[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yandex_ru,
+     &mail_ru,
+     &duckduckgo, &duckduckgo_light,
+@@ -548,7 +548,7 @@ const PrepopulatedEngine* const engines_MD[] = {
+ 
+ // Montenegro
+ const PrepopulatedEngine* const engines_ME[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yahoo,
+     &bing,
+     &yandex_ru,
+@@ -556,7 +556,7 @@ const PrepopulatedEngine* const engines_ME[] = {
+ 
+ // Macedonia
+ const PrepopulatedEngine* const engines_MK[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yahoo,
+     &bing,
+     &duckduckgo, &duckduckgo_light,
+@@ -564,7 +564,7 @@ const PrepopulatedEngine* const engines_MK[] = {
+ 
+ // Mexico
+ const PrepopulatedEngine* const engines_MX[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo_mx,
+     &duckduckgo, &duckduckgo_light,
+@@ -572,7 +572,7 @@ const PrepopulatedEngine* const engines_MX[] = {
+ 
+ // Malaysia
+ const PrepopulatedEngine* const engines_MY[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yahoo_my,
+     &bing,
+     &baidu,
+@@ -580,7 +580,7 @@ const PrepopulatedEngine* const engines_MY[] = {
+ 
+ // Nicaragua
+ const PrepopulatedEngine* const engines_NI[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -588,7 +588,7 @@ const PrepopulatedEngine* const engines_NI[] = {
+ 
+ // Netherlands
+ const PrepopulatedEngine* const engines_NL[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo_nl,
+     &duckduckgo, &duckduckgo_light,
+@@ -596,7 +596,7 @@ const PrepopulatedEngine* const engines_NL[] = {
+ 
+ // Norway
+ const PrepopulatedEngine* const engines_NO[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -604,7 +604,7 @@ const PrepopulatedEngine* const engines_NO[] = {
+ 
+ // New Zealand
+ const PrepopulatedEngine* const engines_NZ[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &duckduckgo, &duckduckgo_light,
+     &yahoo_nz,
+@@ -612,7 +612,7 @@ const PrepopulatedEngine* const engines_NZ[] = {
+ 
+ // Oman
+ const PrepopulatedEngine* const engines_OM[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &ask,
+@@ -620,7 +620,7 @@ const PrepopulatedEngine* const engines_OM[] = {
+ 
+ // Panama
+ const PrepopulatedEngine* const engines_PA[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -628,7 +628,7 @@ const PrepopulatedEngine* const engines_PA[] = {
+ 
+ // Peru
+ const PrepopulatedEngine* const engines_PE[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yahoo_pe,
+     &bing,
+     &duckduckgo, &duckduckgo_light,
+@@ -636,7 +636,7 @@ const PrepopulatedEngine* const engines_PE[] = {
+ 
+ // Philippines
+ const PrepopulatedEngine* const engines_PH[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yahoo_ph,
+     &bing,
+     &duckduckgo, &duckduckgo_light,
+@@ -644,7 +644,7 @@ const PrepopulatedEngine* const engines_PH[] = {
+ 
+ // Pakistan
+ const PrepopulatedEngine* const engines_PK[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yahoo,
+     &bing,
+     &baidu,
+@@ -652,7 +652,7 @@ const PrepopulatedEngine* const engines_PK[] = {
+ 
+ // Poland
+ const PrepopulatedEngine* const engines_PL[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -660,7 +660,7 @@ const PrepopulatedEngine* const engines_PL[] = {
+ 
+ // Puerto Rico
+ const PrepopulatedEngine* const engines_PR[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -668,7 +668,7 @@ const PrepopulatedEngine* const engines_PR[] = {
+ 
+ // Portugal
+ const PrepopulatedEngine* const engines_PT[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -676,7 +676,7 @@ const PrepopulatedEngine* const engines_PT[] = {
+ 
+ // Paraguay
+ const PrepopulatedEngine* const engines_PY[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -684,7 +684,7 @@ const PrepopulatedEngine* const engines_PY[] = {
+ 
+ // Qatar
+ const PrepopulatedEngine* const engines_QA[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &ask,
+@@ -692,7 +692,7 @@ const PrepopulatedEngine* const engines_QA[] = {
+ 
+ // Romania
+ const PrepopulatedEngine* const engines_RO[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -700,7 +700,7 @@ const PrepopulatedEngine* const engines_RO[] = {
+ 
+ // Serbia
+ const PrepopulatedEngine* const engines_RS[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yahoo,
+     &bing,
+     &duckduckgo, &duckduckgo_light,
+@@ -709,14 +709,14 @@ const PrepopulatedEngine* const engines_RS[] = {
+ // Russia
+ const PrepopulatedEngine* const engines_RU[] = {
+     &yandex_ru,
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &mail_ru,
+     &bing,
+ };
+ 
+ // Rwanda
+ const PrepopulatedEngine* const engines_RW[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &yandex_ru,
+@@ -724,7 +724,7 @@ const PrepopulatedEngine* const engines_RW[] = {
+ 
+ // Saudi Arabia
+ const PrepopulatedEngine* const engines_SA[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &yandex_com,
+@@ -732,7 +732,7 @@ const PrepopulatedEngine* const engines_SA[] = {
+ 
+ // Sweden
+ const PrepopulatedEngine* const engines_SE[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo_se,
+     &duckduckgo, &duckduckgo_light,
+@@ -740,7 +740,7 @@ const PrepopulatedEngine* const engines_SE[] = {
+ 
+ // Singapore
+ const PrepopulatedEngine* const engines_SG[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo_sg,
+     &yandex_com,
+@@ -748,7 +748,7 @@ const PrepopulatedEngine* const engines_SG[] = {
+ 
+ // Slovenia
+ const PrepopulatedEngine* const engines_SI[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -756,7 +756,7 @@ const PrepopulatedEngine* const engines_SI[] = {
+ 
+ // Slovakia
+ const PrepopulatedEngine* const engines_SK[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -764,7 +764,7 @@ const PrepopulatedEngine* const engines_SK[] = {
+ 
+ // El Salvador
+ const PrepopulatedEngine* const engines_SV[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -772,7 +772,7 @@ const PrepopulatedEngine* const engines_SV[] = {
+ 
+ // Syria
+ const PrepopulatedEngine* const engines_SY[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &yandex_ru,
+@@ -780,7 +780,7 @@ const PrepopulatedEngine* const engines_SY[] = {
+ 
+ // Thailand
+ const PrepopulatedEngine* const engines_TH[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yahoo_th,
+     &bing,
+     &ask,
+@@ -788,7 +788,7 @@ const PrepopulatedEngine* const engines_TH[] = {
+ 
+ // Tunisia
+ const PrepopulatedEngine* const engines_TN[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yahoo,
+     &bing,
+     &yandex_ru,
+@@ -796,7 +796,7 @@ const PrepopulatedEngine* const engines_TN[] = {
+ 
+ // Turkey
+ const PrepopulatedEngine* const engines_TR[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yandex_tr,
+     &yahoo_tr,
+     &bing,
+@@ -804,7 +804,7 @@ const PrepopulatedEngine* const engines_TR[] = {
+ 
+ // Trinidad and Tobago
+ const PrepopulatedEngine* const engines_TT[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -812,7 +812,7 @@ const PrepopulatedEngine* const engines_TT[] = {
+ 
+ // Taiwan
+ const PrepopulatedEngine* const engines_TW[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yahoo_tw,
+     &bing,
+     &baidu,
+@@ -820,7 +820,7 @@ const PrepopulatedEngine* const engines_TW[] = {
+ 
+ // Tanzania
+ const PrepopulatedEngine* const engines_TZ[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &yandex_ru,
+@@ -828,7 +828,7 @@ const PrepopulatedEngine* const engines_TZ[] = {
+ 
+ // Ukraine
+ const PrepopulatedEngine* const engines_UA[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yandex_ua,
+     &mail_ru,
+     &bing,
+@@ -836,7 +836,7 @@ const PrepopulatedEngine* const engines_UA[] = {
+ 
+ // United States
+ const PrepopulatedEngine* const engines_US[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -844,7 +844,7 @@ const PrepopulatedEngine* const engines_US[] = {
+ 
+ // Uruguay
+ const PrepopulatedEngine* const engines_UY[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -852,7 +852,7 @@ const PrepopulatedEngine* const engines_UY[] = {
+ 
+ // Venezuela
+ const PrepopulatedEngine* const engines_VE[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &yahoo_ve,
+     &bing,
+     &duckduckgo, &duckduckgo_light,
+@@ -860,7 +860,7 @@ const PrepopulatedEngine* const engines_VE[] = {
+ 
+ // Vietnam
+ const PrepopulatedEngine* const engines_VN[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &coccoc,
+     &bing,
+     &yahoo_vn,
+@@ -868,7 +868,7 @@ const PrepopulatedEngine* const engines_VN[] = {
+ 
+ // Yemen
+ const PrepopulatedEngine* const engines_YE[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &baidu,
+@@ -876,7 +876,7 @@ const PrepopulatedEngine* const engines_YE[] = {
+ 
+ // South Africa
+ const PrepopulatedEngine* const engines_ZA[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &duckduckgo, &duckduckgo_light,
+@@ -884,7 +884,7 @@ const PrepopulatedEngine* const engines_ZA[] = {
+ 
+ // Zimbabwe
+ const PrepopulatedEngine* const engines_ZW[] = {
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &bing,
+     &yahoo,
+     &baidu,
+@@ -900,7 +900,7 @@ const PrepopulatedEngine* const kAllEngines[] = {
+     &coccoc,
+     &daum,
+     &duckduckgo, &duckduckgo_light,
+-    &googleen, &google, &startpage,
++    &googleen, &google, &startpage, &qwant,
+     &mail_ru,
+     &naver,
+     &parsijoo,
+-- 
+2.11.0
+

+ 3 - 3
build/patches/Allow-building-without-safebrowsing-for-Android.patch

@@ -228,7 +228,7 @@ diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrom
  #include "chrome/grit/generated_resources.h"
  #include "components/download/public/common/download_interrupt_reasons.h"
  #include "components/download/public/common/download_item.h"
-@@ -94,8 +98,10 @@
+@@ -101,8 +105,10 @@
  using content::BrowserThread;
  using download::DownloadItem;
  using content::DownloadManager;
@@ -239,7 +239,7 @@ diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrom
  
  namespace {
  
-@@ -744,19 +750,19 @@ ChromeDownloadManagerDelegate::ApplicationClientIdForFileScanning() const {
+@@ -764,19 +770,19 @@ ChromeDownloadManagerDelegate::ApplicationClientIdForFileScanning() const {
    return std::string(chrome::kApplicationClientIDStringForAVScanning);
  }
  
@@ -261,7 +261,7 @@ diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrom
  
  void ChromeDownloadManagerDelegate::NotifyExtensions(
      DownloadItem* download,
-@@ -1199,13 +1205,17 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDetermined(
+@@ -1219,13 +1225,17 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDetermined(
        DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true);
  #endif
  

+ 49 - 0
build/patches/Enable-secure-DNS-mode-by-default-in-DnsTransaction.patch

@@ -0,0 +1,49 @@
+From: csagan5 <32685696+csagan5@users.noreply.github.com>
+Date: Fri, 15 Mar 2019 10:05:14 +0100
+Subject: Enable secure DNS mode by default in DnsTransaction.
+
+---
+ chrome/browser/net/dns_probe_runner.cc                | 2 +-
+ components/certificate_transparency/log_dns_client.cc | 2 +-
+ net/dns/host_resolver_impl.cc                         | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/chrome/browser/net/dns_probe_runner.cc b/chrome/browser/net/dns_probe_runner.cc
+--- a/chrome/browser/net/dns_probe_runner.cc
++++ b/chrome/browser/net/dns_probe_runner.cc
+@@ -110,7 +110,7 @@ void DnsProbeRunner::RunProbe(const base::Closure& callback) {
+       kKnownGoodHostname, net::dns_protocol::kTypeA,
+       base::Bind(&DnsProbeRunner::OnTransactionComplete,
+                  weak_factory_.GetWeakPtr()),
+-      NetLogWithSource(), net::SecureDnsMode::AUTOMATIC);
++      NetLogWithSource(), net::SecureDnsMode::SECURE);
+ 
+   transaction_->Start();
+ }
+diff --git a/components/certificate_transparency/log_dns_client.cc b/components/certificate_transparency/log_dns_client.cc
+--- a/components/certificate_transparency/log_dns_client.cc
++++ b/components/certificate_transparency/log_dns_client.cc
+@@ -472,7 +472,7 @@ bool AuditProofQueryImpl::StartDnsTransaction(const std::string& qname) {
+       qname, net::dns_protocol::kTypeTXT,
+       base::BindOnce(&AuditProofQueryImpl::OnDnsTransactionComplete,
+                      weak_ptr_factory_.GetWeakPtr()),
+-      net_log_, net::SecureDnsMode::AUTOMATIC);
++      net_log_, net::SecureDnsMode::SECURE);
+ 
+   current_dns_transaction_->Start();
+   return true;
+diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc
+--- a/net/dns/host_resolver_impl.cc
++++ b/net/dns/host_resolver_impl.cc
+@@ -1066,7 +1066,7 @@ class HostResolverImpl::DnsTask : public base::SupportsWeakPtr<DnsTask> {
+             base::BindOnce(&DnsTask::OnTransactionComplete,
+                            base::Unretained(this), tick_clock_->NowTicks(),
+                            dns_query_type),
+-            net_log_, SecureDnsMode::AUTOMATIC);
++            net_log_, SecureDnsMode::SECURE);
+     trans->SetRequestContext(delegate_->url_request_context());
+     trans->SetRequestPriority(delegate_->priority());
+     return trans;
+-- 
+2.11.0
+

+ 0 - 22
build/patches/Specify-image-URL-for-Qwant-search-engine.patch

@@ -1,22 +0,0 @@
-From: csagan5 <32685696+csagan5@users.noreply.github.com>
-Date: Mon, 12 Mar 2018 20:31:44 +0100
-Subject: Specify image URL for Qwant search engine
-
----
- components/search_engines/prepopulated_engines.json | 1 +
- 1 file changed, 1 insertion(+)
-
-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
-@@ -186,6 +186,7 @@
-       "favicon_url": "https://www.qwant.com/favicon.ico",
-       "search_url": "https://www.qwant.com/?q={searchTerms}&client=opensearch",
-       "suggest_url": "https://api.qwant.com/api/suggest/?q={searchTerms}&client=opensearch",
-+      "image_url": "https://www.qwant.com/?t=images&q={searchTerms}",
-       "type": "SEARCH_ENGINE_QWANT",
-       "id": 94
-     },
--- 
-2.11.0
-

+ 481 - 0
build/patches/Support-different-secure-DNS-modes-within-DnsTransaction.patch

@@ -0,0 +1,481 @@
+From: dalyk <dalyk@google.com>
+Date: Wed, 13 Feb 2019 17:50:04 +0000
+Subject: Support different secure DNS modes within DnsTransaction.
+
+In SECURE mode, only DnsHTTPAttempts should be made. In AUTOMATIC mode,
+DnsHTTPAttempts should be made first, before falling back to insecure
+attempts. In OFF mode, only insecure attempts should be made.
+
+Follow-up work will correct cache lookups for SECURE and AUTOMATIC modes,
+remove the system resolver fallback for SECURE mode, set the mode
+based on the pref setting, and make AUTOMATIC mode more conservative by
+incorporating state related to DoH (DoH probes, successive DoH failures).
+
+There should be no change in behavior experienced by users configuring
+DoH via the command line since AUTOMATIC mode is used for all queries
+currently.
+
+Bug: 878582
+Change-Id: I5539c5273eb846c95f9a7cdab95429522bc43f50
+Reviewed-on: https://chromium-review.googlesource.com/c/1450858
+Reviewed-by: Paul Jensen <pauljensen@chromium.org>
+Commit-Queue: Katharine Daly <dalyk@google.com>
+Cr-Commit-Position: refs/heads/master@{#631784}
+---
+ chrome/browser/net/dns_probe_runner.cc             |  3 +-
+ .../certificate_transparency/log_dns_client.cc     |  3 +-
+ net/dns/BUILD.gn                                   |  1 +
+ net/dns/dns_test_util.cc                           |  3 +-
+ net/dns/dns_transaction.cc                         | 42 ++++++---
+ net/dns/dns_transaction.h                          | 10 ++-
+ net/dns/dns_transaction_unittest.cc                | 99 ++++++++++++++++++++--
+ net/dns/dns_util.h                                 | 12 +++
+ net/dns/host_resolver_impl.cc                      |  2 +-
+ 9 files changed, 154 insertions(+), 21 deletions(-)
+
+diff --git a/chrome/browser/net/dns_probe_runner.cc b/chrome/browser/net/dns_probe_runner.cc
+--- a/chrome/browser/net/dns_probe_runner.cc
++++ b/chrome/browser/net/dns_probe_runner.cc
+@@ -17,6 +17,7 @@
+ #include "net/dns/dns_client.h"
+ #include "net/dns/dns_response.h"
+ #include "net/dns/dns_transaction.h"
++#include "net/dns/dns_util.h"
+ #include "net/dns/public/dns_protocol.h"
+ #include "net/log/net_log_with_source.h"
+ 
+@@ -109,7 +110,7 @@ void DnsProbeRunner::RunProbe(const base::Closure& callback) {
+       kKnownGoodHostname, net::dns_protocol::kTypeA,
+       base::Bind(&DnsProbeRunner::OnTransactionComplete,
+                  weak_factory_.GetWeakPtr()),
+-      NetLogWithSource());
++      NetLogWithSource(), net::SecureDnsMode::AUTOMATIC);
+ 
+   transaction_->Start();
+ }
+diff --git a/components/certificate_transparency/log_dns_client.cc b/components/certificate_transparency/log_dns_client.cc
+--- a/components/certificate_transparency/log_dns_client.cc
++++ b/components/certificate_transparency/log_dns_client.cc
+@@ -27,6 +27,7 @@
+ #include "net/dns/dns_config.h"
+ #include "net/dns/dns_response.h"
+ #include "net/dns/dns_transaction.h"
++#include "net/dns/dns_util.h"
+ #include "net/dns/public/dns_protocol.h"
+ #include "net/dns/record_parsed.h"
+ #include "net/dns/record_rdata.h"
+@@ -471,7 +472,7 @@ bool AuditProofQueryImpl::StartDnsTransaction(const std::string& qname) {
+       qname, net::dns_protocol::kTypeTXT,
+       base::BindOnce(&AuditProofQueryImpl::OnDnsTransactionComplete,
+                      weak_ptr_factory_.GetWeakPtr()),
+-      net_log_);
++      net_log_, net::SecureDnsMode::AUTOMATIC);
+ 
+   current_dns_transaction_->Start();
+   return true;
+diff --git a/net/dns/BUILD.gn b/net/dns/BUILD.gn
+--- a/net/dns/BUILD.gn
++++ b/net/dns/BUILD.gn
+@@ -291,6 +291,7 @@ source_set("dns_client") {
+       "dns_client.h",
+       "dns_response.h",
+       "dns_transaction.h",
++      "dns_util.h",
+       "record_parsed.h",
+       "record_rdata.h",
+     ]
+diff --git a/net/dns/dns_test_util.cc b/net/dns/dns_test_util.cc
+--- a/net/dns/dns_test_util.cc
++++ b/net/dns/dns_test_util.cc
+@@ -441,7 +441,8 @@ class MockDnsClient::MockTransactionFactory : public DnsTransactionFactory {
+       const std::string& hostname,
+       uint16_t qtype,
+       DnsTransactionFactory::CallbackType callback,
+-      const NetLogWithSource&) override {
++      const NetLogWithSource&,
++      SecureDnsMode) override {
+     std::unique_ptr<MockTransaction> transaction =
+         std::make_unique<MockTransaction>(rules_, hostname, qtype,
+                                           std::move(callback));
+diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc
+--- a/net/dns/dns_transaction.cc
++++ b/net/dns/dns_transaction.cc
+@@ -772,11 +772,13 @@ class DnsTransactionImpl : public DnsTransaction,
+                      uint16_t qtype,
+                      DnsTransactionFactory::CallbackType callback,
+                      const NetLogWithSource& net_log,
+-                     const OptRecordRdata* opt_rdata)
++                     const OptRecordRdata* opt_rdata,
++                     SecureDnsMode secure_dns_mode)
+       : session_(session),
+         hostname_(hostname),
+         qtype_(qtype),
+         opt_rdata_(opt_rdata),
++        secure_dns_mode_(secure_dns_mode),
+         callback_(std::move(callback)),
+         net_log_(net_log),
+         qnames_initial_size_(0),
+@@ -919,12 +921,17 @@ class DnsTransactionImpl : public DnsTransaction,
+   }
+ 
+   AttemptResult MakeAttempt() {
+-    // Make an HTTP attempt unless we have already made more attempts
+-    // than we have configured servers. Otherwise make a UDP attempt
+-    // as long as we have configured nameservers.
+     DnsConfig config = session_->config();
+-    if (doh_attempts_ < config.dns_over_https_servers.size())
++    // In AUTOMATIC and SECURE mode, make an HTTP attempt unless we have already
++    // made more attempts than we have configured servers.
++    if (secure_dns_mode_ != SecureDnsMode::OFF &&
++        doh_attempts_ < config.dns_over_https_servers.size()) {
+       return MakeHTTPAttempt(config.dns_over_https_servers);
++    }
++    // In AUTOMATIC mode, insecure attempts are allowed after HTTP attempts are
++    // exhausted. In OFF mode, only insecure attempts are allowed. It should
++    // not be possible to reach this point in SECURE mode.
++    DCHECK_NE(secure_dns_mode_, SecureDnsMode::SECURE);
+     DCHECK_GT(config.nameservers.size(), 0u);
+     return MakeUDPAttempt();
+   }
+@@ -1112,8 +1119,19 @@ class DnsTransactionImpl : public DnsTransaction,
+     if (had_tcp_attempt_)
+       return false;
+     const DnsConfig& config = session_->config();
+-    return attempts_.size() < config.attempts * config.nameservers.size() +
+-                                  config.dns_over_https_servers.size();
++    unsigned insecure_attempts_possible =
++        config.attempts * config.nameservers.size();
++    unsigned secure_attempts_possible = config.dns_over_https_servers.size();
++
++    switch (secure_dns_mode_) {
++      case SecureDnsMode::SECURE:
++        return attempts_.size() < secure_attempts_possible;
++      case SecureDnsMode::AUTOMATIC:
++        return attempts_.size() <
++               secure_attempts_possible + insecure_attempts_possible;
++      case SecureDnsMode::OFF:
++        return attempts_.size() < insecure_attempts_possible;
++    }
+   }
+ 
+   // Resolves the result of a DnsAttempt until a terminal result is reached
+@@ -1204,6 +1222,7 @@ class DnsTransactionImpl : public DnsTransaction,
+   std::string hostname_;
+   uint16_t qtype_;
+   const OptRecordRdata* opt_rdata_;
++  const SecureDnsMode secure_dns_mode_;
+   // Cleared in DoCallback.
+   DnsTransactionFactory::CallbackType callback_;
+ 
+@@ -1248,10 +1267,11 @@ class DnsTransactionFactoryImpl : public DnsTransactionFactory {
+       const std::string& hostname,
+       uint16_t qtype,
+       CallbackType callback,
+-      const NetLogWithSource& net_log) override {
+-    return std::make_unique<DnsTransactionImpl>(session_.get(), hostname, qtype,
+-                                                std::move(callback), net_log,
+-                                                opt_rdata_.get());
++      const NetLogWithSource& net_log,
++      SecureDnsMode secure_dns_mode) override {
++    return std::make_unique<DnsTransactionImpl>(
++        session_.get(), hostname, qtype, std::move(callback), net_log,
++        opt_rdata_.get(), secure_dns_mode);
+   }
+ 
+   void AddEDNSOption(const OptRecordRdata::Opt& opt) override {
+diff --git a/net/dns/dns_transaction.h b/net/dns/dns_transaction.h
+--- a/net/dns/dns_transaction.h
++++ b/net/dns/dns_transaction.h
+@@ -12,6 +12,7 @@
+ 
+ #include "base/callback.h"
+ #include "net/base/request_priority.h"
++#include "net/dns/dns_util.h"
+ #include "net/dns/record_rdata.h"
+ #include "url/gurl.h"
+ 
+@@ -69,11 +70,18 @@ class NET_EXPORT_PRIVATE DnsTransactionFactory {
+   //
+   // The transaction will run |callback| upon asynchronous completion.
+   // The |net_log| is used as the parent log.
++  //
++  // The |secure_dns_mode| specifies the order in which secure and/or insecure
++  // DNS lookups will be performed. In SECURE mode, only secure lookups will be
++  // perfomed. In AUTOMATIC mode, secure lookups will be performed first when
++  // possible, and insecure lookups will be performed as a fallback. In OFF
++  // mode, only insecure lookups will be performed.
+   virtual std::unique_ptr<DnsTransaction> CreateTransaction(
+       const std::string& hostname,
+       uint16_t qtype,
+       CallbackType callback,
+-      const NetLogWithSource& net_log) WARN_UNUSED_RESULT = 0;
++      const NetLogWithSource& net_log,
++      SecureDnsMode secure_dns_mode) WARN_UNUSED_RESULT = 0;
+ 
+   // The given EDNS0 option will be included in all DNS queries performed by
+   // transactions from this factory.
+diff --git a/net/dns/dns_transaction_unittest.cc b/net/dns/dns_transaction_unittest.cc
+--- a/net/dns/dns_transaction_unittest.cc
++++ b/net/dns/dns_transaction_unittest.cc
+@@ -246,7 +246,17 @@ class TestSocketFactory : public MockClientSocketFactory {
+     remote_endpoints_.push_back(endpoint);
+   }
+ 
+-  std::vector<IPEndPoint> remote_endpoints_;
++  struct RemoteNameserver {
++    RemoteNameserver(IPEndPoint insecure_nameserver)
++        : insecure_nameserver(insecure_nameserver) {}
++    RemoteNameserver(DnsConfig::DnsOverHttpsServerConfig secure_nameserver)
++        : secure_nameserver(secure_nameserver) {}
++
++    base::Optional<IPEndPoint> insecure_nameserver;
++    base::Optional<DnsConfig::DnsOverHttpsServerConfig> secure_nameserver;
++  };
++
++  std::vector<RemoteNameserver> remote_endpoints_;
+   bool fail_next_socket_;
+ 
+  private:
+@@ -269,6 +279,7 @@ class TransactionHelper {
+                     int expected_answer_count)
+       : hostname_(hostname),
+         qtype_(qtype),
++        secure_dns_mode_(SecureDnsMode::AUTOMATIC),
+         response_(nullptr),
+         expected_answer_count_(expected_answer_count),
+         cancel_in_callback_(false),
+@@ -277,13 +288,19 @@ class TransactionHelper {
+   // Mark that the transaction shall be destroyed immediately upon callback.
+   void set_cancel_in_callback() { cancel_in_callback_ = true; }
+ 
++  // Set the secure DNS mode for the transaction.
++  void set_secure_dns_mode(SecureDnsMode secure_dns_mode) {
++    secure_dns_mode_ = secure_dns_mode;
++  }
++
+   void StartTransaction(DnsTransactionFactory* factory) {
+     EXPECT_EQ(NULL, transaction_.get());
+     transaction_ = factory->CreateTransaction(
+         hostname_, qtype_,
+         base::Bind(&TransactionHelper::OnTransactionComplete,
+                    base::Unretained(this)),
+-        NetLogWithSource::Make(&net_log_, net::NetLogSourceType::NONE));
++        NetLogWithSource::Make(&net_log_, net::NetLogSourceType::NONE),
++        secure_dns_mode_);
+     transaction_->SetRequestContext(&request_context_);
+     transaction_->SetRequestPriority(DEFAULT_PRIORITY);
+     EXPECT_EQ(hostname_, transaction_->GetHostname());
+@@ -360,6 +377,7 @@ class TransactionHelper {
+  private:
+   std::string hostname_;
+   uint16_t qtype_;
++  SecureDnsMode secure_dns_mode_;
+   std::unique_ptr<DnsTransaction> transaction_;
+   const DnsResponse* response_;
+   int expected_answer_count_;
+@@ -669,9 +687,20 @@ class DnsTransactionTestBase : public testing::Test {
+   // |servers|.
+   void CheckServerOrder(const unsigned* servers, size_t num_attempts) {
+     ASSERT_EQ(num_attempts, socket_factory_->remote_endpoints_.size());
++    auto num_insecure_nameservers = session_->config().nameservers.size();
+     for (size_t i = 0; i < num_attempts; ++i) {
+-      EXPECT_EQ(socket_factory_->remote_endpoints_[i],
+-                session_->config().nameservers[servers[i]]);
++      if (servers[i] < num_insecure_nameservers) {
++        // Check insecure server match.
++        EXPECT_EQ(
++            socket_factory_->remote_endpoints_[i].insecure_nameserver.value(),
++            session_->config().nameservers[servers[i]]);
++      } else {
++        // Check secure server match.
++        EXPECT_EQ(
++            socket_factory_->remote_endpoints_[i].secure_nameserver.value(),
++            session_->config()
++                .dns_over_https_servers[servers[i] - num_insecure_nameservers]);
++      }
+     }
+   }
+ 
+@@ -762,6 +791,7 @@ class DnsTransactionTest : public DnsTransactionTestBase,
+       if (server.use_post && request->method() == "POST") {
+         if (url_base == request->url().spec()) {
+           server_found = true;
++          socket_factory_->remote_endpoints_.push_back(server);
+         }
+       } else if (!server.use_post && request->method() == "GET") {
+         std::string prefix = url_base + "?dns=";
+@@ -769,6 +799,7 @@ class DnsTransactionTest : public DnsTransactionTestBase,
+                                      request->url().spec().begin());
+         if (mispair.first == prefix.end()) {
+           server_found = true;
++          socket_factory_->remote_endpoints_.push_back(server);
+         }
+       }
+     }
+@@ -1552,6 +1583,43 @@ TEST_F(DnsTransactionTest, HttpsPostFailThenUDPFallback) {
+   TransactionHelper helper0(kT0HostName, kT0Qtype, kT0RecordCount);
+   SetDohJobMakerCallback(base::BindRepeating(DohJobMakerCallbackFailStart));
+   EXPECT_TRUE(helper0.RunUntilDone(transaction_factory_.get()));
++  unsigned kOrder0[] = {1, 0};
++  CheckServerOrder(kOrder0, base::size(kOrder0));
++}
++
++TEST_F(DnsTransactionTest, HttpsPostFailNoUDPFallbackInSecureMode) {
++  config_.attempts = 1;
++  ConfigureNumServers(2);
++  ConfigDohServers(false /* clear_udp */, true /* use_post */, 2);
++  AddQueryAndErrorResponse(0, kT0HostName, kT0Qtype, ERR_CONNECTION_REFUSED,
++                           SYNCHRONOUS, Transport::HTTPS);
++  AddQueryAndErrorResponse(0, kT0HostName, kT0Qtype, ERR_CONNECTION_REFUSED,
++                           SYNCHRONOUS, Transport::HTTPS);
++  TransactionHelper helper0(kT0HostName, kT0Qtype, ERR_FAILED);
++  helper0.set_secure_dns_mode(SecureDnsMode::SECURE);
++  SetDohJobMakerCallback(base::BindRepeating(DohJobMakerCallbackFailStart));
++  EXPECT_TRUE(helper0.RunUntilDone(transaction_factory_.get()));
++  unsigned kOrder0[] = {2, 3};
++  CheckServerOrder(kOrder0, base::size(kOrder0));
++}
++
++TEST_F(DnsTransactionTest, NoHttpsAttemptInOffMode) {
++  config_.attempts = 2;
++  ConfigureNumServers(2);
++  ConfigDohServers(false /* clear_udp */, true /* use_post */, 2);
++  AddQueryAndErrorResponse(0, kT0HostName, kT0Qtype, ERR_CONNECTION_REFUSED,
++                           SYNCHRONOUS, Transport::UDP);
++  AddQueryAndErrorResponse(0, kT0HostName, kT0Qtype, ERR_CONNECTION_REFUSED,
++                           SYNCHRONOUS, Transport::UDP);
++  AddQueryAndErrorResponse(0, kT0HostName, kT0Qtype, ERR_CONNECTION_REFUSED,
++                           SYNCHRONOUS, Transport::UDP);
++  AddQueryAndResponse(0, kT0HostName, kT0Qtype, kT0ResponseDatagram,
++                      base::size(kT0ResponseDatagram), ASYNC, Transport::UDP);
++  TransactionHelper helper0(kT0HostName, kT0Qtype, kT0RecordCount);
++  helper0.set_secure_dns_mode(SecureDnsMode::OFF);
++  EXPECT_TRUE(helper0.RunUntilDone(transaction_factory_.get()));
++  unsigned kOrder0[] = {0, 1, 0, 1};
++  CheckServerOrder(kOrder0, base::size(kOrder0));
+ }
+ 
+ TEST_F(DnsTransactionTest, HttpsPostFailThenUDPFailThenUDPFallback) {
+@@ -1575,6 +1643,8 @@ TEST_F(DnsTransactionTest, HttpsPostFailThenUDPFailThenUDPFallback) {
+   EXPECT_EQ(session_->NextGoodServerIndex(0), 1u);
+   EXPECT_EQ(session_->NextGoodServerIndex(1), 1u);
+   EXPECT_EQ(session_->NextGoodServerIndex(2), 2u);
++  unsigned kOrder0[] = {3, 0, 1};
++  CheckServerOrder(kOrder0, base::size(kOrder0));
+ }
+ 
+ TEST_F(DnsTransactionTest, HttpsMarkUdpBad) {
+@@ -1595,6 +1665,8 @@ TEST_F(DnsTransactionTest, HttpsMarkUdpBad) {
+   EXPECT_EQ(session_->NextGoodServerIndex(0), 1u);
+   EXPECT_EQ(session_->NextGoodServerIndex(1), 1u);
+   EXPECT_EQ(session_->NextGoodDnsOverHttpsServerIndex(2), 2u);
++  unsigned kOrder0[] = {2, 0, 1};
++  CheckServerOrder(kOrder0, base::size(kOrder0));
+ 
+   AddQueryAndErrorResponse(1, kT1HostName, kT1Qtype, ERR_CONNECTION_REFUSED,
+                            SYNCHRONOUS, Transport::HTTPS);
+@@ -1612,6 +1684,11 @@ TEST_F(DnsTransactionTest, HttpsMarkUdpBad) {
+   EXPECT_EQ(session_->NextGoodServerIndex(0), 0u);
+   EXPECT_EQ(session_->NextGoodServerIndex(1), 0u);
+   EXPECT_EQ(session_->NextGoodDnsOverHttpsServerIndex(2), 2u);
++  unsigned kOrder1[] = {
++      2, 0, 1, /* transaction0 */
++      2, 1, 0  /* transaction1 */
++  };
++  CheckServerOrder(kOrder1, base::size(kOrder1));
+ }
+ 
+ TEST_F(DnsTransactionTest, HttpsMarkHttpsBad) {
+@@ -1627,7 +1704,6 @@ TEST_F(DnsTransactionTest, HttpsMarkHttpsBad) {
+                            SYNCHRONOUS, Transport::HTTPS);
+   AddQueryAndErrorResponse(1, kT1HostName, kT1Qtype, ERR_CONNECTION_REFUSED,
+                            SYNCHRONOUS, Transport::HTTPS);
+-
+   AddQueryAndResponse(1, kT1HostName, kT1Qtype, kT1ResponseDatagram,
+                       base::size(kT1ResponseDatagram), ASYNC, Transport::HTTPS);
+   TransactionHelper helper0(kT0HostName, kT0Qtype, kT0RecordCount);
+@@ -1640,6 +1716,8 @@ TEST_F(DnsTransactionTest, HttpsMarkHttpsBad) {
+   EXPECT_EQ(session_->NextGoodDnsOverHttpsServerIndex(1), 3u);
+   EXPECT_EQ(session_->NextGoodDnsOverHttpsServerIndex(2), 3u);
+   EXPECT_EQ(session_->NextGoodDnsOverHttpsServerIndex(3), 3u);
++  unsigned kOrder0[] = {1, 2, 3};
++  CheckServerOrder(kOrder0, base::size(kOrder0));
+ 
+   EXPECT_TRUE(helper1.RunUntilDone(transaction_factory_.get()));
+   // Server 0 is still our only UDP server, so will be good by definition.
+@@ -1651,6 +1729,11 @@ TEST_F(DnsTransactionTest, HttpsMarkHttpsBad) {
+   EXPECT_EQ(session_->NextGoodDnsOverHttpsServerIndex(1), 2u);
+   EXPECT_EQ(session_->NextGoodDnsOverHttpsServerIndex(2), 2u);
+   EXPECT_EQ(session_->NextGoodDnsOverHttpsServerIndex(3), 2u);
++  unsigned kOrder1[] = {
++      1, 2, 3, /* transaction0 */
++      3, 1, 2  /* transaction1 */
++  };
++  CheckServerOrder(kOrder1, base::size(kOrder1));
+ }
+ 
+ TEST_F(DnsTransactionTest, HttpsPostFailThenHTTPFallback) {
+@@ -1662,6 +1745,8 @@ TEST_F(DnsTransactionTest, HttpsPostFailThenHTTPFallback) {
+                       Transport::HTTPS);
+   TransactionHelper helper0(kT0HostName, kT0Qtype, kT0RecordCount);
+   EXPECT_TRUE(helper0.RunUntilDone(transaction_factory_.get()));
++  unsigned kOrder0[] = {0, 1};
++  CheckServerOrder(kOrder0, base::size(kOrder0));
+ }
+ 
+ TEST_F(DnsTransactionTest, HttpsPostFailTwiceThenUDPFallback) {
+@@ -1678,6 +1763,8 @@ TEST_F(DnsTransactionTest, HttpsPostFailTwiceThenUDPFallback) {
+   TransactionHelper helper0(kT0HostName, kT0Qtype, kT0RecordCount);
+   SetDohJobMakerCallback(base::BindRepeating(DohJobMakerCallbackFailStart));
+   EXPECT_TRUE(helper0.RunUntilDone(transaction_factory_.get()));
++  unsigned kOrder0[] = {1, 2, 0};
++  CheckServerOrder(kOrder0, base::size(kOrder0));
+ }
+ 
+ TEST_F(DnsTransactionTest, HttpsPostFailTwice) {
+@@ -1692,6 +1779,8 @@ TEST_F(DnsTransactionTest, HttpsPostFailTwice) {
+   TransactionHelper helper0(kT0HostName, kT0Qtype, ERR_FAILED);
+   SetDohJobMakerCallback(base::BindRepeating(DohJobMakerCallbackFailStart));
+   EXPECT_TRUE(helper0.RunUntilDone(transaction_factory_.get()));
++  unsigned kOrder0[] = {0, 1};
++  CheckServerOrder(kOrder0, base::size(kOrder0));
+ }
+ 
+ void MakeResponseWithCookie(URLRequest* request, HttpResponseInfo* info) {
+diff --git a/net/dns/dns_util.h b/net/dns/dns_util.h
+--- a/net/dns/dns_util.h
++++ b/net/dns/dns_util.h
+@@ -93,6 +93,18 @@ uint16_t DnsQueryTypeToQtype(DnsQueryType dns_query_type);
+ NET_EXPORT DnsQueryType
+ AddressFamilyToDnsQueryType(AddressFamily address_family);
+ 
++// The SecureDnsMode specifies what types of lookups (secure/insecure) should
++// be performed and in what order when resolving a specific query.
++enum SecureDnsMode : int {
++  // In OFF mode, no DoH lookups should be performed.
++  OFF,
++  // In AUTOMATIC mode, DoH lookups should be performed first if DoH is
++  // available, and insecure DNS lookups should be performed as a fallback.
++  AUTOMATIC,
++  // In SECURE mode, only DoH lookups should be performed.
++  SECURE,
++};
++
+ }  // namespace net
+ 
+ #endif  // NET_DNS_DNS_UTIL_H_
+diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc
+--- a/net/dns/host_resolver_impl.cc
++++ b/net/dns/host_resolver_impl.cc
+@@ -1066,7 +1066,7 @@ class HostResolverImpl::DnsTask : public base::SupportsWeakPtr<DnsTask> {
+             base::BindOnce(&DnsTask::OnTransactionComplete,
+                            base::Unretained(this), tick_clock_->NowTicks(),
+                            dns_query_type),
+-            net_log_);
++            net_log_, SecureDnsMode::AUTOMATIC);
+     trans->SetRequestContext(delegate_->url_request_context());
+     trans->SetRequestPriority(delegate_->priority());
+     return trans;
+-- 
+2.11.0
+

+ 2 - 2
build/patches/ungoogled-chromium-disable-safe-browsing.patch

@@ -308,7 +308,7 @@ diff --git a/chrome/browser/component_updater/file_type_policies_component_insta
 diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrome/browser/download/chrome_download_manager_delegate.cc
 --- a/chrome/browser/download/chrome_download_manager_delegate.cc
 +++ b/chrome/browser/download/chrome_download_manager_delegate.cc
-@@ -315,13 +315,6 @@ ChromeDownloadManagerDelegate::~ChromeDownloadManagerDelegate() {
+@@ -322,13 +322,6 @@ ChromeDownloadManagerDelegate::~ChromeDownloadManagerDelegate() {
  
  void ChromeDownloadManagerDelegate::SetDownloadManager(DownloadManager* dm) {
    download_manager_ = dm;
@@ -322,7 +322,7 @@ diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrom
  }
  
  #if defined(OS_ANDROID)
-@@ -616,16 +609,6 @@ void ChromeDownloadManagerDelegate::ChooseSavePath(
+@@ -636,16 +629,6 @@ void ChromeDownloadManagerDelegate::ChooseSavePath(
  
  void ChromeDownloadManagerDelegate::SanitizeSavePackageResourceName(
      base::FilePath* filename) {

+ 3 - 1
build/patches_list.txt

@@ -44,8 +44,8 @@ Disable-Omaha-update-checks.patch
 Disable-update-scheduler.patch
 Add-StartPage-search-engine.patch
 Add-English-only-search-engine.patch
-Specify-image-URL-for-Qwant-search-engine.patch
 Add-DuckDuckGo-Lite-search-engine.patch
+Add-Qwant-search-engine.patch
 Fix-crash-when-accessing-page-info-site-settings.patch
 openH264-enable-ARM-ARM64-optimizations.patch
 Switch-to-fstack-protector-strong.patch
@@ -68,6 +68,8 @@ Add-flags-to-disable-device-motion-and-orientation-APIs.patch
 Punt-the-Widevine-version-string.patch
 Disable-metrics-on-all-I-O-threads.patch
 Add-a-flag-for-DNS-over-HTTPS.patch
+Support-different-secure-DNS-modes-within-DnsTransaction.patch
+Enable-secure-DNS-mode-by-default-in-DnsTransaction.patch
 Always-respect-async-dns-flag-regardless-of-SDK-version.patch
 Add-flag-to-configure-maximum-connections-per-host.patch
 Add-custom-tab-intents-privacy-option.patch

部分文件因为文件数量过多而无法显示