Ver Fonte

Release 73.0.3683.61

csagan5 há 6 anos atrás
pai
commit
a34b285160
87 ficheiros alterados com 2775 adições e 2942 exclusões
  1. 7 0
      CHANGELOG.md
  2. 89 17
      build/filters/adblock_entries.h
  3. 2 2
      build/patches/AV1-codec-support.patch
  4. 625 0
      build/patches/Add-DuckDuckGo-Lite-search-engine.patch
  5. 0 715
      build/patches/Add-DuckDuckGo-search-engine.patch
  6. 671 355
      build/patches/Add-English-only-search-engine.patch
  7. 0 726
      build/patches/Add-Qwant-search-engine.patch
  8. 671 355
      build/patches/Add-StartPage-search-engine.patch
  9. 47 42
      build/patches/Add-a-flag-for-DNS-over-HTTPS.patch
  10. 19 19
      build/patches/Add-a-proxy-configuration-page.patch
  11. 22 21
      build/patches/Add-an-always-incognito-mode.patch
  12. 16 16
      build/patches/Add-bookmark-import-export-actions.patch
  13. 5 5
      build/patches/Add-custom-tab-intents-privacy-option.patch
  14. 3 3
      build/patches/Add-exit-menu-item.patch
  15. 22 30
      build/patches/Add-flag-to-configure-maximum-connections-per-host.patch
  16. 10 10
      build/patches/Add-flag-to-control-video-playback-resume-feature.patch
  17. 7 7
      build/patches/Add-flag-to-disable-IPv6-probes.patch
  18. 5 5
      build/patches/Add-flag-to-show-hide-NTP-tiles.patch
  19. 10 10
      build/patches/Add-flags-to-disable-device-motion-and-orientation-APIs.patch
  20. 3 3
      build/patches/Add-menu-option-to-toggle-global-Javascript-preference.patch
  21. 12 12
      build/patches/Add-option-to-not-persist-tabs-across-sessions.patch
  22. 13 13
      build/patches/Add-site-settings-option-for-session-only-cookies.patch
  23. 36 16
      build/patches/Allow-building-without-safebrowsing-for-Android.patch
  24. 4 4
      build/patches/Allow-playing-audio-in-background.patch
  25. 1 1
      build/patches/Allow-website-sign-in-without-account-sign-in.patch
  26. 1 1
      build/patches/Always-respect-async-dns-flag-regardless-of-SDK-version.patch
  27. 13 13
      build/patches/AudioBuffer-AnalyserNode-fingerprinting-mitigations-via-IDL.patch
  28. 1 1
      build/patches/Battery-API-return-nothing.patch
  29. 5 5
      build/patches/Bromite-adblock-engine.patch
  30. 4 4
      build/patches/Canvas-fingerprinting-mitigations-for-image-data-and-webGL.patch
  31. 1 1
      build/patches/Disable-NTP-remote-suggestions-by-default.patch
  32. 2 2
      build/patches/Disable-Omaha-update-checks.patch
  33. 0 23
      build/patches/Disable-ads-metrics-by-default.patch
  34. 3 3
      build/patches/Disable-fetching-of-all-field-trials.patch
  35. 1 1
      build/patches/Disable-hyperlink-auditing-by-default.patch
  36. 6 6
      build/patches/Disable-metrics-collection-for-NTP-tiles.patch
  37. 1 1
      build/patches/Disable-metrics-on-all-I-O-threads.patch
  38. 1 1
      build/patches/Disable-omission-of-URL-elements-in-Omnibox.patch
  39. 1 1
      build/patches/Disable-plugins-enumeration.patch
  40. 1 1
      build/patches/Disable-promos-displayed-in-bookmarks-manager.patch
  41. 58 62
      build/patches/Disable-signin-and-data-saver-preferences.patch
  42. 35 16
      build/patches/Disable-signin-data-reduction-promos.patch
  43. 1 1
      build/patches/Disable-smooth-scrolling-on-Linux.patch
  44. 1 1
      build/patches/Do-not-grant-notifications-to-default-search-engine.patch
  45. 3 3
      build/patches/Do-not-ignore-download-location-prompt-setting.patch
  46. 1 1
      build/patches/Do-not-store-passwords-by-default.patch
  47. 0 23
      build/patches/Enable-TLS-1.3-final-by-default.patch
  48. 1 1
      build/patches/Enable-fwrapv-in-Clang-for-non-UBSan-builds.patch
  49. 4 4
      build/patches/Enable-history-requirement-of-user-gesture.patch
  50. 1 1
      build/patches/Fix-crash-when-accessing-page-info-site-settings.patch
  51. 2 2
      build/patches/Hide-passwords-manager-link.patch
  52. 2 2
      build/patches/Hide-send-reports-checkbox.patch
  53. 7 7
      build/patches/Inject-scripts-for-AMP-tracking-ads-and-video-functionality.patch
  54. 9 9
      build/patches/Modify-default-preferences.patch
  55. 1 1
      build/patches/Never-fetch-popular-sites.patch
  56. 1 1
      build/patches/Punt-the-Widevine-version-string.patch
  57. 85 30
      build/patches/Remove-EV-certificates.patch
  58. 6 6
      build/patches/Remove-Sync-and-Translate-menu.patch
  59. 2 2
      build/patches/Remove-help-menu-item.patch
  60. 3 3
      build/patches/Remove-request-for-account-access-permission-on-reboot.patch
  61. 10 10
      build/patches/Rollback-android-minSdkVersion-from-19-KitKat-to-16-JellyBean.patch
  62. 22 0
      build/patches/Specify-image-URL-for-Qwant-search-engine.patch
  63. 1 1
      build/patches/Switch-to-fstack-protector-strong.patch
  64. 8 25
      build/patches/Use-4-tile-rows-never-show-logo.patch
  65. 9 9
      build/patches/autofill-disable-autofill-download-manager.patch
  66. 1 1
      build/patches/dns-send-IPv6-connectivity-probes-to-RIPE-DNS.patch
  67. 11 11
      build/patches/getClientRects-getBoundingClientRect-measureText-add-fingerprinting-mitigation.patch
  68. 4 4
      build/patches/kill-Auth.patch
  69. 10 10
      build/patches/kill-GCM.patch
  70. 1 1
      build/patches/kill-Location-fall-back-to-system.patch
  71. 11 12
      build/patches/kill-TOS-and-metrics-opt-out.patch
  72. 1 1
      build/patches/prefs-only-keep-cookies-until-exit.patch
  73. 1 1
      build/patches/promo-disable-Google-promotion-fetching.patch
  74. 1 1
      build/patches/safe_browsing-disable-cookie-transmission.patch
  75. 3 3
      build/patches/safe_browsing-disable-incident-reporting.patch
  76. 1 1
      build/patches/ungoogled-chromium-Always-use-local-DevTools-files-instead-of-remote-files-from-Google.patch
  77. 6 6
      build/patches/ungoogled-chromium-Disable-Gaia.patch
  78. 1 1
      build/patches/ungoogled-chromium-Disable-Google-host-detection.patch
  79. 1 1
      build/patches/ungoogled-chromium-Disable-domain-reliability.patch
  80. 1 1
      build/patches/ungoogled-chromium-Disable-profile-avatar-downloading.patch
  81. 0 56
      build/patches/ungoogled-chromium-Disable-signin.patch
  82. 2 2
      build/patches/ungoogled-chromium-Disable-translate-integration.patch
  83. 2 2
      build/patches/ungoogled-chromium-Disable-untraceable-URLs.patch
  84. 7 8
      build/patches/ungoogled-chromium-Disable-webRTC-log-uploader.patch
  85. 92 140
      build/patches/ungoogled-chromium-disable-safe-browsing.patch
  86. 2 2
      build/patches/updater-disable-updater-pings.patch
  87. 2 5
      build/patches_list.txt

+ 7 - 0
CHANGELOG.md

