diff --git a/CHANGELOG.md b/CHANGELOG.md index 084c7ffa..a6f5cb2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 84.0.4147.121 +* removed Qwant search engine +* fixed zh_CN translations +* added patch to not embed non-free unrar library (fixes https://github.com/bromite/bromite/issues/674) +* enable improved cookie controls by default + # 84.0.4147.119 * update zh_CN translations * disable CORS RFC1918 (fixes https://github.com/bromite/bromite/issues/664) diff --git a/README.md b/README.md index 60383932..1fc6fd22 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ ETH donations address: `0xf47ff39223d828f99fec5ab53bd068c5c0522042` # Features -* customizable adblock filters via user-provided URL +* customizable adblock filters via user-provided URL (see https://www.bromite.org/custom-filters) * remove click-tracking and AMP from search results * DNS-over-HTTPS support with any valid IETF DoH endpoint * always-incognito mode diff --git a/build/RELEASE b/build/RELEASE index 3575e9fe..93d06b75 100644 --- a/build/RELEASE +++ b/build/RELEASE @@ -1 +1 @@ -84.0.4147.119 +84.0.4147.121 diff --git a/build/bromite_patches_list.txt b/build/bromite_patches_list.txt index 87e35d43..be4a6b4a 100644 --- a/build/bromite_patches_list.txt +++ b/build/bromite_patches_list.txt @@ -39,7 +39,6 @@ Disable-Omaha-update-checks.patch Disable-update-scheduler.patch Add-English-only-search-engine.patch Add-DuckDuckGo-Lite-search-engine.patch -Add-Qwant-search-engine.patch Fix-crash-when-accessing-page-info-site-settings.patch openH264-enable-ARM-ARM64-optimizations.patch Switch-to-fstack-protector-strong.patch @@ -146,5 +145,8 @@ Block-gateway-attacks-via-websockets.patch Enable-prefetch-privacy-changes-by-default.patch Enable-reduced-referrer-granularity-by-default.patch Restore-duet-flags.patch +Disable-support-for-RAR-files-inspection.patch +Enable-improved-cookie-controls-by-default.patch +Session-only-cookies-support.patch Add-history-support-in-incognito-mode.patch Automated-domain-substitution.patch diff --git a/build/patches/Add-Qwant-search-engine.patch b/build/patches/Add-Qwant-search-engine.patch deleted file mode 100644 index 8e857b5e..00000000 --- a/build/patches/Add-Qwant-search-engine.patch +++ /dev/null @@ -1,999 +0,0 @@ -From: csagan5 <32685696+csagan5@users.noreply.github.com> -Date: Mon, 12 Mar 2018 20:31:44 +0100 -Subject: Add Qwant search engine - -Specify image URL in upstream engine definition -Make search engine selectable in default list ---- - .../search_engines/prepopulated_engines.json | 1 + - .../template_url_prepopulate_data.cc | 216 +++++++++--------- - 2 files changed, 109 insertions(+), 108 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 -@@ -193,6 +193,7 @@ - "favicon_url": "https://www.qwant.com/favicon.ico", - "search_url": "https://www.qwant.com/?q={searchTerms}&client=opensearch", - "suggest_url": "https://api.qwant.com/api/suggest/?q={searchTerms}&client=opensearch", -+ "image_url": "https://www.qwant.com/?t=images&q={searchTerms}", - "type": "SEARCH_ENGINE_QWANT", - "id": 94 - }, -diff --git a/components/search_engines/template_url_prepopulate_data.cc b/components/search_engines/template_url_prepopulate_data.cc ---- a/components/search_engines/template_url_prepopulate_data.cc -+++ b/components/search_engines/template_url_prepopulate_data.cc -@@ -32,7 +32,7 @@ namespace { - - // Default (for countries with no better engine set) - const PrepopulatedEngine* const engines_default[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -42,7 +42,7 @@ const PrepopulatedEngine* const engines_default[] = { - // Engine selection by country ------------------------------------------------ - // United Arab Emirates - const PrepopulatedEngine* const engines_AE[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -51,7 +51,7 @@ const PrepopulatedEngine* const engines_AE[] = { - - // Albania - const PrepopulatedEngine* const engines_AL[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &yahoo, - &bing, - &duckduckgo, &duckduckgo_light, -@@ -60,7 +60,7 @@ const PrepopulatedEngine* const engines_AL[] = { - - // Argentina - const PrepopulatedEngine* const engines_AR[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo_ar, - &duckduckgo, &duckduckgo_light, -@@ -69,7 +69,7 @@ const PrepopulatedEngine* const engines_AR[] = { - - // Austria - const PrepopulatedEngine* const engines_AT[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &duckduckgo, &duckduckgo_light, - &yahoo_at, -@@ -78,7 +78,7 @@ const PrepopulatedEngine* const engines_AT[] = { - - // Australia - const PrepopulatedEngine* const engines_AU[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &duckduckgo, &duckduckgo_light, - &yahoo_au, -@@ -87,7 +87,7 @@ const PrepopulatedEngine* const engines_AU[] = { - - // Bosnia and Herzegovina - const PrepopulatedEngine* const engines_BA[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -96,7 +96,7 @@ const PrepopulatedEngine* const engines_BA[] = { - - // Belgium - const PrepopulatedEngine* const engines_BE[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &ecosia, -@@ -105,7 +105,7 @@ const PrepopulatedEngine* const engines_BE[] = { - - // Bulgaria - const PrepopulatedEngine* const engines_BG[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -114,7 +114,7 @@ const PrepopulatedEngine* const engines_BG[] = { - - // Bahrain - const PrepopulatedEngine* const engines_BH[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -123,7 +123,7 @@ const PrepopulatedEngine* const engines_BH[] = { - - // Burundi - const PrepopulatedEngine* const engines_BI[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -132,7 +132,7 @@ const PrepopulatedEngine* const engines_BI[] = { - - // Brunei - const PrepopulatedEngine* const engines_BN[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -141,7 +141,7 @@ const PrepopulatedEngine* const engines_BN[] = { - - // Bolivia - const PrepopulatedEngine* const engines_BO[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -150,7 +150,7 @@ const PrepopulatedEngine* const engines_BO[] = { - - // Brazil - const PrepopulatedEngine* const engines_BR[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo_br, - &duckduckgo, &duckduckgo_light, -@@ -159,7 +159,7 @@ const PrepopulatedEngine* const engines_BR[] = { - - // Belarus - const PrepopulatedEngine* const engines_BY[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &yandex_by, - &mail_ru, - &bing, -@@ -168,7 +168,7 @@ const PrepopulatedEngine* const engines_BY[] = { - - // Belize - const PrepopulatedEngine* const engines_BZ[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -177,7 +177,7 @@ const PrepopulatedEngine* const engines_BZ[] = { - - // Canada - const PrepopulatedEngine* const engines_CA[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo_ca, - &duckduckgo, &duckduckgo_light, -@@ -186,7 +186,7 @@ const PrepopulatedEngine* const engines_CA[] = { - - // Switzerland - const PrepopulatedEngine* const engines_CH[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &duckduckgo, &duckduckgo_light, - &yahoo_ch, -@@ -195,7 +195,7 @@ const PrepopulatedEngine* const engines_CH[] = { - - // Chile - const PrepopulatedEngine* const engines_CL[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo_cl, - &duckduckgo, &duckduckgo_light, -@@ -206,14 +206,14 @@ const PrepopulatedEngine* const engines_CL[] = { - const PrepopulatedEngine* const engines_CN[] = { - &baidu, - &sogou, -- &googleen, &google, -+ &googleen, &google, &qwant, - &so_360, - &bing, - }; - - // Colombia - const PrepopulatedEngine* const engines_CO[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo_co, - &ecosia, -@@ -222,7 +222,7 @@ const PrepopulatedEngine* const engines_CO[] = { - - // Costa Rica - const PrepopulatedEngine* const engines_CR[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -231,7 +231,7 @@ const PrepopulatedEngine* const engines_CR[] = { - - // Czech Republic - const PrepopulatedEngine* const engines_CZ[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &seznam_cz, - &bing, - &yahoo, -@@ -240,7 +240,7 @@ const PrepopulatedEngine* const engines_CZ[] = { - - // Germany - const PrepopulatedEngine* const engines_DE[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo_de, - &duckduckgo, &duckduckgo_light, -@@ -249,7 +249,7 @@ const PrepopulatedEngine* const engines_DE[] = { - - // Denmark - const PrepopulatedEngine* const engines_DK[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo_dk, - &duckduckgo, &duckduckgo_light, -@@ -258,7 +258,7 @@ const PrepopulatedEngine* const engines_DK[] = { - - // Dominican Republic - const PrepopulatedEngine* const engines_DO[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -267,7 +267,7 @@ const PrepopulatedEngine* const engines_DO[] = { - - // Algeria - const PrepopulatedEngine* const engines_DZ[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &yahoo, - &bing, - &yandex_ru, -@@ -276,7 +276,7 @@ const PrepopulatedEngine* const engines_DZ[] = { - - // Ecuador - const PrepopulatedEngine* const engines_EC[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &ecosia, -@@ -285,7 +285,7 @@ const PrepopulatedEngine* const engines_EC[] = { - - // Estonia - const PrepopulatedEngine* const engines_EE[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yandex_ru, - &yahoo, -@@ -294,7 +294,7 @@ const PrepopulatedEngine* const engines_EE[] = { - - // Egypt - const PrepopulatedEngine* const engines_EG[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &yahoo, - &bing, - &yandex_ru, -@@ -303,7 +303,7 @@ const PrepopulatedEngine* const engines_EG[] = { - - // Spain - const PrepopulatedEngine* const engines_ES[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo_es, - &duckduckgo, &duckduckgo_light, -@@ -312,7 +312,7 @@ const PrepopulatedEngine* const engines_ES[] = { - - // Finland - const PrepopulatedEngine* const engines_FI[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo_fi, - &duckduckgo, &duckduckgo_light, -@@ -321,7 +321,7 @@ const PrepopulatedEngine* const engines_FI[] = { - - // Faroe Islands - const PrepopulatedEngine* const engines_FO[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo_dk, - &duckduckgo, &duckduckgo_light, -@@ -330,7 +330,7 @@ const PrepopulatedEngine* const engines_FO[] = { - - // France - const PrepopulatedEngine* const engines_FR[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo_fr, - &qwant, -@@ -339,7 +339,7 @@ const PrepopulatedEngine* const engines_FR[] = { - - // United Kingdom - const PrepopulatedEngine* const engines_GB[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo_uk, - &duckduckgo, &duckduckgo_light, -@@ -348,7 +348,7 @@ const PrepopulatedEngine* const engines_GB[] = { - - // Greece - const PrepopulatedEngine* const engines_GR[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -357,7 +357,7 @@ const PrepopulatedEngine* const engines_GR[] = { - - // Guatemala - const PrepopulatedEngine* const engines_GT[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &ecosia, -@@ -366,7 +366,7 @@ const PrepopulatedEngine* const engines_GT[] = { - - // Hong Kong - const PrepopulatedEngine* const engines_HK[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &yahoo_hk, - &bing, - &yandex_com, -@@ -375,7 +375,7 @@ const PrepopulatedEngine* const engines_HK[] = { - - // Honduras - const PrepopulatedEngine* const engines_HN[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &yandex_ru, -@@ -384,7 +384,7 @@ const PrepopulatedEngine* const engines_HN[] = { - - // Croatia - const PrepopulatedEngine* const engines_HR[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -393,7 +393,7 @@ const PrepopulatedEngine* const engines_HR[] = { - - // Hungary - const PrepopulatedEngine* const engines_HU[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -402,7 +402,7 @@ const PrepopulatedEngine* const engines_HU[] = { - - // Indonesia - const PrepopulatedEngine* const engines_ID[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &yahoo_id, - &bing, - &duckduckgo, &duckduckgo_light, -@@ -411,7 +411,7 @@ const PrepopulatedEngine* const engines_ID[] = { - - // Ireland - const PrepopulatedEngine* const engines_IE[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -420,7 +420,7 @@ const PrepopulatedEngine* const engines_IE[] = { - - // Israel - const PrepopulatedEngine* const engines_IL[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &yandex_ru, -@@ -429,7 +429,7 @@ const PrepopulatedEngine* const engines_IL[] = { - - // India - const PrepopulatedEngine* const engines_IN[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &yahoo_in, - &bing, - &duckduckgo, &duckduckgo_light, -@@ -438,7 +438,7 @@ const PrepopulatedEngine* const engines_IN[] = { - - // Iraq - const PrepopulatedEngine* const engines_IQ[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &yahoo, - &bing, - &yandex_ru, -@@ -447,7 +447,7 @@ const PrepopulatedEngine* const engines_IQ[] = { - - // Iran - const PrepopulatedEngine* const engines_IR[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &yandex_ru, -@@ -456,7 +456,7 @@ const PrepopulatedEngine* const engines_IR[] = { - - // Iceland - const PrepopulatedEngine* const engines_IS[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &duckduckgo, &duckduckgo_light, - &yahoo, -@@ -465,7 +465,7 @@ const PrepopulatedEngine* const engines_IS[] = { - - // Italy - const PrepopulatedEngine* const engines_IT[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -474,7 +474,7 @@ const PrepopulatedEngine* const engines_IT[] = { - - // Jamaica - const PrepopulatedEngine* const engines_JM[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -483,7 +483,7 @@ const PrepopulatedEngine* const engines_JM[] = { - - // Jordan - const PrepopulatedEngine* const engines_JO[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -492,7 +492,7 @@ const PrepopulatedEngine* const engines_JO[] = { - - // Japan - const PrepopulatedEngine* const engines_JP[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &yahoo_jp, - &bing, - &baidu, -@@ -501,7 +501,7 @@ const PrepopulatedEngine* const engines_JP[] = { - - // Kenya - const PrepopulatedEngine* const engines_KE[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -510,7 +510,7 @@ const PrepopulatedEngine* const engines_KE[] = { - - // South Korea - const PrepopulatedEngine* const engines_KR[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &naver, - &bing, - &daum, -@@ -519,7 +519,7 @@ const PrepopulatedEngine* const engines_KR[] = { - - // Kuwait - const PrepopulatedEngine* const engines_KW[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -528,7 +528,7 @@ const PrepopulatedEngine* const engines_KW[] = { - - // Kazakhstan - const PrepopulatedEngine* const engines_KZ[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &yandex_kz, - &mail_ru, - &bing, -@@ -537,7 +537,7 @@ const PrepopulatedEngine* const engines_KZ[] = { - - // Lebanon - const PrepopulatedEngine* const engines_LB[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -546,7 +546,7 @@ const PrepopulatedEngine* const engines_LB[] = { - - // Liechtenstein - const PrepopulatedEngine* const engines_LI[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &duckduckgo, &duckduckgo_light, - &yahoo, -@@ -555,7 +555,7 @@ const PrepopulatedEngine* const engines_LI[] = { - - // Lithuania - const PrepopulatedEngine* const engines_LT[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &yandex_ru, -@@ -564,7 +564,7 @@ const PrepopulatedEngine* const engines_LT[] = { - - // Luxembourg - const PrepopulatedEngine* const engines_LU[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &duckduckgo, &duckduckgo_light, - &yahoo, -@@ -573,7 +573,7 @@ const PrepopulatedEngine* const engines_LU[] = { - - // Latvia - const PrepopulatedEngine* const engines_LV[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &yandex_ru, - &bing, - &yahoo, -@@ -582,7 +582,7 @@ const PrepopulatedEngine* const engines_LV[] = { - - // Libya - const PrepopulatedEngine* const engines_LY[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &yahoo, - &bing, - &yandex_com, -@@ -591,7 +591,7 @@ const PrepopulatedEngine* const engines_LY[] = { - - // Morocco - const PrepopulatedEngine* const engines_MA[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &yahoo, - &bing, - &duckduckgo, &duckduckgo_light, -@@ -600,7 +600,7 @@ const PrepopulatedEngine* const engines_MA[] = { - - // Monaco - const PrepopulatedEngine* const engines_MC[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &duckduckgo, &duckduckgo_light, - &yahoo, -@@ -609,7 +609,7 @@ const PrepopulatedEngine* const engines_MC[] = { - - // Moldova - const PrepopulatedEngine* const engines_MD[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &yandex_ru, - &mail_ru, - &duckduckgo, &duckduckgo_light, -@@ -618,7 +618,7 @@ const PrepopulatedEngine* const engines_MD[] = { - - // Montenegro - const PrepopulatedEngine* const engines_ME[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &yandex_ru, -@@ -627,7 +627,7 @@ const PrepopulatedEngine* const engines_ME[] = { - - // Macedonia - const PrepopulatedEngine* const engines_MK[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -636,7 +636,7 @@ const PrepopulatedEngine* const engines_MK[] = { - - // Mexico - const PrepopulatedEngine* const engines_MX[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo_mx, - &ecosia, -@@ -645,7 +645,7 @@ const PrepopulatedEngine* const engines_MX[] = { - - // Malaysia - const PrepopulatedEngine* const engines_MY[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo_my, - &duckduckgo, &duckduckgo_light, -@@ -654,7 +654,7 @@ const PrepopulatedEngine* const engines_MY[] = { - - // Nicaragua - const PrepopulatedEngine* const engines_NI[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -664,7 +664,7 @@ const PrepopulatedEngine* const engines_NI[] = { - - // Netherlands - const PrepopulatedEngine* const engines_NL[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo_nl, - &duckduckgo, &duckduckgo_light, -@@ -673,7 +673,7 @@ const PrepopulatedEngine* const engines_NL[] = { - - // Norway - const PrepopulatedEngine* const engines_NO[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -682,7 +682,7 @@ const PrepopulatedEngine* const engines_NO[] = { - - // New Zealand - const PrepopulatedEngine* const engines_NZ[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &duckduckgo, &duckduckgo_light, - &yahoo_nz, -@@ -691,7 +691,7 @@ const PrepopulatedEngine* const engines_NZ[] = { - - // Oman - const PrepopulatedEngine* const engines_OM[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -700,7 +700,7 @@ const PrepopulatedEngine* const engines_OM[] = { - - // Panama - const PrepopulatedEngine* const engines_PA[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -709,7 +709,7 @@ const PrepopulatedEngine* const engines_PA[] = { - - // Peru - const PrepopulatedEngine* const engines_PE[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo_pe, - &ecosia, -@@ -718,7 +718,7 @@ const PrepopulatedEngine* const engines_PE[] = { - - // Philippines - const PrepopulatedEngine* const engines_PH[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &yahoo_ph, - &bing, - &ecosia, -@@ -727,7 +727,7 @@ const PrepopulatedEngine* const engines_PH[] = { - - // Pakistan - const PrepopulatedEngine* const engines_PK[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &yahoo, - &bing, - &duckduckgo, &duckduckgo_light, -@@ -736,7 +736,7 @@ const PrepopulatedEngine* const engines_PK[] = { - - // Poland - const PrepopulatedEngine* const engines_PL[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -745,7 +745,7 @@ const PrepopulatedEngine* const engines_PL[] = { - - // Puerto Rico - const PrepopulatedEngine* const engines_PR[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -754,7 +754,7 @@ const PrepopulatedEngine* const engines_PR[] = { - - // Portugal - const PrepopulatedEngine* const engines_PT[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -763,7 +763,7 @@ const PrepopulatedEngine* const engines_PT[] = { - - // Paraguay - const PrepopulatedEngine* const engines_PY[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -772,7 +772,7 @@ const PrepopulatedEngine* const engines_PY[] = { - - // Qatar - const PrepopulatedEngine* const engines_QA[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -781,7 +781,7 @@ const PrepopulatedEngine* const engines_QA[] = { - - // Romania - const PrepopulatedEngine* const engines_RO[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -790,7 +790,7 @@ const PrepopulatedEngine* const engines_RO[] = { - - // Serbia - const PrepopulatedEngine* const engines_RS[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &yahoo, - &bing, - &duckduckgo, &duckduckgo_light, -@@ -799,7 +799,7 @@ const PrepopulatedEngine* const engines_RS[] = { - - // Russia - const PrepopulatedEngine* const engines_RU[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &yandex_ru, - &mail_ru, - &bing, -@@ -808,7 +808,7 @@ const PrepopulatedEngine* const engines_RU[] = { - - // Rwanda - const PrepopulatedEngine* const engines_RW[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -817,7 +817,7 @@ const PrepopulatedEngine* const engines_RW[] = { - - // Saudi Arabia - const PrepopulatedEngine* const engines_SA[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &yandex_com, -@@ -826,7 +826,7 @@ const PrepopulatedEngine* const engines_SA[] = { - - // Sweden - const PrepopulatedEngine* const engines_SE[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo_se, - &duckduckgo, &duckduckgo_light, -@@ -835,7 +835,7 @@ const PrepopulatedEngine* const engines_SE[] = { - - // Singapore - const PrepopulatedEngine* const engines_SG[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yandex_com, - &yahoo_sg, -@@ -844,7 +844,7 @@ const PrepopulatedEngine* const engines_SG[] = { - - // Slovenia - const PrepopulatedEngine* const engines_SI[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &duckduckgo, &duckduckgo_light, - &yahoo, -@@ -853,7 +853,7 @@ const PrepopulatedEngine* const engines_SI[] = { - - // Slovakia - const PrepopulatedEngine* const engines_SK[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -862,7 +862,7 @@ const PrepopulatedEngine* const engines_SK[] = { - - // El Salvador - const PrepopulatedEngine* const engines_SV[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -871,7 +871,7 @@ const PrepopulatedEngine* const engines_SV[] = { - - // Syria - const PrepopulatedEngine* const engines_SY[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &yandex_ru, -@@ -880,7 +880,7 @@ const PrepopulatedEngine* const engines_SY[] = { - - // Thailand - const PrepopulatedEngine* const engines_TH[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &yahoo_th, - &bing, - &duckduckgo, &duckduckgo_light, -@@ -889,7 +889,7 @@ const PrepopulatedEngine* const engines_TH[] = { - - // Tunisia - const PrepopulatedEngine* const engines_TN[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &yahoo, - &bing, - &yandex_ru, -@@ -898,7 +898,7 @@ const PrepopulatedEngine* const engines_TN[] = { - - // Turkey - const PrepopulatedEngine* const engines_TR[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &yandex_tr, - &yahoo_tr, - &bing, -@@ -907,7 +907,7 @@ const PrepopulatedEngine* const engines_TR[] = { - - // Trinidad and Tobago - const PrepopulatedEngine* const engines_TT[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -916,7 +916,7 @@ const PrepopulatedEngine* const engines_TT[] = { - - // Taiwan - const PrepopulatedEngine* const engines_TW[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &yahoo_tw, - &bing, - &baidu, -@@ -925,7 +925,7 @@ const PrepopulatedEngine* const engines_TW[] = { - - // Tanzania - const PrepopulatedEngine* const engines_TZ[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -934,7 +934,7 @@ const PrepopulatedEngine* const engines_TZ[] = { - - // Ukraine - const PrepopulatedEngine* const engines_UA[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &yandex_ua, - &bing, - &mail_ru, -@@ -943,7 +943,7 @@ const PrepopulatedEngine* const engines_UA[] = { - - // United States - const PrepopulatedEngine* const engines_US[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -952,7 +952,7 @@ const PrepopulatedEngine* const engines_US[] = { - - // Uruguay - const PrepopulatedEngine* const engines_UY[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -961,7 +961,7 @@ const PrepopulatedEngine* const engines_UY[] = { - - // Venezuela - const PrepopulatedEngine* const engines_VE[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &yahoo_ve, - &bing, - &duckduckgo, &duckduckgo_light, -@@ -970,7 +970,7 @@ const PrepopulatedEngine* const engines_VE[] = { - - // Vietnam - const PrepopulatedEngine* const engines_VN[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &coccoc, - &yahoo, - &bing, -@@ -979,7 +979,7 @@ const PrepopulatedEngine* const engines_VN[] = { - - // Yemen - const PrepopulatedEngine* const engines_YE[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &yandex_ru, -@@ -988,7 +988,7 @@ const PrepopulatedEngine* const engines_YE[] = { - - // South Africa - const PrepopulatedEngine* const engines_ZA[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &duckduckgo, &duckduckgo_light, -@@ -997,7 +997,7 @@ const PrepopulatedEngine* const engines_ZA[] = { - - // Zimbabwe - const PrepopulatedEngine* const engines_ZW[] = { -- &googleen, &google, -+ &googleen, &google, &qwant, - &bing, - &yahoo, - &ask, --- -2.17.1 - diff --git a/build/patches/Block-gateway-attacks-via-websockets.patch b/build/patches/Block-gateway-attacks-via-websockets.patch index c2496a34..dc857b74 100644 --- a/build/patches/Block-gateway-attacks-via-websockets.patch +++ b/build/patches/Block-gateway-attacks-via-websockets.patch @@ -13,8 +13,7 @@ Subject: Block gateway attacks via websockets .../websockets/websocket_channel_impl.cc | 5 +++ .../modules/websockets/websocket_common.cc | 27 +++++++++++++++ .../modules/websockets/websocket_common.h | 4 +++ - .../platform/runtime_enabled_features.json5 | 2 +- - 11 files changed, 94 insertions(+), 20 deletions(-) + 10 files changed, 93 insertions(+), 19 deletions(-) diff --git a/services/network/public/cpp/features.cc b/services/network/public/cpp/features.cc --- a/services/network/public/cpp/features.cc @@ -249,18 +248,6 @@ diff --git a/third_party/blink/renderer/modules/websockets/websocket_common.h b/ // The following methods are public for testing. // Returns true if |protocol| is a valid WebSocket subprotocol name. -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 -@@ -385,7 +385,7 @@ - name: "CooperativeScheduling" - }, - { -- name: "CorsRFC1918", -+ name: "CorsRFC1918" - }, - { - name: "CSS3Text", -- 2.17.1 diff --git a/build/patches/Disable-support-for-RAR-files-inspection.patch b/build/patches/Disable-support-for-RAR-files-inspection.patch new file mode 100644 index 00000000..81e97104 --- /dev/null +++ b/build/patches/Disable-support-for-RAR-files-inspection.patch @@ -0,0 +1,96 @@ +From: Michael Gilbert +Date: Wed, 21 Nov 2018 02:37:35 +0000 +Subject: Disable support for RAR files inspection + +--- + .../download_protection/file_analyzer.cc | 2 +- + chrome/common/safe_browsing/BUILD.gn | 33 ------------------- + .../file_util/safe_archive_analyzer.cc | 4 +-- + 3 files changed, 2 insertions(+), 37 deletions(-) + +diff --git a/chrome/browser/safe_browsing/download_protection/file_analyzer.cc b/chrome/browser/safe_browsing/download_protection/file_analyzer.cc +--- a/chrome/browser/safe_browsing/download_protection/file_analyzer.cc ++++ b/chrome/browser/safe_browsing/download_protection/file_analyzer.cc +@@ -87,7 +87,7 @@ void FileAnalyzer::Start(const base::FilePath& target_path, + if (inspection_type == DownloadFileType::ZIP) { + StartExtractZipFeatures(); + } else if (inspection_type == DownloadFileType::RAR) { +- StartExtractRarFeatures(); ++ LOG(WARNING) << "Safebrowser inspection of rar files is disabled in this build"; + #if defined(OS_MACOSX) + } else if (inspection_type == DownloadFileType::DMG) { + StartExtractDmgFeatures(); +diff --git a/chrome/common/safe_browsing/BUILD.gn b/chrome/common/safe_browsing/BUILD.gn +--- a/chrome/common/safe_browsing/BUILD.gn ++++ b/chrome/common/safe_browsing/BUILD.gn +@@ -52,38 +52,6 @@ if (safe_browsing_mode == 1) { + public_deps = [ "//components/safe_browsing/core:csd_proto" ] + } + +- source_set("rar_analyzer") { +- sources = [ +- "rar_analyzer.cc", +- "rar_analyzer.h", +- ] +- +- deps = [ +- ":archive_analyzer_results", +- ":download_type_util", +- "//base", +- "//base:i18n", +- "//components/safe_browsing/core:features", +- "//third_party/unrar:unrar", +- ] +- +- defines = [ +- "_FILE_OFFSET_BITS=64", +- "LARGEFILE_SOURCE", +- "RAR_SMP", +- "SILENT", +- +- # The following is set to disable certain macro definitions in the unrar +- # source code. +- "CHROMIUM_UNRAR", +- +- # Disables exceptions in unrar, replaces them with process termination. +- "UNRAR_NO_EXCEPTIONS", +- ] +- +- public_deps = [ "//components/safe_browsing/core:csd_proto" ] +- } +- + source_set("disk_image_type_sniffer_mac") { + sources = [ + "disk_image_type_sniffer_mac.cc", +@@ -150,7 +118,6 @@ source_set("safe_browsing") { + ":archive_analyzer_results", + ":binary_feature_extractor", + ":download_type_util", +- ":rar_analyzer", + "//components/safe_browsing/core:features", + ] + +diff --git a/chrome/services/file_util/safe_archive_analyzer.cc b/chrome/services/file_util/safe_archive_analyzer.cc +--- a/chrome/services/file_util/safe_archive_analyzer.cc ++++ b/chrome/services/file_util/safe_archive_analyzer.cc +@@ -7,7 +7,6 @@ + #include "base/macros.h" + #include "build/build_config.h" + #include "chrome/common/safe_browsing/archive_analyzer_results.h" +-#include "chrome/common/safe_browsing/rar_analyzer.h" + #include "chrome/common/safe_browsing/zip_analyzer.h" + #include "mojo/public/cpp/bindings/strong_binding.h" + +@@ -48,8 +47,7 @@ void SafeArchiveAnalyzer::AnalyzeRarFile(base::File rar_file, + AnalyzeRarFileCallback callback) { + DCHECK(rar_file.IsValid()); + ++ LOG(FATAL) << "AnalyzeRarFile is disabled in this build"; + safe_browsing::ArchiveAnalyzerResults results; +- safe_browsing::rar_analyzer::AnalyzeRarFile( +- std::move(rar_file), std::move(temporary_file), &results); + std::move(callback).Run(results); + } +-- +2.17.1 + diff --git a/build/patches/Enable-improved-cookie-controls-by-default.patch b/build/patches/Enable-improved-cookie-controls-by-default.patch new file mode 100644 index 00000000..a147c581 --- /dev/null +++ b/build/patches/Enable-improved-cookie-controls-by-default.patch @@ -0,0 +1,32 @@ +From: csagan5 <32685696+csagan5@users.noreply.github.com> +Date: Fri, 7 Aug 2020 13:41:21 +0200 +Subject: Enable improved cookie controls by default + +--- + components/content_settings/core/common/features.cc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/components/content_settings/core/common/features.cc b/components/content_settings/core/common/features.cc +--- a/components/content_settings/core/common/features.cc ++++ b/components/content_settings/core/common/features.cc +@@ -11,7 +11,7 @@ namespace content_settings { + + // Enables an improved UI for third-party cookie blocking in incognito mode. + const base::Feature kImprovedCookieControls{"ImprovedCookieControls", +- base::FEATURE_DISABLED_BY_DEFAULT}; ++ base::FEATURE_ENABLED_BY_DEFAULT}; + + // Default setting for improved cookie controls. + const base::FeatureParam kImprovedCookieControlsDefaultInIncognito{ +@@ -20,5 +20,5 @@ const base::FeatureParam kImprovedCookieControlsDefaultInIncognito{ + // Enables an improved UI for existing third-party cookie blocking users. + const base::Feature kImprovedCookieControlsForThirdPartyCookieBlocking{ + "ImprovedCookieControlsForThirdPartyCookieBlocking", +- base::FEATURE_DISABLED_BY_DEFAULT}; +-} +\ No newline at end of file ++ base::FEATURE_ENABLED_BY_DEFAULT}; ++} +-- +2.17.1 + diff --git a/build/patches/Session-only-cookies-support.patch b/build/patches/Session-only-cookies-support.patch new file mode 100644 index 00000000..821fad67 --- /dev/null +++ b/build/patches/Session-only-cookies-support.patch @@ -0,0 +1,708 @@ +From: uazo +Date: Thu, 6 Aug 2020 14:02:57 +0000 +Subject: Session-only cookies support + +--- + base/android/application_status_listener.cc | 1 + + base/android/application_status_listener.h | 3 +- + .../org/chromium/base/ApplicationStatus.java | 4 ++ + .../chrome/browser/ApplicationLifetime.java | 3 ++ + .../availability/availability_prober.cc | 1 + + .../four_state_cookie_settings_preference.xml | 7 ++++ + .../ContentSettingsResources.java | 9 +++++ + .../FourStateCookieSettingsPreference.java | 17 +++++++- + .../site_settings/SingleCategorySettings.java | 30 ++++++++++++++ + .../site_settings/SingleWebsiteSettings.java | 40 ++++++++++++++----- + .../site_settings/SiteSettings.java | 9 +++++ + .../strings/android/site_settings.grdp | 8 +++- + .../translations/browser_ui_strings_it.xtb | 2 + + .../core/browser/content_settings_registry.cc | 0 + .../scheduler/responsiveness/calculator.cc | 1 + + .../base/application_state_mojom_traits.cc | 7 +++- + .../public/mojom/base/application_state.mojom | 1 + + services/network/cookie_manager.cc | 14 +++++++ + services/network/cookie_manager.h | 3 ++ + services/network/network_context.cc | 17 ++++++++ + .../network/public/mojom/cookie_manager.mojom | 3 ++ + .../network/session_cleanup_cookie_store.cc | 39 ++++++++++++++++++ + .../network/session_cleanup_cookie_store.h | 9 +++++ + 23 files changed, 212 insertions(+), 16 deletions(-) + mode change 100644 => 100755 base/android/application_status_listener.cc + mode change 100644 => 100755 base/android/application_status_listener.h + mode change 100644 => 100755 base/android/java/src/org/chromium/base/ApplicationStatus.java + mode change 100644 => 100755 chrome/android/java/src/org/chromium/chrome/browser/ApplicationLifetime.java + mode change 100644 => 100755 chrome/browser/availability/availability_prober.cc + mode change 100644 => 100755 components/browser_ui/site_settings/android/java/res/layout/four_state_cookie_settings_preference.xml + mode change 100644 => 100755 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java + mode change 100644 => 100755 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/FourStateCookieSettingsPreference.java + mode change 100644 => 100755 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java + mode change 100644 => 100755 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java + mode change 100644 => 100755 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java + mode change 100644 => 100755 components/browser_ui/strings/android/site_settings.grdp + mode change 100644 => 100755 components/browser_ui/strings/android/translations/browser_ui_strings_it.xtb + mode change 100644 => 100755 components/content_settings/core/browser/content_settings_registry.cc + mode change 100644 => 100755 content/browser/scheduler/responsiveness/calculator.cc + mode change 100644 => 100755 mojo/public/cpp/base/application_state_mojom_traits.cc + mode change 100644 => 100755 mojo/public/mojom/base/application_state.mojom + mode change 100644 => 100755 services/network/cookie_manager.cc + mode change 100644 => 100755 services/network/cookie_manager.h + mode change 100644 => 100755 services/network/network_context.cc + mode change 100644 => 100755 services/network/public/mojom/cookie_manager.mojom + mode change 100644 => 100755 services/network/session_cleanup_cookie_store.cc + mode change 100644 => 100755 services/network/session_cleanup_cookie_store.h + +diff --git a/base/android/application_status_listener.cc b/base/android/application_status_listener.cc +old mode 100644 +new mode 100755 +--- a/base/android/application_status_listener.cc ++++ b/base/android/application_status_listener.cc +@@ -84,6 +84,7 @@ void ApplicationStatusListener::NotifyApplicationStateChange( + switch (state) { + case APPLICATION_STATE_UNKNOWN: + case APPLICATION_STATE_HAS_DESTROYED_ACTIVITIES: ++ case APPLICATION_STATE_EXITING: + break; + case APPLICATION_STATE_HAS_RUNNING_ACTIVITIES: + RecordAction(UserMetricsAction("Android.LifeCycle.HasRunningActivities")); +diff --git a/base/android/application_status_listener.h b/base/android/application_status_listener.h +old mode 100644 +new mode 100755 +--- a/base/android/application_status_listener.h ++++ b/base/android/application_status_listener.h +@@ -30,7 +30,8 @@ enum ApplicationState { + APPLICATION_STATE_HAS_RUNNING_ACTIVITIES = 1, + APPLICATION_STATE_HAS_PAUSED_ACTIVITIES = 2, + APPLICATION_STATE_HAS_STOPPED_ACTIVITIES = 3, +- APPLICATION_STATE_HAS_DESTROYED_ACTIVITIES = 4 ++ APPLICATION_STATE_HAS_DESTROYED_ACTIVITIES = 4, ++ APPLICATION_STATE_EXITING = 5 + }; + + // A native helper class to listen to state changes of the Android +diff --git a/base/android/java/src/org/chromium/base/ApplicationStatus.java b/base/android/java/src/org/chromium/base/ApplicationStatus.java +old mode 100644 +new mode 100755 +--- a/base/android/java/src/org/chromium/base/ApplicationStatus.java ++++ b/base/android/java/src/org/chromium/base/ApplicationStatus.java +@@ -661,6 +661,10 @@ public class ApplicationStatus { + return ApplicationState.HAS_DESTROYED_ACTIVITIES; + } + ++ public static void sendOnApplicationStateChange(int newState) { ++ ApplicationStatusJni.get().onApplicationStateChange(newState); ++ } ++ + @NativeMethods + interface Natives { + // Called to notify the native side of state changes. +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ApplicationLifetime.java b/chrome/android/java/src/org/chromium/chrome/browser/ApplicationLifetime.java +old mode 100644 +new mode 100755 +--- a/chrome/android/java/src/org/chromium/chrome/browser/ApplicationLifetime.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/ApplicationLifetime.java +@@ -6,6 +6,7 @@ package org.chromium.chrome.browser; + + import org.chromium.base.ObserverList; + import org.chromium.base.annotations.CalledByNative; ++import org.chromium.base.ApplicationStatus; + + /** + * Watches for when Chrome is told to restart itself. +@@ -42,6 +43,8 @@ public class ApplicationLifetime { + + @CalledByNative + public static void terminate(boolean restart) { ++ ApplicationStatus.sendOnApplicationStateChange(org.chromium.mojo_base.mojom.ApplicationState.APPLICATION_STATE_EXITING); ++ + for (Observer observer : sObservers) { + observer.onTerminate(restart); + } +diff --git a/chrome/browser/availability/availability_prober.cc b/chrome/browser/availability/availability_prober.cc +old mode 100644 +new mode 100755 +--- a/chrome/browser/availability/availability_prober.cc ++++ b/chrome/browser/availability/availability_prober.cc +@@ -205,6 +205,7 @@ bool IsInForeground(base::android::ApplicationState state) { + case base::android::APPLICATION_STATE_HAS_PAUSED_ACTIVITIES: + case base::android::APPLICATION_STATE_HAS_STOPPED_ACTIVITIES: + case base::android::APPLICATION_STATE_HAS_DESTROYED_ACTIVITIES: ++ case base::android::APPLICATION_STATE_EXITING: + return false; + } + } +diff --git a/components/browser_ui/site_settings/android/java/res/layout/four_state_cookie_settings_preference.xml b/components/browser_ui/site_settings/android/java/res/layout/four_state_cookie_settings_preference.xml +old mode 100644 +new mode 100755 +--- a/components/browser_ui/site_settings/android/java/res/layout/four_state_cookie_settings_preference.xml ++++ b/components/browser_ui/site_settings/android/java/res/layout/four_state_cookie_settings_preference.xml +@@ -39,6 +39,13 @@ + app:primaryText="@string/website_settings_category_cookie_block_third_party_title" + app:descriptionText="@string/website_settings_category_cookie_block_third_party_addition" /> + ++ ++ + + +- ++ ++ Session-only cookies ++ ++ ++ Cookies are availables only until the browser is closed. Third-party cookies will be blocked. ++ + ++ + + Allow sites to run JavaScript (recommended) + +diff --git a/components/browser_ui/strings/android/translations/browser_ui_strings_it.xtb b/components/browser_ui/strings/android/translations/browser_ui_strings_it.xtb +old mode 100644 +new mode 100755 +--- a/components/browser_ui/strings/android/translations/browser_ui_strings_it.xtb ++++ b/components/browser_ui/strings/android/translations/browser_ui_strings_it.xtb +@@ -238,4 +238,6 @@ + Gestito dai genitori + Accesso al microfono + Blocca se il sito mostra annunci invasivi o fuorvianti (consigliato) ++Solo cookies di sessione ++Mantieni i cookies per la sessione corrente. + +\ No newline at end of file +diff --git a/components/content_settings/core/browser/content_settings_registry.cc b/components/content_settings/core/browser/content_settings_registry.cc +old mode 100644 +new mode 100755 +diff --git a/content/browser/scheduler/responsiveness/calculator.cc b/content/browser/scheduler/responsiveness/calculator.cc +old mode 100644 +new mode 100755 +--- a/content/browser/scheduler/responsiveness/calculator.cc ++++ b/content/browser/scheduler/responsiveness/calculator.cc +@@ -331,6 +331,7 @@ void Calculator::OnApplicationStateChanged( + is_application_visible_ = false; + break; + case base::android::APPLICATION_STATE_UNKNOWN: ++ case base::android::APPLICATION_STATE_EXITING: + break; // Keep in previous state. + } + } +diff --git a/mojo/public/cpp/base/application_state_mojom_traits.cc b/mojo/public/cpp/base/application_state_mojom_traits.cc +old mode 100644 +new mode 100755 +--- a/mojo/public/cpp/base/application_state_mojom_traits.cc ++++ b/mojo/public/cpp/base/application_state_mojom_traits.cc +@@ -22,6 +22,8 @@ mojo_base::mojom::ApplicationState EnumTraits< + return mojo_base::mojom::ApplicationState::HAS_STOPPED_ACTIVITIES; + case base::android::APPLICATION_STATE_HAS_DESTROYED_ACTIVITIES: + return mojo_base::mojom::ApplicationState::HAS_DESTROYED_ACTIVITIES; ++ case base::android::APPLICATION_STATE_EXITING: ++ return mojo_base::mojom::ApplicationState::APPLICATION_STATE_EXITING; + } + NOTREACHED(); + return mojo_base::mojom::ApplicationState::UNKNOWN; +@@ -52,7 +54,10 @@ bool EnumTraitsSetCookieAccessDelegate( + std::make_unique(cookie_access_delegate_type, + &cookie_settings_)); ++ if(session_cleanup_cookie_store_) { ++ session_cleanup_cookie_store_->SetDefaultDeleteCookiePredicate( ++ cookie_settings_.CreateDeleteCookieOnExitPredicate()); ++ } + } + + CookieManager::~CookieManager() { +@@ -73,6 +77,16 @@ CookieManager::~CookieManager() { + cookie_store_->SetCookieAccessDelegate(nullptr); + } + ++void CookieManager::DeleteSessionCookies() ++{ ++ // anonymous profile doesn't have a session_cleanup_cookie_store ++ if (session_cleanup_cookie_store_) { ++ session_cleanup_cookie_store_->DeleteSessionCookies( ++ cookie_settings_.CreateDeleteCookieOnExitPredicate()); ++ } ++} ++ ++ + void CookieManager::AddReceiver( + mojo::PendingReceiver receiver) { + receivers_.Add(this, std::move(receiver)); +diff --git a/services/network/cookie_manager.h b/services/network/cookie_manager.h +old mode 100644 +new mode 100755 +--- a/services/network/cookie_manager.h ++++ b/services/network/cookie_manager.h +@@ -101,6 +101,9 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) CookieManager + // Causes the next call to GetCookieList to crash the process. + static void CrashOnGetCookieList(); + ++ // launch session_cleanup_cookie_store_() ++ void DeleteSessionCookies() override; ++ + private: + // State associated with a CookieChangeListener. + struct ListenerRegistration { +diff --git a/services/network/network_context.cc b/services/network/network_context.cc +old mode 100644 +new mode 100755 +--- a/services/network/network_context.cc ++++ b/services/network/network_context.cc +@@ -289,12 +289,23 @@ class NetworkContextApplicationStatusListener + } + + void Notify(base::android::ApplicationState state) override { ++ if(cookie_manager_) { ++ if(state == base::android::APPLICATION_STATE_EXITING) { ++ cookie_manager_->DeleteSessionCookies(); ++ } ++ } ++ + if (callback_) + callback_.Run(state); + } + ++ void SetCookieManager(CookieManager* cookie_manager) { ++ cookie_manager_ = cookie_manager; ++ } ++ + private: + ApplicationStateChangeCallback callback_; ++ CookieManager* cookie_manager_; + }; + #endif + +@@ -2106,6 +2117,12 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() { + std::move(session_cleanup_cookie_store), + std::move(params_->cookie_manager_params)); + ++#if defined(OS_ANDROID) ++ ++ (static_cast(app_status_listener_.get()))->SetCookieManager(cookie_manager_.get()); ++ ++#endif ++ + if (cert_net_fetcher_) + cert_net_fetcher_->SetURLRequestContext(result.url_request_context.get()); + +diff --git a/services/network/public/mojom/cookie_manager.mojom b/services/network/public/mojom/cookie_manager.mojom +old mode 100644 +new mode 100755 +--- a/services/network/public/mojom/cookie_manager.mojom ++++ b/services/network/public/mojom/cookie_manager.mojom +@@ -361,4 +361,7 @@ interface CookieManager { + // the caller with a callback when settings have been updated. + SetStorageAccessGrantSettings( + array settings) => (); ++ ++ // launch session_cleanup_cookie_store_() ++ DeleteSessionCookies(); + }; +diff --git a/services/network/session_cleanup_cookie_store.cc b/services/network/session_cleanup_cookie_store.cc +old mode 100644 +new mode 100755 +--- a/services/network/session_cleanup_cookie_store.cc ++++ b/services/network/session_cleanup_cookie_store.cc +@@ -49,6 +49,11 @@ SessionCleanupCookieStore::~SessionCleanupCookieStore() { + "SessionCleanupCookieStore"); + } + ++void SessionCleanupCookieStore::SetDefaultDeleteCookiePredicate(DeleteCookiePredicate delete_cookie_predicate) ++{ ++ delete_cookie_predicate_ = delete_cookie_predicate; ++} ++ + void SessionCleanupCookieStore::DeleteSessionCookies( + DeleteCookiePredicate delete_cookie_predicate) { + using CookieOrigin = net::SQLitePersistentCookieStore::CookieOrigin; +@@ -137,6 +142,40 @@ void SessionCleanupCookieStore::OnLoad( + ++cookies_per_origin_[origin]; + } + ++#if defined(OS_ANDROID) ++ // In android delete session cookies is never called because it's in dtor(), launch now at restart ++ using CookieOrigin = net::SQLitePersistentCookieStore::CookieOrigin; ++ if (!force_keep_session_state_ && delete_cookie_predicate_) ++ { ++ std::list session_only_cookies; ++ ++ auto cookies_filtered = ++ std::remove_if( ++ cookies.begin(), ++ cookies.end(), ++ [this,&session_only_cookies](const auto& entry) { ++ bool mustRemoved = false; ++ CookieOrigin origin(entry->Domain(), entry->IsSecure()); ++ if(cookies_per_origin_cleared_[origin] == false) ++ { ++ mustRemoved = delete_cookie_predicate_.Run(origin.first, origin.second); ++ } ++ if( mustRemoved ) session_only_cookies.push_back(origin); ++ return mustRemoved; ++ }); ++ ++ cookies.erase(cookies_filtered, cookies.end()); ++ ++ // We need to remove session by origin once ++ for (const auto& cookie : cookies) { ++ CookieOrigin origin(cookie->Domain(), cookie->IsSecure()); ++ cookies_per_origin_cleared_[origin] = true; ++ } ++ ++ persistent_store_->DeleteAllInList(session_only_cookies); ++ } ++#endif ++ + std::move(loaded_callback).Run(std::move(cookies)); + } + +diff --git a/services/network/session_cleanup_cookie_store.h b/services/network/session_cleanup_cookie_store.h +old mode 100644 +new mode 100755 +--- a/services/network/session_cleanup_cookie_store.h ++++ b/services/network/session_cleanup_cookie_store.h +@@ -59,6 +59,11 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) SessionCleanupCookieStore + // |delete_cookie_predicate| returns true for. + void DeleteSessionCookies(DeleteCookiePredicate delete_cookie_predicate); + ++ // Used on android to force deletion of session cookies ++ using CookiesPerOriginClearedMap = ++ std::map; ++ void SetDefaultDeleteCookiePredicate(DeleteCookiePredicate delete_cookie_predicate); ++ + protected: + ~SessionCleanupCookieStore() override; + +@@ -80,6 +85,10 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) SessionCleanupCookieStore + + net::NetLogWithSource net_log_; + ++ // Used on android to force deletion of session cookies ++ DeleteCookiePredicate delete_cookie_predicate_; ++ CookiesPerOriginClearedMap cookies_per_origin_cleared_; ++ + DISALLOW_COPY_AND_ASSIGN(SessionCleanupCookieStore); + }; + +-- +2.17.1 + diff --git a/build/patches/Update-i18n-zh_CN-support.patch b/build/patches/Update-i18n-zh_CN-support.patch index e8dad8c4..ee413709 100644 --- a/build/patches/Update-i18n-zh_CN-support.patch +++ b/build/patches/Update-i18n-zh_CN-support.patch @@ -1,24 +1,12 @@ From: mars -Date: Wed, 13 May 2020 11:28:04 +0800 +Date: Sun, 2 Aug 2020 00:37:49 +0800 Subject: Update i18n zh_CN support --- - .../app/resources/chromium_strings_zh-CN.xtb | 3 ++- - .../resources/generated_resources_zh-CN.xtb | 6 +++++- - .../android_chrome_strings_zh-CN.xtb | 18 ++++++++++++++++++ - 3 files changed, 25 insertions(+), 2 deletions(-) + .../resources/generated_resources_zh-CN.xtb | 6 +++++- + .../android_chrome_strings_zh-CN.xtb | 19 +++++++++++++++++++ + 2 files changed, 24 insertions(+), 1 deletion(-) -diff --git a/chrome/app/resources/chromium_strings_zh-CN.xtb b/chrome/app/resources/chromium_strings_zh-CN.xtb ---- a/chrome/app/resources/chromium_strings_zh-CN.xtb -+++ b/chrome/app/resources/chromium_strings_zh-CN.xtb -@@ -245,4 +245,5 @@ Chromium 无法恢复您的设置。 - Chromium 可能无法正常运行,因为它不再支持 Windows XP 和 Windows Vista - 要求您必须先阅读并接受以下服务条款,才能使用此设备。这些条款不会扩大、修改或限制 Chromium 操作系统条款。 - The Chromium Authors -- -\ No newline at end of file -+关于 Bromite -+ diff --git a/chrome/app/resources/generated_resources_zh-CN.xtb b/chrome/app/resources/generated_resources_zh-CN.xtb --- a/chrome/app/resources/generated_resources_zh-CN.xtb +++ b/chrome/app/resources/generated_resources_zh-CN.xtb @@ -36,10 +24,11 @@ diff --git a/chrome/app/resources/generated_resources_zh-CN.xtb b/chrome/app/res diff --git a/chrome/browser/ui/android/strings/translations/android_chrome_strings_zh-CN.xtb b/chrome/browser/ui/android/strings/translations/android_chrome_strings_zh-CN.xtb --- a/chrome/browser/ui/android/strings/translations/android_chrome_strings_zh-CN.xtb +++ b/chrome/browser/ui/android/strings/translations/android_chrome_strings_zh-CN.xtb -@@ -1011,4 +1011,22 @@ +@@ -1011,4 +1011,23 @@ 当您在地址栏中输入查询内容时,使用联想查询服务显示相关查询和热门网站 正在同步到 Google 活动控件 ++查看源代码 +关于 Bromite +退出 +保留 Cookies 直到您退出浏览器