@@ -1,3 +1,10 @@
+# 73.0.3683.61
+* drop patches with functionality now available from upstream (DuckDuckGo and Qwant search engines, TLS 1.3 final)
+* add only DuckDuckGo Lite search engine
+* provide image URL for Qwant
+* disable safe browsing subresource filter by default
+* fix PAC URL support in proxy configuration
+
 # 72.0.3626.120
 * add support for resource type in adblock engine (fixes https://github.com/bromite/bromite/issues/115)
 * adblock engine speed optimizations

Diff do ficheiro suprimidas por serem muito extensas
+ 89 - 17
build/filters/adblock_entries.h


+ 2 - 2
build/patches/AV1-codec-support.patch

@@ -27,7 +27,7 @@ Report AV1 as playable on Android
 diff --git a/media/base/mime_util_internal.cc b/media/base/mime_util_internal.cc
 --- a/media/base/mime_util_internal.cc
 +++ b/media/base/mime_util_internal.cc
-@@ -548,9 +548,13 @@ bool MimeUtil::IsCodecSupportedOnAndroid(
+@@ -540,9 +540,13 @@ bool MimeUtil::IsCodecSupportedOnAndroid(
      case THEORA:
        return false;
  
@@ -75,7 +75,7 @@ diff --git a/third_party/libaom/BUILD.gn b/third_party/libaom/BUILD.gn
 diff --git a/third_party/libaom/libaom_srcs.gni b/third_party/libaom/libaom_srcs.gni
 --- a/third_party/libaom/libaom_srcs.gni
 +++ b/third_party/libaom/libaom_srcs.gni
-@@ -479,6 +479,11 @@ aom_mem_sources = [
+@@ -483,6 +483,11 @@ aom_mem_sources = [
  
  aom_ports_asm_x86 = [ "//third_party/libaom/source/libaom/aom_ports/emms.asm" ]
  

+ 625 - 0
build/patches/Add-DuckDuckGo-Lite-search-engine.patch

@@ -0,0 +1,625 @@
+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
+

+ 0 - 715
build/patches/Add-DuckDuckGo-search-engine.patch

@@ -1,715 +0,0 @@
-From: csagan5 <32685696+csagan5@users.noreply.github.com>
-Date: Thu, 12 Oct 2017 11:06:18 +0200
-Subject: Add DuckDuckGo search engine
-
----
- .../search_engines/prepopulated_engines.json       |  19 ++
- components/search_engines/search_engine_type.h     |   2 +
- .../template_url_prepopulate_data.cc               | 218 ++++++++++-----------
- 3 files changed, 130 insertions(+), 109 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
-@@ -38,6 +38,25 @@
-   // The following engines are included in country lists and are added to the
-   // list of search engines on the first run depending on user's country.
-   "elements": {
-+    "duckduckgo": {
-+      "name": "DuckDuckGo",
-+      "keyword": "duckduckgo.com",
-+      "favicon_url": "https://duckduckgo.com/favicon.ico",
-+      "search_url": "https://duckduckgo.com/?q={searchTerms}",
-+      "suggest_url": "https://ac.duckduckgo.com/ac/?q={searchTerms}&type=list",
-+      "type": "SEARCH_ENGINE_DUCKDUCKGO",
-+      "id": 11
-+    },
-+
-+    "duckduckgo_light": {
-+      "name": "DuckDuckGo Light",
-+      "keyword": "duckduckgo.com/lite",
-+      "favicon_url": "https://duckduckgo.com/favicon.ico",
-+      "search_url": "https://duckduckgo.com/lite/?q={searchTerms}",
-+      "type": "SEARCH_ENGINE_DUCKDUCKGOLIGHT",
-+      "id": 12
-+    },
-+
-     "aol": {
-       "name": "AOL",
-       "keyword": "aol.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
-@@ -63,6 +63,8 @@ enum SearchEngineType {
-   SEARCH_ENGINE_YANDEX,
-   SEARCH_ENGINE_ZOZNAM,
-   SEARCH_ENGINE_360,
-+  SEARCH_ENGINE_DUCKDUCKGO,
-+  SEARCH_ENGINE_DUCKDUCKGOLIGHT,
-   SEARCH_ENGINE_MAX          // Bounding value needed for UMA histogram macro.
- };
- 
-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
-@@ -33,548 +33,548 @@ namespace {
- 
- // Default (for countries with no better engine set)
- const PrepopulatedEngine* const engines_default[] = {
--    &google, &bing, &yahoo,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // United Arab Emirates
- const PrepopulatedEngine* const engines_AE[] = {
--    &google, &yahoo_maktoob, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
- 
- // Albania
- const PrepopulatedEngine* const engines_AL[] = {
--    &google, &yahoo, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Argentina
- const PrepopulatedEngine* const engines_AR[] = {
--    &google, &bing, &yahoo_ar,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_ar,
- };
- 
- // Austria
- const PrepopulatedEngine* const engines_AT[] = {
--    &google, &bing, &yahoo_at,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_at,
- };
- 
- // Australia
- const PrepopulatedEngine* const engines_AU[] = {
--    &google, &bing, &yahoo_au,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_au,
- };
- 
- // Bosnia and Herzegovina
- const PrepopulatedEngine* const engines_BA[] = {
--    &google, &yahoo, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Belgium
- const PrepopulatedEngine* const engines_BE[] = {
--    &google, &bing, &yahoo, &yahoo_fr,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo, &yahoo_fr,
- };
- 
- // Bulgaria
- const PrepopulatedEngine* const engines_BG[] = {
--    &google, &bing, &ask,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &ask,
- };
- 
- // Bahrain
- const PrepopulatedEngine* const engines_BH[] = {
--    &google, &yahoo_maktoob, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
- 
- // Burundi
- const PrepopulatedEngine* const engines_BI[] = {
--    &google, &yahoo, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Brunei
- const PrepopulatedEngine* const engines_BN[] = {
--    &google, &yahoo_my, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo_my, &bing,
- };
- 
- // Bolivia
- const PrepopulatedEngine* const engines_BO[] = {
--    &google, &bing, &yahoo,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Brazil
- const PrepopulatedEngine* const engines_BR[] = {
--    &google, &ask_br, &bing, &yahoo_br,
-+    &google, &duckduckgo, &duckduckgo_light, &ask_br, &bing, &yahoo_br,
- };
- 
- // Belarus
- const PrepopulatedEngine* const engines_BY[] = {
--    &google, &yandex_by, &mail_ru,
-+    &google, &duckduckgo, &duckduckgo_light, &yandex_by, &mail_ru,
- };
- 
- // Belize
- const PrepopulatedEngine* const engines_BZ[] = {
--    &google, &yahoo, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Canada
- const PrepopulatedEngine* const engines_CA[] = {
--    &google, &bing, &ask, &yahoo_ca, &yahoo_qc,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &ask, &yahoo_ca, &yahoo_qc,
- };
- 
- // Switzerland
- const PrepopulatedEngine* const engines_CH[] = {
--    &google, &bing, &yahoo_ch,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_ch,
- };
- 
- // Chile
- const PrepopulatedEngine* const engines_CL[] = {
--    &google, &bing, &yahoo_cl,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_cl,
- };
- 
- // China
- const PrepopulatedEngine* const engines_CN[] = {
--    &google, &baidu, &sogou, &so_360,
-+    &google, &duckduckgo, &duckduckgo_light, &baidu, &sogou, &so_360,
- };
- 
- // Colombia
- const PrepopulatedEngine* const engines_CO[] = {
--    &google, &bing, &yahoo_co,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_co,
- };
- 
- // Costa Rica
- const PrepopulatedEngine* const engines_CR[] = {
--    &google, &yahoo, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Czech Republic
- const PrepopulatedEngine* const engines_CZ[] = {
--    &google, &seznam, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &seznam, &bing,
- };
- 
- // Germany
- const PrepopulatedEngine* const engines_DE[] = {
--    &google, &bing, &yahoo_de,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_de,
- };
- 
- // Denmark
- const PrepopulatedEngine* const engines_DK[] = {
--    &google, &bing, &yahoo_dk,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_dk,
- };
- 
- // Dominican Republic
- const PrepopulatedEngine* const engines_DO[] = {
--    &google, &yahoo, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Algeria
- const PrepopulatedEngine* const engines_DZ[] = {
--    &google, &bing, &yahoo_maktoob,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
- };
- 
- // Ecuador
- const PrepopulatedEngine* const engines_EC[] = {
--    &google, &bing, &yahoo,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Estonia
- const PrepopulatedEngine* const engines_EE[] = {
--    &google, &bing, &yahoo,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Egypt
- const PrepopulatedEngine* const engines_EG[] = {
--    &google, &yahoo_maktoob, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
- 
- // Spain
- const PrepopulatedEngine* const engines_ES[] = {
--    &google, &bing, &yahoo_es,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_es,
- };
- 
- // Faroe Islands
- const PrepopulatedEngine* const engines_FO[] = {
--    &google, &bing, &ask,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &ask,
- };
- 
- // Finland
- const PrepopulatedEngine* const engines_FI[] = {
--    &google, &bing, &yahoo_fi,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_fi,
- };
- 
- // France
- const PrepopulatedEngine* const engines_FR[] = {
--    &google, &bing, &yahoo_fr,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_fr,
- };
- 
- // United Kingdom
- const PrepopulatedEngine* const engines_GB[] = {
--    &google, &bing, &yahoo_uk, &ask_uk,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_uk, &ask_uk,
- };
- 
- // Greece
- const PrepopulatedEngine* const engines_GR[] = {
--    &google, &bing, &yahoo_gr,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_gr,
- };
- 
- // Guatemala
- const PrepopulatedEngine* const engines_GT[] = {
--    &google, &yahoo, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Hong Kong
- const PrepopulatedEngine* const engines_HK[] = {
--    &google, &yahoo_hk, &baidu, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo_hk, &baidu, &bing,
- };
- 
- // Honduras
- const PrepopulatedEngine* const engines_HN[] = {
--    &google, &yahoo, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Croatia
- const PrepopulatedEngine* const engines_HR[] = {
--    &google, &bing, &yahoo,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Hungary
- const PrepopulatedEngine* const engines_HU[] = {
--    &google, &bing, &yahoo,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Indonesia
- const PrepopulatedEngine* const engines_ID[] = {
--    &google, &yahoo_id, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo_id, &bing,
- };
- 
- // Ireland
- const PrepopulatedEngine* const engines_IE[] = {
--    &google, &bing, &yahoo_uk,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_uk,
- };
- 
- // Israel
- const PrepopulatedEngine* const engines_IL[] = {
--    &google, &yahoo, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // India
- const PrepopulatedEngine* const engines_IN[] = {
--    &google, &bing, &yahoo_in,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_in,
- };
- 
- // Iraq
- const PrepopulatedEngine* const engines_IQ[] = {
--    &google, &yahoo_maktoob, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
- 
- // Iran
- const PrepopulatedEngine* const engines_IR[] = {
--    &google, &yahoo, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Iceland
- const PrepopulatedEngine* const engines_IS[] = {
--    &google, &bing, &yahoo,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Italy
- const PrepopulatedEngine* const engines_IT[] = {
--    &google, &virgilio, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &virgilio, &bing,
- };
- 
- // Jamaica
- const PrepopulatedEngine* const engines_JM[] = {
--    &google, &yahoo, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Jordan
- const PrepopulatedEngine* const engines_JO[] = {
--    &google, &yahoo_maktoob, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
- 
- // Japan
- const PrepopulatedEngine* const engines_JP[] = {
--    &google, &yahoo_jp, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo_jp, &bing,
- };
- 
- // Kenya
- const PrepopulatedEngine* const engines_KE[] = {
--    &google, &yahoo, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Kuwait
- const PrepopulatedEngine* const engines_KW[] = {
--    &google, &yahoo_maktoob, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
- 
- // South Korea
- const PrepopulatedEngine* const engines_KR[] = {
--    &google, &naver, &daum,
-+    &google, &duckduckgo, &duckduckgo_light, &naver, &daum,
- };
- 
- // Kazakhstan
- const PrepopulatedEngine* const engines_KZ[] = {
--    &google, &mail_ru, &yandex_kz,
-+    &google, &duckduckgo, &duckduckgo_light, &mail_ru, &yandex_kz,
- };
- 
- // Lebanon
- const PrepopulatedEngine* const engines_LB[] = {
--    &google, &yahoo_maktoob, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
- 
- // Liechtenstein
- const PrepopulatedEngine* const engines_LI[] = {
--    &google, &bing, &yahoo_de,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_de,
- };
- 
- // Lithuania
- const PrepopulatedEngine* const engines_LT[] = {
--    &google, &bing, &yandex_ru,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yandex_ru,
- };
- 
- // Luxembourg
- const PrepopulatedEngine* const engines_LU[] = {
--    &google, &bing, &yahoo_fr,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_fr,
- };
- 
- // Latvia
- const PrepopulatedEngine* const engines_LV[] = {
--    &google, &yandex_ru, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yandex_ru, &bing,
- };
- 
- // Libya
- const PrepopulatedEngine* const engines_LY[] = {
--    &google, &yahoo_maktoob, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
- 
- // Morocco
- const PrepopulatedEngine* const engines_MA[] = {
--    &google, &bing, &yahoo_maktoob,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
- };
- 
- // Monaco
- const PrepopulatedEngine* const engines_MC[] = {
--    &google, &yahoo_fr, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo_fr, &bing,
- };
- 
- // Moldova
- const PrepopulatedEngine* const engines_MD[] = {
--    &google, &bing, &yahoo,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Montenegro
- const PrepopulatedEngine* const engines_ME[] = {
--    &google, &bing, &yahoo,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Macedonia
- const PrepopulatedEngine* const engines_MK[] = {
--    &google, &yahoo, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Mexico
- const PrepopulatedEngine* const engines_MX[] = {
--    &google, &bing, &yahoo_mx,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_mx,
- };
- 
- // Malaysia
- const PrepopulatedEngine* const engines_MY[] = {
--    &google, &yahoo_my, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo_my, &bing,
- };
- 
- // Nicaragua
- const PrepopulatedEngine* const engines_NI[] = {
--    &google, &yahoo, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Netherlands
- const PrepopulatedEngine* const engines_NL[] = {
--    &google, &yahoo_nl, &vinden,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo_nl, &vinden,
- };
- 
- // Norway
- const PrepopulatedEngine* const engines_NO[] = {
--    &google, &bing, &kvasir,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &kvasir,
- };
- 
- // New Zealand
- const PrepopulatedEngine* const engines_NZ[] = {
--    &google, &bing, &yahoo_nz,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_nz,
- };
- 
- // Oman
- const PrepopulatedEngine* const engines_OM[] = {
--    &google, &bing, &yahoo_maktoob,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
- };
- 
- // Panama
- const PrepopulatedEngine* const engines_PA[] = {
--    &google, &yahoo, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Peru
- const PrepopulatedEngine* const engines_PE[] = {
--    &google, &bing, &yahoo_pe,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_pe,
- };
- 
- // Philippines
- const PrepopulatedEngine* const engines_PH[] = {
--    &google, &yahoo_ph, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo_ph, &bing,
- };
- 
- // Pakistan
- const PrepopulatedEngine* const engines_PK[] = {
--    &google, &yahoo, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Puerto Rico
- const PrepopulatedEngine* const engines_PR[] = {
--    &google, &yahoo, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Poland
- const PrepopulatedEngine* const engines_PL[] = {
--    &google, &onet, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &onet, &bing,
- };
- 
- // Portugal
- const PrepopulatedEngine* const engines_PT[] = {
--    &google, &bing, &yahoo,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Paraguay
- const PrepopulatedEngine* const engines_PY[] = {
--    &google, &bing, &yahoo,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Qatar
- const PrepopulatedEngine* const engines_QA[] = {
--    &google, &yahoo_maktoob, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
- 
- // Romania
- const PrepopulatedEngine* const engines_RO[] = {
--    &google, &yahoo_ro, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo_ro, &bing,
- };
- 
- // Serbia
- const PrepopulatedEngine* const engines_RS[] = {
--    &google, &bing, &yahoo,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Russia
- const PrepopulatedEngine* const engines_RU[] = {
--    &google, &yandex_ru, &mail_ru,
-+    &google, &duckduckgo, &duckduckgo_light, &yandex_ru, &mail_ru,
- };
- 
- // Rwanda
- const PrepopulatedEngine* const engines_RW[] = {
--    &google, &bing, &yahoo,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Saudi Arabia
- const PrepopulatedEngine* const engines_SA[] = {
--    &google, &yahoo_maktoob, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
- 
- // Sweden
- const PrepopulatedEngine* const engines_SE[] = {
--    &google, &bing, &yahoo_se,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_se,
- };
- 
- // Singapore
- const PrepopulatedEngine* const engines_SG[] = {
--    &google, &yahoo_sg, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo_sg, &bing,
- };
- 
- // Slovenia
- const PrepopulatedEngine* const engines_SI[] = {
--    &google, &najdi, &ask,
-+    &google, &duckduckgo, &duckduckgo_light, &najdi, &ask,
- };
- 
- // Slovakia
- const PrepopulatedEngine* const engines_SK[] = {
--    &google, &bing, &yahoo,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // El Salvador
- const PrepopulatedEngine* const engines_SV[] = {
--    &google, &yahoo, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Syria
- const PrepopulatedEngine* const engines_SY[] = {
--    &google, &bing, &yahoo_maktoob,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
- };
- 
- // Thailand
- const PrepopulatedEngine* const engines_TH[] = {
--    &google, &yahoo_th, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo_th, &bing,
- };
- 
- // Tunisia
- const PrepopulatedEngine* const engines_TN[] = {
--    &google, &bing, &yahoo_maktoob,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
- };
- 
- // Turkey
- const PrepopulatedEngine* const engines_TR[] = {
--    &google, &bing, &yahoo_tr, &yandex_tr,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_tr, &yandex_tr,
- };
- 
- // Trinidad and Tobago
- const PrepopulatedEngine* const engines_TT[] = {
--    &google, &bing, &yahoo,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Taiwan
- const PrepopulatedEngine* const engines_TW[] = {
--    &google, &yahoo_tw, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo_tw, &bing,
- };
- 
- // Tanzania
- const PrepopulatedEngine* const engines_TZ[] = {
--    &google, &yahoo, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Ukraine
- const PrepopulatedEngine* const engines_UA[] = {
--    &google, &yandex_ua, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yandex_ua, &bing,
- };
- 
- // United States
- const PrepopulatedEngine* const engines_US[] = {
--    &google, &bing, &yahoo, &aol, &ask,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo, &aol, &ask,
- };
- 
- // Uruguay
- const PrepopulatedEngine* const engines_UY[] = {
--    &google, &bing, &yahoo,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Venezuela
- const PrepopulatedEngine* const engines_VE[] = {
--    &google, &bing, &yahoo_ve,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_ve,
- };
- 
- // Vietnam
- const PrepopulatedEngine* const engines_VN[] = {
--    &google, &yahoo_vn, &bing,
-+    &google, &duckduckgo, &duckduckgo_light, &yahoo_vn, &bing,
- };
- 
- // Yemen
- const PrepopulatedEngine* const engines_YE[] = {
--    &google, &bing, &yahoo_maktoob,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
- };
- 
- // South Africa
- const PrepopulatedEngine* const engines_ZA[] = {
--    &google, &bing, &yahoo,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Zimbabwe
- const PrepopulatedEngine* const engines_ZW[] = {
--    &google, &bing, &yahoo, &ask,
-+    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo, &ask,
- };
- 
- // A list of all the engines that we know about.
- const PrepopulatedEngine* const kAllEngines[] = {
-     // Prepopulated engines:
--    &aol, &ask, &ask_br, &ask_uk, &baidu, &bing, &daum, &google, &kvasir,
-+    &aol, &ask, &ask_br, &ask_uk, &baidu, &bing, &daum, &google, &duckduckgo, &duckduckgo_light, &kvasir,
-     &mail_ru, &najdi, &naver, &onet, &seznam, &sogou, &vinden, &virgilio,
-     &yahoo, &yahoo_ar, &yahoo_at, &yahoo_au, &yahoo_br, &yahoo_ca, &yahoo_ch,
-     &yahoo_cl, &yahoo_co, &yahoo_de, &yahoo_dk, &yahoo_es, &yahoo_fi, &yahoo_fr,
--- 
-2.11.0
-

+ 671 - 355
build/patches/Add-English-only-search-engine.patch

@@ -13,16 +13,16 @@ disable from all its searches RLZ and field experiments querystring parameters.
 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
-@@ -32,7 +32,7 @@
- 
+@@ -28,7 +28,7 @@
      // Increment this if you change the data in ways that mean users with
-     // existing data should get a new version.
--    "kCurrentDataVersion": 104
-+    "kCurrentDataVersion": 105
+     // existing data should get a new version. Otherwise, existing data may
+     // continue to be used and updates made here will not always appear.
+-    "kCurrentDataVersion": 111
++    "kCurrentDataVersion": 112
    },
  
    // The following engines are included in country lists and are added to the
-@@ -159,6 +159,27 @@
+@@ -126,6 +126,27 @@
        "id": 1
      },
  
@@ -47,681 +47,997 @@ diff --git a/components/search_engines/prepopulated_engines.json b/components/se
 +      "id": 13
 +    },
 +
-     "kvasir": {
-       "name": "Kvasir",
-       "keyword": "kvasir.no",
+     "mail_ru": {
+       "name": "@MAIL.RU",
+       "keyword": "mail.ru",
 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
-@@ -66,6 +66,7 @@ enum SearchEngineType {
-   SEARCH_ENGINE_DUCKDUCKGO,
-   SEARCH_ENGINE_DUCKDUCKGOLIGHT,
+@@ -68,6 +68,7 @@ enum SearchEngineType {
+   SEARCH_ENGINE_PARSIJOO,
+   SEARCH_ENGINE_QWANT,
    SEARCH_ENGINE_STARTPAGE,
 +  SEARCH_ENGINE_GOOGLE_EN,
-   SEARCH_ENGINE_MAX          // Bounding value needed for UMA histogram macro.
- };
  
+   SEARCH_ENGINE_MAX  // Bounding value needed for UMA histogram macro.
+ };
 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
-@@ -33,548 +33,548 @@ namespace {
+@@ -32,7 +32,7 @@ namespace {
  
  // Default (for countries with no better engine set)
  const PrepopulatedEngine* const engines_default[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
  };
- 
+@@ -41,7 +41,7 @@ const PrepopulatedEngine* const engines_default[] = {
+ // Engine selection by country ------------------------------------------------
  // United Arab Emirates
  const PrepopulatedEngine* const engines_AE[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -49,7 +49,7 @@ const PrepopulatedEngine* const engines_AE[] = {
  
  // Albania
  const PrepopulatedEngine* const engines_AL[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yahoo,
+     &bing,
+     &ask,
+@@ -57,7 +57,7 @@ const PrepopulatedEngine* const engines_AL[] = {
  
  // Argentina
  const PrepopulatedEngine* const engines_AR[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_ar,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_ar,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo_ar,
+     &duckduckgo,
+@@ -65,7 +65,7 @@ const PrepopulatedEngine* const engines_AR[] = {
  
  // Austria
  const PrepopulatedEngine* const engines_AT[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_at,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_at,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo_at,
+     &duckduckgo,
+@@ -73,7 +73,7 @@ const PrepopulatedEngine* const engines_AT[] = {
  
  // Australia
  const PrepopulatedEngine* const engines_AU[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_au,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_au,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo_au,
+     &duckduckgo,
+@@ -81,7 +81,7 @@ const PrepopulatedEngine* const engines_AU[] = {
  
  // Bosnia and Herzegovina
  const PrepopulatedEngine* const engines_BA[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yahoo,
+     &bing,
+     &ask,
+@@ -89,7 +89,7 @@ const PrepopulatedEngine* const engines_BA[] = {
  
  // Belgium
  const PrepopulatedEngine* const engines_BE[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo, &yahoo_fr,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo, &yahoo_fr,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -97,7 +97,7 @@ const PrepopulatedEngine* const engines_BE[] = {
  
  // Bulgaria
  const PrepopulatedEngine* const engines_BG[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &ask,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &ask,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &yandex_ru,
+@@ -105,7 +105,7 @@ const PrepopulatedEngine* const engines_BG[] = {
  
  // Bahrain
  const PrepopulatedEngine* const engines_BH[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &ask,
+@@ -113,7 +113,7 @@ const PrepopulatedEngine* const engines_BH[] = {
  
  // Burundi
  const PrepopulatedEngine* const engines_BI[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &yandex_ru,
+@@ -121,7 +121,7 @@ const PrepopulatedEngine* const engines_BI[] = {
  
  // Brunei
  const PrepopulatedEngine* const engines_BN[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_my, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_my, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -129,7 +129,7 @@ const PrepopulatedEngine* const engines_BN[] = {
  
  // Bolivia
  const PrepopulatedEngine* const engines_BO[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -137,7 +137,7 @@ const PrepopulatedEngine* const engines_BO[] = {
  
  // Brazil
  const PrepopulatedEngine* const engines_BR[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &ask_br, &bing, &yahoo_br,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &ask_br, &bing, &yahoo_br,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo_br,
+     &duckduckgo,
+@@ -145,7 +145,7 @@ const PrepopulatedEngine* const engines_BR[] = {
  
  // Belarus
  const PrepopulatedEngine* const engines_BY[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yandex_by, &mail_ru,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yandex_by, &mail_ru,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yandex_by,
+     &mail_ru,
+     &bing,
+@@ -153,7 +153,7 @@ const PrepopulatedEngine* const engines_BY[] = {
  
  // Belize
  const PrepopulatedEngine* const engines_BZ[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -161,12 +161,12 @@ const PrepopulatedEngine* const engines_BZ[] = {
  
  // Canada
  const PrepopulatedEngine* const engines_CA[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &ask, &yahoo_ca, &yahoo_qc,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &ask, &yahoo_ca, &yahoo_qc,
+-    &google, &startpage, &bing, &yahoo_ca, &yahoo_qc, &duckduckgo,
++    &googleen, &google, &startpage, &bing, &yahoo_ca, &yahoo_qc, &duckduckgo,
  };
  
  // Switzerland
  const PrepopulatedEngine* const engines_CH[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_ch,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_ch,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &duckduckgo,
+     &yahoo_ch,
+@@ -174,7 +174,7 @@ const PrepopulatedEngine* const engines_CH[] = {
  
  // Chile
  const PrepopulatedEngine* const engines_CL[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_cl,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_cl,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo_cl,
+     &duckduckgo,
+@@ -182,12 +182,12 @@ const PrepopulatedEngine* const engines_CL[] = {
  
  // China
  const PrepopulatedEngine* const engines_CN[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &baidu, &sogou, &so_360,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &baidu, &sogou, &so_360,
+-    &baidu, &so_360, &google, &startpage, &sogou, &bing,
++    &baidu, &so_360, &googleen, &google, &startpage, &sogou, &bing,
  };
  
  // Colombia
  const PrepopulatedEngine* const engines_CO[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_co,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_co,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yahoo_co,
+     &bing,
+     &duckduckgo,
+@@ -195,7 +195,7 @@ const PrepopulatedEngine* const engines_CO[] = {
  
  // Costa Rica
  const PrepopulatedEngine* const engines_CR[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -203,7 +203,7 @@ const PrepopulatedEngine* const engines_CR[] = {
  
  // Czech Republic
  const PrepopulatedEngine* const engines_CZ[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &seznam, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &seznam, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &seznam,
+     &bing,
+     &yahoo,
+@@ -211,7 +211,7 @@ const PrepopulatedEngine* const engines_CZ[] = {
  
  // Germany
  const PrepopulatedEngine* const engines_DE[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_de,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_de,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo_de,
+     &duckduckgo,
+@@ -219,7 +219,7 @@ const PrepopulatedEngine* const engines_DE[] = {
  
  // Denmark
  const PrepopulatedEngine* const engines_DK[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_dk,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_dk,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo_dk,
+     &duckduckgo,
+@@ -227,7 +227,7 @@ const PrepopulatedEngine* const engines_DK[] = {
  
  // Dominican Republic
  const PrepopulatedEngine* const engines_DO[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -235,7 +235,7 @@ const PrepopulatedEngine* const engines_DO[] = {
  
  // Algeria
  const PrepopulatedEngine* const engines_DZ[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yahoo,
+     &bing,
+     &yandex_ru,
+@@ -243,7 +243,7 @@ const PrepopulatedEngine* const engines_DZ[] = {
  
  // Ecuador
  const PrepopulatedEngine* const engines_EC[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -251,7 +251,7 @@ const PrepopulatedEngine* const engines_EC[] = {
  
  // Estonia
  const PrepopulatedEngine* const engines_EE[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yandex_ru,
+     &neti,
+@@ -259,7 +259,7 @@ const PrepopulatedEngine* const engines_EE[] = {
  
  // Egypt
  const PrepopulatedEngine* const engines_EG[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yahoo,
+     &bing,
+     &yandex_ru,
+@@ -267,7 +267,7 @@ const PrepopulatedEngine* const engines_EG[] = {
  
  // Spain
  const PrepopulatedEngine* const engines_ES[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_es,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_es,
- };
- 
- // Faroe Islands
- const PrepopulatedEngine* const engines_FO[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &ask,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &ask,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo_es,
+     &duckduckgo,
+@@ -275,7 +275,7 @@ const PrepopulatedEngine* const engines_ES[] = {
  
  // Finland
  const PrepopulatedEngine* const engines_FI[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_fi,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_fi,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo_fi,
+     &duckduckgo,
+@@ -283,7 +283,7 @@ const PrepopulatedEngine* const engines_FI[] = {
+ 
+ // Faroe Islands
+ const PrepopulatedEngine* const engines_FO[] = {
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -291,7 +291,7 @@ const PrepopulatedEngine* const engines_FO[] = {
  
  // France
  const PrepopulatedEngine* const engines_FR[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_fr,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_fr,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo_fr,
+     &qwant,
+@@ -299,7 +299,7 @@ const PrepopulatedEngine* const engines_FR[] = {
  
  // United Kingdom
  const PrepopulatedEngine* const engines_GB[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_uk, &ask_uk,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_uk, &ask_uk,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo_uk,
+     &duckduckgo,
+@@ -307,7 +307,7 @@ const PrepopulatedEngine* const engines_GB[] = {
  
  // Greece
  const PrepopulatedEngine* const engines_GR[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_gr,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_gr,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -315,7 +315,7 @@ const PrepopulatedEngine* const engines_GR[] = {
  
  // Guatemala
  const PrepopulatedEngine* const engines_GT[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -323,7 +323,7 @@ const PrepopulatedEngine* const engines_GT[] = {
  
  // Hong Kong
  const PrepopulatedEngine* const engines_HK[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_hk, &baidu, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_hk, &baidu, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yahoo_hk,
+     &bing,
+     &baidu,
+@@ -331,7 +331,7 @@ const PrepopulatedEngine* const engines_HK[] = {
  
  // Honduras
  const PrepopulatedEngine* const engines_HN[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -339,7 +339,7 @@ const PrepopulatedEngine* const engines_HN[] = {
  
  // Croatia
  const PrepopulatedEngine* const engines_HR[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -347,7 +347,7 @@ const PrepopulatedEngine* const engines_HR[] = {
  
  // Hungary
  const PrepopulatedEngine* const engines_HU[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yahoo,
+     &bing,
+     &duckduckgo,
+@@ -355,7 +355,7 @@ const PrepopulatedEngine* const engines_HU[] = {
  
  // Indonesia
  const PrepopulatedEngine* const engines_ID[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_id, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_id, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yahoo_id,
+     &bing,
+     &duckduckgo,
+@@ -363,7 +363,7 @@ const PrepopulatedEngine* const engines_ID[] = {
  
  // Ireland
  const PrepopulatedEngine* const engines_IE[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_uk,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_uk,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -371,7 +371,7 @@ const PrepopulatedEngine* const engines_IE[] = {
  
  // Israel
  const PrepopulatedEngine* const engines_IL[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &yandex_ru,
+@@ -379,7 +379,7 @@ const PrepopulatedEngine* const engines_IL[] = {
  
  // India
  const PrepopulatedEngine* const engines_IN[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_in,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_in,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yahoo_in,
+     &bing,
+     &duckduckgo,
+@@ -387,7 +387,7 @@ const PrepopulatedEngine* const engines_IN[] = {
  
  // Iraq
  const PrepopulatedEngine* const engines_IQ[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yahoo,
+     &bing,
+     &yandex_ru,
+@@ -395,7 +395,7 @@ const PrepopulatedEngine* const engines_IQ[] = {
  
  // Iran
  const PrepopulatedEngine* const engines_IR[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &parsijoo,
+@@ -403,7 +403,7 @@ const PrepopulatedEngine* const engines_IR[] = {
  
  // Iceland
  const PrepopulatedEngine* const engines_IS[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -411,7 +411,7 @@ const PrepopulatedEngine* const engines_IS[] = {
  
  // Italy
  const PrepopulatedEngine* const engines_IT[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &virgilio, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &virgilio, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -419,7 +419,7 @@ const PrepopulatedEngine* const engines_IT[] = {
  
  // Jamaica
  const PrepopulatedEngine* const engines_JM[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -427,7 +427,7 @@ const PrepopulatedEngine* const engines_JM[] = {
  
  // Jordan
  const PrepopulatedEngine* const engines_JO[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yahoo,
+     &bing,
+     &yandex_ru,
+@@ -435,7 +435,7 @@ const PrepopulatedEngine* const engines_JO[] = {
  
  // Japan
  const PrepopulatedEngine* const engines_JP[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_jp, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_jp, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yahoo_jp,
+     &bing,
+     &baidu,
+@@ -443,7 +443,7 @@ const PrepopulatedEngine* const engines_JP[] = {
  
  // Kenya
  const PrepopulatedEngine* const engines_KE[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Kuwait
- const PrepopulatedEngine* const engines_KW[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yahoo,
+     &bing,
+     &duckduckgo,
+@@ -451,7 +451,7 @@ const PrepopulatedEngine* const engines_KE[] = {
  
  // South Korea
  const PrepopulatedEngine* const engines_KR[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &naver, &daum,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &naver, &daum,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &naver,
+     &daum,
+     &bing,
+@@ -459,7 +459,7 @@ const PrepopulatedEngine* const engines_KR[] = {
+ 
+ // Kuwait
+ const PrepopulatedEngine* const engines_KW[] = {
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &ask,
+@@ -467,7 +467,7 @@ const PrepopulatedEngine* const engines_KW[] = {
  
  // Kazakhstan
  const PrepopulatedEngine* const engines_KZ[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &mail_ru, &yandex_kz,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &mail_ru, &yandex_kz,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yandex_kz,
+     &mail_ru,
+     &bing,
+@@ -475,7 +475,7 @@ const PrepopulatedEngine* const engines_KZ[] = {
  
  // Lebanon
  const PrepopulatedEngine* const engines_LB[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -483,7 +483,7 @@ const PrepopulatedEngine* const engines_LB[] = {
  
  // Liechtenstein
  const PrepopulatedEngine* const engines_LI[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_de,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_de,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &duckduckgo,
+     &yahoo,
+@@ -491,7 +491,7 @@ const PrepopulatedEngine* const engines_LI[] = {
  
  // Lithuania
  const PrepopulatedEngine* const engines_LT[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yandex_ru,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yandex_ru,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &yandex_ru,
+@@ -499,7 +499,7 @@ const PrepopulatedEngine* const engines_LT[] = {
  
  // Luxembourg
  const PrepopulatedEngine* const engines_LU[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_fr,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_fr,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &duckduckgo,
+     &yahoo,
+@@ -507,7 +507,7 @@ const PrepopulatedEngine* const engines_LU[] = {
  
  // Latvia
  const PrepopulatedEngine* const engines_LV[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yandex_ru, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yandex_ru, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yandex_ru,
+     &yahoo,
+@@ -515,7 +515,7 @@ const PrepopulatedEngine* const engines_LV[] = {
  
  // Libya
  const PrepopulatedEngine* const engines_LY[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yahoo,
+     &bing,
+     &yandex_com,
+@@ -523,7 +523,7 @@ const PrepopulatedEngine* const engines_LY[] = {
  
  // Morocco
  const PrepopulatedEngine* const engines_MA[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yahoo,
+     &bing,
+     &yandex_ru,
+@@ -531,7 +531,7 @@ const PrepopulatedEngine* const engines_MA[] = {
  
  // Monaco
  const PrepopulatedEngine* const engines_MC[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_fr, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_fr, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -539,7 +539,7 @@ const PrepopulatedEngine* const engines_MC[] = {
  
  // Moldova
  const PrepopulatedEngine* const engines_MD[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yandex_ru,
+     &mail_ru,
+     &duckduckgo,
+@@ -547,7 +547,7 @@ const PrepopulatedEngine* const engines_MD[] = {
  
  // Montenegro
  const PrepopulatedEngine* const engines_ME[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yahoo,
+     &bing,
+     &yandex_ru,
+@@ -555,7 +555,7 @@ const PrepopulatedEngine* const engines_ME[] = {
  
  // Macedonia
  const PrepopulatedEngine* const engines_MK[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yahoo,
+     &bing,
+     &duckduckgo,
+@@ -563,7 +563,7 @@ const PrepopulatedEngine* const engines_MK[] = {
  
  // Mexico
  const PrepopulatedEngine* const engines_MX[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_mx,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_mx,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo_mx,
+     &duckduckgo,
+@@ -571,7 +571,7 @@ const PrepopulatedEngine* const engines_MX[] = {
  
  // Malaysia
  const PrepopulatedEngine* const engines_MY[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_my, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_my, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yahoo_my,
+     &bing,
+     &baidu,
+@@ -579,7 +579,7 @@ const PrepopulatedEngine* const engines_MY[] = {
  
  // Nicaragua
  const PrepopulatedEngine* const engines_NI[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -587,7 +587,7 @@ const PrepopulatedEngine* const engines_NI[] = {
  
  // Netherlands
  const PrepopulatedEngine* const engines_NL[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_nl, &vinden,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_nl, &vinden,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo_nl,
+     &duckduckgo,
+@@ -595,7 +595,7 @@ const PrepopulatedEngine* const engines_NL[] = {
  
  // Norway
  const PrepopulatedEngine* const engines_NO[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &kvasir,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &kvasir,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -603,7 +603,7 @@ const PrepopulatedEngine* const engines_NO[] = {
  
  // New Zealand
  const PrepopulatedEngine* const engines_NZ[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_nz,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_nz,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &duckduckgo,
+     &yahoo_nz,
+@@ -611,7 +611,7 @@ const PrepopulatedEngine* const engines_NZ[] = {
  
  // Oman
  const PrepopulatedEngine* const engines_OM[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &ask,
+@@ -619,7 +619,7 @@ const PrepopulatedEngine* const engines_OM[] = {
  
  // Panama
  const PrepopulatedEngine* const engines_PA[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -627,7 +627,7 @@ const PrepopulatedEngine* const engines_PA[] = {
  
  // Peru
  const PrepopulatedEngine* const engines_PE[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_pe,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_pe,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yahoo_pe,
+     &bing,
+     &duckduckgo,
+@@ -635,7 +635,7 @@ const PrepopulatedEngine* const engines_PE[] = {
  
  // Philippines
  const PrepopulatedEngine* const engines_PH[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_ph, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_ph, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yahoo_ph,
+     &bing,
+     &duckduckgo,
+@@ -643,7 +643,7 @@ const PrepopulatedEngine* const engines_PH[] = {
  
  // Pakistan
  const PrepopulatedEngine* const engines_PK[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Puerto Rico
- const PrepopulatedEngine* const engines_PR[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yahoo,
+     &bing,
+     &baidu,
+@@ -651,7 +651,7 @@ const PrepopulatedEngine* const engines_PK[] = {
  
  // Poland
  const PrepopulatedEngine* const engines_PL[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &onet, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &onet, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -659,7 +659,7 @@ const PrepopulatedEngine* const engines_PL[] = {
+ 
+ // Puerto Rico
+ const PrepopulatedEngine* const engines_PR[] = {
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -667,7 +667,7 @@ const PrepopulatedEngine* const engines_PR[] = {
  
  // Portugal
  const PrepopulatedEngine* const engines_PT[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -675,7 +675,7 @@ const PrepopulatedEngine* const engines_PT[] = {
  
  // Paraguay
  const PrepopulatedEngine* const engines_PY[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -683,7 +683,7 @@ const PrepopulatedEngine* const engines_PY[] = {
  
  // Qatar
  const PrepopulatedEngine* const engines_QA[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &ask,
+@@ -691,7 +691,7 @@ const PrepopulatedEngine* const engines_QA[] = {
  
  // Romania
  const PrepopulatedEngine* const engines_RO[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_ro, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_ro, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -699,7 +699,7 @@ const PrepopulatedEngine* const engines_RO[] = {
  
  // Serbia
  const PrepopulatedEngine* const engines_RS[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yahoo,
+     &bing,
+     &duckduckgo,
+@@ -708,14 +708,14 @@ const PrepopulatedEngine* const engines_RS[] = {
  // Russia
  const PrepopulatedEngine* const engines_RU[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yandex_ru, &mail_ru,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yandex_ru, &mail_ru,
+     &yandex_ru,
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &mail_ru,
+     &bing,
  };
  
  // Rwanda
  const PrepopulatedEngine* const engines_RW[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &yandex_ru,
+@@ -723,7 +723,7 @@ const PrepopulatedEngine* const engines_RW[] = {
  
  // Saudi Arabia
  const PrepopulatedEngine* const engines_SA[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &yandex_com,
+@@ -731,7 +731,7 @@ const PrepopulatedEngine* const engines_SA[] = {
  
  // Sweden
  const PrepopulatedEngine* const engines_SE[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_se,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_se,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo_se,
+     &duckduckgo,
+@@ -739,7 +739,7 @@ const PrepopulatedEngine* const engines_SE[] = {
  
  // Singapore
  const PrepopulatedEngine* const engines_SG[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_sg, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_sg, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo_sg,
+     &yandex_com,
+@@ -747,7 +747,7 @@ const PrepopulatedEngine* const engines_SG[] = {
  
  // Slovenia
  const PrepopulatedEngine* const engines_SI[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &najdi, &ask,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &najdi, &ask,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -755,7 +755,7 @@ const PrepopulatedEngine* const engines_SI[] = {
  
  // Slovakia
  const PrepopulatedEngine* const engines_SK[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -763,7 +763,7 @@ const PrepopulatedEngine* const engines_SK[] = {
  
  // El Salvador
  const PrepopulatedEngine* const engines_SV[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -771,7 +771,7 @@ const PrepopulatedEngine* const engines_SV[] = {
  
  // Syria
  const PrepopulatedEngine* const engines_SY[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &yandex_ru,
+@@ -779,7 +779,7 @@ const PrepopulatedEngine* const engines_SY[] = {
  
  // Thailand
  const PrepopulatedEngine* const engines_TH[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_th, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_th, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yahoo_th,
+     &bing,
+     &ask,
+@@ -787,7 +787,7 @@ const PrepopulatedEngine* const engines_TH[] = {
  
  // Tunisia
  const PrepopulatedEngine* const engines_TN[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yahoo,
+     &bing,
+     &yandex_ru,
+@@ -795,7 +795,7 @@ const PrepopulatedEngine* const engines_TN[] = {
  
  // Turkey
  const PrepopulatedEngine* const engines_TR[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_tr, &yandex_tr,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_tr, &yandex_tr,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yandex_tr,
+     &yahoo_tr,
+     &bing,
+@@ -803,7 +803,7 @@ const PrepopulatedEngine* const engines_TR[] = {
  
  // Trinidad and Tobago
  const PrepopulatedEngine* const engines_TT[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -811,7 +811,7 @@ const PrepopulatedEngine* const engines_TT[] = {
  
  // Taiwan
  const PrepopulatedEngine* const engines_TW[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_tw, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_tw, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yahoo_tw,
+     &bing,
+     &baidu,
+@@ -819,7 +819,7 @@ const PrepopulatedEngine* const engines_TW[] = {
  
  // Tanzania
  const PrepopulatedEngine* const engines_TZ[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &yandex_ru,
+@@ -827,7 +827,7 @@ const PrepopulatedEngine* const engines_TZ[] = {
  
  // Ukraine
  const PrepopulatedEngine* const engines_UA[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yandex_ua, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yandex_ua, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yandex_ua,
+     &mail_ru,
+     &bing,
+@@ -835,7 +835,7 @@ const PrepopulatedEngine* const engines_UA[] = {
  
  // United States
  const PrepopulatedEngine* const engines_US[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo, &aol, &ask,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo, &aol, &ask,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -843,7 +843,7 @@ const PrepopulatedEngine* const engines_US[] = {
  
  // Uruguay
  const PrepopulatedEngine* const engines_UY[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -851,7 +851,7 @@ const PrepopulatedEngine* const engines_UY[] = {
  
  // Venezuela
  const PrepopulatedEngine* const engines_VE[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_ve,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_ve,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &yahoo_ve,
+     &bing,
+     &duckduckgo,
+@@ -859,7 +859,7 @@ const PrepopulatedEngine* const engines_VE[] = {
  
  // Vietnam
  const PrepopulatedEngine* const engines_VN[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_vn, &bing,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_vn, &bing,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &coccoc,
+     &bing,
+     &yahoo_vn,
+@@ -867,7 +867,7 @@ const PrepopulatedEngine* const engines_VN[] = {
  
  // Yemen
  const PrepopulatedEngine* const engines_YE[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &baidu,
+@@ -875,7 +875,7 @@ const PrepopulatedEngine* const engines_YE[] = {
  
  // South Africa
  const PrepopulatedEngine* const engines_ZA[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -883,7 +883,7 @@ const PrepopulatedEngine* const engines_ZA[] = {
  
  // Zimbabwe
  const PrepopulatedEngine* const engines_ZW[] = {
--    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo, &ask,
-+    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo, &ask,
- };
- 
- // A list of all the engines that we know about.
- const PrepopulatedEngine* const kAllEngines[] = {
-     // Prepopulated engines:
--    &aol, &ask, &ask_br, &ask_uk, &baidu, &bing, &daum, &google, &startpage, &duckduckgo, &duckduckgo_light, &kvasir,
-+    &aol, &ask, &ask_br, &ask_uk, &baidu, &bing, &daum, &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &kvasir,
-     &mail_ru, &najdi, &naver, &onet, &seznam, &sogou, &vinden, &virgilio,
-     &yahoo, &yahoo_ar, &yahoo_at, &yahoo_au, &yahoo_br, &yahoo_ca, &yahoo_ch,
-     &yahoo_cl, &yahoo_co, &yahoo_de, &yahoo_dk, &yahoo_es, &yahoo_fi, &yahoo_fr,
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &bing,
+     &yahoo,
+     &baidu,
+@@ -899,7 +899,7 @@ const PrepopulatedEngine* const kAllEngines[] = {
+     &coccoc,
+     &daum,
+     &duckduckgo,
+-    &google, &startpage,
++    &googleen, &google, &startpage,
+     &mail_ru,
+     &naver,
+     &parsijoo,
 -- 
 2.11.0
 

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

@@ -1,726 +0,0 @@
-From: csagan5 <32685696+csagan5@users.noreply.github.com>
-Date: Mon, 12 Mar 2018 20:31:44 +0100
-Subject: Add Qwant search engine
-
----
- .../search_engines/prepopulated_engines.json       |  24 ++-
- components/search_engines/search_engine_type.h     |   1 +
- .../template_url_prepopulate_data.cc               | 218 ++++++++++-----------
- 3 files changed, 133 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
-@@ -32,7 +32,7 @@
- 
-     // Increment this if you change the data in ways that mean users with
-     // existing data should get a new version.
--    "kCurrentDataVersion": 105
-+    "kCurrentDataVersion": 106
-   },
- 
-   // The following engines are included in country lists and are added to the
-@@ -954,6 +954,28 @@
-       "id": 6
-     },
- 
-+    "qwant": {
-+      "name": "Qwant",
-+      "keyword": "qwant.com",
-+      "favicon_url": "https://www.qwant.com/favicon.ico",
-+      "search_url": "https://www.qwant.com/?client=opensearch&q={searchTerms}",
-+      "suggest_url": "https://api.qwant.com/api/suggest/?client=opensearch&q={searchTerms}",
-+      "image_url": "https://www.qwant.com/?t=images&q={searchTerms}",
-+      "type": "SEARCH_ENGINE_QWANT",
-+      "id": 14
-+    },
-+
-+    "qwant": {
-+      "name": "Qwant",
-+      "keyword": "qwant.com",
-+      "favicon_url": "https://www.qwant.com/favicon.ico",
-+      "search_url": "https://www.qwant.com/?client=opensearch&q={searchTerms}",
-+      "suggest_url": "https://api.qwant.com/api/suggest/?client=opensearch&q={searchTerms}",
-+      "image_url": "https://www.qwant.com/?t=images&q={searchTerms}",
-+      "type": "SEARCH_ENGINE_QWANT",
-+      "id": 14
-+    },
-+
-     "rambler": {
-       "name": "\u0420\u0430\u043c\u0431\u043b\u0435\u0440",
-       "keyword": "rambler.ru",
-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
-@@ -67,6 +67,7 @@ enum SearchEngineType {
-   SEARCH_ENGINE_DUCKDUCKGOLIGHT,
-   SEARCH_ENGINE_STARTPAGE,
-   SEARCH_ENGINE_GOOGLE_EN,
-+  SEARCH_ENGINE_QWANT,
-   SEARCH_ENGINE_MAX          // Bounding value needed for UMA histogram macro.
- };
- 
-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
-@@ -33,548 +33,548 @@ namespace {
- 
- // Default (for countries with no better engine set)
- const PrepopulatedEngine* const engines_default[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // United Arab Emirates
- const PrepopulatedEngine* const engines_AE[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
- 
- // Albania
- const PrepopulatedEngine* const engines_AL[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Argentina
- const PrepopulatedEngine* const engines_AR[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_ar,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_ar,
- };
- 
- // Austria
- const PrepopulatedEngine* const engines_AT[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_at,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_at,
- };
- 
- // Australia
- const PrepopulatedEngine* const engines_AU[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_au,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_au,
- };
- 
- // Bosnia and Herzegovina
- const PrepopulatedEngine* const engines_BA[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Belgium
- const PrepopulatedEngine* const engines_BE[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo, &yahoo_fr,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo, &yahoo_fr,
- };
- 
- // Bulgaria
- const PrepopulatedEngine* const engines_BG[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &ask,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &ask,
- };
- 
- // Bahrain
- const PrepopulatedEngine* const engines_BH[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
- 
- // Burundi
- const PrepopulatedEngine* const engines_BI[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Brunei
- const PrepopulatedEngine* const engines_BN[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_my, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo_my, &bing,
- };
- 
- // Bolivia
- const PrepopulatedEngine* const engines_BO[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Brazil
- const PrepopulatedEngine* const engines_BR[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &ask_br, &bing, &yahoo_br,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &ask_br, &bing, &yahoo_br,
- };
- 
- // Belarus
- const PrepopulatedEngine* const engines_BY[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yandex_by, &mail_ru,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yandex_by, &mail_ru,
- };
- 
- // Belize
- const PrepopulatedEngine* const engines_BZ[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Canada
- const PrepopulatedEngine* const engines_CA[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &ask, &yahoo_ca, &yahoo_qc,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &ask, &yahoo_ca, &yahoo_qc,
- };
- 
- // Switzerland
- const PrepopulatedEngine* const engines_CH[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_ch,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_ch,
- };
- 
- // Chile
- const PrepopulatedEngine* const engines_CL[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_cl,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_cl,
- };
- 
- // China
- const PrepopulatedEngine* const engines_CN[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &baidu, &sogou, &so_360,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &baidu, &sogou, &so_360,
- };
- 
- // Colombia
- const PrepopulatedEngine* const engines_CO[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_co,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_co,
- };
- 
- // Costa Rica
- const PrepopulatedEngine* const engines_CR[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Czech Republic
- const PrepopulatedEngine* const engines_CZ[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &seznam, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &seznam, &bing,
- };
- 
- // Germany
- const PrepopulatedEngine* const engines_DE[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_de,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_de,
- };
- 
- // Denmark
- const PrepopulatedEngine* const engines_DK[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_dk,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_dk,
- };
- 
- // Dominican Republic
- const PrepopulatedEngine* const engines_DO[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Algeria
- const PrepopulatedEngine* const engines_DZ[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
- };
- 
- // Ecuador
- const PrepopulatedEngine* const engines_EC[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Estonia
- const PrepopulatedEngine* const engines_EE[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Egypt
- const PrepopulatedEngine* const engines_EG[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
- 
- // Spain
- const PrepopulatedEngine* const engines_ES[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_es,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_es,
- };
- 
- // Faroe Islands
- const PrepopulatedEngine* const engines_FO[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &ask,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &ask,
- };
- 
- // Finland
- const PrepopulatedEngine* const engines_FI[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_fi,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_fi,
- };
- 
- // France
- const PrepopulatedEngine* const engines_FR[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_fr,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_fr,
- };
- 
- // United Kingdom
- const PrepopulatedEngine* const engines_GB[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_uk, &ask_uk,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_uk, &ask_uk,
- };
- 
- // Greece
- const PrepopulatedEngine* const engines_GR[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_gr,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_gr,
- };
- 
- // Guatemala
- const PrepopulatedEngine* const engines_GT[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Hong Kong
- const PrepopulatedEngine* const engines_HK[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_hk, &baidu, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo_hk, &baidu, &bing,
- };
- 
- // Honduras
- const PrepopulatedEngine* const engines_HN[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Croatia
- const PrepopulatedEngine* const engines_HR[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Hungary
- const PrepopulatedEngine* const engines_HU[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Indonesia
- const PrepopulatedEngine* const engines_ID[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_id, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo_id, &bing,
- };
- 
- // Ireland
- const PrepopulatedEngine* const engines_IE[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_uk,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_uk,
- };
- 
- // Israel
- const PrepopulatedEngine* const engines_IL[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // India
- const PrepopulatedEngine* const engines_IN[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_in,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_in,
- };
- 
- // Iraq
- const PrepopulatedEngine* const engines_IQ[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
- 
- // Iran
- const PrepopulatedEngine* const engines_IR[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Iceland
- const PrepopulatedEngine* const engines_IS[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Italy
- const PrepopulatedEngine* const engines_IT[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &virgilio, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &virgilio, &bing,
- };
- 
- // Jamaica
- const PrepopulatedEngine* const engines_JM[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Jordan
- const PrepopulatedEngine* const engines_JO[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
- 
- // Japan
- const PrepopulatedEngine* const engines_JP[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_jp, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo_jp, &bing,
- };
- 
- // Kenya
- const PrepopulatedEngine* const engines_KE[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Kuwait
- const PrepopulatedEngine* const engines_KW[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
- 
- // South Korea
- const PrepopulatedEngine* const engines_KR[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &naver, &daum,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &naver, &daum,
- };
- 
- // Kazakhstan
- const PrepopulatedEngine* const engines_KZ[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &mail_ru, &yandex_kz,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &mail_ru, &yandex_kz,
- };
- 
- // Lebanon
- const PrepopulatedEngine* const engines_LB[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
- 
- // Liechtenstein
- const PrepopulatedEngine* const engines_LI[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_de,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_de,
- };
- 
- // Lithuania
- const PrepopulatedEngine* const engines_LT[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yandex_ru,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yandex_ru,
- };
- 
- // Luxembourg
- const PrepopulatedEngine* const engines_LU[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_fr,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_fr,
- };
- 
- // Latvia
- const PrepopulatedEngine* const engines_LV[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yandex_ru, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yandex_ru, &bing,
- };
- 
- // Libya
- const PrepopulatedEngine* const engines_LY[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
- 
- // Morocco
- const PrepopulatedEngine* const engines_MA[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
- };
- 
- // Monaco
- const PrepopulatedEngine* const engines_MC[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_fr, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo_fr, &bing,
- };
- 
- // Moldova
- const PrepopulatedEngine* const engines_MD[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Montenegro
- const PrepopulatedEngine* const engines_ME[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Macedonia
- const PrepopulatedEngine* const engines_MK[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Mexico
- const PrepopulatedEngine* const engines_MX[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_mx,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_mx,
- };
- 
- // Malaysia
- const PrepopulatedEngine* const engines_MY[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_my, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo_my, &bing,
- };
- 
- // Nicaragua
- const PrepopulatedEngine* const engines_NI[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Netherlands
- const PrepopulatedEngine* const engines_NL[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_nl, &vinden,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo_nl, &vinden,
- };
- 
- // Norway
- const PrepopulatedEngine* const engines_NO[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &kvasir,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &kvasir,
- };
- 
- // New Zealand
- const PrepopulatedEngine* const engines_NZ[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_nz,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_nz,
- };
- 
- // Oman
- const PrepopulatedEngine* const engines_OM[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
- };
- 
- // Panama
- const PrepopulatedEngine* const engines_PA[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Peru
- const PrepopulatedEngine* const engines_PE[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_pe,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_pe,
- };
- 
- // Philippines
- const PrepopulatedEngine* const engines_PH[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_ph, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo_ph, &bing,
- };
- 
- // Pakistan
- const PrepopulatedEngine* const engines_PK[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Puerto Rico
- const PrepopulatedEngine* const engines_PR[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Poland
- const PrepopulatedEngine* const engines_PL[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &onet, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &onet, &bing,
- };
- 
- // Portugal
- const PrepopulatedEngine* const engines_PT[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Paraguay
- const PrepopulatedEngine* const engines_PY[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Qatar
- const PrepopulatedEngine* const engines_QA[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
- 
- // Romania
- const PrepopulatedEngine* const engines_RO[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_ro, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo_ro, &bing,
- };
- 
- // Serbia
- const PrepopulatedEngine* const engines_RS[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Russia
- const PrepopulatedEngine* const engines_RU[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yandex_ru, &mail_ru,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yandex_ru, &mail_ru,
- };
- 
- // Rwanda
- const PrepopulatedEngine* const engines_RW[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Saudi Arabia
- const PrepopulatedEngine* const engines_SA[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
- 
- // Sweden
- const PrepopulatedEngine* const engines_SE[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_se,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_se,
- };
- 
- // Singapore
- const PrepopulatedEngine* const engines_SG[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_sg, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo_sg, &bing,
- };
- 
- // Slovenia
- const PrepopulatedEngine* const engines_SI[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &najdi, &ask,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &najdi, &ask,
- };
- 
- // Slovakia
- const PrepopulatedEngine* const engines_SK[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // El Salvador
- const PrepopulatedEngine* const engines_SV[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Syria
- const PrepopulatedEngine* const engines_SY[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
- };
- 
- // Thailand
- const PrepopulatedEngine* const engines_TH[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_th, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo_th, &bing,
- };
- 
- // Tunisia
- const PrepopulatedEngine* const engines_TN[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
- };
- 
- // Turkey
- const PrepopulatedEngine* const engines_TR[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_tr, &yandex_tr,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_tr, &yandex_tr,
- };
- 
- // Trinidad and Tobago
- const PrepopulatedEngine* const engines_TT[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Taiwan
- const PrepopulatedEngine* const engines_TW[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_tw, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo_tw, &bing,
- };
- 
- // Tanzania
- const PrepopulatedEngine* const engines_TZ[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Ukraine
- const PrepopulatedEngine* const engines_UA[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yandex_ua, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yandex_ua, &bing,
- };
- 
- // United States
- const PrepopulatedEngine* const engines_US[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo, &aol, &ask,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo, &aol, &ask,
- };
- 
- // Uruguay
- const PrepopulatedEngine* const engines_UY[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Venezuela
- const PrepopulatedEngine* const engines_VE[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_ve,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_ve,
- };
- 
- // Vietnam
- const PrepopulatedEngine* const engines_VN[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_vn, &bing,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &yahoo_vn, &bing,
- };
- 
- // Yemen
- const PrepopulatedEngine* const engines_YE[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
- };
- 
- // South Africa
- const PrepopulatedEngine* const engines_ZA[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
- // Zimbabwe
- const PrepopulatedEngine* const engines_ZW[] = {
--    &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo, &ask,
-+    &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &bing, &yahoo, &ask,
- };
- 
- // A list of all the engines that we know about.
- const PrepopulatedEngine* const kAllEngines[] = {
-     // Prepopulated engines:
--    &aol, &ask, &ask_br, &ask_uk, &baidu, &bing, &daum, &googleen, &google, &startpage, &duckduckgo, &duckduckgo_light, &kvasir,
-+    &aol, &ask, &ask_br, &ask_uk, &baidu, &bing, &daum, &googleen, &google, &startpage, &qwant, &duckduckgo, &duckduckgo_light, &kvasir,
-     &mail_ru, &najdi, &naver, &onet, &seznam, &sogou, &vinden, &virgilio,
-     &yahoo, &yahoo_ar, &yahoo_at, &yahoo_au, &yahoo_br, &yahoo_ca, &yahoo_ch,
-     &yahoo_cl, &yahoo_co, &yahoo_de, &yahoo_dk, &yahoo_es, &yahoo_fi, &yahoo_fr,
--- 
-2.11.0
-

+ 671 - 355
build/patches/Add-StartPage-search-engine.patch

@@ -11,16 +11,16 @@ Subject: Add StartPage search engine
 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
-@@ -32,7 +32,7 @@
- 
+@@ -28,7 +28,7 @@
      // Increment this if you change the data in ways that mean users with
-     // existing data should get a new version.
--    "kCurrentDataVersion": 103
-+    "kCurrentDataVersion": 104
+     // existing data should get a new version. Otherwise, existing data may
+     // continue to be used and updates made here will not always appear.
+-    "kCurrentDataVersion": 110
++    "kCurrentDataVersion": 111
    },
  
    // The following engines are included in country lists and are added to the
-@@ -247,6 +247,16 @@
+@@ -206,6 +206,16 @@
        "id": 56
      },
  
@@ -34,681 +34,997 @@ diff --git a/components/search_engines/prepopulated_engines.json b/components/se
 +      "id": 33
 +    },
 +
-     "vinden": {
-       "name": "Vinden.nl",
-       "keyword": "vinden.nl",
+     "yahoo": {
+       "name": "Yahoo!",
+       "keyword": "yahoo.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,
+@@ -67,6 +67,7 @@ enum SearchEngineType {
    SEARCH_ENGINE_DUCKDUCKGO,
-   SEARCH_ENGINE_DUCKDUCKGOLIGHT,
+   SEARCH_ENGINE_PARSIJOO,
+   SEARCH_ENGINE_QWANT,
 +  SEARCH_ENGINE_STARTPAGE,
-   SEARCH_ENGINE_MAX          // Bounding value needed for UMA histogram macro.
- };
  
+   SEARCH_ENGINE_MAX  // Bounding value needed for UMA histogram macro.
+ };
 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
-@@ -33,548 +33,548 @@ namespace {
+@@ -32,7 +32,7 @@ namespace {
  
  // Default (for countries with no better engine set)
  const PrepopulatedEngine* const engines_default[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
  };
- 
+@@ -41,7 +41,7 @@ const PrepopulatedEngine* const engines_default[] = {
+ // Engine selection by country ------------------------------------------------
  // United Arab Emirates
  const PrepopulatedEngine* const engines_AE[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -49,7 +49,7 @@ const PrepopulatedEngine* const engines_AE[] = {
  
  // Albania
  const PrepopulatedEngine* const engines_AL[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &yahoo,
+     &bing,
+     &ask,
+@@ -57,7 +57,7 @@ const PrepopulatedEngine* const engines_AL[] = {
  
  // Argentina
  const PrepopulatedEngine* const engines_AR[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_ar,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_ar,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo_ar,
+     &duckduckgo,
+@@ -65,7 +65,7 @@ const PrepopulatedEngine* const engines_AR[] = {
  
  // Austria
  const PrepopulatedEngine* const engines_AT[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_at,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_at,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo_at,
+     &duckduckgo,
+@@ -73,7 +73,7 @@ const PrepopulatedEngine* const engines_AT[] = {
  
  // Australia
  const PrepopulatedEngine* const engines_AU[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_au,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_au,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo_au,
+     &duckduckgo,
+@@ -81,7 +81,7 @@ const PrepopulatedEngine* const engines_AU[] = {
  
  // Bosnia and Herzegovina
  const PrepopulatedEngine* const engines_BA[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &yahoo,
+     &bing,
+     &ask,
+@@ -89,7 +89,7 @@ const PrepopulatedEngine* const engines_BA[] = {
  
  // Belgium
  const PrepopulatedEngine* const engines_BE[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo, &yahoo_fr,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo, &yahoo_fr,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -97,7 +97,7 @@ const PrepopulatedEngine* const engines_BE[] = {
  
  // Bulgaria
  const PrepopulatedEngine* const engines_BG[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &ask,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &ask,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &yandex_ru,
+@@ -105,7 +105,7 @@ const PrepopulatedEngine* const engines_BG[] = {
  
  // Bahrain
  const PrepopulatedEngine* const engines_BH[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &ask,
+@@ -113,7 +113,7 @@ const PrepopulatedEngine* const engines_BH[] = {
  
  // Burundi
  const PrepopulatedEngine* const engines_BI[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &yandex_ru,
+@@ -121,7 +121,7 @@ const PrepopulatedEngine* const engines_BI[] = {
  
  // Brunei
  const PrepopulatedEngine* const engines_BN[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo_my, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_my, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -129,7 +129,7 @@ const PrepopulatedEngine* const engines_BN[] = {
  
  // Bolivia
  const PrepopulatedEngine* const engines_BO[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -137,7 +137,7 @@ const PrepopulatedEngine* const engines_BO[] = {
  
  // Brazil
  const PrepopulatedEngine* const engines_BR[] = {
--    &google, &duckduckgo, &duckduckgo_light, &ask_br, &bing, &yahoo_br,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &ask_br, &bing, &yahoo_br,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo_br,
+     &duckduckgo,
+@@ -145,7 +145,7 @@ const PrepopulatedEngine* const engines_BR[] = {
  
  // Belarus
  const PrepopulatedEngine* const engines_BY[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yandex_by, &mail_ru,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yandex_by, &mail_ru,
- };
+-    &google,
++    &google, &startpage,
+     &yandex_by,
+     &mail_ru,
+     &bing,
+@@ -153,7 +153,7 @@ const PrepopulatedEngine* const engines_BY[] = {
  
  // Belize
  const PrepopulatedEngine* const engines_BZ[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -161,12 +161,12 @@ const PrepopulatedEngine* const engines_BZ[] = {
  
  // Canada
  const PrepopulatedEngine* const engines_CA[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &ask, &yahoo_ca, &yahoo_qc,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &ask, &yahoo_ca, &yahoo_qc,
+-    &google, &bing, &yahoo_ca, &yahoo_qc, &duckduckgo,
++    &google, &startpage, &bing, &yahoo_ca, &yahoo_qc, &duckduckgo,
  };
  
  // Switzerland
  const PrepopulatedEngine* const engines_CH[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_ch,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_ch,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &duckduckgo,
+     &yahoo_ch,
+@@ -174,7 +174,7 @@ const PrepopulatedEngine* const engines_CH[] = {
  
  // Chile
  const PrepopulatedEngine* const engines_CL[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_cl,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_cl,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo_cl,
+     &duckduckgo,
+@@ -182,12 +182,12 @@ const PrepopulatedEngine* const engines_CL[] = {
  
  // China
  const PrepopulatedEngine* const engines_CN[] = {
--    &google, &duckduckgo, &duckduckgo_light, &baidu, &sogou, &so_360,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &baidu, &sogou, &so_360,
+-    &baidu, &so_360, &google, &sogou, &bing,
++    &baidu, &so_360, &google, &startpage, &sogou, &bing,
  };
  
  // Colombia
  const PrepopulatedEngine* const engines_CO[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_co,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_co,
- };
+-    &google,
++    &google, &startpage,
+     &yahoo_co,
+     &bing,
+     &duckduckgo,
+@@ -195,7 +195,7 @@ const PrepopulatedEngine* const engines_CO[] = {
  
  // Costa Rica
  const PrepopulatedEngine* const engines_CR[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -203,7 +203,7 @@ const PrepopulatedEngine* const engines_CR[] = {
  
  // Czech Republic
  const PrepopulatedEngine* const engines_CZ[] = {
--    &google, &duckduckgo, &duckduckgo_light, &seznam, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &seznam, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &seznam,
+     &bing,
+     &yahoo,
+@@ -211,7 +211,7 @@ const PrepopulatedEngine* const engines_CZ[] = {
  
  // Germany
  const PrepopulatedEngine* const engines_DE[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_de,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_de,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo_de,
+     &duckduckgo,
+@@ -219,7 +219,7 @@ const PrepopulatedEngine* const engines_DE[] = {
  
  // Denmark
  const PrepopulatedEngine* const engines_DK[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_dk,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_dk,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo_dk,
+     &duckduckgo,
+@@ -227,7 +227,7 @@ const PrepopulatedEngine* const engines_DK[] = {
  
  // Dominican Republic
  const PrepopulatedEngine* const engines_DO[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -235,7 +235,7 @@ const PrepopulatedEngine* const engines_DO[] = {
  
  // Algeria
  const PrepopulatedEngine* const engines_DZ[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
- };
+-    &google,
++    &google, &startpage,
+     &yahoo,
+     &bing,
+     &yandex_ru,
+@@ -243,7 +243,7 @@ const PrepopulatedEngine* const engines_DZ[] = {
  
  // Ecuador
  const PrepopulatedEngine* const engines_EC[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -251,7 +251,7 @@ const PrepopulatedEngine* const engines_EC[] = {
  
  // Estonia
  const PrepopulatedEngine* const engines_EE[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yandex_ru,
+     &neti,
+@@ -259,7 +259,7 @@ const PrepopulatedEngine* const engines_EE[] = {
  
  // Egypt
  const PrepopulatedEngine* const engines_EG[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &yahoo,
+     &bing,
+     &yandex_ru,
+@@ -267,7 +267,7 @@ const PrepopulatedEngine* const engines_EG[] = {
  
  // Spain
  const PrepopulatedEngine* const engines_ES[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_es,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_es,
- };
- 
- // Faroe Islands
- const PrepopulatedEngine* const engines_FO[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &ask,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &ask,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo_es,
+     &duckduckgo,
+@@ -275,7 +275,7 @@ const PrepopulatedEngine* const engines_ES[] = {
  
  // Finland
  const PrepopulatedEngine* const engines_FI[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_fi,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_fi,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo_fi,
+     &duckduckgo,
+@@ -283,7 +283,7 @@ const PrepopulatedEngine* const engines_FI[] = {
+ 
+ // Faroe Islands
+ const PrepopulatedEngine* const engines_FO[] = {
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -291,7 +291,7 @@ const PrepopulatedEngine* const engines_FO[] = {
  
  // France
  const PrepopulatedEngine* const engines_FR[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_fr,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_fr,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo_fr,
+     &qwant,
+@@ -299,7 +299,7 @@ const PrepopulatedEngine* const engines_FR[] = {
  
  // United Kingdom
  const PrepopulatedEngine* const engines_GB[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_uk, &ask_uk,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_uk, &ask_uk,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo_uk,
+     &duckduckgo,
+@@ -307,7 +307,7 @@ const PrepopulatedEngine* const engines_GB[] = {
  
  // Greece
  const PrepopulatedEngine* const engines_GR[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_gr,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_gr,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -315,7 +315,7 @@ const PrepopulatedEngine* const engines_GR[] = {
  
  // Guatemala
  const PrepopulatedEngine* const engines_GT[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -323,7 +323,7 @@ const PrepopulatedEngine* const engines_GT[] = {
  
  // Hong Kong
  const PrepopulatedEngine* const engines_HK[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo_hk, &baidu, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_hk, &baidu, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &yahoo_hk,
+     &bing,
+     &baidu,
+@@ -331,7 +331,7 @@ const PrepopulatedEngine* const engines_HK[] = {
  
  // Honduras
  const PrepopulatedEngine* const engines_HN[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -339,7 +339,7 @@ const PrepopulatedEngine* const engines_HN[] = {
  
  // Croatia
  const PrepopulatedEngine* const engines_HR[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -347,7 +347,7 @@ const PrepopulatedEngine* const engines_HR[] = {
  
  // Hungary
  const PrepopulatedEngine* const engines_HU[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google,
++    &google, &startpage,
+     &yahoo,
+     &bing,
+     &duckduckgo,
+@@ -355,7 +355,7 @@ const PrepopulatedEngine* const engines_HU[] = {
  
  // Indonesia
  const PrepopulatedEngine* const engines_ID[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo_id, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_id, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &yahoo_id,
+     &bing,
+     &duckduckgo,
+@@ -363,7 +363,7 @@ const PrepopulatedEngine* const engines_ID[] = {
  
  // Ireland
  const PrepopulatedEngine* const engines_IE[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_uk,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_uk,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -371,7 +371,7 @@ const PrepopulatedEngine* const engines_IE[] = {
  
  // Israel
  const PrepopulatedEngine* const engines_IL[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &yandex_ru,
+@@ -379,7 +379,7 @@ const PrepopulatedEngine* const engines_IL[] = {
  
  // India
  const PrepopulatedEngine* const engines_IN[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_in,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_in,
- };
+-    &google,
++    &google, &startpage,
+     &yahoo_in,
+     &bing,
+     &duckduckgo,
+@@ -387,7 +387,7 @@ const PrepopulatedEngine* const engines_IN[] = {
  
  // Iraq
  const PrepopulatedEngine* const engines_IQ[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &yahoo,
+     &bing,
+     &yandex_ru,
+@@ -395,7 +395,7 @@ const PrepopulatedEngine* const engines_IQ[] = {
  
  // Iran
  const PrepopulatedEngine* const engines_IR[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &parsijoo,
+@@ -403,7 +403,7 @@ const PrepopulatedEngine* const engines_IR[] = {
  
  // Iceland
  const PrepopulatedEngine* const engines_IS[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -411,7 +411,7 @@ const PrepopulatedEngine* const engines_IS[] = {
  
  // Italy
  const PrepopulatedEngine* const engines_IT[] = {
--    &google, &duckduckgo, &duckduckgo_light, &virgilio, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &virgilio, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -419,7 +419,7 @@ const PrepopulatedEngine* const engines_IT[] = {
  
  // Jamaica
  const PrepopulatedEngine* const engines_JM[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -427,7 +427,7 @@ const PrepopulatedEngine* const engines_JM[] = {
  
  // Jordan
  const PrepopulatedEngine* const engines_JO[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &yahoo,
+     &bing,
+     &yandex_ru,
+@@ -435,7 +435,7 @@ const PrepopulatedEngine* const engines_JO[] = {
  
  // Japan
  const PrepopulatedEngine* const engines_JP[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo_jp, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_jp, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &yahoo_jp,
+     &bing,
+     &baidu,
+@@ -443,7 +443,7 @@ const PrepopulatedEngine* const engines_JP[] = {
  
  // Kenya
  const PrepopulatedEngine* const engines_KE[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Kuwait
- const PrepopulatedEngine* const engines_KW[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &yahoo,
+     &bing,
+     &duckduckgo,
+@@ -451,7 +451,7 @@ const PrepopulatedEngine* const engines_KE[] = {
  
  // South Korea
  const PrepopulatedEngine* const engines_KR[] = {
--    &google, &duckduckgo, &duckduckgo_light, &naver, &daum,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &naver, &daum,
- };
+-    &google,
++    &google, &startpage,
+     &naver,
+     &daum,
+     &bing,
+@@ -459,7 +459,7 @@ const PrepopulatedEngine* const engines_KR[] = {
+ 
+ // Kuwait
+ const PrepopulatedEngine* const engines_KW[] = {
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &ask,
+@@ -467,7 +467,7 @@ const PrepopulatedEngine* const engines_KW[] = {
  
  // Kazakhstan
  const PrepopulatedEngine* const engines_KZ[] = {
--    &google, &duckduckgo, &duckduckgo_light, &mail_ru, &yandex_kz,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &mail_ru, &yandex_kz,
- };
+-    &google,
++    &google, &startpage,
+     &yandex_kz,
+     &mail_ru,
+     &bing,
+@@ -475,7 +475,7 @@ const PrepopulatedEngine* const engines_KZ[] = {
  
  // Lebanon
  const PrepopulatedEngine* const engines_LB[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -483,7 +483,7 @@ const PrepopulatedEngine* const engines_LB[] = {
  
  // Liechtenstein
  const PrepopulatedEngine* const engines_LI[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_de,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_de,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &duckduckgo,
+     &yahoo,
+@@ -491,7 +491,7 @@ const PrepopulatedEngine* const engines_LI[] = {
  
  // Lithuania
  const PrepopulatedEngine* const engines_LT[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yandex_ru,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yandex_ru,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &yandex_ru,
+@@ -499,7 +499,7 @@ const PrepopulatedEngine* const engines_LT[] = {
  
  // Luxembourg
  const PrepopulatedEngine* const engines_LU[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_fr,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_fr,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &duckduckgo,
+     &yahoo,
+@@ -507,7 +507,7 @@ const PrepopulatedEngine* const engines_LU[] = {
  
  // Latvia
  const PrepopulatedEngine* const engines_LV[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yandex_ru, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yandex_ru, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yandex_ru,
+     &yahoo,
+@@ -515,7 +515,7 @@ const PrepopulatedEngine* const engines_LV[] = {
  
  // Libya
  const PrepopulatedEngine* const engines_LY[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &yahoo,
+     &bing,
+     &yandex_com,
+@@ -523,7 +523,7 @@ const PrepopulatedEngine* const engines_LY[] = {
  
  // Morocco
  const PrepopulatedEngine* const engines_MA[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
- };
+-    &google,
++    &google, &startpage,
+     &yahoo,
+     &bing,
+     &yandex_ru,
+@@ -531,7 +531,7 @@ const PrepopulatedEngine* const engines_MA[] = {
  
  // Monaco
  const PrepopulatedEngine* const engines_MC[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo_fr, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_fr, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -539,7 +539,7 @@ const PrepopulatedEngine* const engines_MC[] = {
  
  // Moldova
  const PrepopulatedEngine* const engines_MD[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google,
++    &google, &startpage,
+     &yandex_ru,
+     &mail_ru,
+     &duckduckgo,
+@@ -547,7 +547,7 @@ const PrepopulatedEngine* const engines_MD[] = {
  
  // Montenegro
  const PrepopulatedEngine* const engines_ME[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google,
++    &google, &startpage,
+     &yahoo,
+     &bing,
+     &yandex_ru,
+@@ -555,7 +555,7 @@ const PrepopulatedEngine* const engines_ME[] = {
  
  // Macedonia
  const PrepopulatedEngine* const engines_MK[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &yahoo,
+     &bing,
+     &duckduckgo,
+@@ -563,7 +563,7 @@ const PrepopulatedEngine* const engines_MK[] = {
  
  // Mexico
  const PrepopulatedEngine* const engines_MX[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_mx,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_mx,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo_mx,
+     &duckduckgo,
+@@ -571,7 +571,7 @@ const PrepopulatedEngine* const engines_MX[] = {
  
  // Malaysia
  const PrepopulatedEngine* const engines_MY[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo_my, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_my, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &yahoo_my,
+     &bing,
+     &baidu,
+@@ -579,7 +579,7 @@ const PrepopulatedEngine* const engines_MY[] = {
  
  // Nicaragua
  const PrepopulatedEngine* const engines_NI[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -587,7 +587,7 @@ const PrepopulatedEngine* const engines_NI[] = {
  
  // Netherlands
  const PrepopulatedEngine* const engines_NL[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo_nl, &vinden,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_nl, &vinden,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo_nl,
+     &duckduckgo,
+@@ -595,7 +595,7 @@ const PrepopulatedEngine* const engines_NL[] = {
  
  // Norway
  const PrepopulatedEngine* const engines_NO[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &kvasir,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &kvasir,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -603,7 +603,7 @@ const PrepopulatedEngine* const engines_NO[] = {
  
  // New Zealand
  const PrepopulatedEngine* const engines_NZ[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_nz,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_nz,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &duckduckgo,
+     &yahoo_nz,
+@@ -611,7 +611,7 @@ const PrepopulatedEngine* const engines_NZ[] = {
  
  // Oman
  const PrepopulatedEngine* const engines_OM[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &ask,
+@@ -619,7 +619,7 @@ const PrepopulatedEngine* const engines_OM[] = {
  
  // Panama
  const PrepopulatedEngine* const engines_PA[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -627,7 +627,7 @@ const PrepopulatedEngine* const engines_PA[] = {
  
  // Peru
  const PrepopulatedEngine* const engines_PE[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_pe,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_pe,
- };
+-    &google,
++    &google, &startpage,
+     &yahoo_pe,
+     &bing,
+     &duckduckgo,
+@@ -635,7 +635,7 @@ const PrepopulatedEngine* const engines_PE[] = {
  
  // Philippines
  const PrepopulatedEngine* const engines_PH[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo_ph, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_ph, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &yahoo_ph,
+     &bing,
+     &duckduckgo,
+@@ -643,7 +643,7 @@ const PrepopulatedEngine* const engines_PH[] = {
  
  // Pakistan
  const PrepopulatedEngine* const engines_PK[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
- 
- // Puerto Rico
- const PrepopulatedEngine* const engines_PR[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &yahoo,
+     &bing,
+     &baidu,
+@@ -651,7 +651,7 @@ const PrepopulatedEngine* const engines_PK[] = {
  
  // Poland
  const PrepopulatedEngine* const engines_PL[] = {
--    &google, &duckduckgo, &duckduckgo_light, &onet, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &onet, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -659,7 +659,7 @@ const PrepopulatedEngine* const engines_PL[] = {
+ 
+ // Puerto Rico
+ const PrepopulatedEngine* const engines_PR[] = {
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -667,7 +667,7 @@ const PrepopulatedEngine* const engines_PR[] = {
  
  // Portugal
  const PrepopulatedEngine* const engines_PT[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -675,7 +675,7 @@ const PrepopulatedEngine* const engines_PT[] = {
  
  // Paraguay
  const PrepopulatedEngine* const engines_PY[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -683,7 +683,7 @@ const PrepopulatedEngine* const engines_PY[] = {
  
  // Qatar
  const PrepopulatedEngine* const engines_QA[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &ask,
+@@ -691,7 +691,7 @@ const PrepopulatedEngine* const engines_QA[] = {
  
  // Romania
  const PrepopulatedEngine* const engines_RO[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo_ro, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_ro, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -699,7 +699,7 @@ const PrepopulatedEngine* const engines_RO[] = {
  
  // Serbia
  const PrepopulatedEngine* const engines_RS[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
- 
+-    &google,
++    &google, &startpage,
+     &yahoo,
+     &bing,
+     &duckduckgo,
+@@ -708,14 +708,14 @@ const PrepopulatedEngine* const engines_RS[] = {
  // Russia
  const PrepopulatedEngine* const engines_RU[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yandex_ru, &mail_ru,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yandex_ru, &mail_ru,
+     &yandex_ru,
+-    &google,
++    &google, &startpage,
+     &mail_ru,
+     &bing,
  };
  
  // Rwanda
  const PrepopulatedEngine* const engines_RW[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &yandex_ru,
+@@ -723,7 +723,7 @@ const PrepopulatedEngine* const engines_RW[] = {
  
  // Saudi Arabia
  const PrepopulatedEngine* const engines_SA[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_maktoob, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &yandex_com,
+@@ -731,7 +731,7 @@ const PrepopulatedEngine* const engines_SA[] = {
  
  // Sweden
  const PrepopulatedEngine* const engines_SE[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_se,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_se,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo_se,
+     &duckduckgo,
+@@ -739,7 +739,7 @@ const PrepopulatedEngine* const engines_SE[] = {
  
  // Singapore
  const PrepopulatedEngine* const engines_SG[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo_sg, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_sg, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo_sg,
+     &yandex_com,
+@@ -747,7 +747,7 @@ const PrepopulatedEngine* const engines_SG[] = {
  
  // Slovenia
  const PrepopulatedEngine* const engines_SI[] = {
--    &google, &duckduckgo, &duckduckgo_light, &najdi, &ask,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &najdi, &ask,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -755,7 +755,7 @@ const PrepopulatedEngine* const engines_SI[] = {
  
  // Slovakia
  const PrepopulatedEngine* const engines_SK[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -763,7 +763,7 @@ const PrepopulatedEngine* const engines_SK[] = {
  
  // El Salvador
  const PrepopulatedEngine* const engines_SV[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -771,7 +771,7 @@ const PrepopulatedEngine* const engines_SV[] = {
  
  // Syria
  const PrepopulatedEngine* const engines_SY[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &yandex_ru,
+@@ -779,7 +779,7 @@ const PrepopulatedEngine* const engines_SY[] = {
  
  // Thailand
  const PrepopulatedEngine* const engines_TH[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo_th, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_th, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &yahoo_th,
+     &bing,
+     &ask,
+@@ -787,7 +787,7 @@ const PrepopulatedEngine* const engines_TH[] = {
  
  // Tunisia
  const PrepopulatedEngine* const engines_TN[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
- };
+-    &google,
++    &google, &startpage,
+     &yahoo,
+     &bing,
+     &yandex_ru,
+@@ -795,7 +795,7 @@ const PrepopulatedEngine* const engines_TN[] = {
  
  // Turkey
  const PrepopulatedEngine* const engines_TR[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_tr, &yandex_tr,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_tr, &yandex_tr,
- };
+-    &google,
++    &google, &startpage,
+     &yandex_tr,
+     &yahoo_tr,
+     &bing,
+@@ -803,7 +803,7 @@ const PrepopulatedEngine* const engines_TR[] = {
  
  // Trinidad and Tobago
  const PrepopulatedEngine* const engines_TT[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -811,7 +811,7 @@ const PrepopulatedEngine* const engines_TT[] = {
  
  // Taiwan
  const PrepopulatedEngine* const engines_TW[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo_tw, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_tw, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &yahoo_tw,
+     &bing,
+     &baidu,
+@@ -819,7 +819,7 @@ const PrepopulatedEngine* const engines_TW[] = {
  
  // Tanzania
  const PrepopulatedEngine* const engines_TZ[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &yandex_ru,
+@@ -827,7 +827,7 @@ const PrepopulatedEngine* const engines_TZ[] = {
  
  // Ukraine
  const PrepopulatedEngine* const engines_UA[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yandex_ua, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yandex_ua, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &yandex_ua,
+     &mail_ru,
+     &bing,
+@@ -835,7 +835,7 @@ const PrepopulatedEngine* const engines_UA[] = {
  
  // United States
  const PrepopulatedEngine* const engines_US[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo, &aol, &ask,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo, &aol, &ask,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -843,7 +843,7 @@ const PrepopulatedEngine* const engines_US[] = {
  
  // Uruguay
  const PrepopulatedEngine* const engines_UY[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -851,7 +851,7 @@ const PrepopulatedEngine* const engines_UY[] = {
  
  // Venezuela
  const PrepopulatedEngine* const engines_VE[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_ve,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_ve,
- };
+-    &google,
++    &google, &startpage,
+     &yahoo_ve,
+     &bing,
+     &duckduckgo,
+@@ -859,7 +859,7 @@ const PrepopulatedEngine* const engines_VE[] = {
  
  // Vietnam
  const PrepopulatedEngine* const engines_VN[] = {
--    &google, &duckduckgo, &duckduckgo_light, &yahoo_vn, &bing,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &yahoo_vn, &bing,
- };
+-    &google,
++    &google, &startpage,
+     &coccoc,
+     &bing,
+     &yahoo_vn,
+@@ -867,7 +867,7 @@ const PrepopulatedEngine* const engines_VN[] = {
  
  // Yemen
  const PrepopulatedEngine* const engines_YE[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo_maktoob,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &baidu,
+@@ -875,7 +875,7 @@ const PrepopulatedEngine* const engines_YE[] = {
  
  // South Africa
  const PrepopulatedEngine* const engines_ZA[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo,
- };
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &duckduckgo,
+@@ -883,7 +883,7 @@ const PrepopulatedEngine* const engines_ZA[] = {
  
  // Zimbabwe
  const PrepopulatedEngine* const engines_ZW[] = {
--    &google, &duckduckgo, &duckduckgo_light, &bing, &yahoo, &ask,
-+    &google, &startpage, &duckduckgo, &duckduckgo_light, &bing, &yahoo, &ask,
- };
- 
- // A list of all the engines that we know about.
- const PrepopulatedEngine* const kAllEngines[] = {
-     // Prepopulated engines:
--    &aol, &ask, &ask_br, &ask_uk, &baidu, &bing, &daum, &google, &duckduckgo, &duckduckgo_light, &kvasir,
-+    &aol, &ask, &ask_br, &ask_uk, &baidu, &bing, &daum, &google, &startpage, &duckduckgo, &duckduckgo_light, &kvasir,
-     &mail_ru, &najdi, &naver, &onet, &seznam, &sogou, &vinden, &virgilio,
-     &yahoo, &yahoo_ar, &yahoo_at, &yahoo_au, &yahoo_br, &yahoo_ca, &yahoo_ch,
-     &yahoo_cl, &yahoo_co, &yahoo_de, &yahoo_dk, &yahoo_es, &yahoo_fi, &yahoo_fr,
+-    &google,
++    &google, &startpage,
+     &bing,
+     &yahoo,
+     &baidu,
+@@ -899,7 +899,7 @@ const PrepopulatedEngine* const kAllEngines[] = {
+     &coccoc,
+     &daum,
+     &duckduckgo,
+-    &google,
++    &google, &startpage,
+     &mail_ru,
+     &naver,
+     &parsijoo,
 -- 
 2.11.0
 

+ 47 - 42
build/patches/Add-a-flag-for-DNS-over-HTTPS.patch

@@ -6,25 +6,26 @@ Allow selection between Google and Cloudflare endpoints.
 Serve DoH requests with maximum priority, remove traffic annotation.
 Reduce HTTP headers in DoH requests to bare minimum.
 Add AdGuard (default) endpoint
+Do not fallback to UDP when using DoH
 
 See also: https://tools.ietf.org/id/draft-ietf-doh-dns-over-https-14.txt
 ---
  chrome/browser/about_flags.cc                      | 14 +++++++++++
  chrome/browser/flag_descriptions.cc                |  3 +++
  chrome/browser/flag_descriptions.h                 |  3 +++
- .../browser/net/system_network_context_manager.cc  | 16 ++++++-------
+ .../browser/net/system_network_context_manager.cc  | 17 +++++++------
  .../common/network_features.cc                     |  7 ++++--
  .../common/network_features.h                      |  5 +++-
  .../common/network_switch_list.h                   |  4 ++++
  net/base/load_flags_list.h                         |  6 +++++
  net/dns/dns_transaction.cc                         | 28 +++-------------------
- net/url_request/url_request_http_job.cc            | 26 ++++++++++++--------
- 10 files changed, 65 insertions(+), 47 deletions(-)
+ net/url_request/url_request_http_job.cc            | 28 +++++++++++++---------
+ 10 files changed, 67 insertions(+), 48 deletions(-)
 
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -427,6 +427,14 @@ const FeatureEntry::FeatureVariation kCCTModuleCacheVariations[] = {
+@@ -423,6 +423,14 @@ const FeatureEntry::FeatureVariation kCCTModuleCacheVariations[] = {
       base::size(kCCTModuleCache_ThirtyMinutes), nullptr},
  };
  
@@ -38,8 +39,8 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 +
  #endif  // OS_ANDROID
  
- const FeatureEntry::Choice kNumRasterThreadsChoices[] = {
-@@ -3561,6 +3569,12 @@ const FeatureEntry kFeatureEntries[] = {
+ const FeatureEntry::Choice kMHTMLGeneratorOptionChoices[] = {
+@@ -3436,6 +3444,12 @@ const FeatureEntry kFeatureEntries[] = {
       FEATURE_VALUE_TYPE(features::kAsyncDns)},
  #endif  // defined(OS_ANDROID)
  
@@ -55,7 +56,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
-@@ -2260,6 +2260,9 @@ const char kAutoFetchOnNetErrorPageDescription[] =
+@@ -2292,6 +2292,9 @@ const char kAutoFetchOnNetErrorPageDescription[] =
      "When enabled, and navigation fails with an offline error, schedule a "
      "fetch of the page when online again.";
  
@@ -68,7 +69,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
-@@ -1355,6 +1355,9 @@ extern const char kAsyncDnsDescription[];
+@@ -1362,6 +1362,9 @@ extern const char kAsyncDnsDescription[];
  extern const char kAutoFetchOnNetErrorPageName[];
  extern const char kAutoFetchOnNetErrorPageDescription[];
  
@@ -81,7 +82,7 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptio
 diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc
 --- a/chrome/browser/net/system_network_context_manager.cc
 +++ b/chrome/browser/net/system_network_context_manager.cc
-@@ -23,6 +23,7 @@
+@@ -24,6 +24,7 @@
  #include "chrome/browser/component_updater/sth_set_component_installer.h"
  #include "chrome/browser/io_thread.h"
  #include "chrome/browser/net/chrome_mojo_proxy_resolver_factory.h"
@@ -89,7 +90,15 @@ diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/brows
  #include "chrome/browser/safe_browsing/safe_browsing_service.h"
  #include "chrome/browser/ssl/ssl_config_service_manager.h"
  #include "chrome/common/channel_info.h"
-@@ -395,15 +396,12 @@ SystemNetworkContextManager::SystemNetworkContextManager(
+@@ -121,6 +122,7 @@ void GetStubResolverConfig(
+       if (!net::dns_util::IsValidDoHTemplate(
+               doh_server_list[i].GetString(),
+               doh_server_method_list[i].GetString())) {
++        LOG(ERROR) << "Invalid DoH template: " << doh_server_list[i].GetString() << " with method " << doh_server_method_list[i].GetString();
+         continue;
+       }
+ 
+@@ -395,15 +397,12 @@ SystemNetworkContextManager::SystemNetworkContextManager(
                                      base::Value(ShouldEnableAsyncDns()));
    base::ListValue default_doh_servers;
    base::ListValue default_doh_server_methods;
@@ -147,7 +156,7 @@ diff --git a/components/network_session_configurator/common/network_features.h b
 diff --git a/components/network_session_configurator/common/network_switch_list.h b/components/network_session_configurator/common/network_switch_list.h
 --- a/components/network_session_configurator/common/network_switch_list.h
 +++ b/components/network_session_configurator/common/network_switch_list.h
-@@ -35,6 +35,10 @@ NETWORK_SWITCH(kOriginToForceQuicOn, "origin-to-force-quic-on")
+@@ -32,6 +32,10 @@ NETWORK_SWITCH(kOriginToForceQuicOn, "origin-to-force-quic-on")
  // the server.
  NETWORK_SWITCH(kQuicConnectionOptions, "quic-connection-options")
  
@@ -161,23 +170,20 @@ diff --git a/components/network_session_configurator/common/network_switch_list.
 diff --git a/net/base/load_flags_list.h b/net/base/load_flags_list.h
 --- a/net/base/load_flags_list.h
 +++ b/net/base/load_flags_list.h
-@@ -89,6 +89,12 @@ LOAD_FLAG(MAYBE_USER_GESTURE, 1 << 13)
- LOAD_FLAG(DO_NOT_USE_EMBEDDED_IDENTITY, 1 << 14)
- 
- // Indicates that this request is not to be migrated to a cellular network when
+@@ -105,3 +105,9 @@ LOAD_FLAG(SKIP_VARY_CHECK, 1 << 16)
+ // does not complete in 60 seconds, the cache treat the stale resource as
+ // invalid, as it did not specify stale-while-revalidate.
+ LOAD_FLAG(SUPPORT_ASYNC_REVALIDATION, 1 << 17)
 +
 +// This load will not send Accept-Language or User-Agent headers, and not
 +// advertise brotli encoding.
 +// Used to comply with IETF (draft) DNS-over-HTTPS:
 +// "Implementors SHOULD NOT set non-essential HTTP headers in DoH client requests."
 +LOAD_FLAG(MINIMAL_HEADERS, 1 << 18)
- // QUIC connection migration is enabled.
- LOAD_FLAG(DISABLE_CONNECTION_MIGRATION_TO_CELLULAR, 1 << 15)
- 
 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
-@@ -358,30 +358,7 @@ class DnsHTTPAttempt : public DnsAttempt, public URLRequest::Delegate {
+@@ -352,30 +352,7 @@ class DnsHTTPAttempt : public DnsAttempt, public URLRequest::Delegate {
  
      HttpRequestHeaders extra_request_headers;
      extra_request_headers.SetHeader("Accept", kDnsOverHttpResponseContentType);
@@ -209,7 +215,7 @@ diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc
      net_log_ = request_->net_log();
  
      if (use_post) {
-@@ -397,6 +374,7 @@ class DnsHTTPAttempt : public DnsAttempt, public URLRequest::Delegate {
+@@ -391,6 +368,7 @@ class DnsHTTPAttempt : public DnsAttempt, public URLRequest::Delegate {
  
      request_->SetExtraRequestHeaders(extra_request_headers);
      request_->SetLoadFlags(request_->load_flags() | LOAD_DISABLE_CACHE |
@@ -217,7 +223,7 @@ diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc
                             LOAD_BYPASS_PROXY);
      request_->set_allow_credentials(false);
    }
-@@ -819,7 +797,7 @@ class DnsTransactionImpl : public DnsTransaction,
+@@ -807,7 +785,7 @@ class DnsTransactionImpl : public DnsTransaction,
          had_tcp_attempt_(false),
          doh_attempt_(false),
          first_server_index_(0),
@@ -229,7 +235,7 @@ diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc
 diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
 --- a/net/url_request/url_request_http_job.cc
 +++ b/net/url_request/url_request_http_job.cc
-@@ -422,19 +422,23 @@ void URLRequestHttpJob::Start() {
+@@ -423,17 +423,21 @@ void URLRequestHttpJob::Start() {
    // plugin could set a referrer although sending the referrer is inhibited.
    request_info_.extra_headers.RemoveHeader(HttpRequestHeaders::kReferer);
  
@@ -237,17 +243,16 @@ diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_reque
 -  // instance WebCore::FrameLoader::HideReferrer.
 -  if (referrer.is_valid()) {
 -    request_info_.extra_headers.SetHeader(HttpRequestHeaders::kReferer,
+-                                          referrer.spec());
 +  if (!(request_info_.load_flags & LOAD_MINIMAL_HEADERS)) {
 +    // Our consumer should have made sure that this is a safe referrer. See for
 +    // instance WebCore::FrameLoader::HideReferrer.
 +    if (referrer.is_valid()) {
 +      request_info_.extra_headers.SetHeader(HttpRequestHeaders::kReferer,
-                                           referrer.spec());
++                                           referrer.spec());
 +    }
    }
  
-   // This should be kept in sync with the corresponding code in
-   // URLRequest::GetUserAgent.
 -  request_info_.extra_headers.SetHeaderIfMissing(
 +  if (!(request_info_.load_flags & LOAD_MINIMAL_HEADERS)) {
 +    request_info_.extra_headers.SetHeaderIfMissing(
@@ -258,25 +263,25 @@ diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_reque
  
    AddExtraHeaders();
    AddCookieHeaderAndStart();
-@@ -647,10 +651,12 @@ void URLRequestHttpJob::AddExtraHeaders() {
-           HttpRequestHeaders::kAcceptEncoding)) {
-     // Advertise "br" encoding only if transferred data is opaque to proxy.
-     bool advertise_brotli = false;
--    if (request()->context()->enable_brotli()) {
--      if (request()->url().SchemeIsCryptographic() ||
--          IsLocalhost(request()->url())) {
--        advertise_brotli = true;
-+    if (!(request_info_.load_flags & LOAD_MINIMAL_HEADERS)) {
-+      if (request()->context()->enable_brotli()) {
-+        if (request()->url().SchemeIsCryptographic() ||
-+            IsLocalhost(request()->url())) {
-+          advertise_brotli = true;
-+        }
+@@ -652,10 +656,12 @@ void URLRequestHttpJob::AddExtraHeaders() {
+     } else {
+       // Advertise "br" encoding only if transferred data is opaque to proxy.
+       bool advertise_brotli = false;
+-      if (request()->context()->enable_brotli()) {
+-        if (request()->url().SchemeIsCryptographic() ||
+-            IsLocalhost(request()->url())) {
+-          advertise_brotli = true;
++      if (!(request_info_.load_flags & LOAD_MINIMAL_HEADERS)) {
++        if (request()->context()->enable_brotli()) {
++          if (request()->url().SchemeIsCryptographic() ||
++              IsLocalhost(request()->url())) {
++            advertise_brotli = true;
++          }
+         }
        }
-     }
  
-@@ -667,7 +673,7 @@ void URLRequestHttpJob::AddExtraHeaders() {
-                                           advertised_encodings);
+@@ -673,7 +679,7 @@ void URLRequestHttpJob::AddExtraHeaders() {
+     }
    }
  
 -  if (http_user_agent_settings_) {

+ 19 - 19
build/patches/Add-a-proxy-configuration-page.patch

@@ -78,7 +78,7 @@ diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
 diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd
 --- a/chrome/browser/browser_resources.grd
 +++ b/chrome/browser/browser_resources.grd
-@@ -204,6 +204,8 @@
+@@ -209,6 +209,8 @@
          <include name="IDR_SNIPPETS_INTERNALS_CSS" file="resources\snippets_internals\snippets_internals.css" compress="gzip" type="BINDATA" />
          <include name="IDR_SNIPPETS_INTERNALS_JS" file="resources\snippets_internals\snippets_internals.js" compress="gzip" type="BINDATA" />
          <include name="IDR_SNIPPETS_INTERNALS_MOJO_JS" file="${root_gen_dir}\chrome\browser\ui\webui\snippets_internals\snippets_internals.mojom.js" use_base_dir="false" type="BINDATA" compress="gzip" />
@@ -90,7 +90,7 @@ diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resou
 diff --git a/chrome/browser/prefs/chrome_command_line_pref_store.cc b/chrome/browser/prefs/chrome_command_line_pref_store.cc
 --- a/chrome/browser/prefs/chrome_command_line_pref_store.cc
 +++ b/chrome/browser/prefs/chrome_command_line_pref_store.cc
-@@ -157,7 +157,7 @@ void ChromeCommandLinePrefStore::ApplyProxyMode() {
+@@ -158,7 +158,7 @@ void ChromeCommandLinePrefStore::ApplyProxyMode() {
      SetValue(
          proxy_config::prefs::kProxy,
          std::make_unique<base::Value>(ProxyConfigDictionary::CreateFixedServers(
@@ -439,13 +439,13 @@ new file mode 100644
 +    renderConfig_: function() {
 +      if (this.currentConfig.auto_detect)
 +        $(kIdModeAutoDetect).checked = true;
-+      else if (this.currentConfig.rules.type == "empty")
-+        $(kIdModeEmpty).checked = true;
 +      else if (this.currentConfig.hasOwnProperty('pac_url')) {
 +        $(kIdPacURL).value = this.currentConfig.pac_url;
 +        $(kIdPacMandatory).checked = this.currentConfig.pac_mandatory;
 +        $(kIdModeUsePacURL).checked = true;
-+      } else {
++      } else if (this.currentConfig.rules.type == "empty")
++        $(kIdModeEmpty).checked = true;
++      else {
 +        $(kIdBypassRules).value = this.currentConfig.rules.bypass_rules;
 +        $(kIdReverseBypass).checked = this.currentConfig.rules.reverse_bypass;
 +
@@ -508,7 +508,7 @@ new file mode 100644
 diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
 --- a/chrome/browser/ui/BUILD.gn
 +++ b/chrome/browser/ui/BUILD.gn
-@@ -273,6 +273,8 @@ jumbo_split_static_library("ui") {
+@@ -266,6 +266,8 @@ jumbo_split_static_library("ui") {
      "webui/metrics_handler.h",
      "webui/net_export_ui.cc",
      "webui/net_export_ui.h",
@@ -528,15 +528,15 @@ diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrom
  #include "chrome/browser/ui/webui/quota_internals/quota_internals_ui.h"
  #include "chrome/browser/ui/webui/settings/md_settings_ui.h"
  #include "chrome/browser/ui/webui/settings_utils.h"
-@@ -529,6 +530,8 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
-     return &NewWebUI<SnippetsInternalsUI>;
-   if (url.host_piece() == chrome::kChromeUIWebApksHost)
-     return &NewWebUI<WebApksUI>;
+@@ -378,6 +379,8 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
+     return &NewWebUI<MemoryInternalsUI>;
+   if (url.host_piece() == chrome::kChromeUINetExportHost)
+     return &NewWebUI<NetExportUI>;
 +  if (url.host_piece() == chrome::kChromeUIProxyConfigHost)
 +    return &NewWebUI<ProxyConfigUI>;
- #else
-   if (url.SchemeIs(content::kChromeDevToolsScheme)) {
-     if (!DevToolsUIBindings::IsValidFrontendURL(url))
+   if (url.host_piece() == chrome::kChromeUINetInternalsHost)
+     return &NewWebUI<NetInternalsUI>;
+   if (url.host_piece() == chrome::kChromeUINTPTilesInternalsHost)
 diff --git a/chrome/browser/ui/webui/proxy_config_ui.cc b/chrome/browser/ui/webui/proxy_config_ui.cc
 new file mode 100644
 --- /dev/null
@@ -679,9 +679,9 @@ new file mode 100644
 +#endif  // defined(OS_CHROMEOS)
 +
 +  if (!pref_proxy_config_tracker_) {
-+    pref_proxy_config_tracker_.reset(
++    pref_proxy_config_tracker_ =
 +        ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
-+            profile->GetPrefs(), g_browser_process->local_state()));
++            profile->GetPrefs(), g_browser_process->local_state());
 +  }
 +
 +  proxy_config_service_ = ProxyServiceFactory::CreateProxyConfigService(
@@ -982,7 +982,7 @@ new file mode 100644
 diff --git a/chrome/common/webui_url_constants.cc b/chrome/common/webui_url_constants.cc
 --- a/chrome/common/webui_url_constants.cc
 +++ b/chrome/common/webui_url_constants.cc
-@@ -183,6 +183,8 @@ const char kChromeUINativePhysicalWebDiagnosticsURL[] =
+@@ -182,6 +182,8 @@ const char kChromeUINativePhysicalWebDiagnosticsURL[] =
  const char kChromeUINativeScheme[] = "chrome-native";
  const char kChromeUIOfflineInternalsHost[] = "offline-internals";
  const char kChromeUIPhysicalWebDiagnosticsHost[] = "physical-web-diagnostics";
@@ -991,7 +991,7 @@ diff --git a/chrome/common/webui_url_constants.cc b/chrome/common/webui_url_cons
  const char kChromeUISnippetsInternalsHost[] = "snippets-internals";
  const char kChromeUIWebApksHost[] = "webapks";
  #endif
-@@ -344,6 +346,7 @@ const char* const kChromeHostURLs[] = {
+@@ -351,6 +353,7 @@ const char* const kChromeHostURLs[] = {
      kChromeUIPasswordManagerInternalsHost,
      kChromeUIPolicyHost,
      kChromeUIPredictorsHost,
@@ -999,7 +999,7 @@ diff --git a/chrome/common/webui_url_constants.cc b/chrome/common/webui_url_cons
      kChromeUIQuotaInternalsHost,
      kChromeUISignInInternalsHost,
      kChromeUISiteEngagementHost,
-@@ -378,6 +381,7 @@ const char* const kChromeHostURLs[] = {
+@@ -385,6 +388,7 @@ const char* const kChromeHostURLs[] = {
  #if !defined(OS_ANDROID)
  #if !defined(OS_CHROMEOS)
      kChromeUIAppLauncherPageHost,
@@ -1010,7 +1010,7 @@ diff --git a/chrome/common/webui_url_constants.cc b/chrome/common/webui_url_cons
 diff --git a/chrome/common/webui_url_constants.h b/chrome/common/webui_url_constants.h
 --- a/chrome/common/webui_url_constants.h
 +++ b/chrome/common/webui_url_constants.h
-@@ -105,6 +105,8 @@ extern const char kChromeUIMemoryInternalsHost[];
+@@ -103,6 +103,8 @@ extern const char kChromeUIMemoryInternalsHost[];
  extern const char kChromeUINTPTilesInternalsHost[];
  extern const char kChromeUINaClHost[];
  extern const char kChromeUINetExportHost[];

+ 22 - 21
build/patches/Add-an-always-incognito-mode.patch

@@ -6,20 +6,20 @@ More specifically, add a preference that causes all new tabs and all
 clicked links to launch as incognito.
 ---
  .../android/java/res/xml/privacy_preferences.xml   |  5 ++
- .../browser/AlwaysIncognitoLinkInterceptor.java    | 72 ++++++++++++++++++++++
+ .../browser/AlwaysIncognitoLinkInterceptor.java    | 73 ++++++++++++++++++++++
  .../chromium/chrome/browser/ChromeActivity.java    |  4 ++
  .../chrome/browser/appmenu/AppMenuHandler.java     | 12 ++++
  .../contextmenu/ChromeContextMenuPopulator.java    |  9 ++-
- .../chrome/browser/tabmodel/ChromeTabCreator.java  | 24 +++++++-
+ .../chrome/browser/tabmodel/ChromeTabCreator.java  | 24 ++++++-
  .../java/strings/android_chrome_strings.grd        |  6 ++
  chrome/android/java_sources.gni                    |  1 +
- 8 files changed, 131 insertions(+), 2 deletions(-)
+ 8 files changed, 132 insertions(+), 2 deletions(-)
  create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/AlwaysIncognitoLinkInterceptor.java
 
 diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
 --- a/chrome/android/java/res/xml/privacy_preferences.xml
 +++ b/chrome/android/java/res/xml/privacy_preferences.xml
-@@ -35,6 +35,11 @@
+@@ -40,6 +40,11 @@
          android:key="usage_and_crash_reports"
          android:title="@string/usage_and_crash_reports_title_legacy"
          android:fragment="org.chromium.chrome.browser.preferences.privacy.UsageAndCrashReportsPreferenceFragment" />
@@ -35,7 +35,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/AlwaysIncognito
 new file mode 100644
 --- /dev/null
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/AlwaysIncognitoLinkInterceptor.java
-@@ -0,0 +1,72 @@
+@@ -0,0 +1,73 @@
 +/* This Source Code Form is subject to the terms of the Mozilla Public
 + * License, v. 2.0. If a copy of the MPL was not distributed with this
 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -47,6 +47,7 @@ new file mode 100644
 +import org.chromium.chrome.browser.tab.EmptyTabObserver;
 +import org.chromium.chrome.browser.tab.Tab;
 +import org.chromium.chrome.browser.tabmodel.TabCreatorManager;
++import org.chromium.chrome.browser.tabmodel.TabLaunchType;
 +import org.chromium.chrome.browser.tabmodel.TabModel;
 +import org.chromium.content_public.browser.LoadUrlParams;
 +
@@ -98,7 +99,7 @@ new file mode 100644
 +            return;
 +        }
 +
-+        tab.getActivity().getTabCreator(true).createNewTab(new LoadUrlParams(url), TabModel.TabLaunchType.FROM_LINK, tab);
++        tab.getActivity().getTabCreator(true).createNewTab(new LoadUrlParams(url), TabLaunchType.FROM_LINK, tab);
 +
 +        if ((url.equals(lastUrl)) || (!tab.canGoBack())) {
 +            // this call was triggered by a reload
@@ -111,15 +112,15 @@ new file mode 100644
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
-@@ -253,6 +253,7 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
+@@ -261,6 +261,7 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
      private TouchExplorationStateChangeListener mTouchExplorationStateChangeListener;
  
      // Observes when sync becomes ready to create the mContextReporter.
 +    private static final String PREF_ALWAYS_INCOGNITO = "always_incognito";
      private ProfileSyncService.SyncStateChangedListener mSyncStateChangedListener;
  
-     private ChromeFullscreenManager mFullscreenManager;
-@@ -1690,6 +1691,9 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
+     @Nullable
+@@ -1728,6 +1729,9 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
              throw new IllegalStateException(
                      "Attempting to access TabCreator before initialization");
          }
@@ -210,17 +211,17 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/Chrome
  import org.chromium.base.TraceEvent;
 +import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor;
  import org.chromium.chrome.browser.ChromeActivity;
- import org.chromium.chrome.browser.ChromeFeatureList;
  import org.chromium.chrome.browser.IntentHandler;
-@@ -19,6 +21,7 @@ import org.chromium.chrome.browser.compositor.layouts.content.TabContentManager;
+ import org.chromium.chrome.browser.ServiceTabLauncher;
+@@ -16,6 +18,7 @@ import org.chromium.chrome.browser.compositor.layouts.content.TabContentManager;
  import org.chromium.chrome.browser.net.spdyproxy.DataReductionProxySettings;
  import org.chromium.chrome.browser.tab.Tab;
  import org.chromium.chrome.browser.tab.TabDelegateFactory;
 +import org.chromium.chrome.browser.tab.TabObserver;
  import org.chromium.chrome.browser.tab.TabRedirectHandler;
- import org.chromium.chrome.browser.tabmodel.TabModel.TabLaunchType;
- import org.chromium.chrome.browser.tabmodel.TabModel.TabSelectionType;
-@@ -37,6 +40,7 @@ public class ChromeTabCreator extends TabCreatorManager.TabCreator {
+ import org.chromium.chrome.browser.tab.TabState;
+ import org.chromium.chrome.browser.util.IntentUtils;
+@@ -33,6 +36,7 @@ public class ChromeTabCreator extends TabCreatorManager.TabCreator {
  
      private final ChromeActivity mActivity;
      private final boolean mIncognito;
@@ -228,7 +229,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/Chrome
  
      private WindowAndroid mNativeWindow;
      private TabModel mTabModel;
-@@ -48,6 +52,11 @@ public class ChromeTabCreator extends TabCreatorManager.TabCreator {
+@@ -44,6 +48,11 @@ public class ChromeTabCreator extends TabCreatorManager.TabCreator {
          mActivity = activity;
          mNativeWindow = nativeWindow;
          mIncognito = incognito;
@@ -240,7 +241,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/Chrome
      }
  
      @Override
-@@ -160,6 +169,10 @@ public class ChromeTabCreator extends TabCreatorManager.TabCreator {
+@@ -154,6 +163,10 @@ public class ChromeTabCreator extends TabCreatorManager.TabCreator {
                          tab.getWebContents());
              }
  
@@ -251,7 +252,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/Chrome
              mTabModel.addTab(tab, position, type);
              return tab;
          } finally {
-@@ -200,6 +213,11 @@ public class ChromeTabCreator extends TabCreatorManager.TabCreator {
+@@ -178,6 +191,11 @@ public class ChromeTabCreator extends TabCreatorManager.TabCreator {
          Tab tab = Tab.createLiveTab(
                  Tab.INVALID_TAB_ID, mIncognito, mNativeWindow, type, parentId, !openInForeground);
          tab.initialize(webContents, mTabContentManager, delegateFactory, !openInForeground, false);
@@ -263,7 +264,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/Chrome
          mTabModel.addTab(tab, position, type);
          return true;
      }
-@@ -243,7 +261,6 @@ public class ChromeTabCreator extends TabCreatorManager.TabCreator {
+@@ -220,7 +238,6 @@ public class ChromeTabCreator extends TabCreatorManager.TabCreator {
       */
      public Tab launchUrlFromExternalApp(String url, String referer, String headers,
              String appId, boolean forceNewTab, Intent intent, long intentTimestamp) {
@@ -271,7 +272,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/Chrome
          boolean isLaunchedFromChrome = TextUtils.equals(appId, mActivity.getPackageName());
  
          // If an external app sends an intent for a Weblite URL and the Data Reduction Proxy is
-@@ -303,6 +320,11 @@ public class ChromeTabCreator extends TabCreatorManager.TabCreator {
+@@ -280,6 +297,11 @@ public class ChromeTabCreator extends TabCreatorManager.TabCreator {
          tab.initialize(
                  null, mTabContentManager, createDefaultTabDelegateFactory(), !selectTab, false);
          assert state.isIncognito() == mIncognito;
@@ -286,7 +287,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/Chrome
 diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
 --- a/chrome/android/java/strings/android_chrome_strings.grd
 +++ b/chrome/android/java/strings/android_chrome_strings.grd
-@@ -688,6 +688,12 @@ CHAR-LIMIT guidelines:
+@@ -685,6 +685,12 @@ CHAR-LIMIT guidelines:
        <message name="IDS_SAFE_BROWSING_SCOUT_REPORTING_SUMMARY" desc="Body text for Chrome setting under 'Help Improve Safe Browsing'. This feature sends small amounts of data to Google about potentially-dangerous pages to help Safe Browsing improve Chrome's protection against malware and phishing.">
          Sends some system information and page content to Google
        </message>
@@ -302,7 +303,7 @@ diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/and
 diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni
 --- a/chrome/android/java_sources.gni
 +++ b/chrome/android/java_sources.gni
-@@ -8,6 +8,7 @@ import("//components/offline_pages/buildflags/features.gni")
+@@ -10,6 +10,7 @@ import("//components/offline_pages/buildflags/features.gni")
  import("//device/vr/buildflags/buildflags.gni")
  
  chrome_java_sources = [

+ 16 - 16
build/patches/Add-bookmark-import-export-actions.patch

@@ -291,7 +291,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
      private BookmarkUndoController mUndoController;
      private final ObserverList<BookmarkUIObserver> mUIObservers = new ObserverList<>();
      private BasicNativePage mNativePage;
-@@ -267,6 +270,13 @@ public class BookmarkManager implements BookmarkDelegate, SearchDelegate,
+@@ -266,6 +269,13 @@ public class BookmarkManager implements BookmarkDelegate, SearchDelegate,
      }
  
      /**
@@ -305,7 +305,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
       * @return Current URL representing the UI state of bookmark manager. If no state has been shown
       *         yet in this session, on phone return last used state stored in preference; on tablet
       *         return the url previously set by {@link #updateForUrl(String)}.
-@@ -414,6 +424,16 @@ public class BookmarkManager implements BookmarkDelegate, SearchDelegate,
+@@ -413,6 +423,16 @@ public class BookmarkManager implements BookmarkDelegate, SearchDelegate,
      }
  
      @Override
@@ -336,7 +336,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
 diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
 --- a/chrome/android/java/strings/android_chrome_strings.grd
 +++ b/chrome/android/java/strings/android_chrome_strings.grd
-@@ -227,6 +227,12 @@ CHAR-LIMIT guidelines:
+@@ -224,6 +224,12 @@ CHAR-LIMIT guidelines:
        <message name="IDS_SEARCH" desc="The label for a search button.">
          Search
        </message>
@@ -352,7 +352,7 @@ diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/and
 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
 --- a/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
-@@ -150,6 +150,10 @@ jumbo_split_static_library("browser") {
+@@ -163,6 +163,10 @@ jumbo_split_static_library("browser") {
      "bitmap_fetcher/bitmap_fetcher_service.h",
      "bitmap_fetcher/bitmap_fetcher_service_factory.cc",
      "bitmap_fetcher/bitmap_fetcher_service_factory.h",
@@ -363,7 +363,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
      "bookmarks/bookmark_model_factory.cc",
      "bookmarks/bookmark_model_factory.h",
      "bookmarks/bookmark_stats.cc",
-@@ -2616,8 +2620,6 @@ jumbo_split_static_library("browser") {
+@@ -2665,8 +2669,6 @@ jumbo_split_static_library("browser") {
        "banners/app_banner_infobar_delegate_desktop.h",
        "banners/app_banner_manager_desktop.cc",
        "banners/app_banner_manager_desktop.h",
@@ -372,7 +372,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
        "certificate_viewer.h",
        "chrome_browser_field_trials_desktop.cc",
        "chrome_browser_field_trials_desktop.h",
-@@ -2706,8 +2708,6 @@ jumbo_split_static_library("browser") {
+@@ -2755,8 +2757,6 @@ jumbo_split_static_library("browser") {
        "importer/importer_uma.h",
        "importer/in_process_importer_bridge.cc",
        "importer/in_process_importer_bridge.h",
@@ -443,7 +443,7 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browse
 +
 +  // Filter out the URLs with unsupported schemes.
 +  const char* const kInvalidSchemes[] = {"wyciwyg", "place"};
-+  for (size_t i = 0; i < arraysize(kInvalidSchemes); ++i) {
++  for (size_t i = 0; i < base::size(kInvalidSchemes); ++i) {
 +    if (url.SchemeIs(kInvalidSchemes[i]))
 +      return false;
 +  }
@@ -497,7 +497,7 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browse
  }
  
  void BookmarkBridge::Destroy(JNIEnv*, const JavaParamRef<jobject>&) {
-@@ -470,6 +539,152 @@ jint BookmarkBridge::GetTotalBookmarkCount(
+@@ -474,6 +543,152 @@ jint BookmarkBridge::GetTotalBookmarkCount(
    return count;
  }
  
@@ -775,7 +775,7 @@ diff --git a/chrome/browser/importer/profile_writer.h b/chrome/browser/importer/
 diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn
 --- a/chrome/common/BUILD.gn
 +++ b/chrome/common/BUILD.gn
-@@ -441,6 +441,9 @@ static_library("common") {
+@@ -440,6 +440,9 @@ static_library("common") {
      sources += [
        "media/chrome_media_drm_bridge_client.cc",
        "media/chrome_media_drm_bridge_client.h",
@@ -788,7 +788,7 @@ diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn
 diff --git a/chrome/utility/BUILD.gn b/chrome/utility/BUILD.gn
 --- a/chrome/utility/BUILD.gn
 +++ b/chrome/utility/BUILD.gn
-@@ -58,8 +58,6 @@ static_library("utility") {
+@@ -61,8 +61,6 @@ static_library("utility") {
  
    if (!is_android) {
      sources += [
@@ -797,8 +797,8 @@ diff --git a/chrome/utility/BUILD.gn b/chrome/utility/BUILD.gn
        "importer/bookmarks_file_importer.cc",
        "importer/bookmarks_file_importer.h",
        "importer/edge_database_reader_win.cc",
-@@ -162,6 +160,11 @@ static_library("utility") {
-     ]
+@@ -173,6 +171,11 @@ static_library("utility") {
+     }
    }
  
 +  sources += [
@@ -955,7 +955,7 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java b/ui
              if (!window.hasPermission(Manifest.permission.READ_EXTERNAL_STORAGE)) {
                  missingPermissions.add(Manifest.permission.READ_EXTERNAL_STORAGE);
              }
-@@ -324,9 +331,7 @@ public class SelectFileDialog
+@@ -326,9 +333,7 @@ public class SelectFileDialog
       *   3.) There is a valid Android Activity associated with the file request.
       */
      private boolean shouldUseContactsPicker() {
@@ -966,7 +966,7 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java b/ui
      }
  
      /**
-@@ -347,6 +352,7 @@ public class SelectFileDialog
+@@ -349,6 +354,7 @@ public class SelectFileDialog
              }
              if (!mimeTypes.contains(mimeType)) mimeTypes.add(mimeType);
          }
@@ -974,7 +974,7 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java b/ui
          return mimeTypes;
      }
  
-@@ -649,6 +655,10 @@ public class SelectFileDialog
+@@ -652,6 +658,10 @@ public class SelectFileDialog
          return countAcceptTypesFor(specificType) > 0;
      }
  
@@ -988,7 +988,7 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java b/ui
 diff --git a/ui/shell_dialogs/select_file_dialog.h b/ui/shell_dialogs/select_file_dialog.h
 --- a/ui/shell_dialogs/select_file_dialog.h
 +++ b/ui/shell_dialogs/select_file_dialog.h
-@@ -187,6 +187,8 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
+@@ -192,6 +192,8 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
                    void* params);
    bool HasMultipleFileTypeChoices();
  

+ 5 - 5
build/patches/Add-custom-tab-intents-privacy-option.patch

@@ -26,7 +26,7 @@ diff --git a/chrome/android/java/res/values/values.xml b/chrome/android/java/res
 diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
 --- a/chrome/android/java/res/xml/privacy_preferences.xml
 +++ b/chrome/android/java/res/xml/privacy_preferences.xml
-@@ -43,6 +43,11 @@
+@@ -48,6 +48,11 @@
          android:title="@string/clear_browsing_data_title"
          android:summary="@string/clear_browsing_data_summary"
          android:fragment="org.chromium.chrome.browser.preferences.privacy.ClearBrowsingDataTabsFragment" />
@@ -60,7 +60,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDis
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java
-@@ -38,6 +38,7 @@ public class PrivacyPreferences extends PreferenceFragment
+@@ -39,6 +39,7 @@ public class PrivacyPreferences extends PreferenceFragment
          implements OnPreferenceChangeListener {
      private static final String PREF_NAVIGATION_ERROR = "navigation_error";
      private static final String PREF_SEARCH_SUGGESTIONS = "search_suggestions";
@@ -68,7 +68,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/pri
      private static final String PREF_CAN_MAKE_PAYMENT = "can_make_payment";
      private static final String PREF_CONTEXTUAL_SEARCH = "contextual_search";
      private static final String PREF_NETWORK_PREDICTIONS = "network_predictions";
-@@ -101,6 +102,11 @@ public class PrivacyPreferences extends PreferenceFragment
+@@ -104,6 +105,11 @@ public class PrivacyPreferences extends PreferenceFragment
          navigationErrorPref.setOnPreferenceChangeListener(this);
          navigationErrorPref.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
  
@@ -80,7 +80,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/pri
          ChromeBaseCheckBoxPreference searchSuggestionsPref =
                  (ChromeBaseCheckBoxPreference) findPreference(PREF_SEARCH_SUGGESTIONS);
          searchSuggestionsPref.setOnPreferenceChangeListener(this);
-@@ -123,6 +129,10 @@ public class PrivacyPreferences extends PreferenceFragment
+@@ -135,6 +141,10 @@ public class PrivacyPreferences extends PreferenceFragment
              recordNetworkPredictionEnablingUMA((boolean) newValue);
          } else if (PREF_NAVIGATION_ERROR.equals(key)) {
              PrefServiceBridge.getInstance().setResolveNavigationErrorEnabled((boolean) newValue);
@@ -94,7 +94,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/pri
 diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
 --- a/chrome/android/java/strings/android_chrome_strings.grd
 +++ b/chrome/android/java/strings/android_chrome_strings.grd
-@@ -3972,6 +3972,13 @@ However, you aren’t invisible. Going private doesn’t hide your browsing from
+@@ -4012,6 +4012,13 @@ However, you aren’t invisible. Going private doesn’t hide your browsing from
          Browse
        </message>
  

+ 3 - 3
build/patches/Add-exit-menu-item.patch

@@ -25,7 +25,7 @@ diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/re
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
-@@ -2096,6 +2096,8 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
+@@ -2138,6 +2138,8 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
              RecordUserAction.record("MobileMenuSettings");
          } else if (id == R.id.show_menu) {
              showAppMenuForKeyboardEvent();
@@ -37,7 +37,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeLifetimeController.java b/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeLifetimeController.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeLifetimeController.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeLifetimeController.java
-@@ -87,7 +87,11 @@ class ChromeLifetimeController implements ApplicationLifetime.Observer,
+@@ -82,7 +82,11 @@ class ChromeLifetimeController implements ApplicationLifetime.Observer,
  
          // Kick off a timer to kill the process after a delay, which fires only if the Activities
          // take too long to be finished.
@@ -53,7 +53,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeLife
 diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
 --- a/chrome/android/java/strings/android_chrome_strings.grd
 +++ b/chrome/android/java/strings/android_chrome_strings.grd
-@@ -3050,6 +3050,9 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
+@@ -3054,6 +3054,9 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
        <message name="IDS_MENU_PREFERENCES" desc="Menu item for opening browser preferences. [CHAR-LIMIT=27]">
          Settings
        </message>

+ 22 - 30
build/patches/Add-flag-to-configure-maximum-connections-per-host.patch

@@ -6,19 +6,19 @@ With the introduction of this flag it is possible to increase the maximum
 allowed connections per host; this can however be detrimental to devices
 with limited CPU/memory resources and it is disabled by default.
 ---
- chrome/browser/about_flags.cc                            |  8 ++++++++
- chrome/browser/flag_descriptions.cc                      |  4 ++++
- chrome/browser/flag_descriptions.h                       |  3 +++
- .../common/network_features.cc                           |  3 +++
- .../common/network_features.h                            |  4 ++++
- .../common/network_switch_list.h                         |  4 ++++
- net/socket/client_socket_pool_manager.cc                 | 16 ++++++++++++++++
- 7 files changed, 42 insertions(+)
+ chrome/browser/about_flags.cc                           |  8 ++++++++
+ chrome/browser/flag_descriptions.cc                     |  4 ++++
+ chrome/browser/flag_descriptions.h                      |  3 +++
+ .../common/network_features.cc                          |  3 +++
+ .../common/network_features.h                           |  4 ++++
+ .../common/network_switch_list.h                        |  4 ++++
+ net/socket/client_socket_pool_manager.cc                | 17 +++++++++++++++++
+ 7 files changed, 43 insertions(+)
 
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -912,6 +912,11 @@ const FeatureEntry::Choice kForceEffectiveConnectionTypeChoices[] = {
+@@ -809,6 +809,11 @@ const FeatureEntry::Choice kForceEffectiveConnectionTypeChoices[] = {
       net::kEffectiveConnectionType4G},
  };
  
@@ -30,7 +30,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
  // Ensure that all effective connection types returned by Network Quality
  // Estimator (NQE) are also exposed via flags.
  static_assert(net::EFFECTIVE_CONNECTION_TYPE_LAST + 2 ==
-@@ -2495,6 +2500,9 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -2360,6 +2365,9 @@ const FeatureEntry kFeatureEntries[] = {
       flag_descriptions::kMaterialDesignIncognitoNTPName,
       flag_descriptions::kMaterialDesignIncognitoNTPDescription, kOsAndroid,
       FEATURE_VALUE_TYPE(features::kMaterialDesignIncognitoNTP)},
@@ -43,7 +43,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
-@@ -1231,6 +1231,10 @@ const char kMaterialDesignIncognitoNTPDescription[] =
+@@ -1264,6 +1264,10 @@ const char kMaterialDesignIncognitoNTPDescription[] =
      "If enabled, the Incognito New Tab page uses the new material design with "
      "a better readable text.";
  
@@ -57,7 +57,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
-@@ -748,6 +748,9 @@ extern const char kMarkHttpAsWarningAndDangerousOnPasswordsAndCreditCards[];
+@@ -766,6 +766,9 @@ extern const char kMarkHttpAsWarningAndDangerousOnPasswordsAndCreditCards[];
  extern const char kMaterialDesignIncognitoNTPName[];
  extern const char kMaterialDesignIncognitoNTPDescription[];
  
@@ -98,39 +98,31 @@ diff --git a/components/network_session_configurator/common/network_switch_list.
 --- a/components/network_session_configurator/common/network_switch_list.h
 +++ b/components/network_session_configurator/common/network_switch_list.h
 @@ -21,6 +21,10 @@ NETWORK_SWITCH(kEnableUserAlternateProtocolPorts,
+ 
  // Enables the QUIC protocol.  This is a temporary testing flag.
  NETWORK_SWITCH(kEnableQuic, "enable-quic")
- 
 +// Allows specifying a higher number of maximum connections per host
 +// (15 instead of 6, mirroring the value Mozilla uses).
 +NETWORK_SWITCH(kMaxConnectionsPerHost, "max-connections-per-host")
 +
- // Enable use of experimental TCP sockets API for sending data in the
- // SYN packet.
- NETWORK_SWITCH(kEnableTcpFastOpen, "enable-tcp-fastopen")
+ 
+ // Ignores certificate-related errors.
+ NETWORK_SWITCH(kIgnoreCertificateErrors, "ignore-certificate-errors")
 diff --git a/net/socket/client_socket_pool_manager.cc b/net/socket/client_socket_pool_manager.cc
 --- a/net/socket/client_socket_pool_manager.cc
 +++ b/net/socket/client_socket_pool_manager.cc
-@@ -6,8 +6,10 @@
- 
- #include <memory>
- 
-+#include "base/command_line.h"
- #include "base/logging.h"
- #include "base/strings/stringprintf.h"
-+#include "base/strings/string_number_conversions.h"
- #include "net/base/load_flags.h"
- #include "net/http/http_proxy_client_socket_pool.h"
- #include "net/http/http_request_info.h"
-@@ -19,6 +21,7 @@
- #include "net/socket/ssl_client_socket_pool.h"
+@@ -23,6 +23,10 @@
  #include "net/socket/transport_client_socket_pool.h"
+ #include "net/socket/transport_connect_job.h"
  #include "net/ssl/ssl_config.h"
 +#include "components/network_session_configurator/common/network_switches.h"
++
++#include "base/command_line.h"
++#include "base/strings/string_number_conversions.h"
  
  namespace net {
  
-@@ -314,6 +317,19 @@ void ClientSocketPoolManager::set_max_sockets_per_pool(
+@@ -297,6 +301,19 @@ void ClientSocketPoolManager::set_max_sockets_per_pool(
  int ClientSocketPoolManager::max_sockets_per_group(
      HttpNetworkSession::SocketPoolType pool_type) {
    DCHECK_LT(pool_type, HttpNetworkSession::NUM_SOCKET_POOL_TYPES);

+ 10 - 10
build/patches/Add-flag-to-control-video-playback-resume-feature.patch

@@ -13,9 +13,9 @@ Disable it by default on Android as it is everywhere else
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -3335,6 +3335,11 @@ const FeatureEntry kFeatureEntries[] = {
-      FEATURE_VALUE_TYPE(features::kUseGoogleLocalNtp)},
- #endif  // !defined(OS_ANDROID)
+@@ -3950,6 +3950,11 @@ const FeatureEntry kFeatureEntries[] = {
+      FEATURE_VALUE_TYPE(features::kSiteCharacteristicsDatabase)},
+ #endif
  
 +    {"resume-background-video",
 +     flag_descriptions::kResumeBackgroundVideoName,
@@ -23,14 +23,14 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 +     FEATURE_VALUE_TYPE(media::kResumeBackgroundVideo)},
 +
  #if defined(OS_MACOSX)
-     {"mac-rtl", flag_descriptions::kMacRTLName,
-      flag_descriptions::kMacRTLDescription, kOsMac,
+     {"enable-text-suggestions-touch-bar",
+      flag_descriptions::kTextSuggestionsTouchBarName,
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
-@@ -791,6 +791,11 @@ const char kEnablePictureInPictureName[] = "Enable Picture-in-Picture.";
- const char kEnablePictureInPictureDescription[] =
-     "Enable the Picture-in-Picture feature for videos.";
+@@ -833,6 +833,11 @@ const char kEnablePictureInPictureDescription[] =
+     "controls. The #enable-surfaces-for-videos flag must be enabled as well "
+     "to use it.";
  
 +const char kResumeBackgroundVideoName[] = "Resume background video.";
 +const char kResumeBackgroundVideoDescription[] =
@@ -43,7 +43,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
-@@ -479,6 +479,9 @@ extern const char kOOPHPStackModePseudo[];
+@@ -502,6 +502,9 @@ extern const char kOOPHPStackModePseudo[];
  extern const char kEnablePictureInPictureName[];
  extern const char kEnablePictureInPictureDescription[];
  
@@ -56,7 +56,7 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptio
 diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
 --- a/media/base/media_switches.cc
 +++ b/media/base/media_switches.cc
-@@ -217,11 +217,7 @@ const base::Feature kPreloadMetadataLazyLoad{"PreloadMetadataLazyLoad",
+@@ -212,11 +212,7 @@ const base::Feature kPreloadMetadataLazyLoad{"PreloadMetadataLazyLoad",
  // when in background.
  const base::Feature kResumeBackgroundVideo {
    "resume-background-video",

+ 7 - 7
build/patches/Add-flag-to-disable-IPv6-probes.patch

@@ -14,8 +14,8 @@ Subject: Add flag to disable IPv6 probes
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -3387,6 +3387,11 @@ const FeatureEntry kFeatureEntries[] = {
-      FEATURE_VALUE_TYPE(features::kEnableVirtualKeyboardUkm)},
+@@ -3272,6 +3272,11 @@ const FeatureEntry kFeatureEntries[] = {
+      FEATURE_VALUE_TYPE(features::kHandwritingGesture)},
  #endif  // OS_CHROMEOS
  
 +    {"ipv6-probing",
@@ -29,7 +29,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
-@@ -795,6 +795,10 @@ const char kOOPHPStackModeNative[] = "Native";
+@@ -835,6 +835,10 @@ const char kOOPHPStackModeNative[] = "Native";
  const char kOOPHPStackModeNativeWithThreadNames[] = "Native with thread names";
  const char kOOPHPStackModePseudo[] = "Trace events";
  
@@ -39,11 +39,11 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
 +
  const char kEnablePictureInPictureName[] = "Enable Picture-in-Picture.";
  const char kEnablePictureInPictureDescription[] =
-     "Enable the Picture-in-Picture feature for videos.";
+     "Show Picture-in-Picture in browser context menu and video native "
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
-@@ -482,6 +482,9 @@ extern const char kOOPHPStackModeNative[];
+@@ -505,6 +505,9 @@ extern const char kOOPHPStackModeNative[];
  extern const char kOOPHPStackModeNativeWithThreadNames[];
  extern const char kOOPHPStackModePseudo[];
  
@@ -56,7 +56,7 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptio
 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
-@@ -78,6 +78,7 @@
+@@ -82,6 +82,7 @@
  #include "net/log/net_log_with_source.h"
  #include "net/socket/client_socket_factory.h"
  #include "net/socket/datagram_client_socket.h"
@@ -64,7 +64,7 @@ diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc
  #include "url/url_canon_ip.h"
  
  #if BUILDFLAG(ENABLE_MDNS)
-@@ -2773,8 +2774,13 @@ bool HostResolverImpl::IsIPv6Reachable(const NetLogWithSource& net_log) {
+@@ -2874,8 +2875,13 @@ bool HostResolverImpl::IsIPv6Reachable(const NetLogWithSource& net_log) {
    bool cached = true;
    if ((tick_clock_->NowTicks() - last_ipv6_probe_time_).InMilliseconds() >
        kIPv6ProbePeriodMs) {

+ 5 - 5
build/patches/Add-flag-to-show-hide-NTP-tiles.patch

@@ -14,7 +14,7 @@ Subject: Add flag to show/hide NTP tiles
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -1996,6 +1996,10 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -1866,6 +1866,10 @@ const FeatureEntry kFeatureEntries[] = {
       SINGLE_VALUE_TYPE(switches::kHostedAppQuitNotification)},
  #endif  // OS_MACOSX
  #if defined(OS_ANDROID)
@@ -40,7 +40,7 @@ diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/br
  #include "chrome/browser/history/history_service_factory.h"
  #include "chrome/browser/ntp_tiles/chrome_most_visited_sites_factory.h"
  #include "chrome/browser/profiles/profile.h"
-@@ -162,6 +164,10 @@ void MostVisitedSitesBridge::JavaObserver::OnURLsAvailable(
+@@ -161,6 +163,10 @@ void MostVisitedSitesBridge::JavaObserver::OnURLsAvailable(
    std::vector<int> sources;
    std::vector<int> section_types;
    std::vector<int64_t> data_generation_times;
@@ -51,7 +51,7 @@ diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/br
    for (const auto& section : sections) {
      const NTPTilesVector& tiles = section.second;
      section_types.resize(section_types.size() + tiles.size(),
-@@ -176,6 +182,8 @@ void MostVisitedSitesBridge::JavaObserver::OnURLsAvailable(
+@@ -175,6 +181,8 @@ void MostVisitedSitesBridge::JavaObserver::OnURLsAvailable(
            tile.data_generation_time.ToJavaTime());
      }
    }
@@ -63,7 +63,7 @@ diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/br
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
-@@ -167,6 +167,10 @@ const char kAwaitOptimizationName[] = "Await optimization";
+@@ -189,6 +189,10 @@ const char kAwaitOptimizationName[] = "Await optimization";
  const char kAwaitOptimizationDescription[] =
      "Enables await taking 1 tick on the microtask queue.";
  
@@ -77,7 +77,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
-@@ -126,6 +126,9 @@ extern const char kAutoplayPolicyDocumentUserActivation[];
+@@ -143,6 +143,9 @@ extern const char kAutoplayPolicyDocumentUserActivation[];
  extern const char kAwaitOptimizationName[];
  extern const char kAwaitOptimizationDescription[];
  

+ 10 - 10
build/patches/Add-flags-to-disable-device-motion-and-orientation-APIs.patch

@@ -20,7 +20,7 @@ legacy acceleration events.
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -2900,6 +2900,12 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -2773,6 +2773,12 @@ const FeatureEntry kFeatureEntries[] = {
      {"enable-generic-sensor", flag_descriptions::kEnableGenericSensorName,
       flag_descriptions::kEnableGenericSensorDescription, kOsAll,
       FEATURE_VALUE_TYPE(features::kGenericSensor)},
@@ -36,7 +36,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
-@@ -567,6 +567,14 @@ const char kEnableGenericSensorDescription[] =
+@@ -599,6 +599,14 @@ const char kEnableGenericSensorDescription[] =
      "Accelerometer, LinearAccelerationSensor, Gyroscope, "
      "AbsoluteOrientationSensor and RelativeOrientationSensor interfaces.";
  
@@ -54,7 +54,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
-@@ -368,6 +368,12 @@ extern const char kEnableEnumeratingAudioDevicesDescription[];
+@@ -391,6 +391,12 @@ extern const char kEnableEnumeratingAudioDevicesDescription[];
  extern const char kEnableGenericSensorName[];
  extern const char kEnableGenericSensorDescription[];
  
@@ -70,7 +70,7 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptio
 diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc
 --- a/content/child/runtime_features.cc
 +++ b/content/child/runtime_features.cc
-@@ -145,6 +145,9 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
+@@ -144,6 +144,9 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
        base::FeatureList::IsEnabled(features::kSharedArrayBuffer) ||
        base::FeatureList::IsEnabled(features::kWebAssemblyThreads));
  
@@ -83,7 +83,7 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.
 diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
 --- a/content/public/common/content_features.cc
 +++ b/content/public/common/content_features.cc
-@@ -598,6 +598,16 @@ const base::Feature kWebRtcHideLocalIpsWithMdns{
+@@ -600,6 +600,16 @@ const base::Feature kWebRtcHideLocalIpsWithMdns{
  // https://wicg.github.io/webusb
  const base::Feature kWebUsb{"WebUSB", base::FEATURE_ENABLED_BY_DEFAULT};
  
@@ -103,7 +103,7 @@ diff --git a/content/public/common/content_features.cc b/content/public/common/c
 diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h
 --- a/content/public/common/content_features.h
 +++ b/content/public/common/content_features.h
-@@ -156,6 +156,8 @@ CONTENT_EXPORT extern const char kWebXrRenderPathParamValueGpuFence[];
+@@ -155,6 +155,8 @@ CONTENT_EXPORT extern const char kWebXrRenderPathParamValueGpuFence[];
  CONTENT_EXPORT extern const char kWebXrRenderPathParamValueSharedBuffer[];
  #endif  // defined(OS_ANDROID)
  
@@ -115,9 +115,9 @@ diff --git a/content/public/common/content_features.h b/content/public/common/co
 diff --git a/third_party/blink/public/platform/web_runtime_features.h b/third_party/blink/public/platform/web_runtime_features.h
 --- a/third_party/blink/public/platform/web_runtime_features.h
 +++ b/third_party/blink/public/platform/web_runtime_features.h
-@@ -97,6 +97,8 @@ class WebRuntimeFeatures {
-   BLINK_PLATFORM_EXPORT static void EnableCSSFragmentIdentifiers(bool);
+@@ -95,6 +95,8 @@ class WebRuntimeFeatures {
    BLINK_PLATFORM_EXPORT static void EnableScrollTopLeftInterop(bool);
+   BLINK_PLATFORM_EXPORT static void EnableKeyboardFocusableScrollers(bool);
    BLINK_PLATFORM_EXPORT static void EnableDatabase(bool);
 +  BLINK_PLATFORM_EXPORT static void EnableDeviceMotion(bool);
 +  BLINK_PLATFORM_EXPORT static void EnableDeviceOrientation(bool);
@@ -146,7 +146,7 @@ diff --git a/third_party/blink/renderer/modules/modules_initializer.cc b/third_p
 diff --git a/third_party/blink/renderer/platform/exported/web_runtime_features.cc b/third_party/blink/renderer/platform/exported/web_runtime_features.cc
 --- a/third_party/blink/renderer/platform/exported/web_runtime_features.cc
 +++ b/third_party/blink/renderer/platform/exported/web_runtime_features.cc
-@@ -152,6 +152,14 @@ void WebRuntimeFeatures::EnableDatabase(bool enable) {
+@@ -160,6 +160,14 @@ void WebRuntimeFeatures::EnableDatabase(bool enable) {
    RuntimeEnabledFeatures::SetDatabaseEnabled(enable);
  }
  
@@ -164,7 +164,7 @@ diff --git a/third_party/blink/renderer/platform/exported/web_runtime_features.c
 diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5
 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
-@@ -371,6 +371,14 @@
+@@ -374,6 +374,14 @@
        status: "stable",
      },
      {

+ 3 - 3
build/patches/Add-menu-option-to-toggle-global-Javascript-preference.patch

@@ -75,7 +75,7 @@ diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/re
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
-@@ -2196,6 +2196,14 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
+@@ -2239,6 +2239,14 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
              final boolean usingDesktopUserAgent = currentTab.getUseDesktopUserAgent();
              currentTab.setUseDesktopUserAgent(!usingDesktopUserAgent, reloadOnChange);
              RecordUserAction.record("MobileMenuRequestDesktopSite");
@@ -93,7 +93,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
-@@ -1709,6 +1709,14 @@ public class ChromeTabbedActivity
+@@ -1720,6 +1720,14 @@ public class ChromeTabbedActivity
                  NewTabPageUma.recordAction(NewTabPageUma.ACTION_OPENED_DOWNLOADS_MANAGER);
              }
              RecordUserAction.record("MobileMenuDownloadManager");
@@ -184,7 +184,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Cust
 diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
 --- a/chrome/android/java/strings/android_chrome_strings.grd
 +++ b/chrome/android/java/strings/android_chrome_strings.grd
-@@ -3035,6 +3035,17 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
+@@ -3039,6 +3039,17 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
        <message name="IDS_MENU_FIND_IN_PAGE" desc="Menu item allowing users to find text within the current page. [CHAR-LIMIT=27]">
          Find in page
        </message>

+ 12 - 12
build/patches/Add-option-to-not-persist-tabs-across-sessions.patch

@@ -41,7 +41,7 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
-@@ -1016,8 +1016,10 @@ public class ChromeTabbedActivity
+@@ -1005,8 +1005,10 @@ public class ChromeTabbedActivity
              boolean hadCipherData =
                      CipherFactory.getInstance().restoreFromBundle(getSavedInstanceState());
  
@@ -69,10 +69,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/pri
  import android.view.MenuItem;
  
 +import org.chromium.base.ContextUtils;
+ import org.chromium.base.BuildInfo;
  import org.chromium.base.metrics.RecordHistogram;
  import org.chromium.chrome.R;
- import org.chromium.chrome.browser.ChromeFeatureList;
-@@ -42,6 +44,7 @@ public class PrivacyPreferences extends PreferenceFragment
+@@ -43,6 +45,7 @@ public class PrivacyPreferences extends PreferenceFragment
      private static final String PREF_CAN_MAKE_PAYMENT = "can_make_payment";
      private static final String PREF_CONTEXTUAL_SEARCH = "contextual_search";
      private static final String PREF_NETWORK_PREDICTIONS = "network_predictions";
@@ -80,7 +80,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/pri
      private static final String PREF_DO_NOT_TRACK = "do_not_track";
      private static final String PREF_USAGE_AND_CRASH_REPORTING = "usage_and_crash_reports";
      private static final String PREF_CLEAR_BROWSING_DATA = "clear_browsing_data";
-@@ -91,6 +94,11 @@ public class PrivacyPreferences extends PreferenceFragment
+@@ -94,6 +97,11 @@ public class PrivacyPreferences extends PreferenceFragment
          preferenceScreen.removePreference(findPreference(PREF_SYNC_AND_SERVICES_LINK_DIVIDER));
          preferenceScreen.removePreference(findPreference(PREF_SYNC_AND_SERVICES_LINK));
  
@@ -92,23 +92,23 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/pri
          ChromeBaseCheckBoxPreference networkPredictionPref =
                  (ChromeBaseCheckBoxPreference) findPreference(PREF_NETWORK_PREDICTIONS);
          networkPredictionPref.setChecked(prefServiceBridge.getNetworkPredictionEnabled());
-@@ -136,6 +144,12 @@ public class PrivacyPreferences extends PreferenceFragment
-         } else if (PREF_CAN_MAKE_PAYMENT.equals(key)) {
-             PrefServiceBridge.getInstance().setBoolean(
-                     Pref.CAN_MAKE_PAYMENT_ENABLED, (boolean) newValue);
+@@ -139,6 +147,12 @@ public class PrivacyPreferences extends PreferenceFragment
+         } else if (PREF_NETWORK_PREDICTIONS.equals(key)) {
+             PrefServiceBridge.getInstance().setNetworkPredictionEnabled((boolean) newValue);
+             recordNetworkPredictionEnablingUMA((boolean) newValue);
 +        } else if (PREF_CLOSE_TABS_ON_EXIT.equals(key)) {
 +//            PrefServiceBridge.getInstance().setBoolean(
 +//                    Pref.CLOSE_TABS_ON_EXIT_ENABLED, (boolean) newValue);
 +            SharedPreferences.Editor sharedPreferencesEditor = ContextUtils.getAppSharedPreferences().edit();
 +            sharedPreferencesEditor.putBoolean(PREF_CLOSE_TABS_ON_EXIT, (boolean)newValue);
 +            sharedPreferencesEditor.apply();
-         }
- 
-         return true;
+         } else if (PREF_NAVIGATION_ERROR.equals(key)) {
+             PrefServiceBridge.getInstance().setResolveNavigationErrorEnabled((boolean) newValue);
+         } else if (PREF_ALLOW_CUSTOM_TAB_INTENTS.equals(key)) {
 diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
 --- a/chrome/android/java/strings/android_chrome_strings.grd
 +++ b/chrome/android/java/strings/android_chrome_strings.grd
-@@ -3853,6 +3853,12 @@ However, you aren’t invisible. Going private doesn’t hide your browsing from
+@@ -3893,6 +3893,12 @@ However, you aren’t invisible. Going private doesn’t hide your browsing from
        <message name="IDS_CONTEXTMENU_IMAGE_TITLE" desc="The title of a context menu tab when the item pressed contains more than one type. This indicates that all the actions are related to the image.">
          IMAGE
        </message>

+ 13 - 13
build/patches/Add-site-settings-option-for-session-only-cookies.patch

@@ -44,7 +44,7 @@ diff --git a/chrome/android/java/res/xml/website_preferences.xml b/chrome/androi
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
-@@ -245,6 +245,10 @@ public class PrefServiceBridge {
+@@ -240,6 +240,10 @@ public class PrefServiceBridge {
          return nativeGetBlockThirdPartyCookiesEnabled();
      }
  
@@ -55,7 +55,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Pre
      /**
       * @return Whether third-party cookie blocking is configured by policy
       */
-@@ -631,6 +635,10 @@ public class PrefServiceBridge {
+@@ -626,6 +630,10 @@ public class PrefServiceBridge {
          nativeSetBlockThirdPartyCookiesEnabled(enabled);
      }
  
@@ -66,7 +66,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Pre
      public void setDoNotTrackEnabled(boolean enabled) {
          nativeSetDoNotTrackEnabled(enabled);
      }
-@@ -1079,6 +1087,7 @@ public class PrefServiceBridge {
+@@ -1074,6 +1082,7 @@ public class PrefServiceBridge {
      private native boolean nativeGetAutoplayEnabled();
      private native boolean nativeGetBackgroundSyncEnabled();
      private native boolean nativeGetBlockThirdPartyCookiesEnabled();
@@ -74,7 +74,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Pre
      private native boolean nativeGetBlockThirdPartyCookiesManaged();
      private native boolean nativeGetRememberPasswordsEnabled();
      private native boolean nativeGetPasswordManagerAutoSigninEnabled();
-@@ -1125,6 +1134,7 @@ public class PrefServiceBridge {
+@@ -1120,6 +1129,7 @@ public class PrefServiceBridge {
      private native void nativeSetAutoplayEnabled(boolean enabled);
      private native void nativeSetAllowCookiesEnabled(boolean enabled);
      private native void nativeSetBackgroundSyncEnabled(boolean enabled);
@@ -93,7 +93,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/web
      public static final String NOTIFICATIONS_VIBRATE_TOGGLE_KEY = "notifications_vibrate";
      public static final String EXPLAIN_PROTECTED_MEDIA_KEY = "protected_content_learn_more";
      private static final String ADD_EXCEPTION_KEY = "add_exception";
-@@ -440,6 +441,7 @@ public class SingleCategoryPreferences extends PreferenceFragment
+@@ -441,6 +442,7 @@ public class SingleCategoryPreferences extends PreferenceFragment
  
                  if (type == SiteSettingsCategory.Type.COOKIES) {
                      updateThirdPartyCookiesCheckBox();
@@ -101,16 +101,16 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/web
                  } else if (type == SiteSettingsCategory.Type.NOTIFICATIONS) {
                      updateNotificationsVibrateCheckBox();
                  }
-@@ -478,6 +480,8 @@ public class SingleCategoryPreferences extends PreferenceFragment
-             prefServiceBridge.setContentSetting(
-                     mCategory.getContentSettingsType(), setting.toInt());
+@@ -479,6 +481,8 @@ public class SingleCategoryPreferences extends PreferenceFragment
+             int setting = (int) newValue;
+             prefServiceBridge.setContentSetting(mCategory.getContentSettingsType(), setting);
              getInfoForOrigins();
 +        } else if (COOKIES_SESSION_ONLY_TOGGLE_KEY.equals(preference.getKey())) {
 +            prefServiceBridge.setCookiesSessionOnlyEnabled((boolean) newValue);
          } else if (THIRD_PARTY_COOKIES_TOGGLE_KEY.equals(preference.getKey())) {
              prefServiceBridge.setBlockThirdPartyCookiesEnabled(((boolean) newValue));
          } else if (NOTIFICATIONS_VIBRATE_TOGGLE_KEY.equals(preference.getKey())) {
-@@ -767,6 +771,8 @@ public class SingleCategoryPreferences extends PreferenceFragment
+@@ -768,6 +772,8 @@ public class SingleCategoryPreferences extends PreferenceFragment
          TriStateSiteSettingsPreference triStateToggle =
                  (TriStateSiteSettingsPreference) screen.findPreference(TRI_STATE_TOGGLE_KEY);
          Preference thirdPartyCookies = screen.findPreference(THIRD_PARTY_COOKIES_TOGGLE_KEY);
@@ -119,7 +119,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/web
          Preference notificationsVibrate = screen.findPreference(NOTIFICATIONS_VIBRATE_TOGGLE_KEY);
          Preference explainProtectedMediaKey = screen.findPreference(EXPLAIN_PROTECTED_MEDIA_KEY);
          PreferenceGroup allowedGroup = (PreferenceGroup) screen.findPreference(ALLOWED_GROUP);
-@@ -797,6 +803,7 @@ public class SingleCategoryPreferences extends PreferenceFragment
+@@ -798,6 +804,7 @@ public class SingleCategoryPreferences extends PreferenceFragment
  
          if (hideSecondaryToggles) {
              screen.removePreference(thirdPartyCookies);
@@ -127,7 +127,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/web
              screen.removePreference(notificationsVibrate);
              screen.removePreference(explainProtectedMediaKey);
              screen.removePreference(allowedGroup);
-@@ -806,12 +813,15 @@ public class SingleCategoryPreferences extends PreferenceFragment
+@@ -807,12 +814,15 @@ public class SingleCategoryPreferences extends PreferenceFragment
              return;
          }
  
@@ -144,7 +144,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/web
          }
  
          // Configure/hide the notifications vibrate toggle, as needed.
-@@ -916,6 +926,15 @@ public class SingleCategoryPreferences extends PreferenceFragment
+@@ -917,6 +927,15 @@ public class SingleCategoryPreferences extends PreferenceFragment
                  preference -> PrefServiceBridge.getInstance().isBlockThirdPartyCookiesManaged());
      }
  
@@ -163,7 +163,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/web
 diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
 --- a/chrome/android/java/strings/android_chrome_strings.grd
 +++ b/chrome/android/java/strings/android_chrome_strings.grd
-@@ -879,6 +879,12 @@ Your Google account may have other forms of browsing history like searches and a
+@@ -876,6 +876,12 @@ Your Google account may have other forms of browsing history like searches and a
        <message name="IDS_BLOCK_THIRD_PARTY_COOKIES_SUMMARY" desc="Summary text for Block Third Party Cookies preference">
          Prevent third-party websites from saving and reading cookie data
        </message>

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

@@ -7,7 +7,7 @@ Fix build from scratch (issue found by nikolowry)
  .../android/java/res/xml/privacy_preferences.xml   |  8 -----
  .../preferences/privacy/PrivacyPreferences.java    | 40 ----------------------
  .../chrome_browsing_data_remover_delegate.cc       | 10 ------
- chrome/browser/chrome_content_browser_client.cc    | 14 +-------
+ chrome/browser/chrome_content_browser_client.cc    | 20 +----------
  .../file_type_policies_component_installer.cc      |  2 ++
  .../download/chrome_download_manager_delegate.cc   | 14 ++++++--
  .../download/chrome_download_manager_delegate.h    |  6 ++++
@@ -22,7 +22,7 @@ Fix build from scratch (issue found by nikolowry)
  chrome/browser/download/download_ui_model.h        |  4 +++
  .../chrome_resource_dispatcher_host_delegate.cc    |  4 +++
  chrome/browser/net/chrome_network_delegate.cc      | 35 ++-----------------
- 18 files changed, 85 insertions(+), 106 deletions(-)
+ 18 files changed, 85 insertions(+), 112 deletions(-)
 
 diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
 --- a/chrome/android/java/res/xml/privacy_preferences.xml
@@ -45,7 +45,7 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java
-@@ -38,9 +38,6 @@ public class PrivacyPreferences extends PreferenceFragment
+@@ -39,9 +39,6 @@ public class PrivacyPreferences extends PreferenceFragment
          implements OnPreferenceChangeListener {
      private static final String PREF_NAVIGATION_ERROR = "navigation_error";
      private static final String PREF_SEARCH_SUGGESTIONS = "search_suggestions";
@@ -55,7 +55,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/pri
      private static final String PREF_CAN_MAKE_PAYMENT = "can_make_payment";
      private static final String PREF_CONTEXTUAL_SEARCH = "contextual_search";
      private static final String PREF_NETWORK_PREDICTIONS = "network_predictions";
-@@ -74,8 +71,6 @@ public class PrivacyPreferences extends PreferenceFragment
+@@ -76,8 +73,6 @@ public class PrivacyPreferences extends PreferenceFragment
              // Remove preferences that were migrated to SyncAndServicesPreferences.
              preferenceScreen.removePreference(findPreference(PREF_NAVIGATION_ERROR));
              preferenceScreen.removePreference(findPreference(PREF_SEARCH_SUGGESTIONS));
@@ -64,7 +64,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/pri
              preferenceScreen.removePreference(findPreference(PREF_NETWORK_PREDICTIONS));
              preferenceScreen.removePreference(findPreference(PREF_CONTEXTUAL_SEARCH));
              preferenceScreen.removePreference(findPreference(PREF_USAGE_AND_CRASH_REPORTING));
-@@ -115,17 +110,6 @@ public class PrivacyPreferences extends PreferenceFragment
+@@ -118,17 +113,6 @@ public class PrivacyPreferences extends PreferenceFragment
              preferenceScreen.removePreference(findPreference(PREF_CONTEXTUAL_SEARCH));
          }
  
@@ -79,10 +79,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/pri
 -        safeBrowsingPref.setOnPreferenceChangeListener(this);
 -        safeBrowsingPref.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
 -
-         updateSummaries();
-     }
- 
-@@ -134,11 +118,6 @@ public class PrivacyPreferences extends PreferenceFragment
+         if (BuildInfo.isAtLeastQ()) {
+             ChromeBaseCheckBoxPreference usageStatsPref =
+                     (ChromeBaseCheckBoxPreference) findPreference(PREF_USAGE_STATS);
+@@ -146,11 +130,6 @@ public class PrivacyPreferences extends PreferenceFragment
          String key = preference.getKey();
          if (PREF_SEARCH_SUGGESTIONS.equals(key)) {
              PrefServiceBridge.getInstance().setSearchSuggestEnabled((boolean) newValue);
@@ -94,7 +94,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/pri
          } else if (PREF_NETWORK_PREDICTIONS.equals(key)) {
              PrefServiceBridge.getInstance().setNetworkPredictionEnabled((boolean) newValue);
              recordNetworkPredictionEnablingUMA((boolean) newValue);
-@@ -187,19 +166,6 @@ public class PrivacyPreferences extends PreferenceFragment
+@@ -202,19 +181,6 @@ public class PrivacyPreferences extends PreferenceFragment
              searchSuggestionsPref.setChecked(prefServiceBridge.isSearchSuggestEnabled());
          }
  
@@ -114,7 +114,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/pri
          CheckBoxPreference canMakePaymentPref =
                  (CheckBoxPreference) findPreference(PREF_CAN_MAKE_PAYMENT);
          if (canMakePaymentPref != null) {
-@@ -236,12 +202,6 @@ public class PrivacyPreferences extends PreferenceFragment
+@@ -256,12 +222,6 @@ public class PrivacyPreferences extends PreferenceFragment
              if (PREF_SEARCH_SUGGESTIONS.equals(key)) {
                  return prefs.isSearchSuggestManaged();
              }
@@ -130,7 +130,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/pri
 diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
 --- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
 +++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
-@@ -242,16 +242,6 @@ bool DoesOriginMatchEmbedderMask(int origin_type_mask,
+@@ -243,16 +243,6 @@ bool DoesOriginMatchEmbedderMask(int origin_type_mask,
    return false;
  }
  
@@ -150,7 +150,27 @@ diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.
 diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
 --- a/chrome/browser/chrome_content_browser_client.cc
 +++ b/chrome/browser/chrome_content_browser_client.cc
-@@ -5010,19 +5010,7 @@ ChromeContentBrowserClient::GetSafeBrowsingUrlCheckerDelegate(
+@@ -110,7 +110,6 @@
+ #include "chrome/browser/safe_browsing/certificate_reporting_service.h"
+ #include "chrome/browser/safe_browsing/certificate_reporting_service_factory.h"
+ #include "chrome/browser/safe_browsing/chrome_password_protection_service.h"
+-#include "chrome/browser/safe_browsing/safe_browsing_navigation_throttle.h"
+ #include "chrome/browser/safe_browsing/safe_browsing_service.h"
+ #include "chrome/browser/safe_browsing/ui_manager.h"
+ #include "chrome/browser/safe_browsing/url_checker_delegate_impl.h"
+@@ -4256,11 +4255,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
+       PreviewsLitePageDecider::MaybeCreateThrottleFor(handle);
+   if (previews_lite_page_throttle)
+     throttles.push_back(std::move(previews_lite_page_throttle));
+-  if (base::FeatureList::IsEnabled(safe_browsing::kCommittedSBInterstitials)) {
+-    throttles.push_back(
+-        std::make_unique<safe_browsing::SafeBrowsingNavigationThrottle>(
+-            handle));
+-  }
+ 
+ #if defined(OS_WIN) || defined(OS_MACOSX) || \
+     (defined(OS_LINUX) && !defined(OS_CHROMEOS))
+@@ -5129,19 +5123,7 @@ ChromeContentBrowserClient::GetSafeBrowsingUrlCheckerDelegate(
      content::ResourceContext* resource_context) {
    DCHECK_CURRENTLY_ON(BrowserThread::IO);
  
@@ -175,7 +195,7 @@ diff --git a/chrome/browser/component_updater/file_type_policies_component_insta
 --- a/chrome/browser/component_updater/file_type_policies_component_installer.cc
 +++ b/chrome/browser/component_updater/file_type_policies_component_installer.cc
 @@ -18,7 +18,9 @@
- #include "base/path_service.h"
+ #include "base/stl_util.h"
  #include "base/task/post_task.h"
  #include "base/version.h"
 +#if defined(FULL_SAFE_BROWSING)
@@ -669,7 +689,7 @@ diff --git a/chrome/browser/download/download_ui_model.h b/chrome/browser/downlo
 diff --git a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
 --- a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
 +++ b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
-@@ -421,14 +421,18 @@ void ChromeResourceDispatcherHostDelegate::AppendStandardResourceThrottles(
+@@ -400,14 +400,18 @@ void ChromeResourceDispatcherHostDelegate::AppendStandardResourceThrottles(
      content::ResourceContext* resource_context,
      ResourceType resource_type,
      std::vector<std::unique_ptr<content::ResourceThrottle>>* throttles) {
@@ -711,7 +731,7 @@ diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/
  bool IsAccessAllowedInternal(const base::FilePath& path,
                               const base::FilePath& profile_path) {
    if (g_access_to_all_files_enabled)
-@@ -212,26 +199,8 @@ int ChromeNetworkDelegate::OnBeforeURLRequest(
+@@ -214,26 +201,8 @@ int ChromeNetworkDelegate::OnBeforeURLRequest(
      GURL* new_url) {
    extensions_delegate_->ForwardStartRequestStatus(request);
  

+ 4 - 4
build/patches/Allow-playing-audio-in-background.patch

@@ -10,7 +10,7 @@ Subject: Allow playing audio in background
 diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
 --- a/media/blink/webmediaplayer_impl.cc
 +++ b/media/blink/webmediaplayer_impl.cc
-@@ -917,6 +917,12 @@ bool WebMediaPlayerImpl::HasAudio() const {
+@@ -1014,6 +1014,12 @@ bool WebMediaPlayerImpl::HasAudio() const {
    return pipeline_metadata_.has_audio;
  }
  
@@ -23,10 +23,10 @@ diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_imp
  void WebMediaPlayerImpl::EnabledAudioTracksChanged(
      const blink::WebVector<blink::WebMediaPlayer::TrackId>& enabledTrackIds) {
    DCHECK(main_task_runner_->BelongsToCurrentThread());
-@@ -3108,7 +3114,10 @@ bool WebMediaPlayerImpl::ShouldPauseVideoWhenHidden() const {
+@@ -3296,7 +3302,10 @@ bool WebMediaPlayerImpl::ShouldPauseVideoWhenHidden() const {
    // If suspending background video, pause any video that's not remoted or
    // not unlocked to play in the background.
-   if (IsBackgroundSuspendEnabled(delegate_)) {
+   if (IsBackgroundSuspendEnabled(this)) {
 -    if (!HasVideo())
 +    //pipeline_metadata_.has_video is true for MediaPlayerRenderer,
 +    //see media/base/pipeline_metadata.h. This is a workaround to allow audio
@@ -38,7 +38,7 @@ diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_imp
 diff --git a/media/blink/webmediaplayer_impl.h b/media/blink/webmediaplayer_impl.h
 --- a/media/blink/webmediaplayer_impl.h
 +++ b/media/blink/webmediaplayer_impl.h
-@@ -162,6 +162,8 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
+@@ -153,6 +153,8 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
    // True if the loaded media has a playable video/audio track.
    bool HasVideo() const override;
    bool HasAudio() const override;

+ 1 - 1
build/patches/Allow-website-sign-in-without-account-sign-in.patch

@@ -10,7 +10,7 @@ Disable prefs::kSigninAllowedOnNextStartup by default. The setting can be found
 diff --git a/chrome/browser/signin/account_consistency_mode_manager.cc b/chrome/browser/signin/account_consistency_mode_manager.cc
 --- a/chrome/browser/signin/account_consistency_mode_manager.cc
 +++ b/chrome/browser/signin/account_consistency_mode_manager.cc
-@@ -175,7 +175,7 @@ void AccountConsistencyModeManager::RegisterProfilePrefs(
+@@ -126,7 +126,7 @@ void AccountConsistencyModeManager::RegisterProfilePrefs(
    registry->RegisterBooleanPref(prefs::kAccountConsistencyMirrorRequired,
                                  false);
  #endif

+ 1 - 1
build/patches/Always-respect-async-dns-flag-regardless-of-SDK-version.patch

@@ -11,7 +11,7 @@ Do not read experiment value for cronet async DNS configuration
 diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc
 --- a/chrome/browser/net/system_network_context_manager.cc
 +++ b/chrome/browser/net/system_network_context_manager.cc
-@@ -219,7 +219,7 @@ void OnAuthPrefsChanged(PrefService* local_state,
+@@ -220,7 +220,7 @@ void OnAuthPrefsChanged(PrefService* local_state,
  // Android this includes checking the Android version in the field trial.
  bool ShouldEnableAsyncDns() {
    bool feature_can_be_enabled = true;

+ 13 - 13
build/patches/AudioBuffer-AnalyserNode-fingerprinting-mitigations-via-IDL.patch

@@ -16,16 +16,16 @@ diff --git a/third_party/blink/renderer/modules/webaudio/analyser_node.idl b/thi
  
      // Copies the current frequency data into the passed array.
      // If the array has fewer elements than the frequencyBinCount, the excess elements will be dropped.
--    void getFloatFrequencyData(Float32Array array);
--    void getByteFrequencyData(Uint8Array array);
-+    //void getFloatFrequencyData(Float32Array array);
-+    //void getByteFrequencyData(Uint8Array array);
+-    [HighEntropy, Measure] void getFloatFrequencyData(Float32Array array);
+-    [HighEntropy, Measure] void getByteFrequencyData(Uint8Array array);
++    //[HighEntropy, Measure] void getFloatFrequencyData(Float32Array array);
++    //[HighEntropy, Measure] void getByteFrequencyData(Uint8Array array);
  
      // Real-time waveform data
--    void getFloatTimeDomainData(Float32Array array);
--    void getByteTimeDomainData(Uint8Array array);
-+    //void getFloatTimeDomainData(Float32Array array);
-+    //void getByteTimeDomainData(Uint8Array array);
+-    [HighEntropy, Measure] void getFloatTimeDomainData(Float32Array array);
+-    [HighEntropy, Measure] void getByteTimeDomainData(Uint8Array array);
++    //[HighEntropy, Measure] void getFloatTimeDomainData(Float32Array array);
++    //[HighEntropy, Measure] void getByteTimeDomainData(Uint8Array array);
  };
 diff --git a/third_party/blink/renderer/modules/webaudio/audio_buffer.idl b/third_party/blink/renderer/modules/webaudio/audio_buffer.idl
 --- a/third_party/blink/renderer/modules/webaudio/audio_buffer.idl
@@ -34,16 +34,16 @@ diff --git a/third_party/blink/renderer/modules/webaudio/audio_buffer.idl b/thir
  
      // Channel access
      readonly attribute unsigned long numberOfChannels;
--    [RaisesException] Float32Array getChannelData(unsigned long channelIndex);
--    [RaisesException] void copyFromChannel(Float32Array destination, long channelNumber, optional unsigned long startInChannel = 0);
-+    //[RaisesException] Float32Array getChannelData(unsigned long channelIndex);
-+    //[RaisesException] void copyFromChannel(Float32Array destination, long channelNumber, optional unsigned long startInChannel = 0);
+-    [HighEntropy, Measure, RaisesException] Float32Array getChannelData(unsigned long channelIndex);
+-    [HighEntropy, Measure, RaisesException] void copyFromChannel(Float32Array destination, long channelNumber, optional unsigned long startInChannel = 0);
++    //[HighEntropy, Measure, RaisesException] Float32Array getChannelData(unsigned long channelIndex);
++    //[HighEntropy, Measure, RaisesException] void copyFromChannel(Float32Array destination, long channelNumber, optional unsigned long startInChannel = 0);
      [RaisesException] void copyToChannel(Float32Array source, long channelNumber, optional unsigned long startInChannel = 0);
  };
 diff --git a/third_party/blink/renderer/modules/webaudio/audio_context.cc b/third_party/blink/renderer/modules/webaudio/audio_context.cc
 --- a/third_party/blink/renderer/modules/webaudio/audio_context.cc
 +++ b/third_party/blink/renderer/modules/webaudio/audio_context.cc
-@@ -330,6 +330,7 @@ void AudioContext::StopRendering() {
+@@ -315,6 +315,7 @@ void AudioContext::StopRendering() {
  double AudioContext::baseLatency() const {
    DCHECK(IsMainThread());
    DCHECK(destination());

+ 1 - 1
build/patches/Battery-API-return-nothing.patch

@@ -9,7 +9,7 @@ Subject: Battery API: return nothing
 diff --git a/third_party/blink/renderer/modules/battery/battery_manager.cc b/third_party/blink/renderer/modules/battery/battery_manager.cc
 --- a/third_party/blink/renderer/modules/battery/battery_manager.cc
 +++ b/third_party/blink/renderer/modules/battery/battery_manager.cc
-@@ -42,45 +42,28 @@ ScriptPromise BatteryManager::StartRequest(ScriptState* script_state) {
+@@ -43,45 +43,28 @@ ScriptPromise BatteryManager::StartRequest(ScriptState* script_state) {
  }
  
  bool BatteryManager::charging() {

+ 5 - 5
build/patches/Bromite-adblock-engine.patch

@@ -177,7 +177,7 @@ diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/re
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
-@@ -2206,6 +2206,14 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
+@@ -2249,6 +2249,14 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
              RecordUserAction.record("MobileMenuRequestEnableJavascript");
          } else if (id == R.id.reader_mode_prefs_id) {
              DomDistillerUIUtils.openSettings(currentTab.getWebContents());
@@ -195,7 +195,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
-@@ -1667,6 +1667,14 @@ public class ChromeTabbedActivity
+@@ -1678,6 +1678,14 @@ public class ChromeTabbedActivity
                  reportNewTabShortcutUsed(true);
                  getTabCreator(true).launchNTP();
              }
@@ -280,7 +280,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Cust
 diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
 --- a/chrome/android/java/strings/android_chrome_strings.grd
 +++ b/chrome/android/java/strings/android_chrome_strings.grd
-@@ -3055,6 +3055,17 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
+@@ -3059,6 +3059,17 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
        <message name="IDS_MENU_REQUEST_DESKTOP_SITE_OFF" desc="Accessibility description for when Request Desktop Site is disabled.">
          Turn on Request desktop site
        </message>
@@ -317,7 +317,7 @@ diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/
  #endif
  
  #if defined(OS_CHROMEOS)
-@@ -193,10 +195,91 @@ void ChromeNetworkDelegate::set_cookie_settings(
+@@ -195,10 +197,91 @@ void ChromeNetworkDelegate::set_cookie_settings(
    cookie_settings_ = cookie_settings;
  }
  
@@ -423,7 +423,7 @@ diff --git a/chrome/browser/subresource_filter/subresource_filter_content_settin
 diff --git a/net/BUILD.gn b/net/BUILD.gn
 --- a/net/BUILD.gn
 +++ b/net/BUILD.gn
-@@ -1758,6 +1758,13 @@ component("net") {
+@@ -1799,6 +1799,13 @@ component("net") {
        "url_request/websocket_handshake_userdata_key.h",
      ]
  

+ 4 - 4
build/patches/Canvas-fingerprinting-mitigations-for-image-data-and-webGL.patch

@@ -27,10 +27,10 @@ diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering
  
 -#include "base/rand_util.h"
 -
+ #include "third_party/blink/public/common/features.h"
  #include "third_party/blink/public/platform/platform.h"
  #include "third_party/blink/public/platform/task_type.h"
- #include "third_party/blink/public/platform/web_scroll_into_view_params.h"
-@@ -789,7 +787,7 @@ TextMetrics* CanvasRenderingContext2D::measureText(const String& text) {
+@@ -790,7 +788,7 @@ TextMetrics* CanvasRenderingContext2D::measureText(const String& text) {
                               GetState().GetTextAlign(), text);
  
    // scale text metrics by 3/1000000th
@@ -59,7 +59,7 @@ diff --git a/third_party/blink/renderer/modules/webgl/webgl_debug_renderer_info.
 diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
 --- a/third_party/blink/renderer/platform/BUILD.gn
 +++ b/third_party/blink/renderer/platform/BUILD.gn
-@@ -1429,7 +1429,9 @@ jumbo_component("platform") {
+@@ -1432,7 +1432,9 @@ jumbo_component("platform") {
      "//third_party/blink/renderer:non_test_config",
    ]
  
@@ -112,7 +112,7 @@ diff --git a/third_party/blink/renderer/platform/graphics/static_bitmap_image.cc
  #include "third_party/skia/include/core/SkSurface.h"
  #include "third_party/skia/include/gpu/GrContext.h"
  
-@@ -176,10 +179,163 @@ bool StaticBitmapImage::ConvertToArrayBufferContents(
+@@ -171,10 +174,163 @@ bool StaticBitmapImage::ConvertToArrayBufferContents(
    DCHECK(read_pixels_successful ||
           !sk_image->bounds().intersect(SkIRect::MakeXYWH(
               rect.X(), rect.Y(), info.width(), info.height())));

+ 1 - 1
build/patches/Disable-NTP-remote-suggestions-by-default.patch

@@ -9,7 +9,7 @@ Subject: Disable NTP remote suggestions by default
 diff --git a/components/ntp_snippets/features.cc b/components/ntp_snippets/features.cc
 --- a/components/ntp_snippets/features.cc
 +++ b/components/ntp_snippets/features.cc
-@@ -34,13 +34,13 @@ const base::Feature* const kAllFeatures[] = {
+@@ -35,13 +35,13 @@ const base::Feature* const kAllFeatures[] = {
      &kRemoteSuggestionsBackendFeature};
  
  const base::Feature kArticleSuggestionsFeature{

+ 2 - 2
build/patches/Disable-Omaha-update-checks.patch

@@ -36,8 +36,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/VersionNu
 diff --git a/chrome/browser/android/chrome_feature_list.cc b/chrome/browser/android/chrome_feature_list.cc
 --- a/chrome/browser/android/chrome_feature_list.cc
 +++ b/chrome/browser/android/chrome_feature_list.cc
-@@ -351,7 +351,7 @@ const base::Feature kIntentBlockExternalFormRedirectsNoGesture{
-     base::FEATURE_ENABLED_BY_DEFAULT};
+@@ -361,7 +361,7 @@ const base::Feature kIntentBlockExternalFormRedirectsNoGesture{
+     base::FEATURE_DISABLED_BY_DEFAULT};
  
  const base::Feature kJellyBeanSupported{"JellyBeanSupported",
 -                                        base::FEATURE_DISABLED_BY_DEFAULT};

+ 0 - 23
build/patches/Disable-ads-metrics-by-default.patch

@@ -1,23 +0,0 @@
-From: csagan5 <32685696+csagan5@users.noreply.github.com>
-Date: Wed, 11 Jul 2018 11:17:53 +0200
-Subject: Disable ads metrics by default
-
----
- chrome/common/chrome_features.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
---- a/chrome/common/chrome_features.cc
-+++ b/chrome/common/chrome_features.cc
-@@ -15,7 +15,7 @@ namespace features {
- // All features in alphabetical order.
- 
- // Enables Ads Metrics.
--const base::Feature kAdsFeature{"AdsMetrics", base::FEATURE_ENABLED_BY_DEFAULT};
-+const base::Feature kAdsFeature{"AdsMetrics", base::FEATURE_DISABLED_BY_DEFAULT};
- 
- #if defined(OS_ANDROID)
- const base::Feature kAllowAutoplayUnmutedInWebappManifestScope{
--- 
-2.11.0
-

+ 3 - 3
build/patches/Disable-fetching-of-all-field-trials.patch

@@ -10,7 +10,7 @@ Subject: Disable fetching of all field trials
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java
-@@ -103,9 +103,7 @@ public abstract class ChromeFeatureList {
+@@ -106,9 +106,7 @@ public abstract class ChromeFeatureList {
       */
      public static int getFieldTrialParamByFeatureAsInt(
              String featureName, String paramName, int defaultValue) {
@@ -21,7 +21,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureLi
      }
  
      /**
-@@ -122,9 +120,7 @@ public abstract class ChromeFeatureList {
+@@ -125,9 +123,7 @@ public abstract class ChromeFeatureList {
       */
      public static double getFieldTrialParamByFeatureAsDouble(
              String featureName, String paramName, double defaultValue) {
@@ -32,7 +32,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureLi
      }
  
      /**
-@@ -141,9 +137,7 @@ public abstract class ChromeFeatureList {
+@@ -144,9 +140,7 @@ public abstract class ChromeFeatureList {
       */
      public static boolean getFieldTrialParamByFeatureAsBoolean(
              String featureName, String paramName, boolean defaultValue) {

+ 1 - 1
build/patches/Disable-hyperlink-auditing-by-default.patch

@@ -9,7 +9,7 @@ Subject: Disable hyperlink auditing by default
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -1418,7 +1418,7 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -1325,7 +1325,7 @@ const FeatureEntry kFeatureEntries[] = {
       SINGLE_VALUE_TYPE(switches::kDisableIpcFloodingProtection)},
      {"disable-hyperlink-auditing", flag_descriptions::kHyperlinkAuditingName,
       flag_descriptions::kHyperlinkAuditingDescription, kOsAll,

+ 6 - 6
build/patches/Disable-metrics-collection-for-NTP-tiles.patch

@@ -10,15 +10,15 @@ Subject: Disable metrics collection for NTP tiles
 diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/browser/android/ntp/most_visited_sites_bridge.cc
 --- a/chrome/browser/android/ntp/most_visited_sites_bridge.cc
 +++ b/chrome/browser/android/ntp/most_visited_sites_bridge.cc
-@@ -25,7 +25,6 @@
- #include "chrome/browser/thumbnails/thumbnail_list_source.h"
+@@ -24,7 +24,6 @@
+ #include "chrome/browser/profiles/profile_android.h"
  #include "components/favicon_base/favicon_types.h"
  #include "components/history/core/browser/history_service.h"
 -#include "components/ntp_tiles/metrics.h"
  #include "components/ntp_tiles/most_visited_sites.h"
  #include "components/ntp_tiles/section_type.h"
  #include "components/rappor/rappor_service_impl.h"
-@@ -47,7 +46,6 @@ using ntp_tiles::NTPTilesVector;
+@@ -46,7 +45,6 @@ using ntp_tiles::NTPTilesVector;
  using ntp_tiles::SectionType;
  using ntp_tiles::TileTitleSource;
  using ntp_tiles::TileSource;
@@ -26,7 +26,7 @@ diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/br
  
  namespace {
  
-@@ -252,7 +250,6 @@ void MostVisitedSitesBridge::RecordPageImpression(
+@@ -247,7 +245,6 @@ void MostVisitedSitesBridge::RecordPageImpression(
      JNIEnv* env,
      const JavaParamRef<jobject>& obj,
      jint jtiles_count) {
@@ -34,7 +34,7 @@ diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/br
  }
  
  void MostVisitedSitesBridge::RecordTileImpression(
-@@ -265,18 +262,6 @@ void MostVisitedSitesBridge::RecordTileImpression(
+@@ -260,18 +257,6 @@ void MostVisitedSitesBridge::RecordTileImpression(
      jint jsource,
      jlong jdata_generation_time_ms,
      const JavaParamRef<jstring>& jurl) {
@@ -53,7 +53,7 @@ diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/br
  }
  
  void MostVisitedSitesBridge::RecordOpenedMostVisitedItem(
-@@ -287,12 +272,6 @@ void MostVisitedSitesBridge::RecordOpenedMostVisitedItem(
+@@ -282,12 +267,6 @@ void MostVisitedSitesBridge::RecordOpenedMostVisitedItem(
      jint title_source,
      jint source,
      jlong jdata_generation_time_ms) {

+ 1 - 1
build/patches/Disable-metrics-on-all-I-O-threads.patch

@@ -22,7 +22,7 @@ diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_pro
 diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc
 --- a/chrome/browser/profiles/profile_io_data.cc
 +++ b/chrome/browser/profiles/profile_io_data.cc
-@@ -57,8 +57,6 @@
+@@ -56,8 +56,6 @@
  #include "components/cookie_config/cookie_store_util.h"
  #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h"
  #include "components/dom_distiller/core/url_constants.h"

+ 1 - 1
build/patches/Disable-omission-of-URL-elements-in-Omnibox.patch

@@ -29,9 +29,9 @@ diff --git a/components/url_formatter/url_formatter.cc b/components/url_formatte
 +const FormatUrlType kFormatUrlOmitTrivialSubdomains = 0 << 5;
 +const FormatUrlType kFormatUrlTrimAfterHost = 0 << 6;
 +const FormatUrlType kFormatUrlOmitFileScheme = 0 << 7;
+ const FormatUrlType kFormatUrlOmitMailToScheme = 1 << 8;
  
  const FormatUrlType kFormatUrlOmitDefaults =
-     kFormatUrlOmitUsernamePassword | kFormatUrlOmitHTTP |
 -- 
 2.11.0
 

+ 1 - 1
build/patches/Disable-plugins-enumeration.patch

@@ -9,7 +9,7 @@ Subject: Disable plugins enumeration
 diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
 --- a/third_party/blink/renderer/core/frame/local_frame.cc
 +++ b/third_party/blink/renderer/core/frame/local_frame.cc
-@@ -1309,10 +1309,8 @@ FrameResourceCoordinator* LocalFrame::GetFrameResourceCoordinator() {
+@@ -1321,10 +1321,8 @@ FrameResourceCoordinator* LocalFrame::GetFrameResourceCoordinator() {
  }
  
  PluginData* LocalFrame::GetPluginData() const {

+ 1 - 1
build/patches/Disable-promos-displayed-in-bookmarks-manager.patch

@@ -156,7 +156,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninPr
 diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni
 --- a/chrome/android/java_sources.gni
 +++ b/chrome/android/java_sources.gni
-@@ -163,7 +163,6 @@ chrome_java_sources = [
+@@ -189,7 +189,6 @@ chrome_java_sources = [
    "java/src/org/chromium/chrome/browser/bookmarks/BookmarkManager.java",
    "java/src/org/chromium/chrome/browser/bookmarks/BookmarkModel.java",
    "java/src/org/chromium/chrome/browser/bookmarks/BookmarkPage.java",

+ 58 - 62
build/patches/Disable-signin-and-data-saver-preferences.patch

@@ -4,10 +4,10 @@ Subject: Disable signin and data saver preferences
 
 Never show the data saver promo snackbar
 ---
- chrome/android/java/res/xml/main_preferences.xml   |  9 ------
- .../chromium/chrome/browser/ChromeActivity.java    |  6 ++--
- .../browser/preferences/MainPreferences.java       | 37 +++++++++++-----------
- 3 files changed, 22 insertions(+), 30 deletions(-)
+ chrome/android/java/res/xml/main_preferences.xml   |  9 -----
+ .../chromium/chrome/browser/ChromeActivity.java    |  6 ++-
+ .../browser/preferences/MainPreferences.java       | 46 ++++++----------------
+ 3 files changed, 15 insertions(+), 46 deletions(-)
 
 diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/java/res/xml/main_preferences.xml
 --- a/chrome/android/java/res/xml/main_preferences.xml
@@ -23,22 +23,22 @@ diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/j
      <org.chromium.chrome.browser.preferences.ChromeBasePreference
          android:fragment="org.chromium.chrome.browser.preferences.SyncAndServicesPreferences"
          android:key="sync_and_services"
-@@ -90,11 +86,6 @@
+@@ -89,11 +85,6 @@
+         android:key="languages"
          android:order="16"
          android:title="@string/prefs_languages"/>
-     <org.chromium.chrome.browser.preferences.ChromeBasePreference
--        android:fragment="org.chromium.chrome.browser.preferences.datareduction.DataReductionPreferences"
+-    <org.chromium.chrome.browser.preferences.datareduction.DataReductionPreference
+-        android:fragment="org.chromium.chrome.browser.preferences.datareduction.DataReductionPreferenceFragment"
 -        android:key="data_reduction"
 -        android:order="17"
 -        android:title="@string/data_reduction_title"/>
--    <org.chromium.chrome.browser.preferences.ChromeBasePreference
+     <org.chromium.chrome.browser.preferences.ChromeBasePreference
          android:fragment="org.chromium.chrome.browser.preferences.download.DownloadPreferences"
          android:key="downloads"
-         android:order="18"
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
-@@ -119,7 +119,7 @@ import org.chromium.chrome.browser.printing.TabPrinter;
+@@ -125,7 +125,7 @@ import org.chromium.chrome.browser.printing.TabPrinter;
  import org.chromium.chrome.browser.profiles.Profile;
  import org.chromium.chrome.browser.share.ShareMenuActionHandler;
  import org.chromium.chrome.browser.snackbar.BottomContainer;
@@ -47,7 +47,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.
  import org.chromium.chrome.browser.snackbar.SnackbarManager;
  import org.chromium.chrome.browser.snackbar.SnackbarManager.SnackbarManageable;
  import org.chromium.chrome.browser.sync.ProfileSyncService;
-@@ -267,7 +267,7 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
+@@ -275,7 +275,7 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
      private EphemeralTabPanel mEphemeralTabPanel;
      protected ReaderModeManager mReaderModeManager;
      private SnackbarManager mSnackbarManager;
@@ -56,7 +56,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.
      private AppMenuPropertiesDelegate mAppMenuPropertiesDelegate;
      private AppMenuHandler mAppMenuHandler;
      private ToolbarManager mToolbarManager;
-@@ -678,6 +678,7 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
+@@ -694,6 +694,7 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
          mTabModelSelectorTabObserver = new TabModelSelectorTabObserver(mTabModelSelector) {
              @Override
              public void didFirstVisuallyNonEmptyPaint(Tab tab) {
@@ -64,7 +64,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.
                  // Only alert about data savings once the first paint has happened. It
                  // doesn't make sense to show a snackbar about savings when nothing has been
                  // displayed yet.
-@@ -691,6 +692,7 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
+@@ -707,6 +708,7 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
                              DataReductionProxySettings.getInstance()
                                      .getTotalHttpContentLengthSaved());
                  }
@@ -75,18 +75,19 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/MainPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/MainPreferences.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/MainPreferences.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/MainPreferences.java
-@@ -18,10 +18,8 @@ import org.chromium.chrome.R;
- import org.chromium.chrome.browser.AppHooks;
+@@ -17,11 +17,9 @@ import org.chromium.base.VisibleForTesting;
+ import org.chromium.chrome.R;
  import org.chromium.chrome.browser.ChromeFeatureList;
  import org.chromium.chrome.browser.contextual_suggestions.ContextualSuggestionsEnabledStateUtils;
 -import org.chromium.chrome.browser.net.spdyproxy.DataReductionProxySettings;
  import org.chromium.chrome.browser.partnercustomizations.HomepageManager;
  import org.chromium.chrome.browser.password_manager.ManagePasswordsReferrer;
--import org.chromium.chrome.browser.preferences.datareduction.DataReductionPreferences;
+ import org.chromium.chrome.browser.preferences.autofill_assistant.AutofillAssistantPreferences;
+-import org.chromium.chrome.browser.preferences.datareduction.DataReductionPreferenceFragment;
+ import org.chromium.chrome.browser.preferences.developer.DeveloperPreferences;
  import org.chromium.chrome.browser.search_engines.TemplateUrl;
  import org.chromium.chrome.browser.search_engines.TemplateUrlService;
- import org.chromium.chrome.browser.signin.SigninManager;
-@@ -36,13 +34,11 @@ import java.util.Map;
+@@ -37,13 +35,11 @@ import java.util.Map;
  public class MainPreferences extends PreferenceFragment
          implements SigninManager.SignInStateObserver, TemplateUrlService.LoadListener {
      public static final String PREF_ACCOUNT_SECTION = "account_section";
@@ -100,7 +101,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Mai
      public static final String PREF_NOTIFICATIONS = "notifications";
      public static final String PREF_LANGUAGES = "languages";
      public static final String PREF_DOWNLOADS = "downloads";
-@@ -56,7 +52,6 @@ public class MainPreferences extends PreferenceFragment
+@@ -57,7 +53,6 @@ public class MainPreferences extends PreferenceFragment
  
      private final ManagedPreferenceDelegate mManagedPreferenceDelegate;
      private final Map<String, Preference> mAllPreferences = new HashMap<>();
@@ -108,7 +109,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Mai
  
      public MainPreferences() {
          setHasOptionsMenu(true);
-@@ -72,25 +67,29 @@ public class MainPreferences extends PreferenceFragment
+@@ -73,25 +68,29 @@ public class MainPreferences extends PreferenceFragment
      @Override
      public void onDestroy() {
          super.onDestroy();
@@ -139,27 +140,27 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Mai
      }
  
      @Override
-@@ -103,16 +102,16 @@ public class MainPreferences extends PreferenceFragment
+@@ -104,17 +103,12 @@ public class MainPreferences extends PreferenceFragment
          PreferenceUtils.addPreferencesFromResource(this, R.xml.main_preferences);
          cachePreferences();
  
 -        if (ChromeFeatureList.isEnabled(ChromeFeatureList.UNIFIED_CONSENT)) {
-+/*        if (ChromeFeatureList.isEnabled(ChromeFeatureList.UNIFIED_CONSENT)) {
-             mSignInPreference.setOnStateChangedCallback(this::onSignInPreferenceStateChanged);
+-            mSignInPreference.setOnStateChangedCallback(this::onSignInPreferenceStateChanged);
 -        } else {
-+        } else */{
-             getPreferenceScreen().removePreference(findPreference(PREF_ACCOUNT_SECTION));
-             getPreferenceScreen().removePreference(findPreference(PREF_SYNC_AND_SERVICES));
-         }
+-            getPreferenceScreen().removePreference(findPreference(PREF_ACCOUNT_SECTION));
+-            getPreferenceScreen().removePreference(findPreference(PREF_SYNC_AND_SERVICES));
+-        }
++        getPreferenceScreen().removePreference(findPreference(PREF_ACCOUNT_SECTION));
++        getPreferenceScreen().removePreference(findPreference(PREF_SYNC_AND_SERVICES));
+ 
+         updatePasswordsPreference();
  
          setManagedPreferenceDelegateForPreference(PREF_SEARCH_ENGINE);
-         setManagedPreferenceDelegateForPreference(PREF_SAVED_PASSWORDS);
 -        setManagedPreferenceDelegateForPreference(PREF_DATA_REDUCTION);
-+        //setManagedPreferenceDelegateForPreference(PREF_DATA_REDUCTION);
  
-         updatePasswordsPreference();
- 
-@@ -180,7 +179,7 @@ public class MainPreferences extends PreferenceFragment
+         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+             // If we are on Android O+ the Notifications preference should lead to the Android
+@@ -178,7 +172,7 @@ public class MainPreferences extends PreferenceFragment
              Preference preference = getPreferenceScreen().getPreference(index);
              mAllPreferences.put(preference.getKey(), preference);
          }
@@ -168,7 +169,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Mai
      }
  
      private void setManagedPreferenceDelegateForPreference(String key) {
-@@ -189,12 +188,6 @@ public class MainPreferences extends PreferenceFragment
+@@ -187,12 +181,6 @@ public class MainPreferences extends PreferenceFragment
      }
  
      private void updatePreferences() {
@@ -181,19 +182,18 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Mai
          updateSearchEnginePreference();
  
          if (HomepageManager.shouldShowHomepageSetting()) {
-@@ -217,9 +210,11 @@ public class MainPreferences extends PreferenceFragment
-             removePreferenceIfPresent(PREF_CONTEXTUAL_SUGGESTIONS);
+@@ -220,10 +208,6 @@ public class MainPreferences extends PreferenceFragment
+         } else {
+             removePreferenceIfPresent(PREF_DEVELOPER);
          }
- 
-+/*
-         ChromeBasePreference dataReduction =
-                 (ChromeBasePreference) findPreference(PREF_DATA_REDUCTION);
-         dataReduction.setSummary(DataReductionPreferences.generateSummary(getResources()));
-+*/
+-
+-        ChromeBasePreference dataReduction =
+-                (ChromeBasePreference) findPreference(PREF_DATA_REDUCTION);
+-        dataReduction.setSummary(DataReductionPreferenceFragment.generateSummary(getResources()));
      }
  
      private Preference addPreferenceIfAbsent(String key) {
-@@ -279,11 +274,11 @@ public class MainPreferences extends PreferenceFragment
+@@ -283,11 +267,11 @@ public class MainPreferences extends PreferenceFragment
  
      private void onSignInPreferenceStateChanged() {
          // Remove "Account" section header if the personalized sign-in promo is shown.
@@ -208,29 +208,25 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Mai
      }
  
      // TemplateUrlService.LoadListener implementation.
-@@ -305,9 +300,11 @@ public class MainPreferences extends PreferenceFragment
-                 if (PREF_SAVED_PASSWORDS.equals(preference.getKey())) {
-                     return PrefServiceBridge.getInstance().isRememberPasswordsManaged();
-                 }
-+/*
-                 if (PREF_DATA_REDUCTION.equals(preference.getKey())) {
-                     return DataReductionProxySettings.getInstance().isDataReductionProxyManaged();
-                 }
-+*/
+@@ -306,9 +290,6 @@ public class MainPreferences extends PreferenceFragment
+         return new ManagedPreferenceDelegate() {
+             @Override
+             public boolean isPreferenceControlledByPolicy(Preference preference) {
+-                if (PREF_DATA_REDUCTION.equals(preference.getKey())) {
+-                    return DataReductionProxySettings.getInstance().isDataReductionProxyManaged();
+-                }
                  if (PREF_SEARCH_ENGINE.equals(preference.getKey())) {
                      return TemplateUrlService.getInstance().isDefaultSearchManaged();
                  }
-@@ -321,11 +318,13 @@ public class MainPreferences extends PreferenceFragment
-                     return prefs.isRememberPasswordsManaged()
-                             && !prefs.isRememberPasswordsEnabled();
-                 }
-+/*
-                 if (PREF_DATA_REDUCTION.equals(preference.getKey())) {
-                     DataReductionProxySettings settings = DataReductionProxySettings.getInstance();
-                     return settings.isDataReductionProxyManaged()
-                             && !settings.isDataReductionProxyEnabled();
-                 }
-+*/
+@@ -317,11 +298,6 @@ public class MainPreferences extends PreferenceFragment
+ 
+             @Override
+             public boolean isPreferenceClickDisabledByPolicy(Preference preference) {
+-                if (PREF_DATA_REDUCTION.equals(preference.getKey())) {
+-                    DataReductionProxySettings settings = DataReductionProxySettings.getInstance();
+-                    return settings.isDataReductionProxyManaged()
+-                            && !settings.isDataReductionProxyEnabled();
+-                }
                  if (PREF_SEARCH_ENGINE.equals(preference.getKey())) {
                      return TemplateUrlService.getInstance().isDefaultSearchManaged();
                  }

+ 35 - 16
build/patches/Disable-signin-data-reduction-promos.patch

@@ -3,30 +3,49 @@ Date: Tue, 12 Jun 2018 15:09:26 +0200
 Subject: Disable signin/data reduction promos
 
 ---
- .../java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java    | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
+ .../chrome/browser/ChromeTabbedActivity.java       | 28 ++--------------------
+ 1 file changed, 2 insertions(+), 26 deletions(-)
 
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
-@@ -604,7 +604,7 @@ public class ChromeTabbedActivity
-             // TODO(tedchoc): Unify promo dialog logic as the search engine promo dialog checks
-             //                might not have completed at this point and we could show multiple
-             //                promos.
+@@ -599,34 +599,10 @@ public class ChromeTabbedActivity
+             }
+ 
+             ChromePreferenceManager preferenceManager = ChromePreferenceManager.getInstance();
+-            // Promos can only be shown when we start with ACTION_MAIN intent and
+-            // after FRE is complete. Native initialization can finish before the FRE flow is
+-            // complete, and this will only show promos on the second opportunity. This is
+-            // because the FRE is shown on the first opportunity, and we don't want to show such
+-            // content back to back.
+-            //
+-            // TODO(tedchoc): Unify promo dialog logic as the search engine promo dialog checks
+-            //                might not have completed at this point and we could show multiple
+-            //                promos.
 -            boolean isShowingPromo = mLocaleManager.hasShownSearchEnginePromoThisSession();
-+            /*boolean isShowingPromo = mLocaleManager.hasShownSearchEnginePromoThisSession();
-             // Promo dialogs in multiwindow mode are broken on some devices: http://crbug.com/354696
-             boolean isLegacyMultiWindow = MultiWindowUtils.getInstance().isLegacyMultiWindow(this);
-             if (!isShowingPromo && !mIntentWithEffect && FirstRunStatus.getFirstRunFlowComplete()
-@@ -622,7 +622,7 @@ public class ChromeTabbedActivity
+-            // Promo dialogs in multiwindow mode are broken on some devices: http://crbug.com/354696
+-            boolean isLegacyMultiWindow = MultiWindowUtils.getInstance().isLegacyMultiWindow(this);
+-            if (!isShowingPromo && !mIntentWithEffect && FirstRunStatus.getFirstRunFlowComplete()
+-                    && preferenceManager.readBoolean(
+-                               ChromePreferenceManager.PROMOS_SKIPPED_ON_FIRST_START, false)
+-                    && !VrModuleProvider.getDelegate().isInVr()
+-                    // VrModuleProvider.getDelegate().isInVr may not return true at this point even
+-                    // though Chrome is about to enter VR, so we need to also check whether we're
+-                    // launching into VR.
+-                    && !VrModuleProvider.getIntentDelegate().isLaunchingIntoVr(this, getIntent())
+-                    && !isLegacyMultiWindow) {
+-                isShowingPromo = maybeShowPromo();
+-            } else {
+-                preferenceManager.writeBoolean(
++            preferenceManager.writeBoolean(
                          ChromePreferenceManager.PROMOS_SKIPPED_ON_FIRST_START, true);
-             }
+-            }
  
--            if (!isShowingPromo) {
-+            if (!isShowingPromo) */ {
-                 ToolbarButtonInProductHelpController.maybeShowColdStartIPH(this);
-             }
+-            ToolbarButtonInProductHelpController.create(this, isShowingPromo);
++            ToolbarButtonInProductHelpController.create(this, false);
  
+             if (ChromeFeatureList.isEnabled(ChromeFeatureList.INTEREST_FEED_CONTENT_SUGGESTIONS)) {
+                 // We call getFeedAppLifecycle() here to ensure the app lifecycle is created so that
 -- 
 2.11.0
 

+ 1 - 1
build/patches/Disable-smooth-scrolling-on-Linux.patch

@@ -24,8 +24,8 @@ diff --git a/ui/gfx/animation/animation.cc b/ui/gfx/animation/animation.cc
 -  return true;
 +  return false;
  }
- #endif
  
+ bool Animation::PrefersReducedMotion() {
 -- 
 2.11.0
 

+ 1 - 1
build/patches/Do-not-grant-notifications-to-default-search-engine.patch

@@ -54,7 +54,7 @@ diff --git a/chrome/browser/android/search_permissions/search_permissions_servic
 diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
 --- a/chrome/common/chrome_features.cc
 +++ b/chrome/common/chrome_features.cc
-@@ -291,7 +291,7 @@ const base::Feature kGeoLanguage{"GeoLanguage",
+@@ -296,7 +296,7 @@ const base::Feature kGeoLanguage{"GeoLanguage",
  
  #if defined(OS_ANDROID)
  const base::Feature kGrantNotificationsToDSE{"GrantNotificationsToDSE",

+ 3 - 3
build/patches/Do-not-ignore-download-location-prompt-setting.patch

@@ -12,7 +12,7 @@ do not skip the prompt in such cases.
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadLocationDialogBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadLocationDialogBridge.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadLocationDialogBridge.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadLocationDialogBridge.java
-@@ -32,9 +32,6 @@ public class DownloadLocationDialogBridge implements ModalDialogView.Controller
+@@ -31,9 +31,6 @@ public class DownloadLocationDialogBridge implements ModalDialogProperties.Contr
      private PropertyModel mDialogModel;
      private DownloadLocationCustomView mCustomView;
      private ModalDialogManager mModalDialogManager;
@@ -22,7 +22,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/Downlo
      private Context mContext;
  
      private DownloadLocationDialogBridge(long nativeDownloadLocationDialogBridge) {
-@@ -67,12 +64,28 @@ public class DownloadLocationDialogBridge implements ModalDialogView.Controller
+@@ -66,12 +63,28 @@ public class DownloadLocationDialogBridge implements ModalDialogProperties.Contr
  
          mModalDialogManager = activity.getModalDialogManager();
          mContext = activity;
@@ -56,7 +56,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/Downlo
      }
  
      @Override
-@@ -105,48 +118,6 @@ public class DownloadLocationDialogBridge implements ModalDialogView.Controller
+@@ -104,48 +117,6 @@ public class DownloadLocationDialogBridge implements ModalDialogProperties.Contr
          mCustomView = null;
      }
  

+ 1 - 1
build/patches/Do-not-store-passwords-by-default.patch

@@ -9,7 +9,7 @@ Subject: Do not store passwords by default
 diff --git a/components/password_manager/core/browser/password_manager.cc b/components/password_manager/core/browser/password_manager.cc
 --- a/components/password_manager/core/browser/password_manager.cc
 +++ b/components/password_manager/core/browser/password_manager.cc
-@@ -321,10 +321,10 @@ void RecordParsingOnSavingDifference(
+@@ -333,10 +333,10 @@ void RecordParsingOnSavingDifference(
  void PasswordManager::RegisterProfilePrefs(
      user_prefs::PrefRegistrySyncable* registry) {
    registry->RegisterBooleanPref(

+ 0 - 23
build/patches/Enable-TLS-1.3-final-by-default.patch

@@ -1,23 +0,0 @@
-From: csagan5 <32685696+csagan5@users.noreply.github.com>
-Date: Mon, 5 Nov 2018 09:39:50 +0100
-Subject: Enable TLS 1.3 (final) by default
-
----
- chrome/browser/ssl/ssl_config_service_manager_pref.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/chrome/browser/ssl/ssl_config_service_manager_pref.cc b/chrome/browser/ssl/ssl_config_service_manager_pref.cc
---- a/chrome/browser/ssl/ssl_config_service_manager_pref.cc
-+++ b/chrome/browser/ssl/ssl_config_service_manager_pref.cc
-@@ -179,7 +179,7 @@ SSLConfigServiceManagerPref::SSLConfigServiceManagerPref(
-   } else if (tls13_variant == "draft23") {
-     tls13_value = switches::kTLS13VariantDraft23;
-     version_value = switches::kSSLVersionTLSv13;
--  } else if (tls13_variant == "final") {
-+  } else if (tls13_variant == "final" || tls13_variant.empty()) {
-     tls13_value = switches::kTLS13VariantFinal;
-     version_value = switches::kSSLVersionTLSv13;
-   }
--- 
-2.11.0
-

+ 1 - 1
build/patches/Enable-fwrapv-in-Clang-for-non-UBSan-builds.patch

@@ -9,7 +9,7 @@ Subject: Enable -fwrapv in Clang for non-UBSan builds
 diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
 --- a/build/config/compiler/BUILD.gn
 +++ b/build/config/compiler/BUILD.gn
-@@ -267,6 +267,10 @@ config("compiler") {
+@@ -268,6 +268,10 @@ config("compiler") {
        }
      }
  

+ 4 - 4
build/patches/Enable-history-requirement-of-user-gesture.patch

@@ -10,15 +10,15 @@ Set #enable-history-entry-requires-user-gesture to enabled by default
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -1420,7 +1420,7 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -1323,7 +1323,7 @@ const FeatureEntry kFeatureEntries[] = {
      {"enable-history-entry-requires-user-gesture",
       flag_descriptions::kHistoryRequiresUserGestureName,
       flag_descriptions::kHistoryRequiresUserGestureDescription, kOsAll,
 -     SINGLE_VALUE_TYPE(switches::kHistoryEntryRequiresUserGesture)},
 +     SINGLE_DISABLE_VALUE_TYPE(switches::kHistoryEntryRequiresUserGesture)},
-     {"disable-pushstate-throttle",
-      flag_descriptions::kDisablePushStateThrottleName,
-      flag_descriptions::kDisablePushStateThrottleDescription, kOsAll,
+     {"enable-history-manipulation-intervention",
+      flag_descriptions::kHistoryManipulationIntervention,
+      flag_descriptions::kHistoryManipulationInterventionDescription, kOsAll,
 -- 
 2.11.0
 

+ 1 - 1
build/patches/Fix-crash-when-accessing-page-info-site-settings.patch

@@ -9,7 +9,7 @@ Subject: Fix crash when accessing page info / site settings
 diff --git a/chrome/browser/permissions/permission_manager.cc b/chrome/browser/permissions/permission_manager.cc
 --- a/chrome/browser/permissions/permission_manager.cc
 +++ b/chrome/browser/permissions/permission_manager.cc
-@@ -689,6 +689,9 @@ PermissionResult PermissionManager::GetPermissionStatusHelper(
+@@ -694,6 +694,9 @@ PermissionResult PermissionManager::GetPermissionStatusHelper(
    if (status != CONTENT_SETTING_DEFAULT)
      return PermissionResult(status, PermissionStatusSource::UNSPECIFIED);
    PermissionContextBase* context = GetPermissionContext(permission);

+ 2 - 2
build/patches/Hide-passwords-manager-link.patch

@@ -9,7 +9,7 @@ Subject: Hide passwords manager link
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferences.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferences.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferences.java
-@@ -251,7 +251,7 @@ public class SavePasswordsPreferences
+@@ -249,7 +249,7 @@ public class SavePasswordsPreferences
              return;
          }
  
@@ -18,7 +18,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/pas
  
          PreferenceGroup passwordParent;
          if (mSearchQuery == null) {
-@@ -326,7 +326,7 @@ public class SavePasswordsPreferences
+@@ -324,7 +324,7 @@ public class SavePasswordsPreferences
              return;
          }
  

+ 2 - 2
build/patches/Hide-send-reports-checkbox.patch

@@ -13,8 +13,8 @@ diff --git a/chrome/android/java/res/layout/fre_tosanduma.xml b/chrome/android/j
                          android:layout_height="wrap_content"
                          android:lineSpacingMultiplier="1.4"
                          android:text="@string/fre_send_report_check"
--                        android:textAppearance="@style/BlackBodyDefault" />
-+                        android:textAppearance="@style/BlackBodyDefault" android:visibility = "gone" />
+-                        android:textAppearance="@style/TextAppearance.BlackBodyDefault" />
++                        android:textAppearance="@style/TextAppearance.BlackBodyDefault" android:visibility="gone" />
                      </LinearLayout>
              </LinearLayout>
          </LinearLayout>

+ 7 - 7
build/patches/Inject-scripts-for-AMP-tracking-ads-and-video-functionality.patch

@@ -20,7 +20,7 @@ Send a random key press to circumvent idle status detection
 diff --git a/third_party/blink/renderer/core/dom/BUILD.gn b/third_party/blink/renderer/core/dom/BUILD.gn
 --- a/third_party/blink/renderer/core/dom/BUILD.gn
 +++ b/third_party/blink/renderer/core/dom/BUILD.gn
-@@ -148,6 +148,8 @@ blink_core_sources("dom") {
+@@ -150,6 +150,8 @@ blink_core_sources("dom") {
      "global_event_handlers.h",
      "icon_url.cc",
      "icon_url.h",
@@ -32,7 +32,7 @@ diff --git a/third_party/blink/renderer/core/dom/BUILD.gn b/third_party/blink/re
 diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc
 --- a/third_party/blink/renderer/core/dom/document.cc
 +++ b/third_party/blink/renderer/core/dom/document.cc
-@@ -234,6 +234,7 @@
+@@ -236,6 +236,7 @@
  #include "third_party/blink/renderer/core/page/scrolling/scrolling_coordinator.h"
  #include "third_party/blink/renderer/core/page/scrolling/snap_coordinator.h"
  #include "third_party/blink/renderer/core/page/scrolling/top_document_root_scroller_controller.h"
@@ -40,7 +40,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink
  #include "third_party/blink/renderer/core/paint/compositing/paint_layer_compositor.h"
  #include "third_party/blink/renderer/core/paint/first_meaningful_paint_detector.h"
  #include "third_party/blink/renderer/core/paint/paint_layer.h"
-@@ -293,6 +294,8 @@
+@@ -296,6 +297,8 @@
  #include "third_party/blink/renderer/platform/wtf/text/text_encoding_registry.h"
  #include "third_party/blink/renderer/platform/wtf/time.h"
  
@@ -49,9 +49,9 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink
  #ifndef NDEBUG
  using WeakDocumentSet = blink::HeapHashSet<blink::WeakMember<blink::Document>>;
  static WeakDocumentSet& liveDocumentSet();
-@@ -6131,8 +6134,35 @@ void Document::FinishedParsing() {
-     fetcher_->ClearResourcesFromPreviousFetcher();
-   }
+@@ -6199,8 +6202,35 @@ void Document::FinishedParsing() {
+   // Parser should have picked up all preloads by now
+   fetcher_->ClearPreloads(ResourceFetcher::kClearSpeculativeMarkupPreloads);
  
 -  if (IsPrefetchOnly())
 +  if (IsPrefetchOnly()) {
@@ -111,7 +111,7 @@ new file mode 100644
 diff --git a/third_party/blink/renderer/core/html/html_script_element.cc b/third_party/blink/renderer/core/html/html_script_element.cc
 --- a/third_party/blink/renderer/core/html/html_script_element.cc
 +++ b/third_party/blink/renderer/core/html/html_script_element.cc
-@@ -147,6 +147,11 @@ void HTMLScriptElement::setTextContent(
+@@ -155,6 +155,11 @@ void HTMLScriptElement::setTextContent(
    }
  }
  

+ 9 - 9
build/patches/Modify-default-preferences.patch

@@ -36,7 +36,7 @@ diff --git a/chrome/browser/background/background_mode_manager.cc b/chrome/brows
 diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
 --- a/chrome/browser/chrome_content_browser_client.cc
 +++ b/chrome/browser/chrome_content_browser_client.cc
-@@ -1058,7 +1058,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs(
+@@ -1098,7 +1098,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs(
  void ChromeContentBrowserClient::RegisterProfilePrefs(
      user_prefs::PrefRegistrySyncable* registry) {
    registry->RegisterBooleanPref(prefs::kDisable3DAPIs, false);
@@ -84,7 +84,7 @@ diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profil
 diff --git a/chrome/browser/resources/settings/reset_page/reset_profile_dialog.html b/chrome/browser/resources/settings/reset_page/reset_profile_dialog.html
 --- a/chrome/browser/resources/settings/reset_page/reset_profile_dialog.html
 +++ b/chrome/browser/resources/settings/reset_page/reset_profile_dialog.html
-@@ -45,7 +45,7 @@
+@@ -52,7 +52,7 @@
          </paper-button>
        </div>
        <div slot="footer">
@@ -96,7 +96,7 @@ diff --git a/chrome/browser/resources/settings/reset_page/reset_profile_dialog.h
 diff --git a/chrome/browser/signin/signin_promo.cc b/chrome/browser/signin/signin_promo.cc
 --- a/chrome/browser/signin/signin_promo.cc
 +++ b/chrome/browser/signin/signin_promo.cc
-@@ -353,8 +353,8 @@ void ForceWebBasedSigninFlowForTesting(bool force) {
+@@ -291,8 +291,8 @@ void ForceWebBasedSigninFlowForTesting(bool force) {
  void RegisterProfilePrefs(
      user_prefs::PrefRegistrySyncable* registry) {
    registry->RegisterIntegerPref(prefs::kSignInPromoStartupCount, 0);
@@ -165,7 +165,7 @@ diff --git a/chrome/service/cloud_print/connector_settings.cc b/chrome/service/c
 diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
 --- a/components/autofill/core/browser/autofill_manager.cc
 +++ b/components/autofill/core/browser/autofill_manager.cc
-@@ -351,10 +351,7 @@ bool AutofillManager::ShouldParseForms(const std::vector<FormData>& forms,
+@@ -356,10 +356,7 @@ bool AutofillManager::ShouldParseForms(const std::vector<FormData>& forms,
    bool enabled = IsAutofillEnabled();
    sync_state_ = personal_data_ ? personal_data_->GetSyncSigninState()
                                 : AutofillSyncSigninState::kNumSyncStates;
@@ -177,7 +177,7 @@ diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/a
  
    return enabled;
  }
-@@ -621,10 +618,7 @@ void AutofillManager::OnQueryFormFieldAutofillImpl(
+@@ -627,10 +624,7 @@ void AutofillManager::OnQueryFormFieldAutofillImpl(
        // suggestions available.
        // TODO(mathp): Differentiate between number of suggestions available
        // (current metric) and number shown to the user.
@@ -189,7 +189,7 @@ diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/a
      }
    }
  
-@@ -1216,8 +1210,8 @@ void AutofillManager::Reset() {
+@@ -1237,8 +1231,8 @@ void AutofillManager::Reset() {
  #if defined(OS_ANDROID) || defined(OS_IOS)
    autofill_assistant_.Reset();
  #endif
@@ -203,7 +203,7 @@ diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/a
 diff --git a/components/autofill/core/common/autofill_prefs.cc b/components/autofill/core/common/autofill_prefs.cc
 --- a/components/autofill/core/common/autofill_prefs.cc
 +++ b/components/autofill/core/common/autofill_prefs.cc
-@@ -132,10 +132,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
+@@ -137,10 +137,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
        prefs::kAutofillBillingCustomerNumber, 0.0,
        user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF);
    registry->RegisterBooleanPref(
@@ -216,7 +216,7 @@ diff --git a/components/autofill/core/common/autofill_prefs.cc b/components/auto
        user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
    registry->RegisterIntegerPref(
        prefs::kAutofillLastVersionDeduped, 0,
-@@ -148,7 +148,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
+@@ -153,7 +153,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
        prefs::kAutofillLastVersionDisusedAddressesDeleted, 0,
        user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
    registry->RegisterBooleanPref(
@@ -228,7 +228,7 @@ diff --git a/components/autofill/core/common/autofill_prefs.cc b/components/auto
 diff --git a/components/bookmarks/browser/bookmark_utils.cc b/components/bookmarks/browser/bookmark_utils.cc
 --- a/components/bookmarks/browser/bookmark_utils.cc
 +++ b/components/bookmarks/browser/bookmark_utils.cc
-@@ -441,12 +441,12 @@ void GetBookmarksMatchingProperties(BookmarkModel* model,
+@@ -440,12 +440,12 @@ void GetBookmarksMatchingProperties(BookmarkModel* model,
  void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
    registry->RegisterBooleanPref(
        prefs::kShowBookmarkBar,

+ 1 - 1
build/patches/Never-fetch-popular-sites.patch

@@ -9,7 +9,7 @@ Subject: Never fetch popular sites
 diff --git a/components/ntp_tiles/popular_sites_impl.cc b/components/ntp_tiles/popular_sites_impl.cc
 --- a/components/ntp_tiles/popular_sites_impl.cc
 +++ b/components/ntp_tiles/popular_sites_impl.cc
-@@ -291,6 +291,12 @@ bool PopularSitesImpl::MaybeStartFetch(bool force_download,
+@@ -287,6 +287,12 @@ bool PopularSitesImpl::MaybeStartFetch(bool force_download,
    DCHECK(!callback_);
    callback_ = callback;
  

+ 1 - 1
build/patches/Punt-the-Widevine-version-string.patch

@@ -10,7 +10,7 @@ Originally from http://bazaar.launchpad.net/~saiarcot895/chromium-browser/chromi
 diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc
 --- a/chrome/common/chrome_content_client.cc
 +++ b/chrome/common/chrome_content_client.cc
-@@ -541,7 +541,7 @@ void ChromeContentClient::AddContentDecryptionModules(
+@@ -518,7 +518,7 @@ void ChromeContentClient::AddContentDecryptionModules(
      base::FilePath cdm_path;
      content::CdmCapability capability;
      if (IsWidevineAvailable(&cdm_path, &capability)) {

+ 85 - 30
build/patches/Remove-EV-certificates.patch

@@ -7,40 +7,95 @@ certificates. The web of trust is considered a failure in itself, so
 do not give users a false sense of extra security with EV certs.
 Instead, let them appear just like regular ones.
 ---
- net/cert/ev_root_ca_metadata.cc | 14 +++++++++++++-
- 1 file changed, 13 insertions(+), 1 deletion(-)
+ net/cert/ev_root_ca_metadata.cc | 13 +++++++++----
+ net/cert/ev_root_ca_metadata.h  |  6 ++----
+ 2 files changed, 11 insertions(+), 8 deletions(-)
 
 diff --git a/net/cert/ev_root_ca_metadata.cc b/net/cert/ev_root_ca_metadata.cc
 --- a/net/cert/ev_root_ca_metadata.cc
 +++ b/net/cert/ev_root_ca_metadata.cc
-@@ -46,6 +46,16 @@ struct EVMetadata {
-   base::StringPiece policy_oids[kMaxOIDsPerCA];
- };
- 
-+  // need some dummy thing to make compiler happy, because
-+  // arraysize() is implemented as a convoluted template rather than
-+  // the traditional sizeof(x)/sizeof(*x)
-+  { { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-+        0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } },
-+    {
-+      "0",
-+    }
-+  },
-+#if 0
- // These certificates may be found in net/data/ssl/ev_roots.
- static const EVMetadata kEvRootCaMetadata[] = {
-     // AC Camerfirma S.A. Chambers of Commerce Root - 2008
-@@ -750,7 +760,9 @@ static const EVMetadata kEvRootCaMetadata[] = {
-           0xd2, 0x09, 0xb7, 0x37, 0xcb, 0xe2, 0xc1, 0x8c, 0xfb, 0x2c, 0x10,
-           0xc0, 0xff, 0x0b, 0xcf, 0x0d, 0x32, 0x86, 0xfc, 0x1a, 0xa2}},
-         {"2.16.840.1.114404.1.1.2.4.1", ""},
--    }};
-+    }
-+#endif
-+};
- 
- #endif  // defined(PLATFORM_USES_CHROMIUM_EV_METADATA)
- }  // namespace
+@@ -4,7 +4,7 @@
+ 
+ #include "net/cert/ev_root_ca_metadata.h"
+ 
+-#if defined(USE_NSS_CERTS)
++#if defined(USE_NSS_CERTS) && defined(PLATFORM_USES_CHROMIUM_EV_METADATA)
+ #include <cert.h>
+ #include <pkcs11n.h>
+ #include <secerr.h>
+@@ -19,7 +19,7 @@
+ #include "base/logging.h"
+ #include "base/strings/string_piece.h"
+ #include "net/der/input.h"
+-#if defined(USE_NSS_CERTS)
++#if defined(USE_NSS_CERTS) && defined(PLATFORM_USES_CHROMIUM_EV_METADATA)
+ #include "crypto/nss_util.h"
+ #elif defined(PLATFORM_USES_CHROMIUM_EV_METADATA) || defined(OS_WIN)
+ #include "third_party/boringssl/src/include/openssl/bytestring.h"
+@@ -763,7 +763,7 @@ EVRootCAMetadata* EVRootCAMetadata::GetInstance() {
+   return g_ev_root_ca_metadata.Pointer();
+ }
+ 
+-#if defined(USE_NSS_CERTS)
++#if defined(USE_NSS_CERTS) && defined(PLATFORM_USES_CHROMIUM_EV_METADATA)
+ 
+ namespace {
+ // Converts a DER-encoded OID (without leading tag and length) to a SECOidTag.
+@@ -1045,6 +1045,11 @@ bool EVRootCAMetadata::RemoveEVCA(const SHA256HashValue& fingerprint) {
+ // metadata.
+ //
+ 
++bool EVRootCAMetadata::IsCaBrowserForumEvOid(PolicyOID policy_oid) {
++  LOG(WARNING) << "Not implemented";
++  return false;
++}
++
+ bool EVRootCAMetadata::IsEVPolicyOID(PolicyOID policy_oid) const {
+   LOG(WARNING) << "Not implemented";
+   return false;
+@@ -1084,7 +1089,7 @@ bool EVRootCAMetadata::RemoveEVCA(const SHA256HashValue& fingerprint) {
+ 
+ EVRootCAMetadata::EVRootCAMetadata() {
+ // Constructs the object from the raw metadata in kEvRootCaMetadata.
+-#if defined(USE_NSS_CERTS)
++#if defined(USE_NSS_CERTS) && defined(PLATFORM_USES_CHROMIUM_EV_METADATA)
+   crypto::EnsureNSSInit();
+ 
+   for (const auto& ev_root : kEvRootCaMetadata) {
+diff --git a/net/cert/ev_root_ca_metadata.h b/net/cert/ev_root_ca_metadata.h
+--- a/net/cert/ev_root_ca_metadata.h
++++ b/net/cert/ev_root_ca_metadata.h
+@@ -24,7 +24,7 @@
+     defined(OS_FUCHSIA)
+ // When not defined, the EVRootCAMetadata singleton is a dumb placeholder
+ // implementation that will fail all EV lookup operations.
+-#define PLATFORM_USES_CHROMIUM_EV_METADATA
++//#define PLATFORM_USES_CHROMIUM_EV_METADATA
+ #endif
+ 
+ namespace base {
+@@ -68,12 +68,10 @@ class NET_EXPORT_PRIVATE EVRootCAMetadata {
+   bool HasEVPolicyOIDGivenBytes(const SHA256HashValue& fingerprint,
+                                 const der::Input& policy_oid) const;
+ 
+-#if defined(PLATFORM_USES_CHROMIUM_EV_METADATA)
+   // Returns true if |policy_oid| is for 2.23.140.1.1 (CA/Browser Forum's
+   // Extended Validation Policy). This is used as a hack by the
+   // platform-specific CertVerifyProcs when doing EV verification.
+   static bool IsCaBrowserForumEvOid(PolicyOID policy_oid);
+-#endif
+ 
+   // AddEVCA adds an EV CA to the list of known EV CAs with the given policy.
+   // |policy| is expressed as a string of dotted numbers. It returns true on
+@@ -90,7 +88,7 @@ class NET_EXPORT_PRIVATE EVRootCAMetadata {
+   EVRootCAMetadata();
+   ~EVRootCAMetadata();
+ 
+-#if defined(USE_NSS_CERTS)
++#if defined(USE_NSS_CERTS) && defined(PLATFORM_USES_CHROMIUM_EV_METADATA)
+   using PolicyOIDMap = std::map<SHA256HashValue, std::vector<PolicyOID>>;
+ 
+   // RegisterOID registers |policy|, a policy OID in dotted string form, and
 -- 
 2.11.0
 

+ 6 - 6
build/patches/Remove-Sync-and-Translate-menu.patch

@@ -156,7 +156,7 @@ diff --git a/chrome/android/java/res/xml/site_settings_preferences.xml b/chrome/
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsPreferences.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsPreferences.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsPreferences.java
-@@ -39,7 +39,6 @@ public class SiteSettingsPreferences extends PreferenceFragment
+@@ -38,7 +38,6 @@ public class SiteSettingsPreferences extends PreferenceFragment
      // are defined in the SiteSettingsCategory, additional keys
      // are listed here.
      static final String MEDIA_KEY = "media";
@@ -164,7 +164,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/web
  
      // Whether the Protected Content menu is available for display.
      boolean mProtectedContentMenuAvailable;
-@@ -83,11 +82,10 @@ public class SiteSettingsPreferences extends PreferenceFragment
+@@ -82,11 +81,10 @@ public class SiteSettingsPreferences extends PreferenceFragment
              // The Media sub-menu only contains Protected Content and Autoplay, so remove all other
              // menus.
              for (@Type int i = 0; i < Type.NUM_ENTRIES; i++) {
@@ -177,7 +177,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/web
          } else {
              // If both Autoplay and Protected Content menus are available, they'll be tucked under
              // the Media key. Otherwise, we can remove the Media menu entry.
-@@ -109,11 +107,6 @@ public class SiteSettingsPreferences extends PreferenceFragment
+@@ -108,11 +106,6 @@ public class SiteSettingsPreferences extends PreferenceFragment
              if (!ChromeFeatureList.isEnabled(ChromeFeatureList.CLIPBOARD_CONTENT_SETTING)) {
                  getPreferenceScreen().removePreference(findPreference(Type.CLIPBOARD));
              }
@@ -189,7 +189,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/web
              if (!ChromeFeatureList.isEnabled(ChromeFeatureList.GENERIC_SENSOR_EXTRA_CLASSES)) {
                  getPreferenceScreen().removePreference(findPreference(Type.SENSORS));
              }
-@@ -123,10 +116,6 @@ public class SiteSettingsPreferences extends PreferenceFragment
+@@ -122,10 +115,6 @@ public class SiteSettingsPreferences extends PreferenceFragment
      private void updatePreferenceStates() {
          PrefServiceBridge prefServiceBridge = PrefServiceBridge.getInstance();
  
@@ -200,7 +200,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/web
          // Preferences that navigate to Website Settings.
          List<Integer> websitePrefs = new ArrayList<Integer>();
          if (mMediaSubMenu) {
-@@ -143,7 +132,7 @@ public class SiteSettingsPreferences extends PreferenceFragment
+@@ -142,7 +131,7 @@ public class SiteSettingsPreferences extends PreferenceFragment
              if (!mProtectedContentMenuAvailable) {
                  websitePrefs.add(Type.AUTOPLAY);
              }
@@ -209,7 +209,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/web
              websitePrefs.add(Type.CAMERA);
              if (ChromeFeatureList.isEnabled(ChromeFeatureList.CLIPBOARD_CONTENT_SETTING)) {
                  websitePrefs.add(Type.CLIPBOARD);
-@@ -246,11 +235,4 @@ public class SiteSettingsPreferences extends PreferenceFragment
+@@ -241,11 +230,4 @@ public class SiteSettingsPreferences extends PreferenceFragment
                  preference.getTitle().toString());
          return false;
      }

+ 2 - 2
build/patches/Remove-help-menu-item.patch

@@ -24,7 +24,7 @@ diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/re
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
-@@ -2123,15 +2123,6 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
+@@ -2165,15 +2165,6 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
  
          final Tab currentTab = getActivityTab();
  
@@ -56,7 +56,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcu
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
-@@ -1410,7 +1410,7 @@ public class CustomTabActivity extends ChromeActivity<CustomTabActivityComponent
+@@ -865,7 +865,7 @@ public class CustomTabActivity extends ChromeActivity<CustomTabActivityComponent
      public boolean onMenuOrKeyboardAction(int id, boolean fromMenu) {
          // Disable creating new tabs, bookmark, history, print, help, focus_url, etc.
          if (id == R.id.focus_url_bar || id == R.id.all_bookmarks_menu_id

+ 3 - 3
build/patches/Remove-request-for-account-access-permission-on-reboot.patch

@@ -10,7 +10,7 @@ Subject: Remove request for account access permission on reboot
 diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
 --- a/chrome/android/BUILD.gn
 +++ b/chrome/android/BUILD.gn
-@@ -949,8 +949,7 @@ jinja_template_resources("chrome_public_apk_template_resources") {
+@@ -997,8 +997,7 @@ jinja_template_resources("chrome_public_apk_template_resources") {
    resources = [
      "java/res_template/xml/file_paths.xml",
      "java/res_template/xml/launchershortcuts.xml",
@@ -20,7 +20,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
    ]
    res_dir = "java/res_template"
    variables = [ "manifest_package=$manifest_package" ]
-@@ -961,7 +960,6 @@ jinja_template_resources("chrome_test_apk_template_resources") {
+@@ -1009,7 +1008,6 @@ jinja_template_resources("chrome_test_apk_template_resources") {
      "java/res_template/xml/file_paths.xml",
      "java/res_template/xml/launchershortcuts.xml",
      "java/res_template/xml/searchable.xml",
@@ -31,7 +31,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
 diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml
 --- a/chrome/android/java/AndroidManifest.xml
 +++ b/chrome/android/java/AndroidManifest.xml
-@@ -884,14 +884,14 @@ by a child template that "extends" this file.
+@@ -914,14 +914,14 @@ by a child template that "extends" this file.
          </provider>
  
          <!-- Sync adapter for browser invalidation. -->

+ 10 - 10
build/patches/Rollback-android-minSdkVersion-from-19-KitKat-to-16-JellyBean.patch

@@ -83,7 +83,7 @@ diff --git a/build/android/AndroidManifest.xml b/build/android/AndroidManifest.x
 diff --git a/build/android/gradle/android.jinja b/build/android/gradle/android.jinja
 --- a/build/android/gradle/android.jinja
 +++ b/build/android/gradle/android.jinja
-@@ -52,7 +52,7 @@ android {
+@@ -51,7 +51,7 @@ android {
  
      defaultConfig {
          vectorDrawables.useSupportLibrary = true
@@ -95,7 +95,7 @@ diff --git a/build/android/gradle/android.jinja b/build/android/gradle/android.j
 diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
 --- a/chrome/android/BUILD.gn
 +++ b/chrome/android/BUILD.gn
-@@ -63,7 +63,7 @@ jinja_template("chrome_public_android_manifest") {
+@@ -68,7 +68,7 @@ jinja_template("chrome_public_android_manifest") {
    output = chrome_public_android_manifest
    variables = chrome_public_jinja_variables
    variables += [
@@ -103,7 +103,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
 +    "min_sdk_version=16",
      "target_sdk_version=$android_sdk_version",
    ]
- }
+ 
 @@ -1459,7 +1459,7 @@ template("chrome_public_apk_or_module_tmpl") {
        android_manifest = chrome_modern_public_android_manifest
        android_manifest_dep = ":chrome_modern_public_android_manifest"
@@ -113,7 +113,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
        android_manifest = chrome_public_android_manifest
        android_manifest_dep = ":chrome_public_android_manifest"
      }
-@@ -1663,7 +1663,7 @@ jinja_template("chrome_public_test_apk_manifest") {
+@@ -1646,7 +1646,7 @@ jinja_template("chrome_public_test_apk_manifest") {
    variables = default_chrome_public_jinja_variables
    variables += [
      "manifest_package=$test_manifest_package",
@@ -122,7 +122,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
      "target_sdk_version=$android_sdk_version",
    ]
  }
-@@ -1674,7 +1674,7 @@ jinja_template("chrome_public_test_vr_apk_manifest") {
+@@ -1657,7 +1657,7 @@ jinja_template("chrome_public_test_vr_apk_manifest") {
    output = chrome_public_test_vr_apk_manifest
    variables = chrome_public_jinja_variables
    variables += [
@@ -206,16 +206,16 @@ diff --git a/components/cronet/android/test/javaperftests/AndroidManifest.xml b/
 diff --git a/components/cronet/android/test/javatests/AndroidManifest.xml b/components/cronet/android/test/javatests/AndroidManifest.xml
 --- a/components/cronet/android/test/javatests/AndroidManifest.xml
 +++ b/components/cronet/android/test/javatests/AndroidManifest.xml
-@@ -8,8 +8,7 @@
-        doesn't ignore this. -->
+@@ -6,8 +6,7 @@
+    -->
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="org.chromium.net.tests">
 -    <!-- //components/cronet still needs to support Jelly Bean. See crbug.com/922656 -->
 -    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="24" />
 +    <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="23" />
      <uses-permission android:name="android.permission.RUN_INSTRUMENTATION" />
-     <!-- We add an application tag here just so that we can indicate that this
-          package needs to link against the android.test library, which is
+     <uses-permission android:name="android.permission.INTERNET"/>
+     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
 diff --git a/components/test/android/browsertests_apk/AndroidManifest.xml.jinja2 b/components/test/android/browsertests_apk/AndroidManifest.xml.jinja2
 --- a/components/test/android/browsertests_apk/AndroidManifest.xml.jinja2
 +++ b/components/test/android/browsertests_apk/AndroidManifest.xml.jinja2
@@ -279,7 +279,7 @@ diff --git a/content/shell/android/shell_apk/AndroidManifest.xml.jinja2 b/conten
 diff --git a/docs/android_build_instructions.md b/docs/android_build_instructions.md
 --- a/docs/android_build_instructions.md
 +++ b/docs/android_build_instructions.md
-@@ -162,7 +162,7 @@ the version of Android running on a device. Chrome uses this feature to target
+@@ -184,7 +184,7 @@ the version of Android running on a device. Chrome uses this feature to target
  3 different versions using 3 different ninja targets:
  
  1. `chrome_public_apk` (ChromePublic.apk)

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

@@ -0,0 +1,22 @@
+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
+

+ 1 - 1
build/patches/Switch-to-fstack-protector-strong.patch

@@ -9,7 +9,7 @@ Subject: Switch to -fstack-protector-strong
 diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
 --- a/build/config/compiler/BUILD.gn
 +++ b/build/config/compiler/BUILD.gn
-@@ -258,16 +258,12 @@ config("compiler") {
+@@ -259,16 +259,12 @@ config("compiler") {
          cflags += [ "-fstack-protector" ]
        }
      } else if ((is_posix && !is_chromeos && !is_nacl) || is_fuchsia) {

+ 8 - 25
build/patches/Use-4-tile-rows-never-show-logo.patch

@@ -6,10 +6,9 @@ Subject: Use 4 tile rows, never show logo
  .../java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java  | 6 +++---
  .../chromium/chrome/browser/suggestions/MostVisitedSitesBridge.java | 2 +-
  .../src/org/chromium/chrome/browser/suggestions/SiteSection.java    | 2 +-
- components/history/core/browser/top_sites_impl.cc                   | 2 +-
- components/history/core/browser/top_sites_impl.h                    | 4 ++--
+ components/history/core/browser/top_sites_impl.h                    | 2 +-
  components/ntp_snippets/bookmarks/bookmark_suggestions_provider.cc  | 2 +-
- 6 files changed, 9 insertions(+), 9 deletions(-)
+ 5 files changed, 7 insertions(+), 7 deletions(-)
 
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java
@@ -23,7 +22,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageL
      private boolean mSearchProviderIsGoogle;
  
      private boolean mInitialized;
-@@ -548,7 +548,7 @@ public class NewTabPageLayout extends LinearLayout implements TileGroup.Observer
+@@ -550,7 +550,7 @@ public class NewTabPageLayout extends LinearLayout implements TileGroup.Observer
                  && mInitialized) {
              return;
          }
@@ -32,7 +31,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageL
          mSearchProviderIsGoogle = isGoogle;
  
          updateTileGridPadding();
-@@ -831,7 +831,7 @@ public class NewTabPageLayout extends LinearLayout implements TileGroup.Observer
+@@ -839,7 +839,7 @@ public class NewTabPageLayout extends LinearLayout implements TileGroup.Observer
      }
  
      private static int getMaxTileRows() {
@@ -65,31 +64,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/Sit
      }
  
      @LayoutRes
-diff --git a/components/history/core/browser/top_sites_impl.cc b/components/history/core/browser/top_sites_impl.cc
---- a/components/history/core/browser/top_sites_impl.cc
-+++ b/components/history/core/browser/top_sites_impl.cc
-@@ -83,7 +83,7 @@ bool DoTitlesDiffer(const MostVisitedURLList& old_list,
- 
- // Max number of temporary images we'll cache. See comment above
- // temp_images_ for details.
--const size_t kMaxTempTopImages = 8;
-+const size_t kMaxTempTopImages = 8 * 2;
- 
- // The delay for the first HistoryService query at startup.
- constexpr base::TimeDelta kFirstDelayAtStartup =
 diff --git a/components/history/core/browser/top_sites_impl.h b/components/history/core/browser/top_sites_impl.h
 --- a/components/history/core/browser/top_sites_impl.h
 +++ b/components/history/core/browser/top_sites_impl.h
-@@ -60,10 +60,10 @@ class TopSitesImpl : public TopSites, public HistoryServiceObserver {
+@@ -55,7 +55,7 @@ class TopSitesImpl : public TopSites, public HistoryServiceObserver {
    using CanAddURLToHistoryFn = base::Callback<bool(const GURL&)>;
  
-   // How many non-forced top sites to store in the cache.
--  static constexpr size_t kNonForcedTopSitesNumber = 10;
-+  static constexpr size_t kNonForcedTopSitesNumber = 4 * 4 + 2;
- 
-   // How many forced top sites to store in the cache.
--  static constexpr size_t kForcedTopSitesNumber = 10;
-+  static constexpr size_t kForcedTopSitesNumber = 4 * 4 + 2;
+   // How many top sites to store in the cache.
+-  static constexpr size_t kTopSitesNumber = 10;
++  static constexpr size_t kTopSitesNumber = 4 * 4 + 2;
  
    TopSitesImpl(PrefService* pref_service,
                 HistoryService* history_service,

+ 9 - 9
build/patches/autofill-disable-autofill-download-manager.patch

@@ -19,7 +19,7 @@ diff --git a/components/autofill/core/browser/autofill_download_manager.cc b/com
  const size_t kAutofillDownloadManagerMaxFormCacheSize = 16;
  const size_t kMaxFieldsPerQueryRequest = 100;
  
-@@ -418,6 +417,7 @@ bool GetUploadPayloadForApi(const AutofillUploadContents& upload,
+@@ -412,6 +411,7 @@ bool GetUploadPayloadForApi(const AutofillUploadContents& upload,
    return upload_request.SerializeToString(payload);
  }
  
@@ -27,7 +27,7 @@ diff --git a/components/autofill/core/browser/autofill_download_manager.cc b/com
  // Gets an API method URL given its type (query or upload) and an optional
  // resource ID.
  // Example usage:
-@@ -440,6 +440,7 @@ std::string GetAPIMethodUrl(AutofillDownloadManager::RequestType type,
+@@ -434,6 +434,7 @@ std::string GetAPIMethodUrl(AutofillDownloadManager::RequestType type,
    }
    return base::StrCat({api_method_url, "/", resource_id});
  }
@@ -35,7 +35,7 @@ diff --git a/components/autofill/core/browser/autofill_download_manager.cc b/com
  
  }  // namespace
  
-@@ -565,6 +566,7 @@ void AutofillDownloadManager::ClearUploadHistory(PrefService* pref_service) {
+@@ -559,6 +560,7 @@ void AutofillDownloadManager::ClearUploadHistory(PrefService* pref_service) {
  
  std::tuple<GURL, std::string> AutofillDownloadManager::GetRequestURLAndMethod(
      const FormRequestData& request_data) const {
@@ -43,7 +43,7 @@ diff --git a/components/autofill/core/browser/autofill_download_manager.cc b/com
    std::string method("POST");
    std::string query_str;
  
-@@ -587,12 +589,17 @@ std::tuple<GURL, std::string> AutofillDownloadManager::GetRequestURLAndMethod(
+@@ -581,12 +583,17 @@ std::tuple<GURL, std::string> AutofillDownloadManager::GetRequestURLAndMethod(
    GURL url = autofill_server_url_
                   .Resolve(RequestTypeToString(request_data.request_type))
                   .ReplaceComponents(replacements);
@@ -61,7 +61,7 @@ diff --git a/components/autofill/core/browser/autofill_download_manager.cc b/com
    // ID of the resource to add to the API request URL. Nothing will be added if
    // |resource_id| is empty.
    std::string resource_id;
-@@ -621,6 +628,10 @@ AutofillDownloadManager::GetRequestURLAndMethodForApi(
+@@ -615,6 +622,10 @@ AutofillDownloadManager::GetRequestURLAndMethodForApi(
        (request_data.request_type == AutofillDownloadManager::REQUEST_QUERY)
            ? "GET"
            : "POST";
@@ -75,7 +75,7 @@ diff --git a/components/autofill/core/browser/autofill_download_manager.cc b/com
 diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
 --- a/components/autofill/core/browser/autofill_manager.cc
 +++ b/components/autofill/core/browser/autofill_manager.cc
-@@ -171,19 +171,6 @@ void LogDeveloperEngagementUkm(ukm::UkmRecorder* ukm_recorder,
+@@ -172,19 +172,6 @@ void LogDeveloperEngagementUkm(ukm::UkmRecorder* ukm_recorder,
    }
  }
  
@@ -95,7 +95,7 @@ diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/a
  }  // namespace
  
  AutofillManager::FillingContext::FillingContext() = default;
-@@ -1260,11 +1247,6 @@ AutofillManager::AutofillManager(
+@@ -1281,11 +1268,6 @@ AutofillManager::AutofillManager(
        weak_ptr_factory_(this) {
    DCHECK(driver);
    DCHECK(client_);
@@ -105,8 +105,8 @@ diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/a
 -        new AutofillDownloadManager(driver, this, GetAPIKeyForUrl(channel)));
 -  }
    CountryNames::SetLocaleString(app_locale_);
-   if (personal_data_ && client_)
-     personal_data_->OnSyncServiceInitialized(client_->GetSyncService());
+   // Since we want Downstream to still work in incognito, only overwrite the
+   // PDM's sync service if this is not an incognito AutofillManager. However, if
 -- 
 2.11.0
 

+ 1 - 1
build/patches/dns-send-IPv6-connectivity-probes-to-RIPE-DNS.patch

@@ -11,7 +11,7 @@ anyway), avoid sending to Google.
 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
-@@ -118,10 +118,10 @@ const unsigned kMinimumTTLSeconds = kCacheEntryTTLSeconds;
+@@ -122,10 +122,10 @@ const unsigned kMinimumTTLSeconds = kCacheEntryTTLSeconds;
  // cached.
  const int kIPv6ProbePeriodMs = 1000;
  

+ 11 - 11
build/patches/getClientRects-getBoundingClientRect-measureText-add-fingerprinting-mitigation.patch

@@ -25,15 +25,15 @@ See also: http://www.gsd.inesc-id.pt/~mpc/pubs/fingerprinting-trustcom2016.pdf
 diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc
 --- a/third_party/blink/renderer/core/dom/document.cc
 +++ b/third_party/blink/renderer/core/dom/document.cc
-@@ -33,6 +33,7 @@
- 
+@@ -34,6 +34,7 @@
  #include "base/auto_reset.h"
+ #include "base/macros.h"
  #include "base/optional.h"
 +#include "base/rand_util.h"
  #include "services/metrics/public/cpp/mojo_ukm_recorder.h"
  #include "services/metrics/public/cpp/ukm_builders.h"
  #include "services/metrics/public/cpp/ukm_source_id.h"
-@@ -722,6 +723,10 @@ Document::Document(const DocumentInit& initializer,
+@@ -734,6 +735,10 @@ Document::Document(const DocumentInit& initializer,
    }
    DCHECK(fetcher_);
  
@@ -44,7 +44,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink
    root_scroller_controller_ = RootScrollerController::Create(*this);
  
    // We depend on the url getting immediately set in subframes, but we
-@@ -787,6 +792,14 @@ Range* Document::CreateRangeAdjustedToTreeScope(const TreeScope& tree_scope,
+@@ -799,6 +804,14 @@ Range* Document::CreateRangeAdjustedToTreeScope(const TreeScope& tree_scope,
                         Position::BeforeNode(*shadow_host));
  }
  
@@ -62,7 +62,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink
 diff --git a/third_party/blink/renderer/core/dom/document.h b/third_party/blink/renderer/core/dom/document.h
 --- a/third_party/blink/renderer/core/dom/document.h
 +++ b/third_party/blink/renderer/core/dom/document.h
-@@ -418,6 +418,9 @@ class CORE_EXPORT Document : public ContainerNode,
+@@ -389,6 +389,9 @@ class CORE_EXPORT Document : public ContainerNode,
      has_xml_declaration_ = has_xml_declaration ? 1 : 0;
    }
  
@@ -70,9 +70,9 @@ diff --git a/third_party/blink/renderer/core/dom/document.h b/third_party/blink/
 +  double GetShuffleFactorY();
 +
    String visibilityState() const;
-   mojom::PageVisibilityState GetPageVisibilityState() const;
+   bool IsPageVisible() const;
    bool hidden() const;
-@@ -1776,6 +1779,8 @@ class CORE_EXPORT Document : public ContainerNode,
+@@ -1798,6 +1801,8 @@ class CORE_EXPORT Document : public ContainerNode,
  
    double start_time_;
  
@@ -149,7 +149,7 @@ diff --git a/third_party/blink/renderer/core/dom/range.cc b/third_party/blink/re
 diff --git a/third_party/blink/renderer/core/html/canvas/text_metrics.cc b/third_party/blink/renderer/core/html/canvas/text_metrics.cc
 --- a/third_party/blink/renderer/core/html/canvas/text_metrics.cc
 +++ b/third_party/blink/renderer/core/html/canvas/text_metrics.cc
-@@ -45,6 +45,24 @@ void TextMetrics::Trace(blink::Visitor* visitor) {
+@@ -45,6 +45,24 @@ void TextMetrics::Trace(Visitor* visitor) {
  
  TextMetrics::TextMetrics() : baselines_(Baselines::Create()) {}
  
@@ -179,7 +179,7 @@ diff --git a/third_party/blink/renderer/core/html/canvas/text_metrics.h b/third_
 +++ b/third_party/blink/renderer/core/html/canvas/text_metrics.h
 @@ -71,6 +71,8 @@ class CORE_EXPORT TextMetrics final : public ScriptWrappable {
  
-   void Trace(blink::Visitor*) override;
+   void Trace(Visitor*) override;
  
 +  void Shuffle(const double factor);
 +
@@ -195,10 +195,10 @@ diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering
  
 +#include "base/rand_util.h"
 +
+ #include "third_party/blink/public/common/features.h"
  #include "third_party/blink/public/platform/platform.h"
  #include "third_party/blink/public/platform/task_type.h"
- #include "third_party/blink/public/platform/web_scroll_into_view_params.h"
-@@ -783,8 +785,14 @@ TextMetrics* CanvasRenderingContext2D::measureText(const String& text) {
+@@ -784,8 +786,14 @@ TextMetrics* CanvasRenderingContext2D::measureText(const String& text) {
    else
      direction = ToTextDirection(GetState().GetDirection(), canvas());
  

+ 4 - 4
build/patches/kill-Auth.patch

@@ -11,9 +11,9 @@ Subject: kill Auth
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninHelper.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninHelper.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninHelper.java
-@@ -8,10 +8,6 @@ import android.accounts.Account;
- import android.annotation.SuppressLint;
- import android.content.Context;
+@@ -10,10 +10,6 @@ import android.content.Context;
+ import android.content.SharedPreferences;
+ import android.support.annotation.Nullable;
  
 -import com.google.android.gms.auth.AccountChangeEvent;
 -import com.google.android.gms.auth.GoogleAuthException;
@@ -22,7 +22,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninHe
  import org.chromium.base.ContextUtils;
  import org.chromium.base.Log;
  import org.chromium.base.VisibleForTesting;
-@@ -71,23 +67,7 @@ public class SigninHelper {
+@@ -73,23 +69,7 @@ public class SigninHelper {
          @Override
          public List<String> getAccountChangeEvents(
                  Context context, int index, String accountName) {

+ 10 - 10
build/patches/kill-GCM.patch

@@ -40,7 +40,7 @@ diff --git a/build/secondary/third_party/android_tools/BUILD.gn b/build/secondar
 diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
 --- a/chrome/android/BUILD.gn
 +++ b/chrome/android/BUILD.gn
-@@ -317,7 +317,6 @@ android_library("chrome_java") {
+@@ -369,7 +369,6 @@ android_library("chrome_java") {
      "//third_party/android_deps:javax_inject_javax_inject_java",
      "//third_party/android_media:android_media_java",
      "//third_party/android_swipe_refresh:android_swipe_refresh_java",
@@ -74,7 +74,7 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro
      <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
  
      <uses-permission android:name="com.google.android.apps.now.CURRENT_ACCOUNT_ACCESS" />
-@@ -961,43 +956,6 @@ by a child template that "extends" this file.
+@@ -991,43 +986,6 @@ by a child template that "extends" this file.
              android:configChanges="orientation|keyboardHidden|keyboard|screenSize|mcc|mnc|screenLayout|smallestScreenSize"
              android:hardwareAccelerated="false" />
  
@@ -118,7 +118,7 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro
          <!-- Notification service for sync. -->
          <meta-data android:name="ipc.invalidation.ticl.listener_service_class"
              android:value="org.chromium.chrome.browser.invalidation.ChromeInvalidationClientService"/>
-@@ -1009,8 +967,6 @@ by a child template that "extends" this file.
+@@ -1039,8 +997,6 @@ by a child template that "extends" this file.
          </service>
          <service android:name="com.google.ipc.invalidation.ticl.android2.TiclService"
              android:exported="false"/>
@@ -127,7 +127,7 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro
          <receiver android:name="com.google.ipc.invalidation.ticl.android2.AndroidInternalScheduler$AlarmReceiver"
              android:exported="false"/>
          <receiver android:name="com.google.ipc.invalidation.external.client.contrib.AndroidListener$AlarmReceiver"
-@@ -1037,24 +993,6 @@ by a child template that "extends" this file.
+@@ -1067,24 +1023,6 @@ by a child template that "extends" this file.
              android:exported="false"
              android:permission="android.permission.BIND_JOB_SERVICE"/>
  
@@ -290,7 +290,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/BackgroundSyncL
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java
-@@ -116,7 +116,6 @@ public class ChromeBackgroundService extends GcmTaskService {
+@@ -115,7 +115,6 @@ public class ChromeBackgroundService extends GcmTaskService {
  
      @VisibleForTesting
      protected void rescheduleBackgroundSyncTasksOnUpgrade() {
@@ -437,15 +437,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/GC
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/InvalidationGcmUpstreamSender.java b/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/InvalidationGcmUpstreamSender.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/InvalidationGcmUpstreamSender.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/InvalidationGcmUpstreamSender.java
-@@ -12,7 +12,6 @@ import android.os.Parcel;
- import android.support.annotation.MainThread;
+@@ -13,7 +13,6 @@ import android.support.annotation.MainThread;
+ import android.support.annotation.Nullable;
  import android.util.Log;
  
 -import com.google.android.gms.gcm.GoogleCloudMessaging;
  import com.google.ipc.invalidation.ticl.android2.channel.GcmUpstreamSenderService;
  
  import org.chromium.base.ContextUtils;
-@@ -96,20 +95,6 @@ public class InvalidationGcmUpstreamSender extends GcmUpstreamSenderService {
+@@ -93,20 +92,6 @@ public class InvalidationGcmUpstreamSender extends GcmUpstreamSenderService {
       * This function runs on a thread from the AsyncTask.THREAD_POOL_EXECUTOR.
       */
      private void sendUpstreamMessage(String to, Bundle data, String token, Context context) {
@@ -469,7 +469,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/In
 diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni
 --- a/chrome/android/java_sources.gni
 +++ b/chrome/android/java_sources.gni
-@@ -28,7 +28,6 @@ chrome_java_sources = [
+@@ -31,7 +31,6 @@ chrome_java_sources = [
    "java/src/org/chromium/chrome/browser/ChromeActivity.java",
    "java/src/org/chromium/chrome/browser/ChromeActivitySessionTracker.java",
    "java/src/org/chromium/chrome/browser/ChromeApplication.java",
@@ -477,7 +477,7 @@ diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni
    "java/src/org/chromium/chrome/browser/ChromeBackupAgent.java",
    "java/src/org/chromium/chrome/browser/ChromeBackupWatcher.java",
    "java/src/org/chromium/chrome/browser/ChromeFeatureList.java",
-@@ -1417,7 +1416,6 @@ chrome_java_sources = [
+@@ -1447,7 +1446,6 @@ chrome_java_sources = [
    "java/src/org/chromium/chrome/browser/services/AndroidEduAndChildAccountHelper.java",
    "java/src/org/chromium/chrome/browser/services/AndroidEduOwnerCheckCallback.java",
    "java/src/org/chromium/chrome/browser/services/GoogleServicesManager.java",

+ 1 - 1
build/patches/kill-Location-fall-back-to-system.patch

@@ -10,7 +10,7 @@ Subject: kill Location, fall back to system
 diff --git a/services/device/geolocation/BUILD.gn b/services/device/geolocation/BUILD.gn
 --- a/services/device/geolocation/BUILD.gn
 +++ b/services/device/geolocation/BUILD.gn
-@@ -131,7 +131,6 @@ if (is_android) {
+@@ -134,7 +134,6 @@ if (is_android) {
        "android/java/src/org/chromium/device/geolocation/LocationProviderAdapter.java",
        "android/java/src/org/chromium/device/geolocation/LocationProviderAndroid.java",
        "android/java/src/org/chromium/device/geolocation/LocationProviderFactory.java",

+ 11 - 12
build/patches/kill-TOS-and-metrics-opt-out.patch

@@ -3,28 +3,27 @@ Date: Fri, 22 Jun 2018 17:16:07 +0200
 Subject: kill TOS and metrics opt-out
 
 ---
- chrome/android/java/res/layout/fre_tosanduma.xml                       | 3 ++-
- chrome/android/java/res/values/dimens.xml                              | 1 -
- .../src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
+ chrome/android/java/res/layout/fre_tosanduma.xml                        | 2 +-
+ chrome/android/java/res/values/dimens.xml                               | 1 -
+ .../src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java  | 2 +-
+ 3 files changed, 2 insertions(+), 3 deletions(-)
 
 diff --git a/chrome/android/java/res/layout/fre_tosanduma.xml b/chrome/android/java/res/layout/fre_tosanduma.xml
 --- a/chrome/android/java/res/layout/fre_tosanduma.xml
 +++ b/chrome/android/java/res/layout/fre_tosanduma.xml
-@@ -62,7 +62,8 @@
+@@ -62,7 +62,7 @@
                          android:layout_marginBottom="@dimen/fre_vertical_spacing"
                          android:gravity="center"
                          android:lineSpacingMultiplier="1.4"
--                        android:textAppearance="@style/BlackBodyDefault" />
-+                        android:textAppearance="@style/BlackBodyDefault"
-+                        android:visibility="gone" />
+-                        android:textAppearance="@style/TextAppearance.BlackBodyDefault" />
++                        android:textAppearance="@style/TextAppearance.BlackBodyDefault" android:visibility="gone" />
  
                      <CheckBox
                          android:id="@+id/send_report_checkbox"
 diff --git a/chrome/android/java/res/values/dimens.xml b/chrome/android/java/res/values/dimens.xml
 --- a/chrome/android/java/res/values/dimens.xml
 +++ b/chrome/android/java/res/values/dimens.xml
-@@ -182,7 +182,6 @@
+@@ -184,7 +184,6 @@
      <dimen name="fre_button_padding">12dp</dimen>
      <dimen name="fre_margin">24dp</dimen>
      <dimen name="fre_image_height">120dp</dimen>
@@ -35,9 +34,9 @@ diff --git a/chrome/android/java/res/values/dimens.xml b/chrome/android/java/res
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java
-@@ -36,7 +36,7 @@ public abstract class FirstRunActivityBase extends AsyncInitializationActivity {
-     public static final String EXTRA_FIRST_RUN_ACTIVITY_RESULT = "Extra.FreActivityResult";
-     public static final String EXTRA_FIRST_RUN_COMPLETE = "Extra.FreComplete";
+@@ -38,7 +38,7 @@ public abstract class FirstRunActivityBase extends AsyncInitializationActivity {
+     static final String SHOW_SEARCH_ENGINE_PAGE = "ShowSearchEnginePage";
+     static final String SHOW_SIGNIN_PAGE = "ShowSignIn";
  
 -    public static final boolean DEFAULT_METRICS_AND_CRASH_REPORTING = true;
 +    public static final boolean DEFAULT_METRICS_AND_CRASH_REPORTING = false;

+ 1 - 1
build/patches/prefs-only-keep-cookies-until-exit.patch

@@ -10,7 +10,7 @@ Out with all those tracking cookies!
 diff --git a/components/content_settings/core/browser/content_settings_registry.cc b/components/content_settings/core/browser/content_settings_registry.cc
 --- a/components/content_settings/core/browser/content_settings_registry.cc
 +++ b/components/content_settings/core/browser/content_settings_registry.cc
-@@ -118,7 +118,7 @@ void ContentSettingsRegistry::Init() {
+@@ -134,7 +134,7 @@ void ContentSettingsRegistry::Init() {
    // WARNING: The string names of the permissions passed in below are used to
    // generate preference names and should never be changed!
  

+ 1 - 1
build/patches/promo-disable-Google-promotion-fetching.patch

@@ -22,7 +22,7 @@ References: https://github.com/iridium-browser/iridium-browser/issues/33
 diff --git a/chrome/browser/signin/signin_promo.cc b/chrome/browser/signin/signin_promo.cc
 --- a/chrome/browser/signin/signin_promo.cc
 +++ b/chrome/browser/signin/signin_promo.cc
-@@ -130,6 +130,7 @@ const char kSigninPromoLandingURLSuccessPage[] = "success.html";
+@@ -86,6 +86,7 @@ const char kSigninPromoLandingURLSuccessPage[] = "success.html";
  
  bool ShouldShowPromoAtStartup(Profile* profile, bool is_new_profile) {
    DCHECK(profile);

+ 1 - 1
build/patches/safe_browsing-disable-cookie-transmission.patch

@@ -38,7 +38,7 @@ diff --git a/chrome/browser/safe_browsing/client_side_detection_service.cc b/chr
 diff --git a/chrome/browser/safe_browsing/download_protection/check_client_download_request.cc b/chrome/browser/safe_browsing/download_protection/check_client_download_request.cc
 --- a/chrome/browser/safe_browsing/download_protection/check_client_download_request.cc
 +++ b/chrome/browser/safe_browsing/download_protection/check_client_download_request.cc
-@@ -759,7 +759,7 @@ void CheckClientDownloadRequest::SendRequest() {
+@@ -761,7 +761,7 @@ void CheckClientDownloadRequest::SendRequest() {
    auto resource_request = std::make_unique<network::ResourceRequest>();
    resource_request->url = PPAPIDownloadRequest::GetDownloadRequestUrl();
    resource_request->method = "POST";

+ 3 - 3
build/patches/safe_browsing-disable-incident-reporting.patch

@@ -47,9 +47,9 @@ diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc b/chrom
 --- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
 +++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
 @@ -59,8 +59,7 @@ class SafeBrowsingBlockingPageFactoryImpl
-     Profile* profile =
-         Profile::FromBrowserContext(web_contents->GetBrowserContext());
-     PrefService* prefs = profile->GetPrefs();
+     PrefService* prefs =
+         Profile::FromBrowserContext(web_contents->GetBrowserContext())
+             ->GetPrefs();
 -    bool is_extended_reporting_opt_in_allowed =
 -        IsExtendedReportingOptInAllowed(*prefs);
 +    bool is_extended_reporting_opt_in_allowed = false;

+ 1 - 1
build/patches/ungoogled-chromium-Always-use-local-DevTools-files-instead-of-remote-files-from-Google.patch

@@ -17,7 +17,7 @@ Related comment: https://bugs.chromium.org/p/chromium/issues/detail?id=710701#c1
 diff --git a/third_party/blink/renderer/devtools/BUILD.gn b/third_party/blink/renderer/devtools/BUILD.gn
 --- a/third_party/blink/renderer/devtools/BUILD.gn
 +++ b/third_party/blink/renderer/devtools/BUILD.gn
-@@ -1161,10 +1161,8 @@ action("generate_devtools_grd") {
+@@ -1258,10 +1258,8 @@ action("generate_devtools_grd") {
        devtools_embedder_scripts +
        [ "$resources_out_dir/devtools_extension_api.js" ]
  

+ 6 - 6
build/patches/ungoogled-chromium-Disable-Gaia.patch

@@ -18,7 +18,7 @@ See also: https://github.com/Eloston/ungoogled-chromium/issues/104
 diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd
 --- a/chrome/browser/browser_resources.grd
 +++ b/chrome/browser/browser_resources.grd
-@@ -332,7 +332,6 @@
+@@ -384,7 +384,6 @@
        <include name="IDR_INLINE_LOGIN_HTML" file="resources\inline_login\inline_login.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" />
        <include name="IDR_INLINE_LOGIN_CSS" file="resources\inline_login\inline_login.css" flattenhtml="true" type="BINDATA" />
        <include name="IDR_INLINE_LOGIN_JS" file="resources\inline_login\inline_login.js" flattenhtml="true" type="BINDATA" />
@@ -26,7 +26,7 @@ diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resou
        <include name="IDR_INSPECT_CSS" file="resources\inspect\inspect.css" flattenhtml="true" type="BINDATA" />
        <include name="IDR_INSPECT_HTML" file="resources\inspect\inspect.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" />
        <include name="IDR_INSPECT_JS" file="resources\inspect\inspect.js" flattenhtml="true" type="BINDATA" />
-@@ -453,7 +452,6 @@
+@@ -487,7 +486,6 @@
        <include name="IDR_WEBRTC_LOGS_JS" file="resources\media\webrtc_logs.js" type="BINDATA" />
        <include name="IDR_WEBSTORE_MANIFEST" file="resources\webstore_app\manifest.json" type="BINDATA" />
        <include name="IDR_CRYPTOTOKEN_MANIFEST" file="resources\cryptotoken\manifest.json" type="BINDATA" />
@@ -70,8 +70,8 @@ diff --git a/chrome/browser/resources/component_extension_resources.grd b/chrome
 +++ b/chrome/browser/resources/component_extension_resources.grd
 @@ -32,8 +32,6 @@
  
-       <!-- Material Design Bookmarks -->
-       <include name="IDR_COMPONENT_MD_BOOKMARKS_BOOKMARKS_HTML" file="md_bookmarks/bookmarks.html" type="BINDATA" />
+       <!-- Bookmarks -->
+       <include name="IDR_COMPONENT_BOOKMARKS_BOOKMARKS_HTML" file="bookmarks/bookmarks.html" type="BINDATA" />
 -      <!-- Gaia auth extension -->
 -      <include name="IDR_GAIA_AUTH_SUCCESS" file="gaia_auth/success.html" allowexternalscript="true" type="BINDATA" />
        <!-- Hangout Services extension, included in Google Chrome builds only. -->
@@ -100,7 +100,7 @@ diff --git a/google_apis/gaia/gaia_auth_fetcher.cc b/google_apis/gaia/gaia_auth_
  
  std::unique_ptr<const GaiaAuthConsumer::ClientOAuthResult>
  ExtractOAuth2TokenPairResponse(const std::string& data) {
-@@ -270,6 +270,7 @@ void GaiaAuthFetcher::CreateAndStartGaiaFetcher(
+@@ -260,6 +260,7 @@ void GaiaAuthFetcher::CreateAndStartGaiaFetcher(
      const net::NetworkTrafficAnnotationTag& traffic_annotation) {
    DCHECK(!fetch_pending_) << "Tried to fetch two things at once!";
  
@@ -108,7 +108,7 @@ diff --git a/google_apis/gaia/gaia_auth_fetcher.cc b/google_apis/gaia/gaia_auth_
    auto resource_request = std::make_unique<network::ResourceRequest>();
    resource_request->url = gaia_gurl;
    original_url_ = gaia_gurl;
-@@ -324,6 +325,7 @@ void GaiaAuthFetcher::CreateAndStartGaiaFetcher(
+@@ -314,6 +315,7 @@ void GaiaAuthFetcher::CreateAndStartGaiaFetcher(
        base::BindOnce(&GaiaAuthFetcher::OnURLLoadComplete,
                       base::Unretained(this)),
        kMaxMessageSize);

+ 1 - 1
build/patches/ungoogled-chromium-Disable-Google-host-detection.patch

@@ -327,7 +327,7 @@ diff --git a/components/google/core/common/google_util.cc b/components/google/co
 diff --git a/components/search_engines/template_url.cc b/components/search_engines/template_url.cc
 --- a/components/search_engines/template_url.cc
 +++ b/components/search_engines/template_url.cc
-@@ -505,11 +505,7 @@ base::string16 TemplateURLRef::SearchTermToString16(
+@@ -504,11 +504,7 @@ base::string16 TemplateURLRef::SearchTermToString16(
  bool TemplateURLRef::HasGoogleBaseURLs(
      const SearchTermsData& search_terms_data) const {
    ParseIfNecessary(search_terms_data);

+ 1 - 1
build/patches/ungoogled-chromium-Disable-domain-reliability.patch

@@ -635,7 +635,7 @@ diff --git a/components/domain_reliability/google_configs.cc b/components/domain
 -    config->collectors.push_back(
 -        std::make_unique<GURL>(config->origin.ReplaceComponents(replacements)));
 -  }
--  for (size_t i = 0; i < arraysize(kGoogleStandardCollectors); i++)
+-  for (size_t i = 0; i < base::size(kGoogleStandardCollectors); i++)
 -    config->collectors.push_back(
 -        std::make_unique<GURL>(kGoogleStandardCollectors[i]));
 -  config->success_sample_rate = 0.05;

+ 1 - 1
build/patches/ungoogled-chromium-Disable-profile-avatar-downloading.patch

@@ -12,7 +12,7 @@ Added some Bromite-specific further improvements
 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
 --- a/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
-@@ -1271,8 +1271,6 @@ jumbo_split_static_library("browser") {
+@@ -1289,8 +1289,6 @@ jumbo_split_static_library("browser") {
      "profiles/profile_attributes_entry.h",
      "profiles/profile_attributes_storage.cc",
      "profiles/profile_attributes_storage.h",

+ 0 - 56
build/patches/ungoogled-chromium-Disable-signin.patch

@@ -1,56 +0,0 @@
-From: csagan5 <32685696+csagan5@users.noreply.github.com>
-Date: Mon, 12 Feb 2018 21:14:39 +0100
-Subject: ungoogled-chromium: Disable signin
-
----
- chrome/browser/ui/chrome_pages.cc                     | 8 ++------
- components/signin/core/browser/signin_manager_base.cc | 2 +-
- 2 files changed, 3 insertions(+), 7 deletions(-)
-
-diff --git a/chrome/browser/ui/chrome_pages.cc b/chrome/browser/ui/chrome_pages.cc
---- a/chrome/browser/ui/chrome_pages.cc
-+++ b/chrome/browser/ui/chrome_pages.cc
-@@ -72,12 +72,6 @@ void OpenBookmarkManagerForNode(Browser* browser, int64_t node_id) {
-   ShowSingletonTabOverwritingNTP(browser, std::move(params));
- }
- 
--void NavigateToSingletonTab(Browser* browser, const GURL& url) {
--  NavigateParams params(GetSingletonTabNavigateParams(browser, url));
--  params.path_behavior = NavigateParams::IGNORE_AND_NAVIGATE;
--  ShowSingletonTabOverwritingNTP(browser, std::move(params));
--}
--
- // Shows either the help app or the appropriate help page for |source|. If
- // |browser| is NULL and the help page is used (vs the app), the help page is
- // shown in the last active browser. If there is no such browser, a new browser
-@@ -383,6 +377,7 @@ void ShowSearchEngineSettings(Browser* browser) {
- #if !defined(OS_ANDROID)
- void ShowBrowserSignin(Browser* browser,
-                        signin_metrics::AccessPoint access_point) {
-+#if 0
-   Profile* original_profile = browser->profile()->GetOriginalProfile();
-   SigninManagerBase* manager =
-       SigninManagerFactory::GetForProfile(original_profile);
-@@ -434,6 +429,7 @@ void ShowBrowserSignin(Browser* browser,
-                                                   access_point);
- #endif
-   }
-+#endif 
- }
- 
- void ShowBrowserSigninOrSettings(Browser* browser,
-diff --git a/components/signin/core/browser/signin_manager_base.cc b/components/signin/core/browser/signin_manager_base.cc
---- a/components/signin/core/browser/signin_manager_base.cc
-+++ b/components/signin/core/browser/signin_manager_base.cc
-@@ -152,7 +152,7 @@ void SigninManagerBase::Initialize(PrefService* local_state) {
- bool SigninManagerBase::IsInitialized() const { return initialized_; }
- 
- bool SigninManagerBase::IsSigninAllowed() const {
--  return client_->GetPrefs()->GetBoolean(prefs::kSigninAllowed);
-+  return false;
- }
- 
- AccountInfo SigninManagerBase::GetAuthenticatedAccountInfo() const {
--- 
-2.11.0
-

+ 2 - 2
build/patches/ungoogled-chromium-Disable-translate-integration.patch

@@ -10,9 +10,9 @@ Subject: ungoogled-chromium: Disable translate integration
 diff --git a/components/translate/core/browser/translate_manager.cc b/components/translate/core/browser/translate_manager.cc
 --- a/components/translate/core/browser/translate_manager.cc
 +++ b/components/translate/core/browser/translate_manager.cc
-@@ -134,8 +134,9 @@ void TranslateManager::InitiateTranslation(const std::string& page_lang) {
+@@ -664,8 +664,9 @@ void TranslateManager::FilterIsTranslatePossible(
    if (net::NetworkChangeNotifier::IsOffline())
-     return;
+     decision->PreventAllTriggering();
  
 -  if (!ignore_missing_key_for_testing_ &&
 -      !::google_apis::HasAPIKeyConfigured()) {

+ 2 - 2
build/patches/ungoogled-chromium-Disable-untraceable-URLs.patch

@@ -91,7 +91,7 @@ diff --git a/chrome/browser/safe_browsing/client_side_model_loader.h b/chrome/br
 diff --git a/rlz/lib/financial_ping.cc b/rlz/lib/financial_ping.cc
 --- a/rlz/lib/financial_ping.cc
 +++ b/rlz/lib/financial_ping.cc
-@@ -339,7 +339,7 @@ FinancialPing::PingResponse FinancialPing::PingServer(const char* request,
+@@ -338,7 +338,7 @@ FinancialPing::PingResponse FinancialPing::PingServer(const char* request,
  
    // Open network connection.
    InternetHandle connection_handle = InternetConnectA(inet_handle,
@@ -100,7 +100,7 @@ diff --git a/rlz/lib/financial_ping.cc b/rlz/lib/financial_ping.cc
        INTERNET_FLAG_NO_CACHE_WRITE, 0);
    if (!connection_handle)
      return PING_FAILURE;
-@@ -383,7 +383,7 @@ FinancialPing::PingResponse FinancialPing::PingServer(const char* request,
+@@ -382,7 +382,7 @@ FinancialPing::PingResponse FinancialPing::PingServer(const char* request,
    return PING_SUCCESSFUL;
  #else
    std::string url =

+ 7 - 8
build/patches/ungoogled-chromium-Disable-webRTC-log-uploader.patch

@@ -3,18 +3,17 @@ Date: Mon, 12 Feb 2018 21:21:36 +0100
 Subject: ungoogled-chromium: Disable webRTC log uploader
 
 ---
- chrome/browser/media/webrtc/webrtc_log_uploader.cc | 28 ++++------------------
- 1 file changed, 4 insertions(+), 24 deletions(-)
+ chrome/browser/media/webrtc/webrtc_log_uploader.cc | 27 ++++------------------
+ 1 file changed, 4 insertions(+), 23 deletions(-)
 
 diff --git a/chrome/browser/media/webrtc/webrtc_log_uploader.cc b/chrome/browser/media/webrtc/webrtc_log_uploader.cc
 --- a/chrome/browser/media/webrtc/webrtc_log_uploader.cc
 +++ b/chrome/browser/media/webrtc/webrtc_log_uploader.cc
-@@ -121,30 +121,7 @@ void WebRtcLogUploader::LoggingStoppedDoUpload(
+@@ -129,29 +129,7 @@ void WebRtcLogUploader::LoggingStoppedDoUpload(
    DCHECK(meta_data.get());
    DCHECK(!upload_done_data.log_path.empty());
  
--  std::string compressed_log;
--  CompressLog(&compressed_log, log_buffer.get());
+-  std::string compressed_log = CompressLog(log_buffer.get());
 -
 -  std::string local_log_id;
 -
@@ -37,15 +36,15 @@ diff --git a/chrome/browser/media/webrtc/webrtc_log_uploader.cc b/chrome/browser
 -  upload_done_data_with_log_id.local_log_id = local_log_id;
 -  PrepareMultipartPostData(compressed_log, std::move(meta_data),
 -                           upload_done_data_with_log_id);
-+  NotifyUploadDone(net::HTTP_OK, "", upload_done_data);
++  NotifyUploadDoneAndLogStats(net::HTTP_OK, net::OK, "", upload_done_data);
  }
  
  void WebRtcLogUploader::PrepareMultipartPostData(
-@@ -155,6 +132,9 @@ void WebRtcLogUploader::PrepareMultipartPostData(
+@@ -162,6 +140,9 @@ void WebRtcLogUploader::PrepareMultipartPostData(
    DCHECK(!compressed_log.empty());
    DCHECK(meta_data.get());
  
-+  NotifyUploadDone(net::HTTP_OK, "", upload_done_data);
++  NotifyUploadDoneAndLogStats(net::HTTP_OK, net::OK, "", upload_done_data);
 +  return;
 +
    std::unique_ptr<std::string> post_data(new std::string());

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

@@ -13,7 +13,7 @@ Subject: ungoogled-chromium: disable safe browsing
  .../download/chrome_download_manager_delegate.cc   | 17 -----
  chrome/browser/download/download_item_model.cc     |  3 -
  chrome/browser/download/download_prefs.cc          | 13 +---
- .../browser/download/download_target_determiner.cc | 24 +-------
+ .../browser/download/download_target_determiner.cc | 24 +------
  .../extensions/api/downloads/downloads_api.cc      | 39 +-----------
  .../extensions/api/downloads/downloads_api.h       | 10 ---
  .../api/webstore_private/webstore_private_api.cc   | 43 +------------
@@ -27,21 +27,20 @@ Subject: ungoogled-chromium: disable safe browsing
  chrome/browser/safe_browsing/BUILD.gn              |  2 +
  chrome/browser/ssl/captive_portal_blocking_page.cc |  7 +--
  chrome/browser/ssl/cert_report_helper.cc           |  2 -
- chrome/browser/ssl/security_state_tab_helper.cc    | 72 ----------------------
+ chrome/browser/ssl/security_state_tab_helper.cc    | 73 ----------------------
  .../chrome_subresource_filter_client.cc            | 14 -----
  chrome/browser/ui/BUILD.gn                         |  1 -
- chrome/browser/ui/tab_helpers.cc                   |  5 --
+ chrome/browser/ui/tab_helpers.cc                   | 22 +++----
  .../ui/webui/interstitials/interstitial_ui.cc      | 11 ++--
- .../webui/md_downloads/md_downloads_dom_handler.cc | 37 -----------
- .../webui/md_downloads/md_downloads_dom_handler.h  | 13 ----
  chrome/renderer/chrome_content_renderer_client.cc  |  1 -
  components/safe_browsing/features.cc               |  2 +-
- 33 files changed, 22 insertions(+), 487 deletions(-)
+ .../core/browser/subresource_filter_features.cc    |  2 +-
+ 32 files changed, 33 insertions(+), 446 deletions(-)
 
 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
 --- a/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
-@@ -2647,8 +2647,6 @@ jumbo_split_static_library("browser") {
+@@ -2698,8 +2698,6 @@ jumbo_split_static_library("browser") {
        "download/download_commands.h",
        "download/download_crx_util.cc",
        "download/download_crx_util.h",
@@ -101,7 +100,7 @@ diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_pro
  #include "chrome/browser/shell_integration.h"
  #include "chrome/browser/status_icons/status_tray.h"
  #include "chrome/browser/ui/browser_dialogs.h"
-@@ -371,8 +370,6 @@ void BrowserProcessImpl::StartTearDown() {
+@@ -369,8 +368,6 @@ void BrowserProcessImpl::StartTearDown() {
    // that URLFetcher operation before going away.)
    metrics_services_manager_.reset();
    intranet_redirect_detector_.reset();
@@ -133,7 +132,7 @@ diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_pro
  subresource_filter::RulesetService*
  BrowserProcessImpl::subresource_filter_ruleset_service() {
    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-@@ -1298,16 +1279,6 @@ void BrowserProcessImpl::CreateBackgroundPrintingManager() {
+@@ -1292,16 +1273,6 @@ void BrowserProcessImpl::CreateBackgroundPrintingManager() {
  #endif
  }
  
@@ -163,7 +162,7 @@ diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_proc
    subresource_filter::RulesetService* subresource_filter_ruleset_service()
        override;
    optimization_guide::OptimizationGuideService* optimization_guide_service()
-@@ -326,9 +323,6 @@ class BrowserProcessImpl : public BrowserProcess,
+@@ -320,9 +317,6 @@ class BrowserProcessImpl : public BrowserProcess,
    std::unique_ptr<BackgroundModeManager> background_mode_manager_;
  #endif
  
@@ -176,7 +175,7 @@ diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_proc
 diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
 --- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
 +++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
-@@ -617,35 +617,6 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
+@@ -628,35 +628,6 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
          CONTENT_SETTINGS_TYPE_CLIENT_HINTS, base::Time(), base::Time::Max(),
          website_settings_filter);
  
@@ -215,7 +214,7 @@ diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.
 diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
 --- a/chrome/browser/chrome_content_browser_client.cc
 +++ b/chrome/browser/chrome_content_browser_client.cc
-@@ -833,30 +833,6 @@ void SetApplicationLocaleOnIOThread(const std::string& locale) {
+@@ -853,30 +853,6 @@ void SetApplicationLocaleOnIOThread(const std::string& locale) {
    GetIOThreadApplicationLocale() = locale;
  }
  
@@ -246,7 +245,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
  #if defined(OS_ANDROID)
  float GetDeviceScaleAdjustment() {
    static const float kMinFSM = 1.05f;
-@@ -2007,7 +1983,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
+@@ -2052,7 +2028,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
        // Disable client-side phishing detection in the renderer if it is
        // disabled in the Profile preferences or the browser process.
        if (!prefs->GetBoolean(prefs::kSafeBrowsingEnabled) ||
@@ -255,7 +254,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
          command_line->AppendSwitch(
              switches::kDisableClientSidePhishingDetection);
        }
-@@ -2697,7 +2673,7 @@ void ChromeContentBrowserClient::AllowCertificateError(
+@@ -2747,7 +2723,7 @@ void ChromeContentBrowserClient::AllowCertificateError(
    SSLErrorHandler::HandleSSLError(
        web_contents, cert_error, ssl_info, request_url,
        expired_previous_decision,
@@ -264,7 +263,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
        callback, SSLErrorHandler::BlockingPageReadyCallback());
  }
  
-@@ -2977,8 +2953,6 @@ bool ChromeContentBrowserClient::CanCreateWindow(
+@@ -3030,8 +3006,6 @@ bool ChromeContentBrowserClient::CanCreateWindow(
  void ChromeContentBrowserClient::ResourceDispatcherHostCreated() {
    DCHECK_CURRENTLY_ON(BrowserThread::UI);
  
@@ -273,7 +272,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
    for (size_t i = 0; i < extra_parts_.size(); ++i)
      extra_parts_[i]->ResourceDispatcherHostCreated();
  
-@@ -4201,7 +4175,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
+@@ -4250,7 +4224,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
    if (base::FeatureList::IsEnabled(features::kSSLCommittedInterstitials)) {
      throttles.push_back(std::make_unique<SSLErrorNavigationThrottle>(
          handle,
@@ -356,7 +355,7 @@ diff --git a/chrome/browser/download/download_item_model.cc b/chrome/browser/dow
 diff --git a/chrome/browser/download/download_prefs.cc b/chrome/browser/download/download_prefs.cc
 --- a/chrome/browser/download/download_prefs.cc
 +++ b/chrome/browser/download/download_prefs.cc
-@@ -209,14 +209,7 @@ DownloadPrefs::DownloadPrefs(Profile* profile) : profile_(profile) {
+@@ -219,14 +219,7 @@ DownloadPrefs::DownloadPrefs(Profile* profile) : profile_(profile) {
          base::FilePath::StringType(1, base::FilePath::kExtensionSeparator) +
          extension);
  
@@ -372,7 +371,7 @@ diff --git a/chrome/browser/download/download_prefs.cc b/chrome/browser/download
    }
  }
  
-@@ -371,10 +364,6 @@ bool DownloadPrefs::IsAutoOpenEnabledBasedOnExtension(
+@@ -381,10 +374,6 @@ bool DownloadPrefs::IsAutoOpenEnabledBasedOnExtension(
  bool DownloadPrefs::EnableAutoOpenBasedOnExtension(
      const base::FilePath& file_name) {
    base::FilePath::StringType extension = file_name.Extension();
@@ -420,7 +419,7 @@ diff --git a/chrome/browser/download/download_target_determiner.cc b/chrome/brow
 diff --git a/chrome/browser/extensions/api/downloads/downloads_api.cc b/chrome/browser/extensions/api/downloads/downloads_api.cc
 --- a/chrome/browser/extensions/api/downloads/downloads_api.cc
 +++ b/chrome/browser/extensions/api/downloads/downloads_api.cc
-@@ -39,7 +39,6 @@
+@@ -38,7 +38,6 @@
  #include "chrome/browser/browser_process.h"
  #include "chrome/browser/download/download_core_service.h"
  #include "chrome/browser/download/download_core_service_factory.h"
@@ -428,7 +427,7 @@ diff --git a/chrome/browser/extensions/api/downloads/downloads_api.cc b/chrome/b
  #include "chrome/browser/download/download_file_icon_extractor.h"
  #include "chrome/browser/download/download_open_prompt.h"
  #include "chrome/browser/download/download_prefs.h"
-@@ -1305,9 +1304,6 @@ DownloadsAcceptDangerFunction::DownloadsAcceptDangerFunction() {}
+@@ -1304,9 +1303,6 @@ DownloadsAcceptDangerFunction::DownloadsAcceptDangerFunction() {}
  
  DownloadsAcceptDangerFunction::~DownloadsAcceptDangerFunction() {}
  
@@ -438,7 +437,7 @@ diff --git a/chrome/browser/extensions/api/downloads/downloads_api.cc b/chrome/b
  bool DownloadsAcceptDangerFunction::RunAsync() {
    std::unique_ptr<downloads::AcceptDanger::Params> params(
        downloads::AcceptDanger::Params::Create(*args_));
-@@ -1345,40 +1341,7 @@ void DownloadsAcceptDangerFunction::PromptOrWait(int download_id, int retries) {
+@@ -1344,40 +1340,7 @@ void DownloadsAcceptDangerFunction::PromptOrWait(int download_id, int retries) {
      return;
    }
    RecordApiFunctions(DOWNLOADS_FUNCTION_ACCEPT_DANGER);
@@ -651,7 +650,7 @@ diff --git a/chrome/browser/extensions/blacklist_state_fetcher.h b/chrome/browse
 diff --git a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
 --- a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
 +++ b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
-@@ -296,8 +296,7 @@ void NotifyUIThreadOfRequestComplete(
+@@ -290,8 +290,7 @@ void NotifyUIThreadOfRequestComplete(
  }  // namespace
  
  ChromeResourceDispatcherHostDelegate::ChromeResourceDispatcherHostDelegate()
@@ -661,7 +660,7 @@ diff --git a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc b
  
  ChromeResourceDispatcherHostDelegate::~ChromeResourceDispatcherHostDelegate() {
  #if BUILDFLAG(ENABLE_EXTENSIONS)
-@@ -311,8 +310,6 @@ void ChromeResourceDispatcherHostDelegate::RequestBeginning(
+@@ -305,8 +304,6 @@ void ChromeResourceDispatcherHostDelegate::RequestBeginning(
      content::AppCacheService* appcache_service,
      ResourceType resource_type,
      std::vector<std::unique_ptr<content::ResourceThrottle>>* throttles) {
@@ -670,7 +669,7 @@ diff --git a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc b
    ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context);
  
  #if BUILDFLAG(ENABLE_OFFLINE_PAGES) || BUILDFLAG(ENABLE_NACL)
-@@ -431,7 +428,7 @@ void ChromeResourceDispatcherHostDelegate::AppendStandardResourceThrottles(
+@@ -410,7 +407,7 @@ void ChromeResourceDispatcherHostDelegate::AppendStandardResourceThrottles(
    content::ResourceThrottle* first_throttle = NULL;
  #if defined(OS_ANDROID)
    first_throttle = DataReductionProxyResourceThrottle::MaybeCreate(
@@ -708,18 +707,18 @@ diff --git a/chrome/browser/net/trial_comparison_cert_verifier.cc b/chrome/brows
 diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
 --- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
 +++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
-@@ -233,7 +233,6 @@ void ChromeBrowserMainExtraPartsProfiles::
+@@ -239,7 +239,6 @@ void ChromeBrowserMainExtraPartsProfiles::
  #if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION)
    CaptivePortalServiceFactory::GetInstance();
  #endif
 -  CertificateReportingServiceFactory::GetInstance();
    ChromeBrowsingDataRemoverDelegateFactory::GetInstance();
  #if defined(OS_CHROMEOS)
-   chromeos::ChromeCryptAuthServiceFactory::GetInstance();
+   chromeos::android_sms::AndroidSmsServiceFactory::GetInstance();
 diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
 --- a/chrome/browser/profiles/profile_impl.cc
 +++ b/chrome/browser/profiles/profile_impl.cc
-@@ -549,18 +549,6 @@ ProfileImpl::ProfileImpl(
+@@ -589,18 +589,6 @@ ProfileImpl::ProfileImpl(
                                   create_mode == CREATE_MODE_SYNCHRONOUS);
  #endif
  
@@ -738,7 +737,7 @@ diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/p
    content::BrowserContext::Initialize(this, path_);
  
    {
-@@ -569,7 +557,7 @@ ProfileImpl::ProfileImpl(
+@@ -609,7 +597,7 @@ ProfileImpl::ProfileImpl(
              ->CreateDelegate();
      delegate->InitPrefRegistry(pref_registry_.get());
      prefs_ = chrome_prefs::CreateProfilePrefs(
@@ -758,7 +757,7 @@ diff --git a/chrome/browser/safe_browsing/BUILD.gn b/chrome/browser/safe_browsin
    sources = [
      "safe_browsing_controller_client.cc",
      "safe_browsing_controller_client.h",
-@@ -75,6 +76,7 @@ static_library("safe_browsing") {
+@@ -100,6 +101,7 @@ static_library("safe_browsing") {
    } else {
      sources += [ "chrome_cleaner/chrome_cleaner_extension_util_win_noop.cc" ]
    }
@@ -793,7 +792,7 @@ diff --git a/chrome/browser/ssl/captive_portal_blocking_page.cc b/chrome/browser
 diff --git a/chrome/browser/ssl/cert_report_helper.cc b/chrome/browser/ssl/cert_report_helper.cc
 --- a/chrome/browser/ssl/cert_report_helper.cc
 +++ b/chrome/browser/ssl/cert_report_helper.cc
-@@ -178,8 +178,6 @@ void CertReportHelper::FinishCertCollection() {
+@@ -179,8 +179,6 @@ void CertReportHelper::FinishCertCollection() {
      LOG(ERROR) << "Failed to serialize certificate report.";
      return;
    }
@@ -805,7 +804,7 @@ diff --git a/chrome/browser/ssl/cert_report_helper.cc b/chrome/browser/ssl/cert_
 diff --git a/chrome/browser/ssl/security_state_tab_helper.cc b/chrome/browser/ssl/security_state_tab_helper.cc
 --- a/chrome/browser/ssl/security_state_tab_helper.cc
 +++ b/chrome/browser/ssl/security_state_tab_helper.cc
-@@ -269,78 +269,6 @@ bool SecurityStateTabHelper::UsedPolicyInstalledCertificate() const {
+@@ -186,79 +186,6 @@ bool SecurityStateTabHelper::UsedPolicyInstalledCertificate() const {
  
  security_state::MaliciousContentStatus
  SecurityStateTabHelper::GetMaliciousContentStatus() const {
@@ -874,6 +873,7 @@ diff --git a/chrome/browser/ssl/security_state_tab_helper.cc b/chrome/browser/ss
 -      case safe_browsing::SB_THREAT_TYPE_CSD_WHITELIST:
 -      case safe_browsing::SB_THREAT_TYPE_AD_SAMPLE:
 -      case safe_browsing::SB_THREAT_TYPE_SUSPICIOUS_SITE:
+-      case safe_browsing::SB_THREAT_TYPE_APK_DOWNLOAD:
 -        // These threat types are not currently associated with
 -        // interstitials, and thus resources with these threat types are
 -        // not ever whitelisted or pending whitelisting.
@@ -911,7 +911,7 @@ diff --git a/chrome/browser/subresource_filter/chrome_subresource_filter_client.
 diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
 --- a/chrome/browser/ui/BUILD.gn
 +++ b/chrome/browser/ui/BUILD.gn
-@@ -2420,7 +2420,6 @@ jumbo_split_static_library("ui") {
+@@ -2463,7 +2463,6 @@ jumbo_split_static_library("ui") {
        "views/cookie_info_view.h",
        "views/device_chooser_content_view.cc",
        "views/device_chooser_content_view.h",
@@ -922,25 +922,63 @@ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
 diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc
 --- a/chrome/browser/ui/tab_helpers.cc
 +++ b/chrome/browser/ui/tab_helpers.cc
-@@ -244,8 +244,6 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
+@@ -44,8 +44,8 @@
+ #include "chrome/browser/previews/resource_loading_hints/resource_loading_hints_web_contents_observer.h"
+ #include "chrome/browser/profiles/profile.h"
+ #include "chrome/browser/resource_coordinator/tab_helper.h"
+-#include "chrome/browser/safe_browsing/safe_browsing_navigation_observer.h"
+-#include "chrome/browser/safe_browsing/trigger_creator.h"
++//#include "chrome/browser/safe_browsing/safe_browsing_navigation_observer.h"
++//#include "chrome/browser/safe_browsing/trigger_creator.h"
+ #include "chrome/browser/sessions/session_tab_helper.h"
+ #include "chrome/browser/ssl/connection_help_tab_helper.h"
+ #include "chrome/browser/ssl/security_state_tab_helper.h"
+@@ -105,7 +105,7 @@
+ #else
+ #include "chrome/browser/banners/app_banner_manager_desktop.h"
+ #include "chrome/browser/plugins/plugin_observer.h"
+-#include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h"
++//#include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h"
+ #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
+ #include "chrome/browser/ui/hung_plugin_tab_helper.h"
+ #include "chrome/browser/ui/sad_tab_helper.h"
+@@ -200,10 +200,10 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
+   ChromePasswordManagerClient::CreateForWebContentsWithAutofillClient(
+       web_contents,
+       autofill::ChromeAutofillClient::FromWebContents(web_contents));
+-  if (base::FeatureList::IsEnabled(
+-          subresource_filter::kSafeBrowsingSubresourceFilter)) {
+-    ChromeSubresourceFilterClient::CreateForWebContents(web_contents);
+-  }
++  //if (base::FeatureList::IsEnabled(
++  //        subresource_filter::kSafeBrowsingSubresourceFilter)) {
++  //  ChromeSubresourceFilterClient::CreateForWebContents(web_contents);
++  //}
+   ChromeTranslateClient::CreateForWebContents(web_contents);
+   ClientHintsObserver::CreateForWebContents(web_contents);
+   ConnectionHelpTabHelper::CreateForWebContents(web_contents);
+@@ -243,10 +243,8 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
    PreviewsUITabHelper::CreateForWebContents(web_contents);
    RecentlyAudibleHelper::CreateForWebContents(web_contents);
    ResourceLoadingHintsWebContentsObserver::CreateForWebContents(web_contents);
+-  safe_browsing::SafeBrowsingNavigationObserver::MaybeCreateForWebContents(
+-      web_contents);
 -  safe_browsing::TriggerCreator::MaybeCreateTriggersForWebContents(
 -      profile, web_contents);
++  //safe_browsing::SafeBrowsingNavigationObserver::MaybeCreateForWebContents(
++  //    web_contents);
    SearchEngineTabHelper::CreateForWebContents(web_contents);
    SecurityStateTabHelper::CreateForWebContents(web_contents);
    if (SiteEngagementService::IsEnabled())
-@@ -298,9 +296,6 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
+@@ -299,7 +297,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
                          new ChromePDFWebContentsHelperClient()));
    PluginObserver::CreateForWebContents(web_contents);
    SadTabHelper::CreateForWebContents(web_contents);
 -  safe_browsing::SafeBrowsingTabObserver::CreateForWebContents(web_contents);
--  safe_browsing::SafeBrowsingNavigationObserver::MaybeCreateForWebContents(
--      web_contents);
++  //safe_browsing::SafeBrowsingTabObserver::CreateForWebContents(web_contents);
    SearchTabHelper::CreateForWebContents(web_contents);
    TabDialogs::CreateForWebContents(web_contents);
-   ThumbnailTabHelper::CreateForWebContents(web_contents);
+   web_modal::WebContentsModalDialogManager::CreateForWebContents(web_contents);
 diff --git a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc b/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
 --- a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
 +++ b/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
@@ -991,127 +1029,41 @@ diff --git a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc b/chrome/b
    } else if (interstitial_delegate.get()) {
      html = interstitial_delegate.get()->GetHTMLContents();
    } else {
-diff --git a/chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.cc b/chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.cc
---- a/chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.cc
-+++ b/chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.cc
-@@ -21,7 +21,6 @@
- #include "base/threading/thread.h"
- #include "base/values.h"
- #include "chrome/browser/browser_process.h"
--#include "chrome/browser/download/download_danger_prompt.h"
- #include "chrome/browser/download/download_history.h"
- #include "chrome/browser/download/download_item_model.h"
- #include "chrome/browser/download/download_prefs.h"
-@@ -204,9 +203,6 @@ void MdDownloadsDOMHandler::HandleDrag(const base::ListValue* args) {
- 
- void MdDownloadsDOMHandler::HandleSaveDangerous(const base::ListValue* args) {
-   CountDownloadsDOMEvents(DOWNLOADS_DOM_EVENT_SAVE_DANGEROUS);
--  download::DownloadItem* file = GetDownloadByValue(args);
--  if (file)
--    ShowDangerPrompt(file);
- }
- 
- void MdDownloadsDOMHandler::HandleRetryDownload(const base::ListValue* args) {
-@@ -313,12 +309,6 @@ void MdDownloadsDOMHandler::RemoveDownloads(const DownloadVector& to_remove) {
-   IdSet ids;
- 
-   for (auto* download : to_remove) {
--    if (download->IsDangerous()) {
--      // Don't allow users to revive dangerous downloads; just nuke 'em.
--      download->Remove();
--      continue;
--    }
--
-     DownloadItemModel item_model(download);
-     if (!item_model.ShouldShowInShelf() ||
-         download->GetState() == download::DownloadItem::IN_PROGRESS) {
-@@ -371,33 +361,6 @@ void MdDownloadsDOMHandler::FinalizeRemovals() {
-   }
- }
- 
--void MdDownloadsDOMHandler::ShowDangerPrompt(
--    download::DownloadItem* dangerous_item) {
--  DownloadDangerPrompt* danger_prompt = DownloadDangerPrompt::Create(
--      dangerous_item,
--      GetWebUIWebContents(),
--      false,
--      base::Bind(&MdDownloadsDOMHandler::DangerPromptDone,
--                 weak_ptr_factory_.GetWeakPtr(), dangerous_item->GetId()));
--  // danger_prompt will delete itself.
--  DCHECK(danger_prompt);
--}
--
--void MdDownloadsDOMHandler::DangerPromptDone(
--    int download_id, DownloadDangerPrompt::Action action) {
--  if (action != DownloadDangerPrompt::ACCEPT)
--    return;
--  download::DownloadItem* item = NULL;
--  if (GetMainNotifierManager())
--    item = GetMainNotifierManager()->GetDownload(download_id);
--  if (!item && GetOriginalNotifierManager())
--    item = GetOriginalNotifierManager()->GetDownload(download_id);
--  if (!item || item->IsDone())
--    return;
--  CountDownloadsDOMEvents(DOWNLOADS_DOM_EVENT_SAVE_DANGEROUS);
--  item->ValidateDangerousDownload();
--}
--
- bool MdDownloadsDOMHandler::IsDeletingHistoryAllowed() {
-   content::DownloadManager* manager = GetMainNotifierManager();
-   return manager &&
-diff --git a/chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.h b/chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.h
---- a/chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.h
-+++ b/chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.h
-@@ -12,7 +12,6 @@
- 
- #include "base/macros.h"
- #include "base/memory/weak_ptr.h"
--#include "chrome/browser/download/download_danger_prompt.h"
- #include "chrome/browser/ui/webui/md_downloads/downloads_list_tracker.h"
- #include "content/public/browser/web_contents_observer.h"
- #include "content/public/browser/web_ui_message_handler.h"
-@@ -120,18 +119,6 @@ class MdDownloadsDOMHandler : public content::WebContentsObserver,
-   // null-checking |original_notifier_|.
-   content::DownloadManager* GetOriginalNotifierManager() const;
- 
--  // Displays a native prompt asking the user for confirmation after accepting
--  // the dangerous download specified by |dangerous|. The function returns
--  // immediately, and will invoke DangerPromptAccepted() asynchronously if the
--  // user accepts the dangerous download. The native prompt will observe
--  // |dangerous| until either the dialog is dismissed or |dangerous| is no
--  // longer an in-progress dangerous download.
--  virtual void ShowDangerPrompt(download::DownloadItem* dangerous);
--
--  // Conveys danger acceptance from the DownloadDangerPrompt to the
--  // DownloadItem.
--  void DangerPromptDone(int download_id, DownloadDangerPrompt::Action action);
--
-   // Returns true if the records of any downloaded items are allowed (and able)
-   // to be deleted.
-   bool IsDeletingHistoryAllowed();
 diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
 --- a/chrome/renderer/chrome_content_renderer_client.cc
 +++ b/chrome/renderer/chrome_content_renderer_client.cc
-@@ -80,7 +80,6 @@
+@@ -81,7 +81,6 @@
  #include "components/error_page/common/localized_error.h"
  #include "components/network_hints/renderer/prescient_networking_dispatcher.h"
  #include "components/pdf/renderer/pepper_pdf_host.h"
 -#include "components/safe_browsing/renderer/threat_dom_details.h"
- #include "components/services/heap_profiling/public/cpp/allocator_shim.h"
  #include "components/spellcheck/spellcheck_buildflags.h"
  #include "components/startup_metric_utils/common/startup_metric.mojom.h"
+ #include "components/subresource_filter/content/renderer/subresource_filter_agent.h"
 diff --git a/components/safe_browsing/features.cc b/components/safe_browsing/features.cc
 --- a/components/safe_browsing/features.cc
 +++ b/components/safe_browsing/features.cc
-@@ -40,7 +40,7 @@ const base::Feature kForceEnableResetPasswordWebUI{
+@@ -44,7 +44,7 @@ const base::Feature kForceEnableResetPasswordWebUI{
      "ForceEnableResetPasswordWebUI", base::FEATURE_DISABLED_BY_DEFAULT};
  
  const base::Feature kSuspiciousSiteTriggerQuotaFeature{
 -    "SafeBrowsingSuspiciousSiteTriggerQuota", base::FEATURE_ENABLED_BY_DEFAULT};
 +    "SafeBrowsingSuspiciousSiteTriggerQuota", base::FEATURE_DISABLED_BY_DEFAULT};
  
- const base::Feature kThreatDomDetailsTagAndAttributeFeature{
-     "ThreatDomDetailsTagAttributes", base::FEATURE_DISABLED_BY_DEFAULT};
+ const base::Feature kTelemetryForApkDownloads{
+     "SafeBrowsingTelemetryForApkDownloads", base::FEATURE_DISABLED_BY_DEFAULT};
+diff --git a/components/subresource_filter/core/browser/subresource_filter_features.cc b/components/subresource_filter/core/browser/subresource_filter_features.cc
+--- a/components/subresource_filter/core/browser/subresource_filter_features.cc
++++ b/components/subresource_filter/core/browser/subresource_filter_features.cc
+@@ -230,7 +230,7 @@ base::LazyInstance<scoped_refptr<ConfigurationList>>::Leaky
+ // Constant definitions -------------------------------------------------------
+ 
+ const base::Feature kSafeBrowsingSubresourceFilter{
+-    "SubresourceFilter", base::FEATURE_ENABLED_BY_DEFAULT};
++    "SubresourceFilter", base::FEATURE_DISABLED_BY_DEFAULT};
+ 
+ const base::Feature kSafeBrowsingSubresourceFilterConsiderRedirects{
+     "SubresourceFilterConsiderRedirects", base::FEATURE_DISABLED_BY_DEFAULT};
 -- 
 2.11.0
 

+ 2 - 2
build/patches/updater-disable-updater-pings.patch

@@ -25,7 +25,7 @@ diff --git a/components/component_updater/component_updater_url_constants.cc b/c
 -    "http://update.googleapis.com/service/update2";
 +    "about:blank";
  
- extern const char kUpdaterJSONDefaultUrl[] =
+ const char kUpdaterJSONDefaultUrl[] =
      "https://update.googleapis.com/service/update2/json";
 diff --git a/components/component_updater/configurator_impl.cc b/components/component_updater/configurator_impl.cc
 --- a/components/component_updater/configurator_impl.cc
@@ -52,7 +52,7 @@ diff --git a/components/component_updater/configurator_impl.cc b/components/comp
 diff --git a/components/component_updater/configurator_impl.h b/components/component_updater/configurator_impl.h
 --- a/components/component_updater/configurator_impl.h
 +++ b/components/component_updater/configurator_impl.h
-@@ -102,7 +102,6 @@ class ConfiguratorImpl {
+@@ -105,7 +105,6 @@ class ConfiguratorImpl {
    const bool deltas_enabled_;
    const bool fast_update_;
    const bool pings_enabled_;

+ 2 - 5
build/patches_list.txt

@@ -11,7 +11,6 @@ Disable-omission-of-URL-elements-in-Omnibox.patch
 Modify-default-preferences.patch
 Disable-contextual-search-by-default.patch
 Disable-hyperlink-auditing-by-default.patch
-Disable-ads-metrics-by-default.patch
 Do-not-store-passwords-by-default.patch
 Disable-NTP-remote-suggestions-by-default.patch
 Disable-references-to-fonts.googleapis.com.patch
@@ -24,7 +23,6 @@ Remove-Sync-and-Translate-menu.patch
 Never-send-any-crash-upload-data.patch
 Hide-send-reports-checkbox.patch
 Never-fetch-popular-sites.patch
-ungoogled-chromium-Disable-signin.patch
 ungoogled-chromium-Disable-webRTC-log-uploader.patch
 ungoogled-chromium-Disable-untraceable-URLs.patch
 ungoogled-chromium-Disable-translate-integration.patch
@@ -44,10 +42,10 @@ Allow-building-without-safebrowsing-for-Android.patch
 Hide-passwords-manager-link.patch
 Disable-Omaha-update-checks.patch
 Disable-update-scheduler.patch
-Add-DuckDuckGo-search-engine.patch
 Add-StartPage-search-engine.patch
 Add-English-only-search-engine.patch
-Add-Qwant-search-engine.patch
+Specify-image-URL-for-Qwant-search-engine.patch
+Add-DuckDuckGo-Lite-search-engine.patch
 Fix-crash-when-accessing-page-info-site-settings.patch
 openH264-enable-ARM-ARM64-optimizations.patch
 Switch-to-fstack-protector-strong.patch
@@ -101,7 +99,6 @@ kill-GCM.patch
 Allow-website-sign-in-without-account-sign-in.patch
 Offer-builtin-autocomplete-for-chrome-flags.patch
 Enable-history-requirement-of-user-gesture.patch
-Enable-TLS-1.3-final-by-default.patch
 Do-not-grant-notifications-to-default-search-engine.patch
 Add-flag-to-disable-IPv6-probes.patch
 Add-a-proxy-configuration-page.patch

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff