Compare commits

...
792 Commits
Author SHA1 Message Date
Carmelo Messina 30d36db905 fix rust toolchain builder 2023-07-18 07:39:10 +02:00
Carmelo Messina 2601837536 bump to 115.0.5790.98 2023-07-17 21:07:31 +02:00
Carmelo Messina 428f940628 add some new patches 2023-07-17 21:05:04 +02:00
Carmelo Messina 93eb582382 set constant available disk space 2023-07-17 21:03:15 +02:00
Carmelo Messina 97dc0a8abb Disable LiveCaption 2023-07-17 21:00:11 +02:00
Carmelo Messina 491d63aee0 Disable Google Search Side Panel and Automatic https Upgrade 2023-07-17 20:58:53 +02:00
Carmelo Messina 5d3d5c996b add more log 2023-07-16 10:14:58 +02:00
Carmelo Messina 5d21277420 bypass cloudflare turnstile 2023-07-16 10:13:25 +02:00
Carmelo Messina 87fc4b5732 exclusion of vr services from the build 2023-07-16 10:03:14 +02:00
Carmelo Messina 38ebd3c85a v115 fix windows build 2023-07-16 09:59:35 +02:00
Carmelo Messina 5f0a60b101 v115 patches (line changes) 2023-07-14 12:08:22 +02:00
Carmelo Messina 6c63c83772 remove 00TEMP-Enable-MojoDirectSharedMemoryAndroid.patch 2023-07-14 12:07:43 +02:00
Carmelo Messina d86b4a9fcf v115 modified patches 2023-07-14 12:06:57 +02:00
Carmelo Messina 3468034653 v115 to be checked 2023-07-14 11:15:59 +02:00
Carmelo Messina 89844e66bc v115 patches 2023-07-14 11:15:04 +02:00
Carmelo Messina af55aa0ddf removed support for header and csp filter option
removed support for json-override, simulate-event-poc, simulate-mouse-event snippets
2023-07-10 19:07:20 +02:00
uazoandGitHub 56b0279548 adapt other patches
mainly touched about_flags.cc
2023-07-09 03:08:44 -11:00
uazoandGitHub 662a811600 AUTOMATED - git apply results 2023-07-09 14:06:16 +00:00
Carmelo Messina d28281d48e update patches list 2023-07-09 16:00:16 +02:00
Carmelo Messina 33623cd26f Log dangling attributes in some html elements 2023-07-09 15:59:03 +02:00
Carmelo Messina 41f20e3e4f enable flag for windows 2023-07-09 15:56:11 +02:00
Carmelo Messina 1a2cb88ecf fix timezone site setting in android 2023-07-09 15:55:46 +02:00
Carmelo Messina 2c881d5103 remove duplicate images setting in pageui (only windows) 2023-07-09 15:53:13 +02:00
Carmelo Messina a0874d0585 Fix site setting not working 2023-07-09 15:52:17 +02:00
Carmelo Messina 5ffb665f31 Eyeo Adblock for Bromite final version 2023-07-09 15:51:35 +02:00
Carmelo Messina 268fc830e0 remove 00Remove-dangling-attributes-in-some-html-elements.patch 2023-07-03 15:56:37 +02:00
Carmelo Messina f5e495c357 Remove support for device memory and cpu recovery 2023-07-02 14:31:59 +02:00
Carmelo Messina ed0f446957 remove unnecessary code 2023-07-02 14:29:37 +02:00
Carmelo Messina a53fbacb50 fix crash in recent tabs
added some log
2023-07-02 14:29:04 +02:00
Carmelo Messina 27d84f84c1 remove securitypolicyviolation event 2023-07-02 14:27:51 +02:00
Carmelo Messina a31cbcdea8 fix crash in blink 2023-07-02 14:26:18 +02:00
Carmelo Messina 3f5f8054fb added log in calls without TrafficAnnotationTag 2023-07-02 14:25:35 +02:00
uazoandGitHub e98862df61 autorebase for 114.0.5735.199
bump to 114.0.5735.199
2023-06-27 05:10:07 -02:00
uazoandGitHub a45043a4f4 AUTOMATED - git apply results 2023-06-27 07:01:57 +00:00
Carmelo Messina e6055a94eb bump to 114.0.5735.199 2023-06-27 08:57:15 +02:00
Carmelo Messina 4c5f4ee402 fix deps 2023-06-21 19:17:27 +02:00
Carmelo Messina df8927d940 no changes (removed context of content setting patches) 2023-06-21 15:45:01 +02:00
Carmelo Messina a0cfe08ebd removed the need of header in rules
allowed the use of urls with parameters in subscriptions
added some log
merged windows patch
2023-06-21 15:44:15 +02:00
Carmelo Messina bc2dc716c4 fixed the correct parameter reading 2023-06-21 15:42:03 +02:00
Carmelo Messina 3412a241f3 Disable kFedCmIdpSigninStatusMetricsOnlyFieldTrialParamName enabled by default 2023-06-21 15:38:40 +02:00
Carmelo Messina 9027043301 increased rule size limit to 50mb 2023-06-21 15:37:28 +02:00
uazoandGitHub fe6975dfbf Merge pull request #59 from uazo/refactoring-site-settings-patches
Refactoring site settings patches
2023-06-21 08:38:30 -04:00
Carmelo Messina ab5e89c104 final version 2023-06-20 12:33:44 +02:00
Carmelo Messina 617ea58d20 stage 2 - windows version 2023-06-17 16:28:04 +02:00
Carmelo Messina 829aacfc96 stage 1 - android version 2023-06-14 09:02:52 +02:00
uazoandGitHub 65e8efafc3 Merge pull request #58 from uazo/create-pull-request/patch-5a3e5b2
Git apply result for next-v114 branch
2023-06-14 12:37:17 +06:00
uazoandGitHub bdfc75898a AUTOMATED - git apply results 2023-06-14 06:32:00 +00:00
Carmelo Messina 5a3e5b2afa bump to 114.0.5735.134 2023-06-14 08:25:18 +02:00
Carmelo Messina 89d2baeaef bump to 114.0.5735.110 2023-06-06 10:23:36 +02:00
uazoandGitHub bd3484a28a Merge pull request #57 from uazo/create-pull-request/patch-42e145b
Git apply result for next-v114 branch
2023-06-05 13:08:29 -06:00
uazoandGitHub 04fde34836 AUTOMATED - git apply results 2023-06-05 19:08:01 +00:00
Carmelo Messina 42e145b55a no changes, lines changed 2023-06-05 20:59:28 +02:00
Carmelo Messina c3656ee5ea update patch list 2023-06-05 20:52:55 +02:00
Carmelo Messina c49608ad0d Remove WebAuthFlowInBrowserTab and google javascript api
Merge windows patch
2023-06-05 20:52:25 +02:00
Carmelo Messina ff8be91d6a Remove unhelpful log 2023-06-05 20:50:56 +02:00
Carmelo Messina 679f321098 Remove unhelpful log 2023-06-05 20:49:36 +02:00
Carmelo Messina ffb6d94fcc Fix crash with list tab switcher 2023-06-05 20:48:48 +02:00
Carmelo Messina cccc426c8a Remove another method 2023-06-05 20:47:58 +02:00
Carmelo Messina d625bc358c Fix crash in mediarouter 2023-06-05 20:47:21 +02:00
Carmelo Messina b6a43c84fd Disable Attribution Reporting cross app and web APIs 2023-06-05 20:46:49 +02:00
Carmelo Messina 09340325a7 use enable_supervised_users gn flag 2023-06-05 20:45:59 +02:00
Carmelo Messina 04595ae433 Disable search for image 2023-06-05 20:45:19 +02:00
Carmelo Messina e05b2d0b8d Enable MojoDirectSharedMemoryAndroid
Temporary, until final activation from upstream
2023-06-05 20:44:45 +02:00
Carmelo Messina 27d239dfb1 Remove dangling attributes in some html elements 2023-06-05 20:43:56 +02:00
Carmelo Messina a055136253 Add some log for troubleshooting
Remove unhelpful log
Fix "Identifier 'textToRegExp' has already been declared"
2023-06-05 20:39:50 +02:00
Carmelo Messina a5c025c14c Disallowing MIDI permission by default 2023-06-05 20:36:20 +02:00
Carmelo Messina 6ef3fec596 Disallow Android App Scheme as referrer 2023-06-05 20:35:57 +02:00
Carmelo Messina 556d740915 Remove Phishing Protection android receiver 2023-06-05 20:35:30 +02:00
Carmelo Messina 6c8d08d43f Disable Compression Dictionary Transport 2023-06-05 20:33:56 +02:00
Carmelo Messina 2b71e75c7c Add Deprecate Data URL in SVGUseElement 2023-06-05 20:33:24 +02:00
Carmelo Messina 3da2c931df bump to 114.0.5735.91 2023-05-31 09:03:57 +02:00
Carmelo Messina 3a67eb813d fix nodebug build 2023-05-31 09:00:30 +02:00
uazoandGitHub eb3328a3a7 Merge pull request #56 from uazo/create-pull-request/patch-731b314
Git apply result for next-v114 branch
2023-05-30 11:36:40 -07:00
uazoandGitHub 0f6577b9e0 AUTOMATED - git apply results 2023-05-30 18:35:38 +00:00
Carmelo Messina 731b314e82 patches for 114 2023-05-30 20:27:35 +02:00
Carmelo Messina deb791bec6 changes for 114 2023-05-30 20:26:46 +02:00
Carmelo Messina b163e04aae bump to 114.0.5735.53 2023-05-27 18:04:33 +02:00
Carmelo Messina 5439366a19 v114 to be checked 2023-05-27 18:03:53 +02:00
Carmelo Messina e1b355f3e2 patches for 114 2023-05-27 18:02:36 +02:00
uazoandGitHub 6d1a7b2fd9 automatic rebase to 113.0.5672.127
automatic rebase to 113.0.5672.127
2023-05-19 17:17:58 +04:00
uazoandGitHub a5076e8c62 AUTOMATED - git apply results 2023-05-19 13:15:52 +00:00
Carmelo Messina bf279e2d6a bump to 113.0.5672.127 2023-05-19 15:08:31 +02:00
Carmelo Messina 08f1c3b2eb no changes 2023-05-19 15:07:42 +02:00
Carmelo Messina 94765e67ae add new patches 2023-05-19 15:06:57 +02:00
Carmelo Messina f84415acb5 default as direct mode in the proxy settings 2023-05-19 15:05:26 +02:00
Carmelo Messina 58909944b8 activate renderer_initiated_download, service_worker_navigation_preload, proxy_config_settings, proxy_config_system 2023-05-19 15:03:24 +02:00
Carmelo Messina 6d194a1adc deativate kDocumentReporting and kReporting
in anticipation of the simplification of the patch
2023-05-19 15:02:42 +02:00
Carmelo Messina e25c2cd1b5 disable kOmniboxTriggerForPrerender2, kSupportSearchSuggestionForPrerender2 and PrerenderFallbackToPreconnect 2023-05-19 15:01:39 +02:00
Carmelo Messina 9a2c6b1f1e disable use of nanoseconds in events 2023-05-19 15:00:57 +02:00
Carmelo Messina 2b9685e75f enable EncryptedClientHelloQuic by default 2023-05-19 14:58:45 +02:00
Carmelo Messina f75f243f20 removed unnecessary logs 2023-05-19 14:58:15 +02:00
Carmelo Messina d646c43534 disable support for Windows domains 2023-05-19 14:56:29 +02:00
Carmelo Messina 1dd1741d2e git apply for 113.0.5672.93 2023-05-10 10:14:14 +02:00
uazoandGitHub 486766afc9 bump to 113.0.5672.93 2023-05-08 23:36:57 -08:00
uazoandGitHub 151e6e4d5f remove safe_browsing_mode=0 from gn args 2023-05-08 11:36:03 +05:00
uazoandGitHub 762b01a09e Merge pull request #53 from uazo/create-pull-request/patch-a79774b
Git apply result for next-v113 branch
2023-05-07 20:48:55 +05:00
uazoandGitHub 70bfd05dad AUTOMATED - git apply results 2023-05-07 15:40:23 +00:00
Carmelo Messina a79774b0d7 update bromite_patches_list 2023-05-07 17:35:31 +02:00
Carmelo Messina 41678f3962 Disable GetInstalledRelatedApps API 2023-05-07 17:34:55 +02:00
Carmelo Messina 497aa34c72 WIN Disable first run 2023-05-07 17:34:36 +02:00
Carmelo Messina 42cfaa7886 WIN Disable updater 2023-05-07 17:34:24 +02:00
Carmelo Messina 9b958070ec Disable shopping list 2023-05-07 17:33:22 +02:00
Carmelo Messina 98b4646953 merge code from disable safe browsing 2023-05-07 17:33:01 +02:00
Carmelo Messina 41d8cdfe2d simplify Disable FLoC and privacy sandbox 2023-05-07 17:30:17 +02:00
Carmelo Messina 98c09be8d8 replace Disable crash reporting 2023-05-07 17:29:29 +02:00
Carmelo Messina 90f1af46f3 Replace Disable all promo dialogs 2023-05-07 17:28:19 +02:00
Carmelo Messina 19f44ece97 replace Disable GSA by default 2023-05-07 17:27:07 +02:00
Carmelo Messina 1d1f5e3ec7 fix incorrect code deletions 2023-05-07 17:25:32 +02:00
Carmelo Messina f863060176 no changes 2023-05-07 17:24:25 +02:00
Carmelo Messina 6383e88bf6 Remove Disable-safe-browsing, Remove-signin-and-sync-integrations, Remove-contextual-search-manager, Remove-price-shopping-commerce-integrations 2023-05-07 17:00:39 +02:00
Carmelo Messina 6ebd45fa3f fix adblock plus crash 2023-05-02 17:52:36 +02:00
uazoandGitHub 049b22f404 Merge pull request #51 from uazo/create-pull-request/patch-7b743af
Git apply result for next-v113 branch
2023-05-01 13:11:02 +00:00
uazoandGitHub d351676de6 AUTOMATED - git apply results 2023-05-01 13:07:29 +00:00
Carmelo Messina 7b743aff9b bump to 113.0.5672.63 2023-05-01 15:02:28 +02:00
Carmelo Messina b51a3c2ca8 Enable internal firewall by default 2023-05-01 15:01:21 +02:00
Carmelo Messina 8f50b49f6f v113 final patch 2023-05-01 14:53:56 +02:00
Carmelo Messina 02c7369665 bump to 113.0.5672.53 2023-04-27 15:17:59 +02:00
Carmelo Messina 5055faface v113 to be checked 2023-04-27 15:17:21 +02:00
Carmelo Messina e7eecdca5e patches for 113 2023-04-27 15:16:45 +02:00
Carmelo Messina e6259a8ffb Added patch:
00Multi-Screen-Window-Placement-API-fix.patch
 00Disable-speechSynthesis-getVoices-API.patch
 00Remove-https-connection-from-chrome-discards.patch
 00Add-a-flag-to-disable-GamePad-API.patch
2023-04-21 15:34:09 +02:00
Carmelo Messina 46b71bf509 revert default allow in windows 2023-04-21 15:21:37 +02:00
Carmelo Messina 89427c73fb opens the context menu even with images 2023-04-19 15:57:29 +02:00
uazoandGitHub 6dacb343fe Merge pull request #50 from uazo/create-pull-request/patch-0ef3b2a
Git apply result for next-v112 branch
2023-04-19 09:00:27 -02:00
uazoandGitHub 5820cd9fd5 AUTOMATED - git apply results 2023-04-19 10:55:10 +00:00
Carmelo Messina 0ef3b2ad88 bump to 112.0.5615.138 2023-04-19 12:50:05 +02:00
Carmelo Messina c53fa69e5c Add Disable-SHA1-Server-Signature.patch Remove-auth-header-upon-cross-origin-redirect.patch Clear-CORS-Preflight-Cache-on-clearing-data.patch 2023-04-19 12:46:53 +02:00
Carmelo Messina 138e06540d Removes special treatments for some search engines 2023-04-19 12:45:28 +02:00
Carmelo Messina 4665625fb2 add Disable-devtools-remote-and-custom-protocols.patch and Remove-detection-of-captive-portals.patch 2023-04-17 17:30:54 +02:00
Carmelo Messina 319bb04361 fix virtual keyboard position 2023-04-17 17:27:35 +02:00
Carmelo Messina 0a175595d7 fix round borders 2023-04-17 17:26:54 +02:00
Carmelo Messina 6aaf2aa129 Enable kSplitAuthCacheByNetworkIsolationKey 2023-04-17 17:26:20 +02:00
Carmelo Messina e000179f9b Deactivate kNetworkErrorLogging and kReporting 2023-04-17 17:25:43 +02:00
Carmelo Messina aafba8c4d8 bump to 112.0.5615.121 2023-04-16 16:16:29 +02:00
Carmelo Messina 03147f2a23 drop Remove-mremap-from-seccomp-baseline-policy.patch 2023-04-16 16:10:18 +02:00
uazoandGitHub a888f12a3d Merge pull request #49 from uazo/create-pull-request/patch-c1733ac
Git apply result for next-v112 branch
2023-04-16 15:05:19 +01:00
uazoandGitHub 69592364e6 AUTOMATED - git apply results 2023-04-16 14:04:00 +00:00
Carmelo Messina c1733acaa5 update bromite_patches_list.txt 2023-04-16 15:56:47 +02:00
Carmelo Messina a7d13ad7aa Add an internal firewall 2023-04-16 15:55:20 +02:00
Carmelo Messina eed391f0ac Add NetworkTrafficAnnotationTag 2023-04-16 15:45:58 +02:00
Carmelo Messina 3b343677ce Increases the number of pixels changed due to numerous failures 2023-04-16 15:44:58 +02:00
Carmelo Messina 3837c1ce5e modernize base::Feature 2023-04-16 15:40:01 +02:00
Carmelo Messina 221f190cc8 Add setting to invert tap and long tap 2023-04-16 15:36:44 +02:00
Carmelo Messina dc10b6b183 remove AffiliationServiceImpl::PrefetchChangePasswordURLs 2023-04-16 15:31:26 +02:00
Carmelo Messina 6703bf478a Add some useful windows patches 2023-04-16 15:29:52 +02:00
uazoandGitHub 4749e17cd5 Patches for 112.0.5615.48
Git apply result for 112.0.5615.48
2023-04-03 03:19:14 -11:00
uazoandGitHub ed2f445154 AUTOMATED - git apply results 2023-04-03 14:17:15 +00:00
Carmelo Messina 888242056a bump to 112.0.5615.48 2023-04-03 16:11:35 +02:00
Carmelo Messina fe1dc4c82a final patches for v112 2023-04-03 16:06:59 +02:00
Carmelo Messina f8ed43d77d merge intermediate patches 2023-03-31 09:12:32 +02:00
Carmelo Messina 66cfb0d389 patches for v112 2023-03-30 14:32:34 +02:00
Carmelo Messina 58ca50c96b patches for v112 2023-03-30 14:32:09 +02:00
Carmelo Messina c6020bcbc2 bump to 112.0.5615.39 2023-03-29 09:46:36 +02:00
Carmelo Messina e7b3b5c42b add Enable-Document-Open-Inheritance-Removal.patch 2023-03-28 17:51:04 +02:00
Carmelo Messina 6c97952cbc fix cookie partition for non secure sites 2023-03-28 17:49:37 +02:00
uazoandGitHub 01892f7095 Merge pull request #47 from uazo/create-pull-request/patch-0df387e
Git apply result for next-v111 branch
2023-03-28 14:18:31 +01:00
uazoandGitHub ac41ee3ccf AUTOMATED - git apply results 2023-03-28 13:18:02 +00:00
Carmelo Messina 0df387e0c9 bump to 111.0.5563.147 2023-03-28 15:10:42 +02:00
Carmelo Messina db3169322e add message to patch 2023-03-24 16:46:17 +01:00
Carmelo Messina b8b973a9f3 Add patch description 2023-03-24 15:58:28 +01:00
Carmelo Messina 398ac1f752 Add a warning message for unsupported hardware aes 2023-03-24 09:02:07 +01:00
Carmelo Messina d077cfd8e6 fix userscript ui 2023-03-22 20:44:59 +01:00
uazoandGitHub 7f076e2456 Git apply result for 111.0.5563.115
Git apply result for 111.0.5563.115
2023-03-22 09:19:18 +00:00
uazoandGitHub dc68f25e92 AUTOMATED - git apply results 2023-03-22 09:13:48 +00:00
Carmelo Messina bdd282a681 bump to 111.0.5563.115 2023-03-22 10:06:33 +01:00
Carmelo Messina 0d6e77b387 fix userscript ui 2023-03-22 09:15:39 +01:00
Carmelo Messina 40046514ac fix userscript ui 2023-03-19 12:19:10 +01:00
Carmelo Messina c67dad9b51 add Partition-HSTS-cache-by-NAK.patch 2023-03-18 16:20:39 +01:00
Carmelo Messina 38c102cbd8 fix Keyboard protection flag 2023-03-18 16:18:56 +01:00
Carmelo Messina 1d000f2e31 fix Keyboard protection 2023-03-15 12:05:11 +01:00
uazoandGitHub e407b4b213 Merge pull request #45 from uazo/create-pull-request/patch-0c9be22
Git apply result for next-v111 branch
2023-03-14 22:22:16 +06:00
uazoandGitHub 591f1fee94 AUTOMATED - git apply results 2023-03-14 16:21:16 +00:00
Carmelo Messina 0c9be22a15 add Keyboard-protection-flag, Disable-TabHoverCard-images, privacy-issues-in-password-manager 2023-03-14 17:15:33 +01:00
Carmelo Messina d39d33f1b7 add eye adblock setting page for windows 2023-03-09 16:19:14 +01:00
Carmelo Messina e093afdd1b fix typo 2023-03-09 16:17:13 +01:00
Carmelo Messina faeadc2f17 bump to 111.0.5563.65 2023-03-08 08:27:21 +01:00
uazoandGitHub c0fcbba7bd Git apply result for 111.0.5563.64
Git apply result for 111.0.5563.64
2023-03-07 18:19:52 +05:00
uazoandGitHub 89e94d2914 AUTOMATED - git apply results 2023-03-07 13:17:40 +00:00
Carmelo Messina 0d0c83ca19 Bump to 111.0.5563.64 2023-03-07 14:09:22 +01:00
Carmelo Messina 3b2e1a333a fix android build 2023-03-06 21:14:50 +01:00
Carmelo Messina 3b5efef49c v111 final patch 2023-03-06 12:20:30 +01:00
Carmelo Messina d9d1773392 v111 no changes 2023-03-06 12:19:57 +01:00
Carmelo Messina 613855db7e Bump to 111.0.5563.50 2023-03-04 12:01:54 +01:00
Carmelo Messina 6ddf8e2011 v111 must be checked 2023-03-04 12:01:41 +01:00
Carmelo Messina d092391c34 v111 no changes 2023-03-04 12:00:32 +01:00
uazoandGitHub 7890942dfa Git apply result for 110.0.5481.178
Git apply result for 110.0.5481.178
2023-03-02 03:38:56 +11:00
uazoandGitHub 11f1fa3e81 AUTOMATED - git apply results 2023-03-01 16:37:19 +00:00
Carmelo Messina e8a7d1fafb bump to 110.0.5481.178 2023-03-01 17:30:26 +01:00
Carmelo Messina beade82b64 add Disable-csp-reports and Fonts-fingerprinting-mitigation patches 2023-03-01 17:25:52 +01:00
Carmelo Messina e75ac5a6d1 fix flag description 2023-03-01 17:25:18 +01:00
Carmelo Messina 19b40faee6 fix android issue 2023-03-01 17:25:03 +01:00
Carmelo Messina d1f8078aa9 fix text for windows version 2023-03-01 17:24:41 +01:00
Carmelo Messina ff03bf9e34 Fix text on site settings 2023-03-01 17:24:15 +01:00
Carmelo Messina acb0b99379 no changes 2023-03-01 17:23:39 +01:00
Carmelo Messina 4f4486adff fix getChannelData performance issue 2023-02-19 16:19:36 +01:00
Carmelo Messina f7b8fdc542 add WIN-Disable-sharing-hub and WIN-Enable-Network-Service-Sandbox-and-CIG 2023-02-17 17:29:24 +01:00
Carmelo Messina 6396527f6e move back CrashUploadList to DATA_TYPE_HISTORY 2023-02-17 17:28:07 +01:00
Carmelo Messina d0b114f61f bump to 110.0.5481.104 2023-02-17 10:52:47 +01:00
Carmelo Messina 2212b173db fix Fullscreen Leak Test, add Clearing data at startup 2023-02-17 10:34:10 +01:00
uazoandGitHub f753fc3f1c 110.0.5481.100 git apply
changes for 110.0.5481.100
2023-02-15 01:14:58 -09:00
uazoandGitHub a2f65c5270 AUTOMATED - git apply results 2023-02-15 10:13:47 +00:00
Carmelo Messina 200bf839d4 Merge branch 'next-v110' of https://github.com/uazo/bromite into next-v110 2023-02-15 11:06:11 +01:00
Carmelo Messina fa34f6f163 bump to 110.0.5481.100 2023-02-15 11:05:02 +01:00
uazoandGitHub 282663329c Rename 00win-enable-pdf-plugin.patch to 00WIN-enable-pdf-plugin.patch 2023-02-15 00:58:54 -09:00
uazoandGitHub 444a0eb5fd Rename 00win-enable-HighEfficiencyMode-by-default.patch to 00WIN-enable-HighEfficiencyMode-by-default.patch 2023-02-15 00:58:43 -09:00
uazoandGitHub 8c11d83cb8 Rename 00win-disable-annotate-downloads.patch to 00WIN-disable-annotate-downloads.patch 2023-02-15 00:58:16 -09:00
Carmelo Messina c15509f3df add missing bromite_patches_list.txt 2023-02-15 10:51:00 +01:00
Carmelo Messina b0d1766743 Rename patches
to simplify future upstream merge
2023-02-15 10:42:12 +01:00
Carmelo Messina 33b9cfd80e fix for 110.0.5481.97 2023-02-14 10:25:35 +01:00
Carmelo Messina 63639cf5b7 bump to 110.0.5481.97 2023-02-14 08:24:12 +01:00
Carmelo Messina 9ce2440935 v110 final patch (with fixup) 2023-02-09 13:14:01 +01:00
Carmelo Messina bad720ceaf fix bromite_patches_list 2023-02-09 08:09:05 +01:00
Carmelo Messina 63cf257d31 bump to 110.0.5481.78 2023-02-08 21:07:18 +01:00
Carmelo Messina 97776654c0 110 wip fixup 2023-02-08 21:03:14 +01:00
Carmelo Messina 090ff82e79 bump to 110.0.5481.77 2023-02-07 17:03:30 +01:00
Carmelo Messina 5c209c719c v110 2023-02-07 16:51:00 +01:00
Carmelo Messina 54239e60f4 v110 no changes 2023-02-07 16:49:58 +01:00
Carmelo Messina e8de884fea update and fix adblock plus 2023-02-03 16:45:41 +01:00
Carmelo Messina 55fe6f07e1 fix bottom toolbar: check top margin when rearrange tabs
see https://github.com/uazo/bromite-buildtools/issues/33#issuecomment-1411598157
2023-02-01 17:18:32 +01:00
Carmelo Messina b4ca08406a fix tab rearrange, disable mathml, fix use OPAQUE_ORIGIN_FOR_INCOMING_INTENTS
see https://github.com/uazo/bromite-buildtools/issues/33#issuecomment-1409929449
2023-01-31 17:19:07 +01:00
Carmelo Messina 0540e3ac78 v109 - fix some issue
https://github.com/uazo/bromite-buildtools/issues/33#issuecomment-1408104271
2023-01-30 16:32:51 +01:00
uazoandGitHub 22818eb869 Bump to 109.0.5414.120
Patches for 109.0.5414.120
2023-01-26 02:36:46 -05:00
uazoandGitHub 63322d2b79 AUTOMATED - git apply results 2023-01-26 07:35:31 +00:00
uazoandGitHub 7d18bebf2c Bump to 109.0.5414.120 2023-01-26 02:29:16 -05:00
uazoandGitHub f588406683 Patches for 109.0.5414.80
109.0.5414.80: git apply result for next-v109 branch
2023-01-09 14:24:50 +01:00
uazoandGitHub 6940db4329 AUTOMATED - git apply results 2023-01-09 13:22:17 +00:00
Carmelo Messina ab2683d72b bump to 109.0.5414.80 2023-01-09 14:15:03 +01:00
Carmelo Messina 1ddeb7ed3a Partitioning all cookies by top frame domain 2023-01-09 14:14:23 +01:00
Carmelo Messina a523da846a patches for v109 2023-01-06 12:25:14 +01:00
Carmelo Messina 5b13bbb2bd fixup for v109 (upstream patch) 2023-01-06 12:24:22 +01:00
Carmelo Messina b955731b20 bump to 109.0.5414.61 2023-01-04 17:18:26 +01:00
Carmelo Messina 44d8d3c7b6 fix tablist order 2023-01-04 08:31:47 +01:00
uazoandGitHub 212b2d94e4 Merge pull request #38 from uazo/create-pull-request/patch-f1a5b53
Git apply result for next-v108 branch
2022-12-28 15:38:01 -01:00
uazoandGitHub 534a16326b AUTOMATED - git apply results 2022-12-28 16:37:23 +00:00
uazoandGitHub f1a5b53327 fix case 2022-12-28 15:30:01 -01:00
uazoandGitHub 403a416d10 fix case 2022-12-28 15:24:43 -01:00
Carmelo Messina 4887cbf832 merge with upstream 2022-12-28 17:15:33 +01:00
uazoandGitHub 35ad42ef78 Merge pull request #37 from uazo/create-pull-request/patch-65add0d
Git apply result for next-v108 branch
2022-12-16 12:03:01 +03:00
uazoandGitHub 82e769ea9d AUTOMATED - git apply results 2022-12-16 08:46:50 +00:00
uazoandGitHub 65add0d4f3 Bump to 108.0.5359.125 2022-12-16 11:40:49 +03:00
uazoandGitHub 1bc26a94ae bump to 108.0.5359.99 2022-12-09 03:15:07 +11:00
Carmelo Messina 7fd0c23c8d bump to 108.0.5359.95 2022-12-03 11:00:36 +01:00
Carmelo Messina bdfa045f36 fix build for 108.0.5359.72 2022-12-03 10:56:42 +01:00
uazoandGitHub c1df1e7e9c Merge pull request #36 from uazo/create-pull-request/patch-63cf10b
changes for 108.0.5359.72
2022-12-02 23:44:27 +08:00
uazoandGitHub 83a1223925 AUTOMATED - git apply results 2022-12-02 15:39:54 +00:00
Carmelo Messina 63cf10bfe4 bump to 108.0.5359.72 2022-12-02 16:33:31 +01:00
Carmelo Messina 6354720bce Merge branch 'next-v108' of https://github.com/uazo/bromite into next-v108 2022-11-25 20:56:43 +01:00
Carmelo Messina 5e24b55c97 fix patch list 2022-11-25 20:56:32 +01:00
Carmelo Messina e65a273775 merge fixup patches (like upstream) 2022-11-25 20:55:02 +01:00
Carmelo Messina 2fbf64aa27 remove 00Enable-CrossSiteFlagNetworkAnonymizationKey-flag.patch 2022-11-25 10:11:26 +01:00
Carmelo Messina 46ec6c48f0 add 00wip-add-browser-policy.patch 2022-11-22 17:55:29 +01:00
Carmelo Messina 78cc56a11c patches for v108 (win) 2022-11-22 17:55:13 +01:00
Carmelo Messina c84e2af096 patches for v108 2022-11-22 13:21:05 +01:00
Carmelo Messina ef21fa4706 bump to 108.0.5359.48 2022-11-20 14:53:55 +01:00
Carmelo Messina cd4463dd45 merge 2022-11-10 13:57:40 +01:00
Carmelo Messina 14340a75a8 rebase for 107.0.5304.107 2022-11-10 13:55:13 +01:00
Carmelo Messina 2a6c0d3a81 patch for 107.0.5304.107 2022-11-10 13:54:39 +01:00
uazoandGitHub 089a895a07 Fixed patches for 107.0.5304.107
Fixed patches for 107.0.5304.107
2022-11-09 21:59:22 +05:00
uazoandGitHub 88e9af34fd AUTOMATED - git apply results 2022-11-09 16:57:39 +00:00
Carmelo Messina 96705b2f4f add some patches to test 2022-11-09 17:37:16 +01:00
Carmelo Messina 968a0f976d bump to 107.0.5304.107 2022-11-09 16:41:35 +01:00
uazoandGitHub 5d2011d58a Merge pull request #32 from uazo/create-pull-request/patch-3c3532e
Git apply result for next-v107 branch
2022-11-03 18:45:52 +07:00
uazoandGitHub e23bbc4919 AUTOMATED - git apply results 2022-11-03 11:40:12 +00:00
Carmelo Messina 3c3532e4a8 bump to 107.0.5304.91 2022-10-28 10:23:40 +02:00
uazoandGitHub fb3456726e Merge pull request #31 from uazo/create-pull-request/patch-fd5c28d
Automatic git apply result for 107.0.5304.63
2022-10-26 03:29:50 -04:00
uazoandGitHub c0a01001e5 AUTOMATED - git apply results 2022-10-26 07:26:54 +00:00
Carmelo Messina fd5c28d83a bump to 107.0.5304.63 2022-10-26 09:15:14 +02:00
Carmelo Messina 19e8fe4de2 adapted for v107 2022-10-20 13:17:02 +02:00
Carmelo Messina 07f2772acc patch for 107.0.5304.36 2022-10-17 17:32:22 +02:00
Carmelo Messina a5cdcd7d43 bump to 107.0.5304.36 2022-10-17 10:11:50 +02:00
Carmelo Messina 32c814d238 fix missing end of statement 2022-10-17 10:10:18 +02:00
uazoandGitHub 8287cb2e9a Update to 106.0.5249.119
Git apply result for next-v106 branch
2022-10-16 15:12:01 +02:00
uazoandGitHub eb9984fa15 AUTOMATED - git apply results 2022-10-16 13:09:00 +00:00
uazoandGitHub e73c89a7dc Move to 106.0.5249.119 2022-10-16 15:04:34 +02:00
Carmelo Messina d457ea214f add windows build patches 2022-10-13 13:58:07 +02:00
Carmelo Messina ab27a87552 add Fix-WebWorker-requestAnimationFrame 2022-10-04 17:59:56 +02:00
Carmelo Messina e86b15cbcf test adblock plus patch 2022-09-29 13:32:01 +02:00
uazoandGitHub 0079e057c5 Update to 106.0.5249.65
Git apply result for next-v106 branch
2022-09-27 13:29:36 +02:00
uazoandGitHub 91ef789b22 AUTOMATED - git apply results 2022-09-27 11:27:16 +00:00
uazoandGitHub 880c090afe bump to 106.0.5249.65 2022-09-27 13:23:35 +02:00
Carmelo Messina 3e0cdeebd4 add other patch not in upstream 2022-09-23 17:00:07 +02:00
Carmelo Messina 98b3b06100 v106 simple line changes 2022-09-22 20:52:33 +02:00
Carmelo Messina a99ed74c32 v106 drop patch already upstream 2022-09-22 20:51:41 +02:00
Carmelo Messina 896eecc4d4 adapted for v106 2022-09-22 20:50:30 +02:00
Carmelo Messina 804473e164 v106 2022-09-22 11:05:02 +02:00
Carmelo Messina 00b22b8821 bump to 106.0.5249.38 2022-09-21 15:16:56 +02:00
csagan5 a38283a21a Release 105.0.5195.41 2022-09-18 09:25:07 +02:00
CarlandGitHub 0b195c831b Patches for v105 (#2308) 2022-09-17 18:11:36 +02:00
csagan5 236a41fbc4 Add mention of strict origin isolation and strict site isolation 2022-09-04 20:25:50 +02:00
csagan5 182c239e96 Remove unused patch 2022-08-14 08:26:08 +02:00
csagan5 c2366cad99 Release 104.0.5112.91 2022-08-14 08:25:05 +02:00
zhmarsandGitHub a2cf968b7d Update zh_CN translations (#2248) 2022-08-13 21:38:10 -07:00
a3605523e5 Add svg fingerprinting mitigation (#2215)
Co-authored-by: Carmelo Messina <uazo@users.noreply.github.com>
2022-08-13 21:37:51 -07:00
csagan5 7dcdc98732 Improve description for #disable-external-intent-requests flag 2022-08-14 04:17:13 +02:00
csagan5 adcc477c33 Add explanation for #site-engagement flag 2022-08-08 06:25:56 +02:00
csagan5 6df964528a Release 104.0.5112.63 2022-08-08 02:07:12 +02:00
CarlandGitHub dca45015a4 Patches for v104 (#2232) 2022-08-07 17:04:16 -07:00
csagan5 069095f200 Clarify distinction for bug reports/feature requests about the browser itself 2022-07-25 04:45:04 +02:00
csagan5 1a874980c9 Update patch description 2022-07-25 04:40:03 +02:00
csagan5 94fb357b3e Release 103.0.5060.140 2022-07-25 03:32:52 +02:00
csagan5 41ab84eba8 Add pull request template 2022-07-21 12:11:34 +02:00
CarlandGitHub ff8c9f219c Merge pull request #2172 from uazo/remove-navigator-connection
Remove navigator.connection info
2022-07-21 03:04:10 -07:00
CarlandGitHub 8d0f1903c7 Merge pull request #2207 from uazo/fix-timezone
Fix incorrect handling of blink::TimeZoneController::TimeZoneOverride
2022-07-21 03:00:14 -07:00
CarlandGitHub 69e7f5cc91 Merge pull request #2208 from uazo/fix-user-agent-customization
Fix the correct management of the custom ua.
2022-07-21 02:59:34 -07:00
csagan5 5971dfdcb0 Update wording for FAQ 2022-07-21 11:52:33 +02:00
Carmelo Messina 82625a734e fix the correct management of the custom ua.
also fix ua reduction management for desktop version (not managed by chromium)
2022-07-20 18:10:09 +02:00
Carmelo Messina 622da7ae82 fix incorrect handling of blink::TimeZoneController::TimeZoneOverride 2022-07-20 18:04:49 +02:00
csagan5 2b57217034 Release 103.0.5060.126 2022-07-17 20:44:26 +02:00
Carmelo Messina d65d4a3d6b Change the result of navigator.connection to default values and disable observers 2022-07-14 15:53:48 +02:00
CarlandGitHub ddb789ed0d Merge pull request #2171 from uazo/fix-clangd-build
Add kill switch for no-unqualified-std-cast-call build option
2022-07-13 22:40:20 +02:00
CarlandGitHub a8f50230a0 Merge pull request #2173 from uazo/partition-blink-memory-cache
Partitioning Blink memory cache
2022-07-13 22:35:18 +02:00
CarlandGitHub 5d7913cf42 Merge pull request #2191 from uazo/some-changes-on-v103
Some changes on v103
2022-07-13 22:33:57 +02:00
CarlandGitHub ae91ca61c9 Merge pull request #2192 from uazo/fix-signin-and-sync-integrations-v103
Fix open password setting and recents tab crash
2022-07-13 22:27:18 +02:00
CarlandGitHub 3b19df2828 Merge pull request #2193 from uazo/fix-2179
Fix sticky desktop mode
2022-07-13 22:25:13 +02:00
Carmelo Messina 650d6bfcb6 fix sticky desktop mode 2022-07-13 17:10:15 +02:00
Carmelo Messina 996fff2c7a fix open password setting and recents tab crash 2022-07-13 17:06:28 +02:00
Carmelo Messina 216f4ce5c0 use space as separator 2022-07-13 17:04:07 +02:00
Carmelo Messina 506d1a51b8 rename to skip_clangd_unsupported_options 2022-07-13 13:46:04 +02:00
Carmelo Messina 9a8759023c merge with master 2022-07-13 13:44:46 +02:00
Carmelo Messina 57ea2280a0 some changes on v103 2022-07-13 13:30:40 +02:00
csagan5 67edc4337f Updated CHANGELOG with correct issue URL 2022-07-12 08:46:20 +02:00
csagan5 994c9dbd98 Release 103.0.5060.121 2022-07-12 08:27:37 +02:00
CarlandGitHub 505b939073 Merge pull request #2157 from bromite/next/v103
Patches for v103
2022-07-12 00:53:26 +02:00
csagan5 99ed991ace Merge branch 'master' into next/v103 2022-07-12 00:44:47 +02:00
csagan5 c7a6d5e006 Fixes from debug build and uazo 2022-07-12 00:14:07 +02:00
Carmelo MessinaandCarl 1576384e02 Remove preload of com.google.android.gms.fonts 2022-07-10 23:13:00 +02:00
Carmelo MessinaandCarl f77ac33155 Remove window name on cross origin navigation 2022-07-10 23:04:09 +02:00
csagan5 8439ece721 Fix SystemWebView building issue and signin crash 2022-07-08 23:13:21 +02:00
csagan5 b60242dde9 Fix other build/link issues 2022-07-07 21:54:47 +02:00
Carmelo Messina 10247f9b65 Partitioning Blink memory cache 2022-07-06 13:54:58 +02:00
Carmelo Messina 32258dc105 Remove navigator.connection info 2022-07-06 13:46:03 +02:00
Carmelo Messina 0162eb0566 Add kill switch for no-unqualified-std-cast-call 2022-07-06 13:35:31 +02:00
csagan5 796a3b0acf Include new patch for dark mode 2022-07-05 23:59:00 +02:00
krlvmandcsagan5 b590fcae83 Patch for allowing to match only system dark mode 2022-07-05 23:59:00 +02:00
csagan5 b21c08de2f Fixed linking issues 2022-07-05 23:59:00 +02:00
krlvmandCarl ad1a13d393 Patch for allowing to match only system dark mode 2022-07-05 01:21:53 +02:00
csagan5 76277b4c08 Remove more signin integrations 2022-06-27 23:31:53 +02:00
csagan5 90e29193cb Remove more signin-related integrations 2022-06-26 23:55:28 +02:00
csagan5 06259daa58 More fixes related to password manager 2022-06-26 19:11:08 +02:00
csagan5 b7d091858e More fixes for linking and removed files 2022-06-26 11:43:20 +02:00
csagan5 a880d8cf53 Patches for v103 2022-06-25 22:03:04 +02:00
csagan5 f5a6e77bb1 Release 102.0.5005.96 2022-06-11 09:02:03 +02:00
c34f5ec6c7 Fix call to StartExpiringOldStuff (#2120)
Co-authored-by: Carmelo Messina <uazo@users.noreply.github.com>
2022-06-08 20:07:35 +02:00
23fde85228 fix category setting activation (#2119)
Co-authored-by: Carmelo Messina <uazo@users.noreply.github.com>
2022-06-08 20:05:40 +02:00
csagan5 8c127918e2 Release 102.0.5005.92 2022-06-05 11:25:52 +02:00
Zelda189andGitHub 57fc5159d1 Remove duplicate offline-indicator-v2 flag (#2092)
Sort flags by name
2022-06-04 17:21:00 +02:00
csagan5 cd52789b01 Release 102.0.5005.67 2022-05-28 12:24:04 +02:00
csagan5 6c2d2ee368 Patches for v102 2022-05-28 12:06:53 +02:00
Bruno PaganiandCarl 3d471a28a1 Fix incognito screenshots flag name
It was apparently renamed at some point but not reflected here.
2022-05-27 11:26:53 +02:00
csagan5 88072763d3 Release 101.0.4951.69 2022-05-15 12:05:41 +02:00
uazoandCarl 13f981d893 Update build/patches/Add-webrtc-site-setting.patch
Co-authored-by: Carl <32685696+csagan5@users.noreply.github.com>
2022-05-14 21:44:00 +02:00
Carmelo MessinaandCarl ceed58fb61 Add webRTC site settings 2022-05-14 21:44:00 +02:00
csagan5 7ce7f94c36 Do not specify 'latest' 2022-05-14 11:31:24 +02:00
Carmelo MessinaandCarl e37ccd0330 fix odd behaviour with search or site suggestions 2022-05-13 21:24:26 +02:00
csagan5 922192904e Add Android 12L to version list 2022-05-13 21:03:40 +02:00
Carmelo MessinaandCarl 63e834c092 Add a flag to site engagement feature 2022-05-05 09:28:07 +02:00
Carmelo MessinaandCarl b7fee7d282 Add webgl site setting 2022-05-05 09:22:28 +02:00
csagan5 ce7cf99887 Add missing CHANGELOG entries 2022-05-03 01:10:18 +02:00
csagan5 1533105a64 Release 101.0.4951.53 2022-05-03 01:05:15 +02:00
csagan5 540f6c5418 Fix merge typo in privacy patch 2022-05-02 22:18:28 +02:00
csagan5 01b1d9144a Updated patches for v101
Add welcome screen patch
2022-05-02 21:55:55 +02:00
Carmelo MessinaandCarl f1a942e3ad multiple fixes 2022-05-02 21:27:49 +02:00
Carmelo MessinaandCarl abb05cb97c reverse the order of appmenu 2022-05-02 21:13:52 +02:00
b7bad88837 Fix Move-navigation-bar-to-bottom.patch (#2029)
* fix 1995 and 2011

* fixgit apply

Co-authored-by: Carmelo Messina <uazo@users.noreply.github.com>
2022-04-29 15:39:18 +02:00
csagan5 685c40dbda Release 101.0.4951.39 2022-04-29 00:34:12 +02:00
CarlandGitHub 432f4a0cd7 Patches for v101 (#2010) 2022-04-29 00:31:49 +02:00
csagan5 39bf208aa1 Quote grep expression 2022-04-24 18:43:52 +02:00
csagan5 22241eabc8 Document home page as NTP 2022-04-24 18:30:09 +02:00
csagan5 0c1d649f30 Fix some incorrect entries in CHANGELOG 2022-04-20 23:17:52 +02:00
csagan5 cc92a9aed0 Re-add bugfix for site engagement
PR #1964 was inadvertently rolled back with release 100.0.4896.83
2022-04-20 23:16:09 +02:00
csagan5 47d47a75f4 Add better description for patch 2022-04-20 23:15:10 +02:00
csagan5 87c19d0bf9 Document new flag move-top-toolbar-to-bottom 2022-04-18 23:35:43 +02:00
csagan5 03da31a022 Release 100.0.4896.135 2022-04-18 23:34:15 +02:00
csagan5 5e4cd6c4ee Add temptative patch for mremap removal 2022-04-16 16:59:48 +02:00
csagan5 727bc7517c Add another pattern for logcat filter 2022-04-16 16:39:28 +02:00
2b0f9b0929 Move toolbar to bottom: fix tabstrip in tablet mode and NewTabPage (#1985)
* fix newtabpage and tabstrip in tablet mode

* rename to Move-navigation-bar-to-bottom.patch

Co-authored-by: Carmelo Messina <uazo@users.noreply.github.com>
2022-04-16 16:29:52 +02:00
csagan5 6639691985 Remove unused patches from list 2022-04-16 10:18:17 +02:00
csagan5 48a205e99b Remove patches not yet tailored for Android 2022-04-16 10:12:07 +02:00
csagan5 7f49ed9fa4 Remove patch not yet used 2022-04-15 16:44:20 +02:00
csagan5 878ef04e92 Release 100.0.4896.92 2022-04-15 16:41:31 +02:00
uazoandGitHub e8b1446c03 Move top toolbar to bottom (#1975) 2022-04-14 19:45:50 +02:00
uazoandGitHub 69f3cc0d41 Disable TLS Resumption (#1973)
* Disable TLS Resumption

* improved the log
2022-04-14 19:38:48 +02:00
csagan5 7ce235d1c5 Add new patches, improve wording 2022-04-13 17:45:39 +02:00
uazoandGitHub 4111a62f3d Partition DNS requests by top-frame NIK (#1974) 2022-04-13 17:08:41 +02:00
uazoandGitHub 2de7773a24 Userscripts: fix some minor issues (#1957) 2022-04-13 15:57:28 +02:00
csagan5 2d2623f6dd Add some missing entries from CHANGELOG
Update autofill patch authorship information
2022-04-11 23:42:10 +02:00
csagan5 f819874002 Release 100.0.4896.83 2022-04-11 23:29:29 +02:00
csagan5 59b049f461 Minor logging improvements for bookmarks import/export patch 2022-04-11 20:02:57 +02:00
90486fde89 don't save WebsiteSettings if it's not a ContentSetting (#1964)
Co-authored-by: Carmelo Messina <uazo@users.noreply.github.com>
2022-04-11 19:46:32 +02:00
csagan5 b4095e087a Updated OpenSearch patch to include fix for upstream bug
Fixes upstream issue with recently-added search engines not showing up
2022-04-11 16:31:51 +02:00
csagan5 52717de04d Updated DoH patch with latest improvements/bugfixes
Includes a fix for upstream system DNS config issue
See also: https://github.com/bromite/bromite/issues/1960
2022-04-11 16:29:30 +02:00
csagan5 1bcb6ca125 Update webRTC FAQ 2022-04-11 16:16:13 +02:00
csagan5 7847515fff Improve suggested grep for logcat 2022-04-11 16:15:54 +02:00
csagan5 8520a538a7 Update webRTC patch 2022-04-11 16:15:14 +02:00
4f10d11318 Add lifetime options support for permissions (#1958)
* Add lifetime options support for permissions

* Update build/patches/Add-lifetime-options-permissions.patch

* add csagan5 suggestion

* Add description from pr

Co-authored-by: Carmelo Messina <uazo@users.noreply.github.com>
2022-04-08 18:04:11 +02:00
csagan5 f6a6bca87b Mention certificate-transparency-enabled flag 2022-04-07 21:42:02 +02:00
zhmarsandGitHub e3930c39c2 Update zh_CN translations (#1940) 2022-04-07 21:23:55 +02:00
c76b9c6567 fix the lack of use of the useragent passed by the user (#1943)
with reduced user agent flag active

Co-authored-by: Carmelo Messina <uazo@users.noreply.github.com>
2022-04-07 21:18:02 +02:00
csagan5 e40a7f8a61 Update some undocumented features 2022-03-29 23:48:47 +02:00
csagan5 692764d073 Release 100.0.4896.57 2022-03-29 23:35:25 +02:00
CarlandGitHub 73886eac62 Patches for v100 (#1930)
* Patches for v100

* Remove unused patches
2022-03-29 15:58:56 +02:00
csagan5 7b8130f61e Add FAQ about ads not blocked 2022-03-29 15:54:08 +02:00
csagan5 3ac3be9b5e Add URL to SearchEngines wiki page 2022-03-29 15:45:43 +02:00
CarlandGitHub 48a2d6c5f4 Merge pull request #1929 from zhmars/translation
Update zh_CN translations
2022-03-28 17:44:06 +02:00
mars 5c0e3ffed7 Update zh_CN translations 2022-03-27 15:39:16 +08:00
CarlandGitHub 8066120fa3 Merge pull request #1925 from nikolowry/master
Fix for contextual search manager removal patch
2022-03-26 16:20:26 +01:00
Niko Lowry fc6eeab58b Fix for removing contextual search manager patch 2022-03-24 16:26:25 -04:00
csagan5 47d0d4f9f8 Release 99.0.4844.77 2022-03-19 11:52:52 +01:00
csagan5 c91167ff8d Release 99.0.4844.58 2022-03-12 17:35:06 +01:00
CarlandGitHub d6621afae1 Merge pull request #1878 from zhmars/translation
Update zh_CN translations
2022-03-11 15:41:08 +01:00
mars c02e6e6cdf Update zh_CN translations 2022-03-11 22:09:45 +08:00
CarlandGitHub 0a7d6c8799 Merge pull request #1877 from zhmars/translation
Update zh_CN translations
2022-03-11 13:16:28 +01:00
mars a5c0da6fda Update zh_CN translations 2022-03-11 16:46:56 +08:00
6fb06e9614 Add Disable-ua-full-version.patch (#1869)
* Add Disable-ua-full-version.patch

* add csagan5 suggestions

Co-authored-by: Carmelo Messina <uazo@users.noreply.github.com>
2022-03-10 15:46:15 +01:00
CarlandGitHub 33135920da Merge pull request #1872 from uazo/fix-1870
Add an option that allows changing the number of days to keep navigation history
2022-03-10 15:12:05 +01:00
Carmelo Messina 86ea470189 Add an option that allows changing the number of days to keep navigation history 2022-03-10 14:15:30 +01:00
csagan5 b4fe978836 Add another missing issue from CHANGELOG 2022-03-08 14:25:37 +01:00
csagan5 85e9e55ddc Add missing issues in CHANGELOG 2022-03-08 14:22:07 +01:00
csagan5 870e6277c0 Fix bug with vulnerable version update showing incorrectly 2022-03-08 10:51:11 +01:00
csagan5 117e80daff Update README with new features 2022-03-07 23:49:59 +01:00
csagan5 f645da9e44 Release 99.0.4844.55 2022-03-07 23:42:23 +01:00
CarlandGitHub 7e0c8e2ef3 Patches for v99 (#1858)
* Add fix for NTP

* Fixes after uazo's review

* Disable safety checks

* Add new patches, other build fixes
2022-03-07 23:35:29 +01:00
csagan5 3a7e27df6a Experimental user scripts for v99
Patch from uazo
2022-03-06 17:28:45 +01:00
Carmelo MessinaandCarl e9cfbf1749 change comment 2022-03-06 17:18:28 +01:00
Carmelo MessinaandCarl 3373b44270 multiple fixes to user script patch
added support for unicode scripts
fix handling of multiple scripts with more detailed log
not allowed access to native pages
2022-03-06 17:18:28 +01:00
Carmelo MessinaandCarl 86225ca1ed fix log style in AlwaysIncognitoLinkInterceptor
added new method IsAlwaysIncognitoEnabled in AutocompleteProviderClient to activate the minimum necessary
2022-03-06 10:53:00 +01:00
Carmelo MessinaandCarl fa0b570677 Added preference in native 2022-03-06 10:53:00 +01:00
uazoandCarl 4f01288ceb Update commit description 2022-03-03 12:00:18 +01:00
Carmelo MessinaandCarl d86e096dc0 Implement jit toggle patch 2022-03-03 12:00:18 +01:00
Carmelo MessinaandCarl 7e2ee59147 minor changes to v98 patches
no functionality changed
2022-03-03 11:49:11 +01:00
csagan5 72547ac4c3 Release 98.0.4758.116 2022-03-02 11:00:40 +01:00
Carmelo MessinaandCarl 6005259c20 complete disabling of client hints 2022-02-26 16:18:02 +01:00
Carmelo MessinaandCarl b9ec284ba4 fix another way to activate origin trials 2022-02-26 16:07:14 +01:00
14250fa45e fix Block gateway attacks via websockets (#1828)
Co-authored-by: Carmelo Messina <uazo@users.noreply.github.com>
2022-02-25 19:16:24 +01:00
csagan5 35e9170312 Release 98.0.4758.108 2022-02-21 23:52:26 +01:00
CarlandGitHub bd83693292 Patches for v98 (#1806) 2022-02-21 23:50:51 +01:00
JustAnUserLolandGitHub b1c8a498fe Fix an URL in FAQs (#1815)
Fix mention of Protected Content menu
2022-02-20 21:03:17 +01:00
csagan5 ca40180ce9 Remove unused patch 2022-02-17 21:26:17 +01:00
csagan5 1243c3a8a3 Release 97.0.4692.106 2022-02-17 19:19:38 +01:00
CarlandGitHub 68e2652402 Patches for v97 (#1795)
Patches for v97

Add uazo's patch to build with use_sysroot=false
Start using new SystemWebView package name
Cleanup metrics patches and add a few more patches from Vanadium
Enable use_cfi_cast
2022-02-17 19:16:35 +01:00
csagan5 a4f6c4cf7b Updated automated domain substitution patch 2022-02-13 21:11:53 +01:00
csagan5 2450c334cf Rename GN_ARGS -> bromite.gn_args 2022-02-13 21:11:53 +01:00
csagan5 b2741b8d4e Add missing architectures
Fix header for SystemWebView question
2022-02-13 16:37:48 +01:00
CarlandGitHub 6696caee49 Merge pull request #1758 from TacoTheDank/yml
Migrate to using GitHub issue forms
2022-02-13 14:45:51 +01:00
CarlandGitHub 4af2a2e018 Merge branch 'master' into yml 2022-02-13 14:44:35 +01:00
csagan5 1dc2fe7cf7 Adjust issue forms 2022-02-13 14:42:23 +01:00
TacoTheDankandcsagan5 7c906e6a15 Migrate to using GitHub issue forms 2022-02-13 13:48:03 +01:00
csagan5 bab0abb2bf Minor patch updates for v97 2022-02-13 13:47:38 +01:00
TacoTheDank 6d614aee45 Migrate to using GitHub issue forms 2022-02-06 01:00:18 -05:00
csagan5 b96c17030f Add FAQ about default search engine 2022-02-05 18:03:23 +01:00
csagan5 3b901cf774 Remove [PATCH] from patches 2022-02-05 18:00:21 +01:00
BayLee4andCarl c46d636377 Resolve issue #1749 : build with '-ftrivial-auto-var-init=zero' 2022-02-05 17:48:28 +01:00
csagan5 0b2a41b2af Release 96.0.4664.183 2022-02-05 17:27:33 +01:00
zhmarsandGitHub 260fea5b66 Update zh_CN translations (#1696)
* Update zh_CN translations

* Update zh_CN translations
2022-02-05 00:04:06 +01:00
csagan5 a5e7515a34 Updated CHANGELOG 2022-02-04 22:11:55 +01:00
csagan5 2c4fff8752 Release 96.0.4664.104 2022-02-04 22:09:00 +01:00
csagan5 83af2e261d Add more explicit comments about what 'or' means and information to fill in on other fields 2022-01-08 19:04:21 +01:00
csagan5 c3ecb0d482 Update donation address 2022-01-07 01:41:45 +01:00
csagan5 685105abc9 Updated minimum SDK required version 2021-12-05 16:50:12 +01:00
csagan5 5b6a7442e0 Release 96.0.4664.54 2021-12-04 15:29:26 +01:00
csagan5 4774aeba9f Added missing improvements for v96 2021-12-03 12:36:58 +01:00
csagan5 288479a5e1 Minor fixes to build v96 2021-12-03 10:24:44 +01:00
csagan5 8b9c14c8b7 Add missing patches 2021-12-03 01:23:23 +01:00
csagan5 820e23fb3d Updated patches for v96
Minus timezone customization and user scripts patches
2021-12-03 00:26:46 +01:00
510a513535 Update Add-option-to-use-home-page-as-NTP.patch for v95 (#1586)
* update patch for v95

* ntp_set_about_blank_button removed

Co-authored-by: Carmelo Messina <uazo@users.noreply.github.com>
2021-12-02 12:25:57 +01:00
csagan5 3444be04d8 Re-introduce patch to add option to use home page as NTP 2021-12-02 12:25:57 +01:00
e14d909347 Fix crash on tablet (#1617)
Co-authored-by: Carmelo Messina <uazo@users.noreply.github.com>
2021-12-02 12:16:33 +01:00
Apparatus_ZeroandGitHub cabdae7c37 Add hyperlinks to version and license shields (#1628) 2021-12-02 12:14:22 +01:00
bd6faa1227 Ask user before close all tabs (#1605)
Co-authored-by: Carmelo Messina <uazo@users.noreply.github.com>
2021-12-02 12:10:42 +01:00
csagan5 785af3a5b2 Release 95.0.4638.79 2021-11-17 18:45:34 +01:00
7700be360a Permanently Disable Floc (#1582)
Co-authored-by: Carmelo Messina <uazo@users.noreply.github.com>
2021-11-16 09:56:44 +01:00
uazoandGitHub fb59381932 permanently removed all relative code to ENABLE_REPORTING buid flag (#1556)
* permanently removed all relative code

* removed unused constants

* use of the error directive
2021-11-15 17:45:51 +01:00
jylitalbitandGitHub ffc4e30278 Ignore StrictMode warning (#1567)
Currently the SystemWebView fails a CTS test case, specifically
testStrictMode from WebViewHostSideStartupTest, due to StrictMode
warnings. So ignore the StrictMode warning as is done elsewhere.
2021-11-15 17:43:59 +01:00
8a4476d697 Disable privacy sandbox (#1581)
Co-authored-by: Carmelo Messina <uazo@users.noreply.github.com>
2021-11-15 17:35:04 +01:00
1bf35985be Disable conversion measurement api (#1583)
Co-authored-by: Carmelo Messina <uazo@users.noreply.github.com>
2021-11-15 17:32:19 +01:00
csagan5 43dbb5e70b Consolidate some patches, updates 2021-11-15 09:39:39 +01:00
csagan5 f7b74aa489 Updated issue template to mention chrome://crashes UI 2021-11-14 22:57:00 +01:00
uazoandGitHub 33d0efa1fa permanently disabled the fetch of field trials (#1558)
* permanently disabled the fetch of field trials

* fix comment
2021-11-14 22:47:32 +01:00
uazoandGitHub 64b257fbeb fix overlap in patch editing (#1555) 2021-11-14 22:45:07 +01:00
uazoandGitHub 016ba130b2 removed ForceEnableOriginTrials related code (#1557) 2021-11-14 22:43:33 +01:00
uazoandGitHub bd10a43371 Disable Accessibility service by default (#1559)
* Disable Accessibility service by default

* fix not correct author

* fix, incorrect check, default false means inactive
2021-11-14 22:40:58 +01:00
csagan5 a426d7f98b Add missing issue in CHANGELOG 2021-11-07 11:36:00 +01:00
csagan5 19bcbb3055 Release 95.0.4638.78 2021-11-07 11:34:05 +01:00
csagan5 ee5a65e4c1 Updated patch for third-party origin trials as suggested by @uazo
New patch to never use HTTP probes
2021-11-06 10:04:12 +01:00
csagan5 aaa6072b7a Add missing changes from third-party origin trials patch 2021-11-05 17:28:58 +01:00
2fe296b6b9 Patches for v95 (#1532)
* fix build

* only lines changes

* remove patch not referenced in patch list

* fix crash when open an offline page without any opened tabs

* Remove duplicate patch for pull-to-refresh

* Latest PRs and disable third-party origin trials

Co-authored-by: uazo <29201891+uazo@users.noreply.github.com>
2021-11-05 08:25:06 +01:00
uazoandGitHub 5b51895953 removed flags exclusivity constraint (#1514) 2021-11-04 09:32:53 +01:00
uazoandGitHub 6b613c2171 Keep empty tabs between sessions (#1515) 2021-11-04 09:20:19 +01:00
csagan5 08f9970bcb Fix wrong URL in CHANGELOG 2021-10-27 20:20:32 +02:00
csagan5 fb5839d5eb Release 94.0.4606.109 2021-10-26 22:55:06 +02:00
uazoandGitHub 3129f5e2c2 fix potential crash on android M (#1512) 2021-10-24 23:06:27 +02:00
csagan5 76add6b7dc Update FAQs and README about autofill and automatic updates 2021-10-24 21:03:56 +02:00
uazoandGitHub 5a4f720d39 enable android autofill with a flag default true (#1511)
* enable android autofill with a flag default true

* removed change of prefs::kAutofillProfileEnabled
2021-10-24 20:53:57 +02:00
uazoandGitHub 01d2217a21 Experimental user scripts support (#857)
* version 0.5

* fix whitespace errors and rebase with 87.0.4280.106

* fix bug [FATAL:utf_string_conversions.cc(338)] Check failed: IsStringASCII(utf16). Tampermonkey • Userscript Sources

* add details for unmatch header, bug DOCUMENT_START not work, add a flag for logging

* deny network access to injected scripts

* removed log + fix ui + upstream update (@9f2aac4)

* update patch for v88

* force char as unsigned in invalidChar

* adapt to v89, add view script source, replace checkbox in preferences, removed extension work, add support to non-standard @url declaration, use saf directly

* updates for v90

* update for v91

* remove flag and keep only toggle
tell that the script has failed with errors
remove copy to temporary file
remove approach with XML overlays so that there are no exceptions thrown while inflating

* change install message + add homepage support + make url clickable

* adaptation for v92

* v93 ready

* add prompt also after selecting file by ui, remove prefs addon patch, add commit message

* add README.md
2021-10-23 12:53:42 +02:00
csagan5 90baa52b27 Add missing issue fixed in CHANGELOG 2021-10-21 00:03:46 +02:00
csagan5 5a25a4d9ea Release 94.0.4606.102 2021-10-20 23:58:39 +02:00
uazoandGitHub 3787e8e9af add snackbar in settings activity (#1492)
* add snackbar in settings activity to inform the user of the reboot required when change the flag

* removed BrowserRestartActivity in favor of ApplicationLifetime
2021-10-20 21:59:24 +02:00
uazoandGitHub a5e03a6664 Add custom tab intents privacy option and force open external links in incognito flag. (#1489)
Add-custom-tab-intents-privacy-option.patch and Force-open-external-links-in-incognito.patch have been unified
2021-10-20 21:56:34 +02:00
csagan5 ba293ac0dc Updated patches for v94 2021-10-20 01:34:25 +02:00
uazoandGitHub e6c854cc9c Add recents, offlinepage and send to home screen for always incognito (#1427)
* Add recents, offlinepage and send to home screen for always incognito

* Add patch description
2021-10-20 01:25:37 +02:00
csagan5 54ee34f629 Mention missing features, mention new auto updates mechanism
Fix a mistake in release notes for v91
2021-10-17 10:58:45 +02:00
csagan5 77822a7efb Release 94.0.4606.94 2021-10-16 22:28:37 +02:00
uazoandGitHub ad34a777bb Enable update notification (#1454)
* Enable update notification

* version check rather than build time

* fixup with Disable-Omaha-update-checks.patch

* taking the last-modified together with the redirect.

the check between build times in any case is currently commented (see isNewVersionAvailableByBuildTime)

* removed code related to build time check

* removed PREF_LATEST_MODIFIED_BUILDTIME
2021-10-16 09:27:49 +02:00
uazoandGitHub ed23baeb48 Add site setting for images (#1447) 2021-10-15 20:55:44 +02:00
csagan5 3884e3d733 Release 93.0.4577.110 2021-10-10 11:03:59 +02:00
Carmelo Messinaandcsagan5 9b61de8734 Enable share intent patch 2021-10-09 10:12:21 +02:00
csagan5 cb9ff4ac99 Document Alt+D shortcut 2021-10-08 19:40:55 +02:00
csagan5 6e457009b4 Updated recent patches 2021-10-08 01:17:15 +02:00
Carmelo MessinaandCarl ce42e0c0ea fix build 2021-10-08 01:07:50 +02:00
Carmelo MessinaandCarl 229aa9a115 add Force-open-external-links-in-incognito.patch 2021-10-08 00:37:29 +02:00
Niko LowryandCarl 07d13a350b Set enable_reporting to false
Added `ungoogled-chromium-Fix-building-without-enabling-reporting.patch`
to fix build issues. See the following PR for more details:
https://github.com/Eloston/ungoogled-chromium/pull/1416
2021-09-26 23:50:19 +02:00
csagan5 858e85b59b Release 93.0.4577.83 2021-09-25 16:23:57 +02:00
csagan5 72e4a6e1eb Release 92.0.4515.176 2021-09-12 11:38:03 +02:00
csagan5 63d816332b Release 92.0.4515.134 2021-08-05 12:04:51 +02:00
csagan5 b9a07b2cea Release 92.0.4515.125 2021-07-27 07:45:58 +02:00
uazoandGitHub 3a5f052e8c reactivation of subresource filter (#1302) 2021-07-25 16:57:44 +02:00
csagan5 2251acbca8 Release 92.0.4515.103 2021-07-23 12:50:01 +02:00
zhmarsandGitHub e5771ef891 Update zh_CN translations (#1282) 2021-07-20 17:42:41 +02:00
csagan5 71ec2c54b0 Release 91.0.4472.158 2021-07-10 12:38:36 +02:00
csagan5 46701c75ed Minor patches fix 2021-06-29 08:42:31 +02:00
csagan5 df446ba6f7 Release 91.0.4472.146 2021-06-29 08:23:34 +02:00
uazoandGitHub 5efb5dd7d4 fix garbled ui by clearing float style (#1236) 2021-06-27 12:28:59 +02:00
csagan5 e093c89001 Release 91.0.4472.143 2021-06-25 11:04:55 +02:00
2a91a60d3e Enable crash reporting ui, allow save report to primary download folder (#1105)
* make sure that only the user wants to save

* Fix DCHECK failed + make a zip file

* fix author

* use standard download ui, tested with A9,A10,A11

* add request new log + clear all files

* reactivated immediate deletion of original files after zipping them + review tips

* Specify "n/a" as file size

* Reword button text as "Generate now"

* Change patch file name

* Change patch subject

* version for v91

* fix garbled UI

Co-authored-by: Carl <32685696+csagan5@users.noreply.github.com>
2021-06-21 20:07:09 +02:00
csagan5 c5c35b06a4 Release 91.0.4472.102 2021-06-10 22:55:24 +02:00
csagan5 413c2c7645 Fix patch mistakes for always incognito new tabs and external intent requests flag 2021-06-09 21:49:50 +02:00
csagan5 4997dcab23 Mention flag to disable external intent requets 2021-06-06 08:03:03 +02:00
csagan5 40c93af283 Release 91.0.4472.97 2021-06-06 07:53:35 +02:00
uazoandGitHub 07102294d0 added export of tabs collection (#1177) 2021-05-27 19:22:27 +02:00
csagan5 73df91cb28 Simplify issue template crash section 2021-05-26 20:20:16 +02:00
uazoandGitHub e3414b5d6b fix saving tabs bookmarks folder (#1166) 2021-05-25 20:58:03 +02:00
uazoandGitHub a1e07fa54b Allow open new tabs and save as link in always incognito mode (#1165) 2021-05-24 12:06:11 +02:00
csagan5 1953e3d415 Release 91.0.4472.50 2021-05-19 19:52:13 +02:00
csagan5 bb68ef38b1 Updated draft for v91 patches 2021-05-15 13:48:28 +02:00
csagan5 b4ca5cb0bd Update bookmarks import/export patch 2021-05-13 19:56:19 +02:00
csagan5 674ab0adbd Draft for v91 patches 2021-05-13 10:44:15 +02:00
CarlandGitHub 5745c4f970 Mention feeds being disabled 2021-05-10 22:35:55 +02:00
csagan5 ded81bf625 Release 90.0.4430.204 2021-05-04 20:55:02 +02:00
uazoandGitHub b2075a3562 revert last changes + remove record incognito launch reason histogram (#1125) 2021-05-02 10:53:01 +02:00
csagan5 d9876e2da3 Release 90.0.4430.101 2021-04-30 08:44:11 +02:00
csagan5 38eeb63d4b Mention new flags in README.md 2021-04-27 18:21:10 +02:00
csagan5 a0ad5d29e8 Release 90.0.4430.92 2021-04-27 00:20:51 +02:00
ad010db02d Add flag IsCleartextPermitted default true (#1111)
Co-authored-by: Carl <32685696+csagan5@users.noreply.github.com>
2021-04-26 21:41:23 +02:00
uazoandGitHub b3f5b62956 New flag "allow-user-certificates" (#1110)
* Add a flag AllowUserCertificates default false

* add to bromite patches list
2021-04-26 21:37:39 +02:00
uazoandGitHub ce1a039537 explicit denial to fetch (#1106) 2021-04-26 14:24:51 +02:00
csagan5 54302084f1 Release 90.0.4430.92 2021-04-26 10:11:43 +02:00
uazoandGitHub e3e5a45562 fix update ui for pac url config (#1098) 2021-04-24 00:39:30 +02:00
CarlandGitHub 1e87d1b0df Mention what to do for bugs unrelated to Chromium 2021-04-15 23:32:23 +02:00
oldphones68andGitHub 4af239c785 README.md (#1076)
Since, `export-bookmarks-use-saf`, is disabled by default, I edited the `New Flags` section of README.
2021-04-15 23:27:05 +02:00
CarlandGitHub a89f8a3150 Add question for incognito tabs 2021-04-15 00:51:32 +02:00
csagan5 0ef43d4eae Release 90.0.4430.74 2021-04-15 00:49:15 +02:00
CarlandGitHub e3b4bf00c9 Merge pull request #1064 from uazo/fix-1051
always-incognito mode: remove unnecessary code for v90
2021-04-14 23:20:53 +02:00
Carmelo Messina 45ddc3909b remove unnecessary code for v90 2021-04-14 10:58:25 +02:00
CarlandGitHub b2975f635a Merge pull request #1054 from uazo/fix-1049
User agent customization: patch update for v90
2021-04-10 09:00:01 +02:00
Carmelo Messina 1aef9679ae updated patch for v90 2021-04-09 22:14:23 +02:00
Carmelo Messina b5a8dc1ebf actual patch v89 2021-04-09 22:13:14 +02:00
csagan5 aaac339b89 Release 90.0.4430.59 2021-04-07 14:05:56 +02:00
csagan5 f4cd704284 v90 patches update 2021-04-05 13:40:42 +02:00
csagan5 feb98f1fb1 Draft for v90 patches 2021-04-04 18:49:59 +02:00
csagan5 4e0e82b3c1 Release 89.0.4389.117 2021-04-02 06:39:28 +02:00
CarlandGitHub 20551a44a3 Minor improvements 2021-03-28 13:44:41 +02:00
CarlandGitHub e751833928 Add some yes/no answers to issue template for bugs 2021-03-22 20:13:07 +01:00
csagan5 c332245d48 Document missing features in README.md 2021-03-21 14:45:22 +01:00
csagan5 777304be3f Release 89.0.4389.100 2021-03-21 14:17:13 +01:00
CarlandGitHub fbecba6643 Mention anti-fingerprinting mitigation flags 2021-03-19 14:00:54 +01:00
CarlandGitHub 6f38083e18 Add section for reporting flags 2021-03-17 08:40:18 +01:00
csagan5 02334e85ab Fix downloads image URL 2021-03-13 21:31:22 +01:00
csagan5 aa0b4b6b59 Release 89.0.4389.92 2021-03-13 18:59:15 +01:00
csagan5 33124cc5d6 Add note about steps to reproduce 2021-03-13 18:56:27 +01:00
CarlandGitHub 167f96019a Merge pull request #999 from uazo/fix-963
fix menu items display with 6 columns + fix disappear after exiting
2021-03-12 22:08:27 +01:00
csagan5 bfdcef797e Mention enable_reporting=true change in v83 2021-03-12 05:43:47 +01:00
CarlandGitHub c6b6838e1e Merge pull request #1000 from zhmars/translation
Update zh_CN translations
2021-03-12 05:43:06 +01:00
mars bdbc25e3ca Update zh_CN translations 2021-03-11 14:08:44 +08:00
Carmelo Messina 6c53bb33b5 fix menu items display with 6 columns + fix disappear after exiting (https://github.com/bromite/bromite/issues/570#issuecomment-782585897) 2021-03-10 17:53:06 +01:00
csagan5 a55c7672af Release 89.0.4389.78 2021-03-09 00:42:09 +01:00
csagan5 6c2412b39d Add question about ad blocker 2021-03-08 22:03:00 +01:00
csagan5 ff09829f7d Updated patches for v89 2021-03-08 09:02:01 +01:00
csagan5 fb90e00324 Patches for next release (v89) 2021-03-07 11:42:42 +01:00
CarlandGitHub 9e1fa7d614 Merge pull request #964 from zhmars/i18n
Update zh_CN translations
2021-03-02 19:51:15 +01:00
mars 262fde89ce Update zh_CN translations 2021-03-02 17:46:43 +08:00
csagan5 302fc11efa Release 88.0.4324.207 2021-03-01 21:38:01 +01:00
csagan5 973ede4ad1 Patches for next release 88.0.4324.207 2021-02-28 20:10:46 +01:00
CarlandGitHub e64e4be007 Merge pull request #945 from uazo/fix-941
fix  wrong last datetime update when opening settings + better check
2021-02-25 21:44:19 +01:00
Carmelo Messina ca839f9480 fix wrong last datetime update when opening settings + better check for first install 2021-02-22 15:09:41 +01:00
csagan5 d70bd10285 Release 88.0.4324.187 2021-02-20 09:24:45 +01:00
CarlandGitHub 9fcce580ab Merge pull request #905 from uazo/fix-811
Ability to see when adblock filters were last updated; button to manually update adblock filters
2021-02-17 20:37:33 +01:00
CarlandGitHub 21e0153b28 Change wording for user-disabled updates log message 2021-02-17 20:36:44 +01:00
CarlandGitHub cb7f579590 Mention removal of dropped patch for user-installed certificates 2021-02-16 22:47:05 +01:00
csagan5 cef459eab9 Release 88.0.4324.185 2021-02-16 22:44:19 +01:00
Carmelo Messina 80c163754a fix strings + UPDATE_IN_PROGRESS message + possibility to disable update + fix crash 2021-02-15 19:38:56 +01:00
Carmelo Messina 51b8c9b04f avoid using ForTesting methods + rename ReStart in StartWithDelay 2021-02-13 18:02:39 +01:00
CarlandGitHub d56cae904d Merge pull request #925 from Ahrotahn/dialpatchfix
Update DIAL repeating discovery patch
2021-02-13 15:21:50 +01:00
CarlandGitHub f350bf9a1b Merge pull request #927 from uazo/fix-788
Fix favicons search for fallback
2021-02-13 15:15:43 +01:00
Carmelo Messina eb1e6fc0b7 Fix favicons search for fallback 2021-02-13 11:48:57 +01:00
Blaise 026b290582 Update DIAL repeating discovery patch 2021-02-11 10:13:31 -06:00
Carmelo Messina b11ab2588e change period in frequency + move next_check_delay_ + call OnFinishedCallback 2021-02-11 17:13:25 +01:00
CarlandGitHub c8417ba29f Merge pull request #922 from uazo/fix-899
remove TabModelSelectorBase.java changes
2021-02-11 00:52:38 +01:00
Carmelo Messina e94630c2b6 remove DCHECK + do not set empty useragent 2021-02-09 21:39:44 +01:00
Carmelo Messina 634c5b2a52 remove TabModelSelectorBase.java changes 2021-02-09 21:31:42 +01:00
Carmelo Messina 95ab44c7af add setting for check + enum from native + revision changes 2021-02-09 21:24:17 +01:00
csagan5 674481d28d Add missing entry to CHANGELOG 2021-02-06 15:34:38 +01:00
csagan5 0292b9612f Release 88.0.4324.149 2021-02-06 15:32:57 +01:00
Carmelo Messina 78a9c7eb85 fix request on start 2021-02-05 16:34:50 +01:00
CarlandGitHub 0fde359db6 Merge pull request #901 from uazo/fix-proxy-system-network
Enable proxy config for the system network context
2021-02-04 22:45:05 +01:00
CarlandGitHub 300460a3ae Merge branch 'master' into fix-proxy-system-network 2021-02-04 22:42:37 +01:00
CarlandGitHub d9922db41c Merge pull request #898 from uazo/fix-884
add reading of kProxyReverseBypass from config
2021-02-04 22:40:26 +01:00
Carmelo Messina 788775f849 Ability to see when adblock filters were last updated; button to manually update adblock filters 2021-02-04 18:27:20 +01:00
Carmelo Messina 126c1afb4d enable proxy config for the system network context 2021-02-02 14:46:10 +01:00
csagan5 cc06b37ef7 Release 88.0.4324.141 2021-01-31 12:59:26 +01:00
Carmelo Messina 30b18d8e15 added reading of kProxyReverseBypass from config 2021-01-30 17:23:11 +01:00
CarlandGitHub 5f22cda333 Merge pull request #896 from uazo/fix-bookmark-import-export
little fix to "Add bookmark import/export actions" patch
2021-01-30 17:15:59 +01:00
Carmelo Messina 902961d756 fix wrong thread (DCHECK failed) + request WRITE_EXTERNAL_STORAGE permission 2021-01-30 14:54:40 +01:00
csagan5 8340b1da10 Mention GitHub Discussions 2021-01-29 23:29:49 +01:00
csagan5 02abc71790 Updating patches for next 88.0.4324.141 release 2021-01-29 21:41:38 +01:00
CarlandGitHub 344da255ba Merge pull request #892 from uazo/fix-v88
fix proxy and bookmark page
2021-01-29 20:38:00 +01:00
Carmelo Messina cf2a2adc87 fix proxy and bookmark page 2021-01-28 21:18:06 +01:00
csagan5 47c948a929 Release 88.0.4324.95 2021-01-26 01:12:38 +01:00
CarlandGitHub f9c06b613d Add section about contributing 2021-01-15 01:34:00 +01:00
csagan5 c3f43a2f14 Update CHANGELOG and network isolation patch 2020-12-27 22:11:25 +01:00
csagan5 6be731cca7 Release 87.0.4280.131 2020-12-27 21:39:48 +01:00
csagan5 b201775f4e Release 87.0.4280.106 2020-12-11 13:29:26 +01:00
CarlandGitHub 42ffe7b18a Merge pull request #830 from uazo/fix-828
Add random seed to TimezoneOverride patch
2020-12-07 00:50:49 +01:00
Carmelo Messina 76992d379b use base::RandInt 2020-12-02 16:29:42 +01:00
Carmelo Messina 95090b016d add random seed 2020-12-01 16:52:31 +01:00
csagan5 d4dd2dd63b Release 87.0.4280.81 2020-11-27 21:48:48 +01:00
CarlandGitHub aecf9624db Merge pull request #823 from uazo/fix-819
Fix allow custom user agent patch
2020-11-25 21:47:31 +01:00
CarlandGitHub b42ba1aef6 Merge pull request #825 from uazo/fix-autoplay
fix global "Autoplay" site-setting
2020-11-25 21:46:07 +01:00
CarlandGitHub b93b06ed88 Merge pull request #821 from zhmars/i18n
Update zh_CN translations
2020-11-25 21:45:31 +01:00
Carmelo Messina fd0b637eef fix autoplay setting 2020-11-25 21:27:07 +01:00
Carmelo Messina 92111e3b07 - correctly passed user agent to blink
- in settings, flag assigned at focus of the control
- loading of overrides at startup
2020-11-24 17:09:56 +01:00
mars a5fe3a57f6 Update zh_CN translations 2020-11-24 02:40:29 +08:00
csagan5 e9a29a5f61 Current version of the user agent customization patch 2020-11-21 22:16:53 +01:00
csagan5 bd63e0463a Release 87.0.4280.68 2020-11-21 17:31:40 +01:00
CarlandGitHub b41c9f3236 Merge pull request #816 from nikolowry/master
Intent handling fix for local apps on Android 11
2020-11-21 12:24:27 +01:00
CarlandGitHub d5ff0c04f4 Merge pull request #807 from uazo/fix-798
Allow custom user agent
2020-11-21 11:49:11 +01:00
Niko Lowry a17ef28063 Intent handling fix for local apps on Android 11 2020-11-20 20:23:17 -05:00
csagan5 7b83448cea Update CHANGELOG.md 2020-11-19 21:16:10 +01:00
csagan5 73ef7f3ea1 Release 87.0.4280.67 2020-11-19 21:00:03 +01:00
Carmelo Messina 06936970d1 readded new title to preference 2020-11-19 13:29:12 +01:00
Carmelo Messina 491c46b6c1 merge with master 2020-11-18 17:54:22 +01:00
Carmelo Messina fdaf4ada21 update for v87 2020-11-18 17:46:05 +01:00
CarlandGitHub d446f0e453 Merge pull request #809 from uazo/v87
Update patches for v87
2020-11-16 20:19:20 +01:00
CarlandGitHub 2e2fa340ef Apply suggestions from code review 2020-11-16 20:18:44 +01:00
Carmelo Messina f545de305f update Disable-sync-services-menu-entry.patch 2020-11-16 19:53:06 +01:00
Carmelo Messina 916169fd14 update timezone-customization patch + fix others 2020-11-16 17:44:12 +01:00
Carmelo Messina 461860fbe3 updated patch with wiggle
added timezone-override patch
2020-11-16 14:45:24 +01:00
Carmelo Messina 997f047926 update patchs with wiggle 2020-11-15 22:25:05 +01:00
Carmelo Messina a8848ed4f6 update patch with wiggle 2020-11-15 18:20:09 +01:00
Carmelo Messina c6060f0d79 [wip] patch before wiggle 2020-11-15 16:21:49 +01:00
Carmelo Messina caef723507 update Disable safe browsing 2020-11-15 15:16:42 +01:00
csagan5 bf42b995a2 Fix adblock filters patch 2020-11-14 20:36:11 +01:00
csagan5 9a1f7c4242 Updated patches for v87 2020-11-14 17:58:46 +01:00
Carmelo Messina 204fafbf4a Allow custom user agent 2020-11-13 13:19:42 +01:00
csagan5 578556604a Release 86.0.4240.194 2020-11-09 19:39:04 +01:00
CarlandGitHub f444a7dba6 Merge pull request #802 from uazo/fix-791
Revert the removal of an option to block autoplay
2020-11-08 08:47:14 +01:00
csagan5 200c855c3e Fix missing index lines
Fix patch order
2020-11-08 02:09:41 +01:00
Carmelo Messina 36e72671b0 Revert the removal of an option to block autoplay 2020-11-07 23:03:08 +01:00
CarlandGitHub a3d4ff7371 Merge pull request #796 from uazo/fix-789
Fix Omnibox flag not working
2020-11-07 21:29:06 +01:00
CarlandGitHub bc9eead93b Merge pull request #800 from uazo/fix-780
Always desktop view mode: exclude internal schemes
2020-11-07 20:37:20 +01:00
Carmelo Messina b886ead295 removed useless flag 2020-11-07 15:13:34 +01:00
Carmelo Messina 525889600f restore search ready omnibox flags behaviour 2020-11-06 21:49:09 +01:00
Carmelo Messina 66cded0cd7 fix transition from and to webui with new flag enabled 2020-11-06 21:44:09 +01:00
Carmelo Messina bbd0f8c531 add a option to exclude internal schemes 2020-11-06 17:10:22 +01:00
Carmelo Messina b2a36c11b8 merge from master 2020-11-06 16:39:34 +01:00
csagan5 85f8338501 Release 86.0.4240.181 2020-11-03 19:29:03 +01:00
CarlandGitHub ed5a1533d9 Merge pull request #787 from uazo/fix-780
Add flag to always view the desktop site for all websites
2020-11-02 22:04:00 +01:00
Carmelo Messina 58395a30a4 fix 789 2020-10-31 23:17:00 +01:00
Carmelo Messina d360de85cc fix toggling the new option alone does not affect the user agent 2020-10-26 17:53:06 +01:00
Carmelo Messina 221c8a3ec3 toggling the new option alone does not affect the user agent 2020-10-26 16:32:32 +01:00
Carmelo Messina 9ed77fd7d6 fixed flag behavior and added new setting menu 2020-10-26 13:05:53 +01:00
Carmelo Messina 6b238924ee removed trailing whitespace 2020-10-24 22:19:53 +02:00
Carmelo Messina 71f1163b2a added flags in homepage_preferences and site_settings_preferences.xml
we need to choose.
2020-10-24 21:49:49 +02:00
csagan5 93f7b0aef6 Release 86.0.4240.112 2020-10-22 00:22:06 +02:00
CarlandGitHub 8b8c74af26 Merge pull request #777 from uazo/fix-771
add item in main_menu_regroup.xml resource
2020-10-20 22:54:20 +02:00
Carmelo Messina 75887279ac updated exit icon menu 2020-10-17 14:31:31 +02:00
csagan5 7e3c9d2064 Release 86.0.4240.99 2020-10-16 22:50:41 +02:00
Carmelo Messina 8a3b173910 add item in main_menu_regroup.xml resource 2020-10-11 21:06:49 +02:00
csagan5 6ebce2bf0c Release 86.0.4240.92 2020-10-10 12:20:40 +02:00
CarlandGitHub ad47e646ee Merge pull request #775 from uazo/fix-758
fix patchs for "All preferences in the screen should be added in the new order list"
2020-10-09 23:43:24 +02:00
Carmelo Messina 32049708d5 fix patchs for "All preferences in the screen should be added in the new order list" 2020-10-09 19:03:14 +02:00
csagan5 8839e61ea5 Release 86.0.4240.73 2020-10-05 00:32:13 +02:00
csagan5 565b2f70a9 Add reference to list of URLs 2020-10-04 12:13:37 +02:00
csagan5 a505fac5d3 Release 86.0.4240.70 2020-10-03 19:01:12 +02:00
csagan5 f97d8aa345 Release 86.0.4240.66 2020-10-02 08:55:51 +02:00
CarlandGitHub eaf47e2099 Merge pull request #757 from uazo/time-override-v86
update timezone override patch for v86
2020-10-01 22:38:21 +02:00
Carmelo Messina 75706ea313 update timezone override patch for v86 2020-09-30 09:52:25 +02:00
csagan5 7a9188d76e v86 patches 2020-09-28 22:00:09 +02:00
CarlandGitHub 7c1c9c5620 Mention media casting in F.A.Q.s 2020-09-28 21:22:08 +02:00
csagan5 47e3933004 Release 85.0.4183.114 2020-09-18 10:50:03 +02:00
CarlandGitHub d2d29d3401 Update Brave link 2020-09-14 00:41:03 +02:00
csagan5 8f01561842 Release 85.0.4183.110 2020-09-11 19:52:12 +02:00
csagan5 62455cbd5a Release 85.0.4183.94 2020-09-05 13:08:53 +02:00
csagan5 57634d6021 Text and layout improvements for the timezone customization patch 2020-09-05 00:19:17 +02:00
CarlandGitHub be7404a961 Merge pull request #725 from uazo/fix-proxy-patch
fix proxy settings patch with always incognito profile
2020-09-04 23:30:39 +02:00
Carmelo Messina d804ba7400 fix for always incognito profile 2020-09-04 15:01:50 +02:00
csagan5 986d04a2c9 Updated timezone customization patch
Added patch for DIAL repeating discovery
2020-09-04 01:06:12 +02:00
CarlandGitHub 23485dc259 Merge pull request #723 from uazo/timezone-override
Add timezone override patch
2020-09-03 20:58:14 +02:00
CarlandGitHub a865bcdedd English text improvements 2020-09-03 20:56:51 +02:00
Carmelo Messina 3a9a367259 fix for 85.0.4183.86 without session-only patch 2020-09-03 17:56:18 +02:00
Carmelo Messina ea53b99aa1 adding suggestions 2020-09-03 09:28:09 +02:00
csagan5 631072f5d6 Remove session-only cookies support 2020-09-01 19:42:42 +02:00
Carmelo Messina 6d9c47e8e6 add timezone override patch 2020-09-01 16:01:00 +02:00
CarlandGitHub d65477e14a Mention that latest version should be used 2020-08-27 08:23:31 +02:00
csagan5 5b28504837 Release 85.0.4183.86 2020-08-26 18:30:56 +02:00
csagan5 90635707e9 Fix LocationBarPhone app crash at startup 2020-08-26 17:47:19 +02:00
csagan5 5daca63561 Release 85.0.4183.84 2020-08-25 21:01:43 +02:00
csagan5 9b30907ddd Minor fixes to proxy patch 2020-08-25 15:02:00 +02:00
csagan5 576f8eb7d0 Cleanup proxy configuration patch, fix mode 2020-08-24 21:49:24 +02:00
uazoandGitHub bfd783f62a Introduce direct mode for proxy configuration
* fix Bromite bugs #377 and #679

* add Add-a-proxy-configuration-page-fix-377-679.patch
2020-08-24 21:25:01 +02:00
csagan5 21c6b87914 Updated patches for v85 2020-08-23 23:06:29 +02:00
csagan5 6717730428 Add changelog entry for issue #654 2020-08-23 22:29:19 +02:00
csagan5 46985eced7 Release 85.0.4183.82 2020-08-23 22:09:50 +02:00
CarlandGitHub d0e9d700f1 Merge pull request #705 from uazo/fix-681
fix RestoreForeignSessionTab in android
2020-08-23 22:03:54 +02:00
Carmelo Messina bc58f108fc fix RestoreForeignSessionTab in android 2020-08-23 11:39:19 +02:00
csagan5 5da292bc15 Remove symlink 2020-08-18 17:08:57 +02:00
csagan5 34bc3555dc Update feature request template 2020-08-18 08:14:00 +02:00
CarlandGitHub 74767e397a Merge pull request #692 from uazo/fix-654
force incognito profile when mStartIncognito is true

Fixes #654
2020-08-17 17:31:29 +02:00
Carmelo Messinaandcsagan5 67dc28859d force incognito profile when mStartIncognito is true 2020-08-17 17:29:54 +02:00
csagan5 c65e5bbda4 Release 84.0.4147.132 2020-08-17 17:07:38 +02:00
CarlandGitHub ce75c13b20 Merge pull request #688 from uazo/fix-exit-menu-item
Fix patch "Add exit menu item"

Fixes #673
2020-08-17 10:33:42 +02:00
CarlandGitHub a6df80f815 Merge pull request #675 from uazo/history-on-incognito
Add history on incognito tabs
2020-08-15 23:23:49 +02:00
CarlandGitHub 15e75eeb88 Merge branch 'master' into history-on-incognito 2020-08-15 23:23:36 +02:00
csagan5 5dd2efd498 Minor patch cleanup 2020-08-15 23:22:16 +02:00
CarlandGitHub 28c2972673 Merge pull request #671 from uazo/session-only-cookies
session only cookies patch - rev 01
2020-08-15 23:20:08 +02:00
csagan5 6dbdeec051 Merge branch 'session-only-cookies' of https://github.com/uazo/bromite into session-only-cookies 2020-08-15 23:18:35 +02:00
csagan5 90a40e41a8 Adjust description and position 2020-08-15 23:17:27 +02:00
Carmelo Messina f241d0183c fix patch "Add exit menu item" 2020-08-15 21:55:09 +02:00
CarlandGitHub 5479f2e978 Merge branch 'master' into session-only-cookies 2020-08-14 08:38:34 +02:00
Carmelo Messinaandcsagan5 bec74e52f4 session only patch rev 01
add session only cookies preferences for site settings

Apply suggestions from code review

Co-authored-by: Carl <32685696+csagan5@users.noreply.github.com>
2020-08-14 08:37:07 +02:00
Carmelo Messina d1e398ce3a add first version 2020-08-07 18:36:16 +02:00
csagan5 225e19cf99 Release 84.0.4147.121 2020-08-07 15:12:29 +02:00
CarlandGitHub ae1fec5f3e Mention URL that explains how to use custom filters 2020-08-06 18:46:10 +02:00
csagan5 96671ab221 Release 84.0.4147.119 2020-08-05 08:49:10 +02:00
zhmarsandGitHub 166c05b5c5 Update zh_CN translations (#665) 2020-08-04 07:55:16 +02:00
csagan5 f513eb76ec Release 84.0.4147.113 2020-07-31 15:09:43 +02:00
csagan5 2de59b6a0c Fixed patch for site settings 2020-07-28 10:35:10 +02:00
csagan5 4eff892d17 Release 84.0.4147.106 2020-07-28 10:15:39 +02:00
csagan5 a634e3ac81 Fix minimum required Android version 2020-07-28 10:08:24 +02:00
csagan5 84a9001629 Release 84.0.4147.95 2020-07-17 15:46:36 +02:00
csagan5 265ab75e24 Release 84.0.4147.90 2020-07-16 23:30:56 +02:00
csagan5 f82057aabf Specify exception about CFI on x86 2020-06-26 21:38:40 +02:00
csagan5 ab94462f0a Fix CFI build flag 2020-06-24 09:06:47 +02:00
csagan5 08874f25ee Release 83.0.4103.119 2020-06-24 09:05:42 +02:00
csagan5 ae8ad945c1 Mention cause for autofill not working 2020-06-23 20:17:13 +02:00
csagan5 47f4e2f650 Remove exception wording for CFI 2020-06-14 19:54:05 +02:00
csagan5 c1ecd4c36a Release 83.0.4103.101 2020-06-10 00:30:29 +02:00
CarlandGitHub 398a3aa344 Provide some pointers for new bug submissions 2020-06-05 00:07:39 +02:00
CarlandGitHub 95e1be4eb2 Clarify what to do before submitting feature requests 2020-06-05 00:06:00 +02:00
csagan5 f210af1b51 Mention autofill in FAQs 2020-06-02 22:33:08 +02:00
csagan5 c63223848d Release 83.0.4103.93 2020-06-02 01:12:43 +02:00
csagan5 d9ebf3fd67 Remove outdated bullet point about QUIC 2020-05-29 19:53:13 +02:00
csagan5 e9f00816c3 Document all the new flags 2020-05-26 22:49:19 +02:00
csagan5 9fd6b12319 Remove mention of additional search engines 2020-05-26 22:05:00 +02:00
csagan5 a7e311242a Release 83.0.4103.76 2020-05-21 10:50:58 +02:00
csagan5 746bf414a2 Combine omnibox-related patches, drop workaround 2020-05-17 12:12:05 +02:00
csagan5 4c4dd71824 Updated domain substitution patch to run before text replacements 2020-05-16 17:43:15 +02:00
csagan5 08f4eacdff Release 83.0.4103.53 2020-05-15 18:45:43 +02:00
lucianlauandGitHub a52d7ffd83 Update CHANGELOG.md (#571)
Fix broken hyperlink
2020-05-14 19:54:02 +02:00
csagan5 6f3ded493a Latest version of the translation patch for zh_CN 2020-05-13 19:42:47 +02:00
csagan5 b6ed0c18db Updated automated domain substitution patch
Reduce changes in testdata files
2020-05-13 19:35:14 +02:00
csagan5 3be92ec2b6 Add missing changelog entry 2020-05-13 19:34:41 +02:00
csagan5 dd87f6cf0a Document new flag for incognito tabs 2020-05-13 19:34:33 +02:00
csagan5 65bd5c1df9 Release 83.0.4103.46 2020-05-13 19:34:31 +02:00
csagan5 45df4acfe5 Introduce patch for webRTC CCT tabs leaks 2020-05-09 17:50:55 +02:00
csagan5 c8825825e4 Fix typo in issue number 2020-04-26 21:23:39 +02:00
csagan5 15f047e484 Release 81.0.4044.127 2020-04-26 21:21:06 +02:00
csagan5 0170036187 Adjust patch for incognito custom tabs support 2020-04-23 22:55:46 +02:00
uazoandcsagan5 fe93fa8497 Enable incognito custom tab 2020-04-23 22:55:42 +02:00
CarlandGitHub 88030934c7 Merge pull request #529 from bromite/always-incognito-bg-fix
Add patch for always-incognito crashes fixes
2020-04-22 18:51:34 +02:00
csagan5 2140ce4f53 Updated patch to latest version 2020-04-20 22:33:15 +02:00
csagan5 0132b51132 Add patch for always-incognito crashes fixes 2020-04-19 16:19:17 +02:00
csagan5 41f3eb6400 Release 81.0.4044.106 2020-04-16 09:10:09 +02:00
csagan5 154ff73784 Minor description update 2020-04-08 20:21:40 +02:00
csagan5 6981d4ee4c Remove invalid changelog entry 2020-04-08 20:15:33 +02:00
csagan5 3c9c050df0 Release 81.0.4044.97 2020-04-08 09:43:51 +02:00
csagan5 119088d986 Minor fixes for bug issue template 2020-04-07 00:24:30 +02:00
CarlandGitHub d12c186bbc Merge pull request #518 from cacheiforindicium/patch-1
Update README.md
2020-04-05 01:56:52 +02:00
cacheiforindiciumandGitHub 95dca6a146 Update README.md
Startpage removed as search engine from browser
2020-04-04 19:22:16 +00:00
csagan5 3c510a3a8e Release 81.0.4044.83 2020-04-01 00:02:24 +02:00
csagan5 7f15412ae0 Update issue/feature templates 2020-03-25 19:32:20 +01:00
csagan5 406bedb7a2 Release 81.0.4044.76 2020-03-23 20:08:12 +01:00
csagan5 c696b6f939 Release 81.0.4044.70 2020-03-20 06:26:36 +01:00
csagan5 97ad845a27 Backport missing Android surface control fix 2020-03-18 19:49:34 +01:00
csagan5 a6ca6a5cee Release 81.0.4044.63 2020-03-13 18:52:40 +01:00
csagan5 7c25daa521 Mention when AdGuard filters were removed 2020-03-09 18:42:38 +01:00
csagan5 f5275180b4 Add question about PWAs WebAPK support 2020-03-07 08:47:32 +01:00
csagan5 e7d8daac10 Update donation address 2020-02-27 23:34:45 +01:00
csagan5 7c6ba84acd Release 80.0.3987.118 2020-02-22 14:33:41 +01:00
csagan5 8d85bfa7d0 Release 80.0.3987.109 2020-02-18 07:50:35 +01:00
csagan5 152903d847 Mention wiki 2020-02-16 18:25:58 +01:00
csagan5 4fad3bf5bc Update patch description 2020-02-15 09:27:21 +01:00
CarlandGitHub 1cc0dfb1ff Merge pull request #491 from bromite/v80/AImageReader-bugfix
Bugfix for AImageReader crash on Android10/arm64
2020-02-15 09:20:28 +01:00
csagan5 0d00af6e73 Bugfix for AImageReader crash on Android10/arm64 #445 2020-02-15 08:55:35 +01:00
372 changed files with 252458 additions and 285014 deletions
-50
View File
@@ -1,50 +0,0 @@
---
name: Bug report
about: Create a Bromite bug report
---
### Bromite version
Version: `76.0...`
Arch: `arm` or `arm64` or `x86`
Android version: (example: `9.0`)
Device model: (example: `SM-G960UZKABST`)
### Is this bug about the SystemWebView?
Yes/No
No support for SystemWebView installations is provided.
### Is the bug reproducible with latest version?
Do not report bugs which are not reproducible with latest version
### Can the bug be reproduced with corresponding Chromium version?
Please pick the same version of Chromium as Bromite from here: https://github.com/bromite/chromium/releases
If the bug is reproducible then it might be a configuration issue or an upstream bug. Upstream bugs can be reported on the [Chromium issue tracker](https://bugs.chromium.org/p/chromium/issues/list) and do not forget to read [Chromium project bug reporting guidelines](https://www.chromium.org/for-testers/bug-reporting-guidelines) first.
### Is the bug a crash?
If yes then individuate and post the logcat dump (remove privacy sensitive information, if any), otherwise remove this section.
### Describe the bug
Write here a clear and concise description of the bug.
### Steps to reproduce the bug
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
### Expected behavior
A clear and concise description of what you expected to happen.
### Screenshots
If applicable, add screenshots to help explain your problem. Otherwise remove this section.
+212
View File
@@ -0,0 +1,212 @@
name: Bug report
description: Create a Bromite bug report
body:
- type: markdown
attributes:
value: |
Welcome! Thanks for taking the time to submit a bug report.
If this is not a bug about the Bromite browser, or you are looking for a place to ask a question to the community,
then please use the [GitHub Discussions](https://github.com/bromite/bromite/discussions) instead.
Make sure you have acknowledged and completed this template before submitting your issue.
Please read it carefully: incorrect issues will be automatically closed and ignored.
- type: checkboxes
id: preliminary_checklist
attributes:
label: Preliminary checklist
options:
- label: "I have read the [README](https://github.com/bromite/bromite/blob/master/README.md)."
required: true
- label: "I have searched the existing issues for my problem. This is a new ticket, NOT a duplicate or related to another open issue."
required: true
- label: "I have read the [FAQs](https://github.com/bromite/bromite/blob/master/FAQ.md)."
required: true
- label: "I have updated Bromite to the latest version. The bug is reproducible on this latest version."
required: true
- label: "This is a bug report about the Bromite browser; not the website nor F-Droid nor anything else."
required: true
- type: dropdown
id: is_chromium
attributes:
label: Can the bug be reproduced with corresponding Chromium version?
description: |
Please pick the same version of Chromium as Bromite from here: https://github.com/bromite/chromium/releases
If the bug is reproducible then it might be a configuration issue or an upstream bug. Upstream bugs can be reported on the [Chromium issue tracker](https://bugs.chromium.org/p/chromium/issues/list) and
do not forget to read [Chromium project bug reporting guidelines](https://www.chromium.org/for-testers/bug-reporting-guidelines) first.
If the bug is related to functionality that does not exist in Chromium then answer "No".
multiple: false
options:
- "Yes"
- "No"
validations:
required: true
- type: input
id: bromite_version
attributes:
label: Bromite version
description: What version of Bromite are you using? Please specify a single version e.g. `96.0.4664.1` not `latest`. If this is not the latest version then please update and retry before submitting this bug report.
validations:
required: true
- type: dropdown
id: device_architecture
attributes:
label: Device architecture
multiple: false
options:
- arm
- arm64
- arm64-v8a
- armeabi-v7a
- x86
- x64
validations:
required: true
- type: dropdown
id: android_version
attributes:
label: Android version
multiple: false
description: What version of Android are you running?
options:
- 12.1
- 12.0
- 11
- 10
- 9
- 8.1
- 8.0
- 7.1
- 7.0
- 6
- 5.1
- 5.0
- 4.4
- 4.3
- 4.2
- 4.1
- 4.0
validations:
required: true
- type: input
id: device_model
attributes:
label: Device model
description: What is your device model? This can usually be found in your device's settings in the "About" section.
placeholder: (e.g. `OnePlus 8 (IN2010)`, or `SM-G960UZKABST`, etc.)
validations:
required: true
- type: textarea
id: changed_flags
attributes:
label: Changed flags
description: |
These are the flags changed under `chrome://flags`.
Report all the flags with non-default configuration (they will be blue-highlighted).
If no flags are changed then write 'no flags changed'.
placeholder: show-overdraw-feedback, enable-parallel-downloading
validations:
required: true
- type: dropdown
id: is_system_webview
attributes:
label: Is this bug about the SystemWebView?
description: Please note that no support for System WebView installation is provided.
multiple: false
options:
- "Yes"
- "No"
validations:
required: true
- type: dropdown
id: is_incognito
attributes:
label: Is this bug happening in an incognito tab?
multiple: false
options:
- "Yes"
- "No"
validations:
required: true
- type: dropdown
id: adblock
attributes:
label: Is this bug caused by the adblocker?
description: You can test this by temporarily allowing ads for the site.
multiple: false
options:
- "Yes"
- "No"
validations:
required: true
- type: textarea
id: bug_crash
attributes:
label: Is this bug a crash?
description: |
1. No.
2. Yes, I have attached the crash report dump that I downloaded from `chrome://crashes`
3. Yes, I have copy/pasted the crash dump
placeholder: |
Drag the crash report dump here to attach it or paste the logcat dump individuated with `adb logcat | grep -E '( cr_|bromite|chromium)'`.
validations:
required: true
- type: textarea
id: bug_description
attributes:
label: Describe the bug
description: Write a clear and concise description of the bug.
validations:
required: true
- type: textarea
id: bug_steps
attributes:
label: Steps to reproduce the bug
description: |
Explain how to cause the bug as clearly as possible. Bugs that are not reproducible cannot be investigated.
Also, do not write "any website": please specify which URLs can be used to reproduce the issue.
placeholder: |
Steps to reproduce the bug (e.g.):
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error
validations:
required: true
- type: textarea
id: expected_behavior
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: |
If applicable, add screenshots to help explain your problem.
Otherwise, ignore this section.
placeholder: |
Drag the screenshot files here to attach them.
validations:
required: false
-23
View File
@@ -1,23 +0,0 @@
---
name: Feature request
about: Suggest a privacy-related idea for this project
---
### Is your feature request related to privacy?
Features that are not related to privacy are unlikely to be considered.
### Is there a patch available for this feature somewhere?
If yes then provide URL and license information.
### Describe the solution you would like
A clear and concise description of what you want to happen.
Do not ask "I would like feature X which is available in browser Y"; such issues are closed immediately.
### Describe alternatives you have considered
A clear and concise description of any alternative solutions or features you have considered.
@@ -0,0 +1,68 @@
name: Feature request
description: Create a Bromite feature request
body:
- type: markdown
attributes:
value: |
Welcome! Thanks for taking time to submit a feature request.
If this is not a feature request about the Bromite browser, or you are looking for a place
to ask a question to the community then please use the [GitHub Discussions](https://github.com/bromite/bromite/discussions) instead.
Make sure you have acknowledged and completed this template before submitting your issue.
Please read it carefully: incorrect issues will be automatically closed and ignored.
Note:
- Features unrelated to privacy will not be considered.
- Do not ask "I would like feature X which is available in browser Y."
- type: checkboxes
id: preliminary_checklist
attributes:
label: Preliminary checklist
options:
- label: "I have read the [README](https://github.com/bromite/bromite/blob/master/README.md)"
required: true
- label: "I have read the [FAQs](https://github.com/bromite/bromite/blob/master/FAQ.md)."
required: true
- label: "I have searched [existing issues](https://github.com/bromite/bromite/issues) for my feature request. This is a new issue (NOT a duplicate) and is not related to another issue."
required: true
- label: "This is a feature request for the Bromite browser; not the website nor F-Droid nor anything else."
required: true
- type: dropdown
id: is_privacy_related
attributes:
label: Is your feature request related to privacy?
description: Features that are not related to privacy are not considered.
multiple: false
options:
- "Yes"
- "No"
validations:
required: true
- type: textarea
id: is_patch_available
attributes:
label: Is there a patch available for this feature somewhere?
description: If yes please provide URL and related license information.
validations:
required: true
- type: textarea
id: solution_description
attributes:
label: Describe the solution you would like
description: A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
id: alternatives_considered
attributes:
label: Describe alternatives you have considered
description: A clear and concise description of any alternative solutions or features you have considered.
validations:
required: true
+15
View File
@@ -0,0 +1,15 @@
## Description
*Please explain here what feature or bugfix these changes are addressing and why they should be included*
## All submissions
* [ ] there are no other open [Pull Requests](../../../pulls) for the same update/change
* [ ] Bromite can be built with these changes
* [ ] I have tested that the new change works as intended (AVD or physical device will do)
### Format
* [ ] patch subject and filename match (e.g. `Subject: Alternative cache (NIK-based)` -> `Alternative-cache-NIK-based.patch`)
* [ ] patch description contains explanation of changes
* [ ] no unnecessary whitespace or unrelated changes
+7
View File
@@ -0,0 +1,7 @@
################################################################################
# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
################################################################################
/.vs/bromite-uazo/config
/.vs/bromite-uazo/FileContentIndex
/.vs
+557
View File
@@ -1,3 +1,559 @@
# 105.0.5195.41
* revert by-pass for clipboard permissions for NTP doodles (fixes https://bugs.chromium.org/p/chromium/issues/detail?id=1334203)
* prevent history detection via favicon (fixes https://github.com/bromite/bromite/issues/2269)
* fix the lack of protection in canvas.convertToBlob()
* improve incognito mode detection countermeasures (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1615)
* fix toolbar gesture when using bottom navigation bar (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/2253)
# 104.0.5112.91
* re-introduce modal flag to prompt when closing all tabs
* sharing hub: always use visible URL (fixes https://github.com/bromite/bromite/issues/2204)
* add SVG fingerprinting mitigation (thanks to @uazo)
* updated zh_CN translactions (thanks to @zhmars)
* dropped patch to open YouTube links in Bromite
# 104.0.5112.63
# 103.0.5060.140
* fix timezone override not working correctly (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/2133)
* never provide navigator.connection info (thanks to @uazo)
* fix management of custom User-Agent (thanks to @uazo)
# 103.0.5060.126
* fix malfunctioning sticky desktop mode (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/2179)
* fix non-working passwords manager (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/2188)
* fix crash when opening recent tabs (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/2190)
* fix autoplay not working correctly (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/2096)
* add GN flag for clangd builds (thanks to @uazo)
# 103.0.5060.121
* do not enable always use HTTPS by default
* match system dark mode (thanks to @krlvm)
* remove window name on cross origin navigation (thanks to @uazo)
* remove preload of GMS fonts on stock Android (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/2156)
# 102.0.5005.96
* fix history expiration bug (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/2104)
* fix category setting activation (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/2091)
* improve plain text rendering on mobile
* rewritten certificate transparency patch (fixes https://github.com/bromite/bromite/issues/2101)
# 102.0.5005.92
* restore offline-indicator-v2 flag functionality (thanks to @Zelda189)
# 102.0.5005.67
* dropped patch to disable mobile identity consistency by default
* fix text for blocked ads (fixes https://github.com/bromite/bromite/issues/2026)
* fix OpenSeach visited site detection bug (fixes https://github.com/bromite/bromite/issues/1994)
# 101.0.4951.69
* flag to toggle site engagement (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/2022)
* site settings to enable webGL (thanks to @uazo)
* removed flag to disable webGL
* fix bottom navigation bar search/site suggestions behaviour (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/2049)
* enable process isolation for all iframes
* add webRTC site settings (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1965)
# 101.0.4951.53
* move incognito settings to separate page (thanks to @uazo)
* disable automatic offline pages saving by default (thanks to @uazo)
* make history support and site settings in always incognito mode disabled by default (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1991)
* move pop-up toolbar to the bottom when using bottom navigation bar (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/2030)
* menu does not show all entries (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/2011)
* stray shadow when using bottom toolbar (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1995)
# 101.0.4951.39
* save only ContentSettings in always-incognito mode (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1942)
* fix a couple issues related to signin and metrics leftover code affecting debug builds (thanks to @uazo)
* remove some more parameters from the English-version search engine (thanks to @uazo)
* add welcome screen with mention of privacy statements (fixes https://github.com/bromite/bromite/issues/691)
# 100.0.4896.135
* remove mremap from seccomp baseline policy
* add flag to move top toolbar to bottom (thanks to @uazo)
# 100.0.4896.92
* improve user script errors and visualized name (thanks to @uazo)
* fix autofill password not working anymore (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1956)
* mark sites as visited when they have an already-parsed OpenSearch descriptor
* disable TLS resumption by default (thanks to @uazo)
* partition DoH requests by top-frame NIK (thanks to @uazo)
# 100.0.4896.83
* update zh_CN translations (thanks to @zhmars)
* fix custom UA reported via Javascript (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1936)
* introduce session granularity for permissions (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1549)
* disable crash reporting
* avoid script injection on some sites
* fix upstream OpenSearch bug with search engines prematurely discarded
* fix upstream DNS bug with inconsistent Android system DNS configuration (fixes https://github.com/bromite/bromite/issues/1960)
* use less invasive approach to protect local IP address when using webRTC (fixes https://github.com/bromite/bromite/issues/589)
* add menu entry to select all bookmarks (fixes https://github.com/bromite/bromite/issues/1959)
* fix Note 9 crash on startup (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1871)
* remove passwords menu entry for leak check
* remove privacy menu entry to use phone as a security key
# 100.0.4896.57
* allow OpenSearch search engine URLs with path
* disable AsyncDNS by default
* remove translate menu entries
* fix patch to remove contextual search (thanks to @nikolowry)
* add option to never expire history
* improve description for JIT site settings (fixes https://github.com/bromite/bromite/issues/1931)
* remove more signin integration (fixes https://github.com/bromite/bromite/issues/1902)
* miscellaneous fixes for AMP and background video playback (fixes https://github.com/bromite/bromite/issues/1921)
* update zh_CN translations (thanks to @zhmars)
# 99.0.4844.77
* fix missing adaptive icon for updates
* do not close adblock filters editor when tapping reset button
* change text for 'Never' in history days to keep setting
* bring back dictionary hints in address bar
# 99.0.4844.58
* remove contextual search (fixes https://github.com/bromite/bromite/issues/1750)
* remove global JIT settings
* add privacy setting for how many number of days of history to keep (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1870)
* disable UA full version (thanks to @uazo)
* reintroduce patch for Save-Data header
* updated zh_CN translations (thanks to @zhmars)
* reintroduce Save-Data header flag
# 99.0.4844.55
* flag to enable Certificate Transparency (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1554)
* allow adding search engines from incognito mode
* disable all predictors code (thanks to @uazo)
* revert allow block of view-source URLs
* enable StrictOriginIsolation and SitePerProcess for all devices (thanks to @uazo)
* JIT toggle site setting (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1720 and https://github.com/bromite/bromite/issues/1819)
* move always incognito preference to native (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1496 and https://github.com/bromite/bromite/issues/1568)
* remove Save-Data header flag
* close a potential security issue with user scripts on native pages (thanks to @uazo)
* disable safety checks and possible Omaha interactions
* disable SegmentationPlatformFeature and Optimization Hints (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1632)
* add notification for a major upstream version being released (fixes https://github.com/bromite/bromite/issues/1796)
* fix screenshots in incognito allowed by default (fixes https://github.com/bromite/bromite/issues/1816)
# 98.0.4758.116
* disable minidumps upload
* complete disabling of client hint headers (thanks to @uazo)
* disable another way to activate origin trials (thanks to @uazo)
* fix for gateway attacks via websockets blocking (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1693)
# 98.0.4758.108
* re-introduce flag for text fragments
* re-introduce content feature flag to disable field trials
* disable idle detection
* disable critical client hints
* disable supervised users
* partial fix for incognito notification (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1503)
* consider websockets 'unknown' address space as 'public' (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1693)
* fix crash when accessing site settings of some sites (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1355)
# 97.0.4692.106
* disable url-keyed metrics reporting service (thanks to @uazo)
* disable mobile identity consistency by default
* disable appending variations header
* use Google Chrome branding for client hints
* make HTTPS-only mode enabled by default
* enable trivial auto var init (thanks to @BayLee4, fixes https://github.com/bromite/bromite/issues/1749)
* enable use_cfi_cast
# 96.0.4664.183
* updated zh_CN translations (thanks to @zhmars)
# 96.0.4664.104
* separate patches for package name
# 96.0.4664.54
* restored offline-indicator-v2 flag (fixes https://github.com/bromite/bromite/issues/1588)
* re-introduced option to use home page as NTP (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1519)
* ask user before closing all tabs (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1561)
* fix crash on always incognito on tablet (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1611)
* dropped patch to not upload crash data
* fix autofill pop-up not appearing (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1534)
# 95.0.4638.79
* improvements for field trials disable patch (thanks to @uazo)
* remove privacy sandbox UI leftover (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1560)
* disable conversion measurement API (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1531)
* remove all code related to FLoC (thanks to @uazo)
* remove all code related to ENABLE_REPORTING (thanks to @uazo)
* enable ad-tagging feature
* SystemWebView: ignore StrictMode warning (thanks to @jylitalbit, https://github.com/bromite/bromite/pull/1567)
* improvements for field trials fetch patch (thanks to @uazo)
* disable accessibility service by default (thanks to @uazo, https://github.com/bromite/bromite/pull/1559)
# 95.0.4638.78
* disable third-party origin trials (fixes https://github.com/bromite/bromite/issues/1530)
* dropped patch for async DNS flag
* dropped duplicate patch for pull-to-refresh flag
* fix application not closing on incognito tab (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1503)
* fix external links in incognito not always opening (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1474)
* fix incognito tab closing new tab under normal tab (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1030)
* allow custom tab intents and opening external links in incognito (thanks to @uazo)
* never use HTTP probes for connectivity check on Android < M
* re-introduce option to use home page as NTP (thanks to @uazo, https://github.com/bromite/bromite/pull/1586)
# 94.0.4606.109
* experimental user scripts support (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/792)
* Bromite auto-update notifications enabled by default
* enable Android native autofill (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/547)
# 94.0.4606.102
* add flag to disable pull-to-refresh effect
* add recents, offlinepage and send to home screen for always incognito (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1182 and https://github.com/bromite/bromite/issues/1362)
* prompt to restart when always-incognito is enabled (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1459)
* merge patches for custom tab intents
# 94.0.4606.94
* Bromite auto-update feature, disabled by default (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/706)
* add site setting for images (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1339)
* use SM-G960U as model provided via client hints and Javascript
* drop patches already merged upstream
# 93.0.4577.110
* set enable_reporting to false (thanks to @nikolowry)
* backported patches for security issues https://crbug.com/1245578 and https://crbug.com/1251787
* disable AGSA by default
* disable UA client hint for model
* disable lock icon in address bar by default
* enable share intent (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1062)
* allow forcing external links to open in incognito (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/728)
* avoid double restart for default tab groups flags status
# 93.0.4577.83
* dropped patch for FLoC (already disabled by upstream)
* dropped patch for build with system sysroots
* disable tab groups by default (needs restart)
* added 'services/network/public/mojom' to ad blocker patch to avoid a build error
# 92.0.4515.176
* use upstream feature to prevent default search engine permissions grants
* slightly improve error message for gateway attacks prevention error
# 92.0.4515.134
# 92.0.4515.125
* replace patch for missing API keys warning
* fix subresource filter not working (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1299)
# 92.0.4515.103
* disable User Agent client hints
* fix builds with system sysroots
* force text/x-suse-ymp to be downloaded
# 91.0.4472.158
* added x64 releases
# 91.0.4472.146
* removed flags for device motion/orientation (fixes https://github.com/bromite/bromite/issues/1204)
* prevent crash on download on API level 21 (fixes https://github.com/bromite/bromite/issues/1184)
* fix crash reporting garbled UI for small screens (thanks to @uazo, https://github.com/bromite/bromite/pull/1236)
* add flag to enable/disable vibration API (fixes https://github.com/bromite/bromite/issues/1045)
# 91.0.4472.143
* add support for ISupportHelpAndFeedback
* JIT-less toggle (fixes https://github.com/bromite/bromite/issues/1235)
* enable crash reporting UI (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/944)
# 91.0.4472.102
* fix opening new tabs from links in always-incognito mode (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1154)
# 91.0.4472.97
* add flag for omnibox autocomplete filtering (fixes https://github.com/bromite/bromite/issues/1152)
* enable IntentBlockExternalFormRedirectsNoGesture by default
* add flag to disable external intent requests
* fix for tab collection temporary/non-exportable (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1138)
# 91.0.4472.50
* unexpire tab group flags `#enable-tab-groups` and `#enable-tab-groups-ui-improvements`
* replace known good hostname used for DoH test (fixes https://github.com/bromite/bromite/issues/1148)
* drop patch to disable preview fetching
* drop patch to restore horizontal tab switcher
# 90.0.4430.204
* fix for custom tab intent tab crashes when in always incognito mode (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1116)
# 90.0.4430.101
* disable RTCGetCurrentBrowsingContextMedia by default
* disable FLoC by default
# 90.0.4430.92
* restore horizontal tab switcher feature (fixes https://github.com/bromite/bromite/issues/1077)
* fix a couple of bugs in proxy saving UI (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1072)
* disable feeds V2 toggle (fixes https://github.com/bromite/bromite/issues/1070)
* allow fetching field trials from flags (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1021)
* add AllowUserCertificates flag (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/921)
* add IsCleartextPermitted flag (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1068)
# 90.0.4430.74
* re-added patch for User agent customization (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1049)
* fix always-incognito custom tab intents issues (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1047 and https://github.com/bromite/bromite/issues/1051)
* prevent Omnibox URL elisions by default
# 90.0.4430.59
* fix menu items not properly displayed with tab overflow menu regroup (fixes https://github.com/bromite/bromite/issues/963)
* fix text displayed for menu entry to bookmark all tabs
* bookmarks import/export: disable SAF by default (fixes https://github.com/bromite/bromite/issues/1039)
* disable offline measurement background task
* dropped patch to show warnings for TSLv1.0/v1.1 connections (upstream now disallows them)
* disable AImageReader by default on Android 9 and below for Qualcomm (fixes https://github.com/bromite/bromite/issues/1005)
# 89.0.4389.117
* disable AImageReader by default on Android 9 and below for ARM (fixes https://github.com/bromite/bromite/issues/1005)
* log checksum of AdBlock filters
# 89.0.4389.100
* enable AImageReader by default (fixes https://github.com/bromite/bromite/issues/1005)
* fix missing flag for AImageReader
* move incognito snapshots flag to proper section (fixes https://github.com/bromite/bromite/issues/1006)
* add missing icon for exit menu
* implement SAF for bookmarks export functionality (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/831)
# 89.0.4389.92
* updated zh_CN translations (thanks to @zhmars, https://github.com/bromite/bromite/pull/1000)
* introduce Alt+D hotkey to focus address bar (fixes https://github.com/bromite/bromite/issues/979)
* use 64-bit ABI for webview processes (fixes https://github.com/bromite/bromite/issues/997)
* use dedicated folder for bookmark all tabs
* fix Javascript and cookies permissions missing (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/990)
* fix missing enable Save-Data header flag (fixes https://github.com/bromite/bromite/issues/989)
* fix menu items not properly displayed with tab overflow menu regroup (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/963)
# 89.0.4389.78
* make all favicon requests on-demand
* restored older icon for view source menu item
* prevent adblock filters update check on app start (fixes https://github.com/bromite/bromite/issues/967)
* removed UI for adblock filters (fixes https://github.com/bromite/bromite/issues/941)
* dropped patch for swapped favicons bug
* dropped patch to enable reduced-referrer-granularity by default (already present upstream)
* dropped password reuse detection patch
* dropped UA customization patch
* enabled PartitionExpectCTStateByNetworkIsolationKey and PartitionDomainReliabilityByNetworkIsolationKey (fixes https://github.com/bromite/bromite/issues/985)
# 88.0.4324.207
* add flag for save-data-header
* add option to force tablet UI
* fix bug with adblock filters not being downloaded correctly (fixes https://github.com/bromite/bromite/issues/960)
* move up bookmark all tabs menu item (fixes https://github.com/bromite/bromite/issues/943)
* fix icons for exit and view source menu items
# 88.0.4324.187
* fix exit menu item not working in tablet mode
* add menu item to bookmark all tabs (fixes https://github.com/bromite/bromite/issues/570)
* enable app overflow menu icons by default
* UI for adblock filters (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/811)
* dropped patch to not permit user-installed certificates
* ignore enterprise policies for secure DNS (fixes https://github.com/bromite/bromite/issues/832)
# 88.0.4324.185
* fix favicons fallback search (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/788)
* fix potential DIAL crash when network state changes (thanks to @Ahrotahn)
* fix crash when opening links in incognito-only mode (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/899)
* disallow empty custom user agent (thanks to @uazo)
# 88.0.4324.149
* fix proxy PAC URL option not working (fixes https://github.com/bromite/bromite/issues/908)
* store proxy configuration in LocalState instead of Profile (thanks to @uazo)
* fix toggle for reversing the meaning of bypass rules (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/884)
* do not permit user-installed certificates
# 88.0.4324.141
* fix bookmarks not opening (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/891)
* fix proxy page not loading (fixes https://github.com/bromite/bromite/issues/890)
# 88.0.4324.95
* fix broken recent tabs behaviour (fixes https://github.com/bromite/bromite/issues/886)
* re-introduce flags for number of raster threads (fixes https://github.com/bromite/bromite/issues/875)
* avoid initializing histogram data for the WebView (https://github.com/bromite/bromite/issues/873)
* dropped patch for manifest changes for Q/R (already present upstream)
* fix check for HTML extension in bookmark import dialog
# 87.0.4280.131
* enable all network isolation features (fixes https://github.com/bromite/bromite/issues/836)
* disable unified autoplay feature (fixes https://github.com/bromite/bromite/issues/804)
# 87.0.4280.106
* enable SplitCacheByNetworkIsolationKey (fixes https://github.com/bromite/bromite/issues/836)
* fix random timezone option (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/828)
* disable autofill server communication by default
* ask permission to play protected media by default
* disable SystemWebView variations support
# 87.0.4280.81
* fix text fragment not disabled by default, unexpire flag (fixes https://github.com/bromite/bromite/issues/803)
* turn AImageReader off by default on ARM64 (fixes https://github.com/bromite/bromite/issues/814)
* fix issue with global autoplay settings (thanks to @uazo, https://github.com/bromite/bromite/pull/825)
* fix issues with user agent customization (thanks to @uazo, https://github.com/bromite/bromite/pull/823)
* updated zh_CN translations (thanks to @zhmars, https://github.com/bromite/bromite/pull/821)
# 87.0.4280.68
* user agent customization (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/798)
* fix for intent handling for local apps on Android 11 (https://github.com/bromite/bromite/pull/816)
# 87.0.4280.67
# 86.0.4240.194
* fix native pages displaying incorrectly with the sticky desktop mode (thanks to @uazo)
* re-introduce simplified NTP (fixes https://github.com/bromite/bromite/issues/701)
* re-introduce site settings to block autoplay (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/791)
* fix Omnibox flag not working (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/789)
# 86.0.4240.181
* allow sticky desktop mode for all tabs (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/780)
# 86.0.4240.112
* fix crash in new overflow menu (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/771)
# 86.0.4240.99
# 86.0.4240.92
* upstream fix for video playback audio issue (fixes https://github.com/bromite/bromite/issues/755)
* fix order of entries in privacy settings (fixes https://github.com/bromite/bromite/issues/758)
# 86.0.4240.73
* re-introduce ARM64 AImageReader mitigations (fixes https://github.com/bromite/bromite/issues/766)
* re-introduce menu items for autocomplete, autofill assistant and contextual search (fixes https://github.com/bromite/bromite/issues/763)
# 86.0.4240.70
* fixed crash on unused menu item tap (fixes https://github.com/bromite/bromite/issues/760)
* fixed issue on new installations without DoH configuration (fixes https://github.com/bromite/bromite/issues/761)
# 86.0.4240.66
* switch to upstream UI for DoH URL customization
* remove weblayer dependency on Play Services
* build fixes for password service
* removed obsolete patch to kill Translate
* removed patch to revert unified consent code
* removed patch for dav1d library
* removed patch for improved cookie controls defaults
* removed patches for ARM64 AImageReader issues
# 85.0.4183.114
# 85.0.4183.110
* hardening against incognito mode detection
* fix background playback issue (fixes https://github.com/bromite/bromite/issues/734)
# 85.0.4183.94
* disable the DIAL repeating discovery
* removed patch for session-only cookies support
* add timezone customization patch (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/331)
* fixed bug happening when configuring proxies in incognito mode (thanks to @uazo)
# 85.0.4183.86
* fix LocationBarPhone app crash at startup (fixes https://github.com/bromite/bromite/issues/565)
# 85.0.4183.84
* fix crash in About page (fixes https://github.com/bromite/bromite/issues/710)
* fix adding more than one proxy (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/679)
* fix system proxy configuration (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/377)
# 85.0.4183.82
* fixes bookmark button not working with always-incognito (fixes https://github.com/bromite/bromite/issues/654)
* disable scroll-to-text-fragment
* remove NTP blocklisted URLs when adding an URL as bookmark
* removed duet flags
* unexpire `#darken-websites-checkbox-in-themes-setting` flag
* rollback dav1d upgrade which breaks x86
# 84.0.4147.132
* fix exit menu item not always working (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/673)
* session-only cookies site settings option (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/142)
* add setting to enable history on incognito mode (thanks to @uazo)
* removed old non-working site settings patches
# 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)
* restore duet flags (fixes https://github.com/bromite/bromite/issues/667)
# 84.0.4147.113
* block gateway attacks via websockets (fixes https://github.com/bromite/bromite/issues/590)
* enable prefetch-privacy-changes by default (fixes https://github.com/bromite/bromite/issues/659)
* enable reduced-referrer-granularity by default (fixes https://github.com/bromite/bromite/issues/659)
# 84.0.4147.106
* fixed bug with Javascript site settings not showing
* add exit menu item to overview menu (fixes https://github.com/bromite/bromite/issues/619)
# 84.0.4147.95
* show warnings for TLSv1.0/TLSv1.1 connections (fixes https://github.com/bromite/bromite/issues/645)
* fix bug with unconfigured DoH (fixes https://github.com/bromite/bromite/issues/646)
# 84.0.4147.90
* added menu item to view source of current page
* fixed dialog for SSL/TLS errors (fixes https://github.com/bromite/bromite/issues/638)
* build with feeds support due to upstream build flags combination bugs
# 83.0.4103.119
* restored non-CFI builds for x86
# 83.0.4103.101
* enable HEVC and Dolby Vision
# 83.0.4103.93
* fix undesired replacement for search engines (fixes https://github.com/bromite/bromite/issues/595)
* fix resume flag not visible
# 83.0.4103.76
* fixed inverted Omnibox flag
* fixed LocationBarPhone/LocationBarTablet crash (fixes https://github.com/bromite/bromite/issues/565)
# 83.0.4103.53
* updated zh_CN translations
* mitigation for LocationBarPhone crash (https://github.com/bromite/bromite/issues/565)
# 83.0.4103.46
* add zh_CN missing translations (fixes https://github.com/bromite/bromite/issues/546)
* change default mode for WebRTC (fixes https://github.com/bromite/bromite/issues/553)
* add flag to allow screenshots of incognito tabs (fixes https://github.com/bromite/bromite/issues/551)
* reintroduced patches for disabling AImageReader
* fixed DevTools issue with domain substitution (fixes https://github.com/bromite/bromite/issues/526)
* drop patch to disable QUIC by default
* drop patch for DoH minimum timeout (upstream also implemented it)
* dropped patch for removal of support of CCT dynamic modules (upstream also removed it)
* removed upstream patch for SD card not found issue (upstream merged it)
* enable reporting because of COEP
# 81.0.4044.127
* fix always-incognito crashes (https://github.com/bromite/bromite/issues/135 and https://github.com/bromite/bromite/pull/529)
* improved crash uploader mock by calling done callback
# 81.0.4044.106
* remove option to add NTP as homepage (fixes https://github.com/bromite/bromite/issues/517)
# 81.0.4044.97
* disable browser auto-login by default
* show download prompt again
# 81.0.4044.83
# 81.0.4044.76
# 81.0.4044.70
* backport surface control fix (fixes https://github.com/bromite/bromite/issues/445)
# 81.0.4044.63
* use upstream fix for SD card not found issue (fixes https://github.com/bromite/bromite/issues/485)
* do not compile QR code sharing
* remove obsolete patch for GCM experiment status
* drop 2 patches for AImageReader crash fix (upstream has the same revert patches)
# 80.0.3987.118
* disable AImageReader for all ARM64 devices (fixes https://github.com/bromite/bromite/issues/497)
* use upstream possible workaround for SD card not found issue (fixes https://github.com/bromite/bromite/issues/485)
# 80.0.3987.109
* restored GPU workaround for the ARM/ARM64 AImageReader crash (https://github.com/bromite/bromite/issues/445)
# 80.0.3987.95
* enable user-agent freeze (fixes https://github.com/bromite/bromite/issues/483)
* fix issue with AMP (fixes https://github.com/bromite/bromite/issues/488)
@@ -219,6 +775,7 @@
* use adblock engine also in SystemWebView
* add back uBlock Origin and EasyList filters
* added Fanboy's Annoyance List
* remove AdGuard filters
# 72.0.3626.119
* use AdGuard filters
+28 -6
View File
@@ -20,7 +20,7 @@ Projects which follow a strict approach on this are [Iridium](https://iridiumbro
Yes, in order to play protected/encrypted media content the browser will use Android's DRM media framework to automatically negotiate access (same as Chromium).
This means for example that requests to Android license servers will be performed (`www.googleapis.com`), see https://w3c.github.io/encrypted-media/#direct-individualization
To disable this functionality you should disable protected content playback from Site settings -> Multimedia.
To disable this functionality you should disable protected content playback from Site settings -> Protected Content.
## What is the SystemWebView?
It is the core component of Android for all web page visualizations. For example when you access a new wifi network and need to activate it, that is using the SystemWebView. If you do not know what it is then you do not need to install it.
@@ -31,14 +31,14 @@ Ad-blocking was present and always enabled in the SystemWebView from version `72
## How to enable DNS-over-HTTPS?
See [this wiki page](https://github.com/bromite/bromite/wiki/Enabling-DNS-over-HTTPS).
See [this page](https://www.bromite.org/doh).
## Can you add HTTPS everywhere?
No.
We cannot add add-ons to Bromite (merely some features).
## Is Bromite on Play Store?
No, and this is unlikely to change. Many limitations apply for submissions there, including which ads are allowed to be blocked.
No, and this is not going to change. Many limitations apply for submissions there, including which ads are allowed to be blocked.
Bromite favors user freedom in software choice: the device is yours so you get to choose which software to run on it, end of the story.
@@ -48,9 +48,7 @@ It is not on the official F-Droid repository and there are no (more) plans to su
You can use F-Droid client to install and receive updates via [the official Bromite F-Droid repository](https://www.bromite.org/fdroid).
## Does Bromite support WebRTC?
Yes, since version 69. While the desktop version of Chromium has an option to disable it (video/audio site settings), the Android version cannot.
The WebRTC functionality has always been using safe defaults to prevent leaks (disabled multiple routes and non-proxied UDP).
Partially, see https://github.com/bromite/bromite/wiki/WebRTC
## Using Bromite will favour the monopoly of the Chromium/Blink engine, why do you develop and maintain Bromite?
In short, to show what a Chromium-based engine could do **for the user** if the user experience and needs were the main focus of modern browser design.
@@ -67,3 +65,27 @@ when websites use the [Push API](https://w3c.github.io/push-api/); this will not
[ServiceWorker notifications](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/showNotification) do work instead since they use
[android.app.Notification](https://developer.android.com/guide/topics/ui/notifiers/notifications).
## Can PWAs be installed?
PWAs are only supported as home shortcuts; WebAPKs will not work because they are generated server-side on googleapis.com (which is not allowed in Bromite).
## Does Bromite support the Android autofill framework?
Yes, since version 94.0.4606.109 the native Android autofill can be used; this does not require accessibility services as a workaround.
## Does Bromite support casting media content?
No, this would require Play Store binary blobs.
## Can you add this search engine as default?
No.
Bromite does not make any choice related to default search engines, the Chromium default is used.
Various Android browsers get some fee to ship their apps with a specific default search engine, Bromite does not get any fee from anyone.
Changing the default search engine would lead to an endless series of requests to change it based on personal preferences, thus no change is made to the default.
See also: https://github.com/bromite/bromite/wiki/SearchEngines
## Some sites show ads, how can I fix this?
You can compare the blocked URLs with a desktop browser and Bromite (using [remote debugging](https://developer.chrome.com/docs/devtools/remote-debugging/)) and figure out some new filter rules to be added.
If the ads are blocked via cosmetic filtering then blocking them is not possible with Bromite's engine and you might need something like an [user script](https://github.com/bromite/bromite/wiki/UserScripts) instead.
See also: https://github.com/bromite/bromite/wiki/AdBlocking
+122 -19
View File
@@ -1,17 +1,23 @@
# Bromite - Take back your browser
<a href="https://github.com/bromite/bromite/releases/latest">
<img src="https://www.bromite.org/release.svg" alt="current Bromite release" title="current Bromite release" /> </a>
<a href="https://github.com/bromite/bromite/blob/master/LICENSE">
<img src="https://www.bromite.org/license.svg" alt="GNU GPL v3" title="GNU VPL v3" />
</a> <br>
<a href="https://www.bromite.org">
<img title="Bromite - take back your browser!" src="https://www.bromite.org/android-icon-192x192.png" width="96" alt="Bromite" />
</a>
<img src="https://www.bromite.org/release.svg" alt="current Bromite release" title="current Bromite release" /> <img src="https://www.bromite.org/license.svg" alt="GNU GPL v3" title="GNU VPL v3" />
Bromite is a [Chromium](https://www.chromium.org/Home) fork with support for ad blocking and enhanced privacy.
<img title="Bromite - take back your browser!" src="https://www.bromite.org/android-icon-192x192.png" width="96" alt="Bromite" />
Bromite is only available for Android Marshmallow (v6.0, API level 23) and above.
Bromite is [Chromium](https://www.chromium.org/Home) plus some patches for ad blocking and enhanced privacy.
Bromite is only available for Android v4.4 and above.
<img src="https://www.bromite.org/bromite_bromite_gh_downloads.svg" alt="downloads on Github" title="downloads on Github" />
<img src="https://fdroid.bromite.org/fdroid/bromite_bromite_gh_downloads.svg" alt="Downloads on Github" title="Downloads on Github" />
For the Frequently Asked Questions see [F.A.Q.](./FAQ.md).
For documentation see the [wiki](https://github.com/bromite/bromite/wiki).
# Goals
Bromite aims at providing a no-clutter browsing experience without privacy-invasive features and with the addition of a fast ad-blocking engine.
@@ -23,36 +29,70 @@ Please donate to support development of Bromite and the costs for the build syst
[&rarr; Support development with a donation](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=JP3XTQPVRNET2): [![paypal](https://www.bromite.org/assets/img/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=JP3XTQPVRNET2)
<a href="bitcoin:3MkC3idL61npQSCxL1gceksmRTkNkiCPcG">BTC donations address</a>: `3MkC3idL61npQSCxL1gceksmRTkNkiCPcG`
<a href="bitcoin:bc1qlx7h0lj9z88g2xfeuwsrtfs77sxuhrxf2t28sw">BTC donations address</a>: `bc1qlx7h0lj9z88g2xfeuwsrtfs77sxuhrxf2t28sw`
ETH donations address: `0xf47ff39223d828f99fec5ab53bd068c5c0522042`
ETH donations address: `0x5d392F8FBf3465afe05B1Adc575e248D33B891F6`
# Features
* customizable adblock filters via user-provided URL
* customizable adblock filters via user-provided URL (see https://www.bromite.org/custom-filters)
* automatically updated adblock filters
* remove click-tracking and AMP from search results
* DNS-over-HTTPS support with any valid IETF DoH endpoint
* always-incognito mode
* disable all field trials permanently
* disable [QUIC](https://en.wikipedia.org/wiki/QUIC) by default
* disable smart search by default, allow web search from incognito mode
* always-visible cookies, javascript and ads site settings
* always-visible cookies, javascript and ads site settings from address bar popup
* remove Play integration binary blobs
* use [CFI](https://en.wikipedia.org/wiki/Control-flow_integrity) on all architectures except x86
* enable trivial auto var init
* disable media router and remoting by default
* disable dynamic module loading
* show warnings for TLSv1.0/TLSv1.1 pages
* enable site-per-process isolation for all devices with memory > 1GB
* completely remove safe browsing and other privacy-unfriendly features
* [proxy configuration page](https://github.com/bromite/bromite/wiki/ProxyConfiguration) with PAC and custom proxy lists support
* [StartPage](https://startpage.com/), [DuckDuckGo](https://duckduckgo.com/) and [Qwant](https://www.qwant.com/) search engines available by default
* flags to disable custom intents and clear session on exit
* flags to toggle anti-fingerprinting mitigations for canvas, audio, client rects, webGL and sensor APIs
* settings to disable custom intents and clear session on exit
* flags to toggle anti-fingerprinting mitigations for canvas, audio, client rects, webGL and sensor APIs (see full list below for all the new flags)
* use frozen User-Agent to conceal real model and browser version
* privacy enhancement patches from [Iridium](https://iridiumbrowser.de/), [Inox patchset](https://github.com/gcarq/inox-patchset), [Brave](https://brave.com/) and [ungoogled-chromium](https://github.com/Eloston/ungoogled-chromium) projects
* security enhancement patches from [GrapheneOS](https://github.com/GrapheneOS) project
* disable scroll-to-text-fragment
* reduced referer granularity
* block gateway attacks via websockets (partial fix, see [this upstream issue](https://bugs.chromium.org/p/chromium/issues/detail?id=590714))
* use 64-bit ABI for webview processes
* make all favicon requests on-demand ([supercookie](https://supercookie.me/) mitigation)
* enable all network isolation features (`PartitionConnectionsByNetworkIsolationKey`, `PartitionHttpServerPropertiesByNetworkIsolationKey`, `SplitHostCacheByNetworkIsolationKey`, `AppendFrameOriginToNetworkIsolationKey`, `SplitCacheByNetworkIsolationKey`, `UseRegistrableDomainInNetworkIsolationKey`, `PartitionSSLSessionsByNetworkIsolationKey`, `PartitionExpectCTStateByNetworkIsolationKey`, `PartitionDomainReliabilityByNetworkIsolationKey`)
* ignore enterprise policies that disallow secure DNS
* ask permission to play protected media
* disable the DIAL repeating discovery
* disable RTCGetCurrentBrowsingContextMedia by default
* disable FLoC and privacy sandbox by default
* disable feeds
* disable reporting of certificate errors
* use pre-defined phone model for client hints and Javascript
* allow forcing external links to open in incognito
* disable AGSA by default
* flag to enable Certificate Transparency
* allow adding search engines from incognito mode
* disable predictors
* disable supervised users
* disable safety check
* disable capability to block `view-source:` URLs
* disable `SegmentationPlatformFeature`, `OptimizationHints`, client hint headers
* disable `AsyncDNS` by default
* customize history expiration threshold
* disable idle detection
* HTTPS-only mode enabled by default
* disable TLS resumption by default
* partition DoH requests by top-frame NIK
* strict site isolation and strict origin isolation
## Features not related to privacy
* browser automatic updates, enabled by default
* native Android autofill support
* import/export bookmarks
* bookmark all tabs from tabs regroup menu
* allow playing videos in background tabs and disable pause on switching tabs
* all codecs included (proprietary, open H.264 etc.)
* [AV1 codec support](https://github.com/bromite/bromite/wiki/AV1-support)
@@ -62,6 +102,21 @@ ETH donations address: `0xf47ff39223d828f99fec5ab53bd068c5c0522042`
* allow changing default download storage location
* do not ignore save prompt for users without SD cards
* disable articles and increase number of icons on new tab page
* adding an URL as bookmark will clear its blocked status for the NTP tiles
* history support in incognito mode
* view source of pages
* sticky desktop mode setting
* mobile/desktop user agent customization
* accessibility preference to force tablet UI
* use Alt+D to focus address bar
* allow sharing to Bromite
* UI for crash information collection
* allow OpenSearch search engine detection in incognito
* allow OpenSearch search engine detection with paths
* keyboard dictionary hints in address bar
* always allow `view-source:` URLs
* allow moving navigation bar to bottom
* add option to use home page as NTP
You can inspect all functionality/privacy changes by reading the [patches](https://github.com/bromite/bromite/tree/master/build/patches) and/or the [CHANGELOG](./CHANGELOG.md).
@@ -69,9 +124,44 @@ You can inspect all functionality/privacy changes by reading the [patches](https
Flags which have been retired from upstream Chromium but are still available in Bromite.
* `#enable-horizontal-tab-switcher`
* `#pull-to-refresh`
* `#enable-search-ready-omnibox`
* `#darken-websites-checkbox-in-themes-setting`
* `#simplified-ntp`, enabled by default
* `#enable-text-fragment-anchor`, disabled by default
* `#num-raster-threads`
* `#enable-image-reader`, enabled by default
* `#enable-tab-groups` and `#enable-tab-groups-ui-improvements`
* `#offline-indicator-v2`
New flags:
* `#fingerprinting-canvas-image-data-noise`, `#fingerprinting-client-rects-noise` and `#fingerprinting-canvas-measuretext-noise`, enabled by default
* `#incognito-screenshot`, disabled by default
* `#max-connections-per-host`
* `#resume-background-video`
* `#ipv6-probing`
* `#enable-device-motion` and `#enable-device-orientation`
* `#show-legacy-tls-warnings`
* `#save-data-header`, disabled by default
* `#export-bookmarks-use-saf`, disabled by default
* `#allow-user-certificates`, disabled by default
* `#cleartext-permitted`, enabled by default, can be used to disable all cleartext-HTTP traffic
* `#omnibox-autocomplete-filtering`, can be used to restrict omnibox autocomplete results
* `#disable-external-intent-requests`, can be used to disable opening any external app for any URL
* `#enable-userscripts-log`, see https://github.com/bromite/bromite/wiki/UserScripts#flags
* `#certificate-transparency-enabled`, enabled by default; see https://chromium.googlesource.com/chromium/src/+/master/net/docs/certificate-transparency.md
* `#move-top-toolbar-to-bottom`, disabled by default
* `#site-engagement`, enabled by default, can be used to disable the automatically-generated icons for most visited sites on the NTP
### Site settings
* webGL, disabled by default
* images, enabled by default
* Javascript JIT, disabled by default
* timezone customization override
* autoplay, disabled by default
* webRTC, disabled by default
# Privacy limitations
@@ -83,9 +173,11 @@ All built versions are available as [releases](https://github.com/bromite/bromit
Each tag corresponds to a Chromium Stable release tag.
Bromite is currently built for ARM, ARM64 and x86 and for the Android SDK versions 19 and 21; [Bromite SystemWebView](https://www.bromite.org/system_web_view) is provided as well (SDK21+).
Bromite is currently built for ARM, ARM64 and x86 and for the Android SDK version 23+; [Bromite SystemWebView](https://www.bromite.org/system_web_view) is provided as well (SDK23+).
For every Bromite build you can always find a matching [vanilla Chromium](https://www.bromite.org/chromium) build which is used for example to verify which issues are specific to Bromite or not.
You will automatically receive notifications about new updates (and be able to install them) via the auto updater functionality (enabled by default), see [related wiki page](https://github.com/bromite/bromite/wiki/AutomaticUpdates).
All official releases are also available through the [official third-party F-Droid repository](https://www.bromite.org/fdroid).
## Integrity and authenticity
@@ -114,7 +206,8 @@ The [Bromite main repository](https://github.com/bromite/bromite) contains tags
Please refer to [official Chromium build documentation](https://www.chromium.org/developers/how-tos/get-the-code) to get started on how to build Chromium; if you can build Chromium for Android, you can build Bromite.
The GN args used to build Bromite are available here: [GN_ARGS](./build/GN_ARGS).
The Chromium version tag used as base for the patches is available here: [RELEASE](./build/RELEASE); this is always corresponding to the git tag for every release.
The GN args used to build Bromite are available here: [bromite.gn_args](./build/bromite.gn_args).
The patches are to be applied second the order specified in the `bromite_patches_list.txt` file (you can use `git am`).
## How to build the filters
@@ -123,6 +216,14 @@ See upstream documentation: https://github.com/chromium/chromium/blob/master/com
Bromite uses an unindexed filter file, which is periodically published at https://github.com/bromite/filters
# Contributing
Please submit issues following the issue template; beware that GitHub does not display the templates from mobile.
Patches are welcome and accepted if they match the project goals.
For any usage or development discussion please use GitHub Discussions: https://github.com/bromite/bromite/discussions
# Credits
* [Chromium project](https://www.chromium.org/Home) and developers
@@ -131,7 +232,7 @@ Bromite uses an unindexed filter file, which is periodically published at https:
* [ungoogled-chromium-android](https://github.com/ungoogled-software/ungoogled-chromium-android) for some patches
* [GrapheneOS](https://github.com/GrapheneOS) for some security patches
* [Inox patchset](https://github.com/gcarq/inox-patchset) for some patches (via ungoogled-chromium)
* [Brave Browser](https://github.com/brave/browser-android-tabs) for some patches
* [Brave Browser](https://github.com/brave/brave-core) for some patches
* [Vadim Pleshkov](http://vadimpleshkov.me/) for Bromite's logo
# Filters credits
@@ -140,6 +241,8 @@ Bromite uses an unindexed filter file, which is periodically published at https:
* [uBlock Origin](https://github.com/uBlockOrigin)
* [Peter Lowe's Ad and tracking server list](https://pgl.yoyo.org/adservers/)
The URLs of the lists used are available at: https://github.com/bromite/filters/blob/master/lists.txt
# License
The patches published as part of the Bromite project are released under [GNU GPL v3](./LICENSE).
+1
View File
@@ -0,0 +1 @@
e3a3a1fe718bf559be801d14660fb6f9dc9bf603-
+1
View File
@@ -0,0 +1 @@
115.0.5790.98
+1
View File
@@ -0,0 +1 @@
5923fa90d4e3587c130983442b9cf90f4c76e851
+49
View File
@@ -0,0 +1,49 @@
android_channel="stable"
blink_symbol_level=1
build_contextual_search=false
build_with_tflite_lib=false
chrome_pgo_phase=0
dcheck_always_on=false
debuggable_apks=false
dfmify_dev_ui=false
disable_android_lint=true
disable_autofill_assistant_dfm=true
disable_fieldtrial_testing_config=true
disable_tab_ui_dfm=true
enable_av1_decoder=true
enable_dav1d_decoder=true
enable_gvr_services=false
enable_hangout_services_extension=false
enable_iterator_debugging=false
enable_mdns=false
enable_mse_mpeg2ts_stream_parser=true
enable_nacl=false
enable_platform_dolby_vision=true
enable_platform_hevc=true
enable_remoting=false
enable_reporting=false
enable_vr=false
exclude_unwind_tables=false
ffmpeg_branding="Chrome"
icu_use_data_file=true
is_cfi=true
is_component_build=false
is_debug=false
is_official_build=true
proprietary_codecs=true
rtc_build_examples=false
symbol_level=1
system_webview_package_name="org.bromite.webview"
target_os="android"
treat_warnings_as_errors=true
use_cfi_cast=true
use_debug_fission=true
use_errorprone_java_compiler=false
use_gnome_keyring=false
use_official_google_api_keys=false
use_rtti=false
use_sysroot=false
webview_includes_weblayer=false
enable_arcore=false
enable_openxr=false
enable_gvr_services=false
+247 -102
View File
@@ -1,139 +1,284 @@
Disable-third-party-cookies-by-default.patch
Revert-Remove-pre-unified-consent-code-in-sync-and-privacy-directory.patch
Remove-EV-certificates.patch
do-not-hide-.orig-files.patch
Do-not-link-with-libatomic.patch
do-not-add-suffix-to-package-name.patch
exit-on-failure-of-inclusion.patch
Move-some-account-settings-back-to-privacy-settings.patch
kill-Vision.patch
kill-Location-fall-back-to-system.patch
kill-Auth.patch
Remove-binary-blob-integrations.patch
Remove-SMS-integration.patch
Remove-voice-recognition-integration.patch
Do-not-compile-QR-code-sharing.patch
Add-support-for-ISupportHelpAndFeedback.patch
Switch-to-fstack-protector-strong.patch
Enable-fwrapv-in-Clang-for-non-UBSan-builds.patch
Bromite-package-name.patch
Restore-classic-new-tab-page.patch
Always-use-new-tab-page-for-default-home-page.patch
Always-allow-partner-customisation.patch
battery_status_service-disable-more-privacy-nightmares.patch
disable-battery-status-updater.patch
Battery-API-return-nothing.patch
google-cloud-messaging-disable-experiment-status-check.patch
updater-disable-updater-pings.patch
prefs-only-keep-cookies-until-exit.patch
Remove-EV-certificates.patch
promo-disable-Google-promotion-fetching.patch
Disable-omission-of-URL-elements-in-Omnibox.patch
Modify-default-preferences.patch
Do-not-hide-component-extensions.patch
Do-not-store-passwords-by-default.patch
Disable-NTP-remote-suggestions-by-default.patch
Disable-references-to-fonts.googleapis.com.patch
Disable-WebRTC-by-default.patch
Never-send-any-crash-upload-data.patch
Hide-send-reports-checkbox.patch
webRTC-do-not-expose-local-IP-addresses.patch
Never-fetch-popular-sites.patch
ungoogled-chromium-Disable-webRTC-log-uploader.patch
ungoogled-chromium-Disable-untraceable-URLs.patch
ungoogled-chromium-Disable-translate-integration.patch
ungoogled-chromium-Disable-profile-avatar-downloading.patch
ungoogled-chromium-Disable-intranet-redirect-detector.patch
ungoogled-chromium-Disable-Google-host-detection.patch
ungoogled-chromium-Disable-GCM.patch
ungoogled-chromium-Disable-profile-avatar.patch
ungoogled-chromium-Disable-intranet-detector.patch
ungoogled-chromium-no-special-hosts-domains.patch
ungoogled-chromium-Disable-Gaia.patch
ungoogled-chromium-Disable-domain-reliability.patch
ungoogled-chromium-Disable-Network-Time-Tracker.patch
Disable-safe-browsing.patch
Skip-the-first-run-and-metrics.patch
Disable-all-promo-dialogs.patch
Disable-sync-services-menu-entry.patch
Remove-signin-and-data-saver-integrations.patch
Hide-passwords-manager-link.patch
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
Enable-fwrapv-in-Clang-for-non-UBSan-builds.patch
build-remove-calling-untrusted-hooks.patch
AV1-codec-support.patch
Inject-scripts-for-AMP-tracking-ads-and-video-functionality.patch
Inject-scripts-for-AMP-tracking-ads-and-video.patch
Allow-playing-audio-in-background.patch
Add-flag-to-control-video-playback-resume-feature.patch
Open-YouTube-links-in-Bromite.patch
Add-exit-menu-item.patch
Remove-help-menu-item.patch
AudioBuffer-AnalyserNode-fingerprinting-mitigations-via-IDL.patch
Multiple-fingerprinting-mitigations-for-canvas-text-and-client-rectangles.patch
Add-flags-to-disable-device-motion-and-orientation-APIs.patch
Disable-metrics-on-all-I-O-threads.patch
Always-respect-async-dns-flag-regardless-of-SDK-version.patch
Multiple-fingerprinting-mitigations.patch
Add-flag-to-configure-maximum-connections-per-host.patch
Add-site-settings-option-for-session-only-cookies.patch
Add-bookmark-import-export-actions.patch
Disable-promos-displayed-in-bookmarks-manager.patch
Add-an-always-incognito-mode.patch
Add-custom-tab-intents-privacy-option.patch
Add-option-to-not-persist-tabs-across-sessions.patch
Disable-fetching-of-all-field-trials.patch
Disable-seed-based-field-trials.patch
Disable-plugins-enumeration.patch
net-cert-increase-default-key-length-for-newly-generated-RSA-keys.patch
dns-send-IPv6-connectivity-probes-to-RIPE-DNS.patch
profile-resetter-do-not-tick-send-settings-by-default.patch
browser-ui-disable-warning-about-missing-API-keys.patch
autofill-disable-autofill-download-manager.patch
first_run-deactivate-autoupdate-globally.patch
translate-disable-fetching-of-translate-languages-from-server.patch
kill-TOS-and-metrics-opt-out.patch
kill-Translate.patch
kill-Vision.patch
kill-Location-fall-back-to-system.patch
kill-Auth.patch
Remove-dependency-on-com.google.android.gms.auth.patch
kill-GCM.patch
Remove-dependency-on-com.google.android.gcm.patch
Remove-dependency-on-com.google.android.gms.gcm.patch
Remove-dependency-on-com.google.android.play.patch
Remove-dependency-on-com.google.android.gms.vision-com.google.android.gms.clearcut-com.google.android.gms.phenotype.patch
Remove-dependency-on-com.google.android.gms.flags-com.google.android.gms.location.places-com.google.android.gms.stats.patch
Remove-dependency-on-com.google.android.gms.fido-com.google.android.gms.iid-com.google.android.gms.instantapps-com.google.android.gms.location.patch
Remove-dependency-on-com.google.android.gms.cast.patch
Remove-dependency-on-com.google.android.gms.common-auth-signin-dynamic-com.google.android.gms.tasks.patch
Remove-SMS-integration.patch
Allow-website-sign-in-without-account-sign-in.patch
Offer-builtin-autocomplete-for-chrome-flags.patch
Do-not-grant-notifications-to-default-search-engine.patch
Add-flag-to-disable-IPv6-probes.patch
Add-a-proxy-configuration-page.patch
Do-not-ignore-download-location-prompt-setting.patch
Disable-previews-by-default.patch
Add-support-for-writing-URIs.patch
Add-bookmark-import-export-actions.patch
Bookmarks-select-all-menu-entry.patch
Add-an-always-incognito-mode.patch
Keep-flag-to-allow-screenshots-in-Incognito-mode.patch
Add-option-to-not-persist-tabs-across-sessions.patch
Add-a-proxy-configuration-page.patch
Add-custom-tab-intents-privacy-option.patch
Disable-FLoC-and-privacy-sandbox.patch
History-number-of-days-privacy-setting.patch
Disable-fetching-of-all-field-trials.patch
Disable-plugins-enumeration.patch
net-cert-increase-default-key-length.patch
dns-send-IPv6-connectivity-probes-to-RIPE-DNS.patch
Add-flag-to-disable-IPv6-probes.patch
profile-resetter-disable-send-settings.patch
Do-not-build-API-keys-infobar.patch
autofill-miscellaneous.patch
Enable-native-Android-autofill.patch
first_run-deactivate-autoupdate-globally.patch
translate-disable-fetching-of-languages-from-server.patch
Offer-builtin-autocomplete-for-chrome-flags.patch
Use-4-tile-rows-never-show-logo.patch
Disable-metrics-collection-for-NTP-tiles.patch
Enable-site-per-process-isolation-for-devices-with-enough-memory.patch
Add-option-to-use-home-page-as-NTP.patch
Disable-dynamic-module-loading.patch
prefs-disable-signinallowed-by-default.patch
prefs-always-prompt-for-download-directory-by-default.patch
Disable-offline-pages-in-the-downloads-home-to-be-opened-in-CCT-by-default.patch
Enable-changing-default-downloads-storage-location-by-default.patch
disable-payment-support-by-default.patch
disable-background-sync-by-default.patch
disable-sensors-access-site-setting-by-default.patch
Disable-various-metrics.patch
Enable-SPPI-for-devices-with-enough-memory.patch
Enable-StrictOriginIsolation-and-SitePerProcess.patch
Use-64-bit-WebView-processes.patch
prefs-always-prompt-for-download-directory.patch
Disable-offline-pages-in-CCT.patch
Disable-media-router-and-remoting-by-default.patch
Revert-Cleanup-Search-Ready-Omnibox-flag-since-it-has-launched.patch
Disable-search-ready-omnibox-by-default.patch
Restore-Search-Ready-Omnibox-flag.patch
disable-AdsBlockedInfoBar.patch
Bromite-AdBlockUpdaterService.patch
Add-option-to-configure-the-ad-blocker-filters-URL.patch
Revert-Merge-to-M78-Enable-AImageReader-by-default.patch
Bromite-subresource-adblocker.patch
Bromite-auto-updater.patch
Replace-DoH-probe-domain-with-RIPE-domain.patch
Increase-number-of-autocomplete-matches-from-5-to-10.patch
Disable-HEAD-requests-for-single-word-Omnibar-searches.patch
Block-all-connection-requests-with-qjz9zk-in-the-domain-name-or-with-a-trk-scheme.patch
Increase-number-of-autocomplete-matches-to-10.patch
Disable-requests-for-single-word-Omnibar-searches.patch
Disable-some-signed-exchange-features.patch
Add-flag-to-disable-WebGL.patch
Add-user-setting-for-DNS-over-HTTPS-DoH-custom-URL.patch
DoH-improvements.patch
Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch
Revert-flags-remove-disable-pull-to-refresh-effect.patch
Use-dummy-DFM-installer.patch
Disable-password-reuse-detection-on-android.patch
Allow-building-without-feed-support.patch
Disable-addresses-autofill-by-default.patch
Always-show-site-settings-for-cookies-javascript-and-ads.patch
Do-not-enable-QUIC-by-default.patch
Restore-enable-horizontal-tab-switcher-flag.patch
Use-a-minimum-DoH-timeout-of-400ms.patch
Disable-feeds-support-by-default.patch
Disable-DRM-media-origin-IDs-preprovisioning.patch
Disable-smart-selection-by-default.patch
Enable-user-agent-freeze-by-default.patch
Automated-domain-substitution.patch
Guard-for-user-agent-reduction.patch
AImageReader-CFI-crash-mitigations.patch
Add-menu-item-to-view-source.patch
Revert-removal-of-execution-context-address-space.patch
Block-gateway-attacks-via-websockets.patch
Enable-prefetch-privacy-changes-by-default.patch
Disable-support-for-RAR-files-inspection.patch
Enable-darken-websites-checkbox-in-themes.patch
Remove-blocklisted-URLs-upon-bookmark-creation.patch
Disable-the-DIAL-repeating-discovery.patch
Block-qjz9zk-or-trk-requests.patch
Hardening-against-incognito-mode-detection.patch
Restore-Simplified-NTP-launch.patch
Add-option-to-use-home-page-as-NTP.patch
Disable-text-fragments-by-default.patch
disable-WebView-variations-support.patch
Enable-network-isolation-features.patch
Revert-flags-remove-num-raster-threads.patch
webview-Hard-no-to-persistent-histograms.patch
Ignore-enterprise-policies-for-secure-DNS.patch
Add-menu-item-to-bookmark-all-tabs.patch
Re-introduce-modal-dialog-flag-to-close-all-tabs.patch
Add-option-to-force-tablet-UI.patch
Add-Alt-D-hotkey-to-focus-address-bar.patch
User-agent-customization.patch
Add-AllowUserCertificates-flag.patch
Add-IsCleartextPermitted-flag.patch
Add-flag-for-omnibox-autocomplete-filtering.patch
Revert-Delete-block-external-form-redirects.patch
Add-flag-to-disable-external-intent-requests.patch
Enable-share-intent.patch
Logcat-crash-reports-UI.patch
Add-flag-to-disable-vibration.patch
mime_util-force-text-x-suse-ymp-to-be-downloaded.patch
Client-hints-overrides.patch
Allow-building-without-enable_reporting.patch
Disable-lock-icon-in-address-bar-by-default.patch
Experimental-user-scripts-support.patch
Keep-empty-tabs-between-sessions.patch
Disable-third-party-origin-trials.patch
Never-use-HTTP-probes-for-connection-detection.patch
Disable-Accessibility-service-by-default.patch
Disable-conversion-measurement-api.patch
Restore-offline-indicator-v2-flag.patch
Re-introduce-override_build_timestamp.patch
enable-ftrivial-auto-var-init-zero.patch
disable-appending-variations-header.patch
Disable-idle-detection.patch
Allow-building-without-supervised-users.patch
Disable-minidump-upload-scheduling.patch
Revert-Permit-blocking-of-view-source.patch
Disable-safety-check.patch
Disable-all-predictors-code.patch
OpenSearch-miscellaneous.patch
Add-flag-for-save-data-header.patch
Disable-UA-full-version.patch
Dictionary-suggestions-for-the-Omnibox.patch
Disable-AsyncDNS-by-default.patch
00Restore-LastTabStandingTracker.patch
Add-lifetime-options-for-permissions.patch
Disable-crash-reporting.patch
Samsung-Note-9-SDK27-crazylinker-workaround.patch
Disable-TLS-resumption.patch
Move-navigation-bar-to-bottom.patch
Welcome-screen.patch
Add-site-engagement-flag.patch
Enable-Certificate-Transparency.patch
Invalidate-components-public-key.patch
Improve-plain-text-rendering-on-mobile.patch
Remove-segmentation-platform.patch
Follow-only-system-dark-mode.patch
Remove-window-name-on-cross-origin-navigation.patch
Remove-preload-of-com.google.android.gms.fonts.patch
Partition-Blink-memory-cache.patch
Remove-navigator.connection-info.patch
Disable-PrivacyGuide.patch
sharing-hub-always-use-visible-URL.patch
Enable-HEVC-by-default.patch
Partition-blobs-by-top-frame-URL.patch
Override-Navigator-Language.patch
Disable-add-to-home-screen-prompt.patch
Remove-HTTP-referrals-in-cross-origin-navigation.patch
Enable-ECH-by-default.patch
Disable-StartSurface-feature.patch
Enable-PermuteTLSExtensions-by-default.patch
Enable-third-party-storage-partitioning.patch
Restore-adaptive-button-in-top-toolbar-customization.patch
Add-kill-switch-for-unsupported-clangd-flags.patch
eyeo-beta-114.0.5735.53-v1-base.patch
eyeo-beta-114.0.5735.53-v1-android_settings.patch
eyeo-beta-114.0.5735.53-v1-extension_api.patch
00Eyeo-Adblock-Remove-Privacy-Issues.patch
00WIN-ADDTO-Add-an-always-incognito-mode.patch
00WIN-ADDTO-Experimental-user-scripts-support.patch
00WIN-ADDTO-ungoogled-chr--Disable-profile-avatar.patch
00WIN-ADDTO-Add-a-proxy-configuration-page.patch
00WIN-ADDTO-Add-bookmark-import-export-actions.patch
00WIN-ADDTO-openH264--enable-ARM-ARM64-optimizati.patch
00WIN-ADDTO-AImageReader-CFI-crash-mitigations.patch
00WIN-ADDTO-Remove-binary-blob-integrations.patch
00WIN-ADDTO-Add-lifetime-options-for-permissions.patch
00WIN-ADDTO-Disable-various-metrics.patch
00WIN-ADDTO-Do-not-build-API-keys-infobar.patch
00WIN-ADDTO-Revert-flags--remove-num-raster-thre.patch
00WIN-ADDTO-Add-flag-to-disable-external-intent-re.patch
00WIN-ADDTO-Restore-Search-Ready-Omnibox-flag.patch
00WIN-ADDTO-Disable-requests-for-single-word-Omni.patch
00WIN-ADDTO-Logcat-crash-reports-UI.patch
00WIN-ADDTO-Add-AllowUserCertificates-flag.patch
00WIN-enable-pdf-plugin.patch
00WIN-disable-annotate-downloads.patch
00WIN-enable-HighEfficiencyMode-by-default.patch
00WIN-enable-file-system-access-blocklist.patch
00WIN-Disable-TabHoverCard-images.patch
00WIN-Fix-log-to-file.patch
00WIN-minimum-data-to-enable-install-extensions.patch
00WIN-Disable-updater.patch
00WIN-Disable-first-run.patch
00WIN-Add-some-prefs-to-secure-preferences.patch
00WIN-Disable-search-for-image.patch
00Temp-Disable-kAutomaticLazyFrameLoadingToEmbeds.patch
00Remove-experimental-relative-c---abi-vtables.patch
AudioBuffer-AnalyserNode-fp-mitigations.patch
00Disable-Component-Updates.patch
00add-browser-policy.patch
00Always-open-browser-controls-in-new-tab.patch
00Partitioning-all-cookies-by-top-frame-domain.patch
00Disable-FedCm.patch
00Disable-BackForwardCache.patch
00Evict-the-entire-FrameTree-like-desktop.patch
00Disable-visited-pseudo-class.patch
00Add-setting-to-clear-data-on-exit.patch
00WIN-Disable-sharing-hub.patch
00WIN-Enable-Network-Service-Sandbox-and-CIG.patch
00Disable-csp-reports.patch
00Fonts-fingerprinting-mitigation.patch
00Keyboard-protection-flag.patch
00Disable-privacy-issues-in-password-manager.patch
00Partition-HSTS-cache-by-NAK.patch
00Warning-message-for-unsupported-hardware-aes.patch
00Enable-Document-Open-Inheritance-Removal.patch
00Add-setting-to-invert-tap-and-long-tap.patch
00Remove-ChromiumNetworkAdapter.patch
00Internal-firewall.patch
00Disable-devtools-remote-and-custom-protocols.patch
00Remove-detection-of-captive-portals.patch
00Disable-SHA1-Server-Signature.patch
00Remove-auth-header-upon-cross-origin-redirect.patch
00Clear-CORS-Preflight-Cache-on-clearing-data.patch
00Multi-Screen-Window-Placement-API-fix.patch
00Remove-https-connection-from-chrome-discards.patch
00Add-a-flag-to-disable-GamePad-API.patch
00Disable-WebGPU.patch
00Disable-FirstPartySets-and-StorageAccessAPI.patch
00Disable-GetInstalledRelatedApps-API.patch
00Disable-GSA-by-default.patch
00Disable-PrivateStateTokens-API.patch
00Disallowing-MIDI-permission-by-default.patch
00Disable-Compression-Dictionary-Transport.patch
00Disallow-Android-App-Scheme-as-referrer.patch
00Deprecate-Data-URL-in-SVGUseElement.patch
00TEMP-Add-a-log-to-track-strange-behavior.patch
00v113-temp-fix-build.patch
00114-temp-disable-find-bad-constructs-external-repo.patch
00115-temp-fix-build.patch
bromite-build-utils.patch
Content-settings-infrastructure.patch
Add-autoplay-site-setting.patch
Site-setting-for-images.patch
JIT-site-settings.patch
Add-webGL-site-setting.patch
Add-webRTC-site-settings.patch
Show-site-settings-for-cookies-javascript-and-ads.patch
Viewport-Protection-flag.patch
Viewport-Protection-Site-Setting.patch
Timezone-customization.patch
00Disable-speechSynthesis-getVoices-API.patch
00Remove-support-for-device-memory-and-cpu-recovery.patch
00Log-dangling-attributes-in-some-html-elements.patch
00Keep-Side-Panel-Companion-disabled.patch
00Lock-Profile-Cookie-Database.patch
00Show-warnings-on-downloads-over-HTTP.patch
+48
View File
@@ -0,0 +1,48 @@
android_channel="stable"
blink_symbol_level=1
build_contextual_search=false
build_with_tflite_lib=false
chrome_pgo_phase=0
dcheck_always_on=false
debuggable_apks=false
dfmify_dev_ui=false
disable_android_lint=true
disable_autofill_assistant_dfm=true
disable_fieldtrial_testing_config=true
disable_tab_ui_dfm=true
enable_av1_decoder=true
enable_dav1d_decoder=true
enable_gvr_services=false
enable_hangout_services_extension=false
enable_iterator_debugging=false
enable_mdns=false
enable_mse_mpeg2ts_stream_parser=true
enable_nacl=false
enable_platform_dolby_vision=true
enable_platform_hevc=true
enable_remoting=false
enable_reporting=true
enable_supervised_users=false
enable_vr=false
exclude_unwind_tables=false
ffmpeg_branding="Chrome"
icu_use_data_file=true
is_cfi=true
is_component_build=false
is_debug=false
is_official_build=true
proprietary_codecs=true
rtc_build_examples=false
safe_browsing_mode=2
symbol_level=1
system_webview_package_name="com.android.webview"
target_os="android"
treat_warnings_as_errors=true
use_cfi_cast=true
use_debug_fission=true
use_errorprone_java_compiler=false
use_gnome_keyring=false
use_official_google_api_keys=false
use_rtti=false
use_sysroot=false
webview_includes_weblayer=false
+8 -3
View File
@@ -1,6 +1,11 @@
Revert-Remove-pre-unified-consent-code-in-sync-and-privacy-directory.patch
AV1-codec-support.patch
exit-on-failure-of-inclusion.patch
Reintroduce-override_build_timestamp.patch
do-not-hide-.orig-files.patch
Do-not-link-with-libatomic.patch
do-not-add-suffix-to-package-name.patch
Switch-to-fstack-protector-strong.patch
Enable-fwrapv-in-Clang-for-non-UBSan-builds.patch
Disable-password-reuse-detection-on-android.patch
Allow-building-without-feed-support.patch
enable-ftrivial-auto-var-init-zero.patch
Disable-feeds-support-by-default.patch
Chromium-package-name.patch
@@ -0,0 +1,58 @@
From: uazo <uazo@users.noreply.github.com>
Date: Tue, 30 May 2023 15:45:59 +0000
Subject: 114 temp disable find_bad_constructs external repo
---
build/config/android/rules.gni | 1 +
crypto/BUILD.gn | 1 +
net/BUILD.gn | 1 +
third_party/libevent/BUILD.gn | 2 ++
4 files changed, 5 insertions(+)
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni
--- a/build/config/android/rules.gni
+++ b/build/config/android/rules.gni
@@ -5128,6 +5128,7 @@ if (enable_java_templates && is_android) {
_module_build_config = _module.build_config
_module_build_config_target = _module.build_config_target
_module_target_name = get_label_info(_module_target, "name")
+ not_needed(["_module_target_name"])
if (!_proguard_enabled) {
_dex_target = "${_module_target_name}__final_dex"
diff --git a/crypto/BUILD.gn b/crypto/BUILD.gn
--- a/crypto/BUILD.gn
+++ b/crypto/BUILD.gn
@@ -14,6 +14,7 @@ buildflag_header("buildflags") {
}
component("crypto") {
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
output_name = "crcrypto" # Avoid colliding with OpenSSL's libcrypto.
sources = [
"aead.cc",
diff --git a/net/BUILD.gn b/net/BUILD.gn
--- a/net/BUILD.gn
+++ b/net/BUILD.gn
@@ -1634,6 +1634,7 @@ component("net") {
configs -= [ "//build/config/compiler:default_optimization" ]
configs += [ "//build/config/compiler:optimize_max" ]
}
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
}
# net_export.h has its own build target so that code (eg
diff --git a/third_party/libevent/BUILD.gn b/third_party/libevent/BUILD.gn
--- a/third_party/libevent/BUILD.gn
+++ b/third_party/libevent/BUILD.gn
@@ -69,6 +69,8 @@ static_library("libevent") {
configs += [ "//build/config/compiler:optimize_max" ]
}
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
}
--
2.25.1
+22
View File
@@ -0,0 +1,22 @@
From: uazo <uazo@users.noreply.github.com>
Date: Tue, 18 Jul 2023 05:36:06 +0000
Subject: 115 temp fix build
Fix rust toolchain builder
---
build/toolchain/gcc_toolchain.gni | 1 +
1 file changed, 1 insertion(+)
diff --git a/build/toolchain/gcc_toolchain.gni b/build/toolchain/gcc_toolchain.gni
--- a/build/toolchain/gcc_toolchain.gni
+++ b/build/toolchain/gcc_toolchain.gni
@@ -855,6 +855,7 @@ template("gcc_toolchain") {
is_debug = false
is_component_build = false
is_official_build = false
+ generate_linker_map = false
}
}
}
--
2.25.1
@@ -0,0 +1,78 @@
From: uazo <uazo@users.noreply.github.com>
Date: Fri, 21 Apr 2023 13:10:20 +0000
Subject: Add a flag to disable GamePad API
Adds restrict-gamepad-access flag (default active) to disable GamePad API.
---
chrome/browser/flag-metadata.json | 4 ++--
chrome/browser/flag_descriptions.cc | 2 +-
device/gamepad/public/cpp/gamepad_features.cc | 4 ++--
.../blink/renderer/modules/gamepad/navigator_gamepad.cc | 6 ++++++
4 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
--- a/chrome/browser/flag-metadata.json
+++ b/chrome/browser/flag-metadata.json
@@ -6657,9 +6657,9 @@
"expiry_milestone": 120
},
{
- "name": "restrict-gamepad-access",
+ "name": "restrict-gamepad-access", // restrict-gamepad-access"
"owners": [ "//device/gamepad/OWNERS", "jameshollyer@chromium.org" ],
- "expiry_milestone": 96
+ "expiry_milestone": -1
},
{
"name": "revamped-password-management-bubble",
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
@@ -2882,7 +2882,7 @@ const char kReduceAcceptLanguageDescription[] =
const char kRestrictGamepadAccessName[] = "Restrict gamepad access";
const char kRestrictGamepadAccessDescription[] =
- "Enables Permissions Policy and Secure Context restrictions on the Gamepad "
+ "Disable the Gamepad "
"API";
const char kRoundedDisplay[] = "Rounded display";
diff --git a/device/gamepad/public/cpp/gamepad_features.cc b/device/gamepad/public/cpp/gamepad_features.cc
--- a/device/gamepad/public/cpp/gamepad_features.cc
+++ b/device/gamepad/public/cpp/gamepad_features.cc
@@ -27,8 +27,8 @@ BASE_FEATURE(kEnableWindowsGamingInputDataFetcher,
base::FEATURE_DISABLED_BY_DEFAULT);
BASE_FEATURE(kRestrictGamepadAccess,
- "RestrictGamepadAccess",
- base::FEATURE_DISABLED_BY_DEFAULT);
+ "RestrictGamepadAccess", // enabled
+ base::FEATURE_ENABLED_BY_DEFAULT); // in bromite
// Enables gamepad multitouch
BASE_FEATURE(kEnableGamepadMultitouch,
diff --git a/third_party/blink/renderer/modules/gamepad/navigator_gamepad.cc b/third_party/blink/renderer/modules/gamepad/navigator_gamepad.cc
--- a/third_party/blink/renderer/modules/gamepad/navigator_gamepad.cc
+++ b/third_party/blink/renderer/modules/gamepad/navigator_gamepad.cc
@@ -113,6 +113,10 @@ void RecordGamepadsForIdentifiabilityStudy(
HeapVector<Member<Gamepad>> NavigatorGamepad::getGamepads(
Navigator& navigator,
ExceptionState& exception_state) {
+ if (base::FeatureList::IsEnabled(::features::kRestrictGamepadAccess)) {
+ exception_state.ThrowSecurityError("Access to the feature \"gamepad\" is denied");
+ return HeapVector<Member<Gamepad>>();
+ }
if (!navigator.DomWindow()) {
// Using an existing NavigatorGamepad if one exists, but don't create one
// for a detached window, as its subclasses depend on a non-null window.
@@ -430,6 +434,8 @@ void NavigatorGamepad::SampleAndCompareGamepadState() {
void NavigatorGamepad::DispatchGamepadEvent(const AtomicString& event_name,
Gamepad* gamepad) {
+ if (base::FeatureList::IsEnabled(::features::kRestrictGamepadAccess))
+ return;
// Ensure that we're blocking re-entrancy.
DCHECK(processing_events_);
DCHECK(has_connection_event_listener_);
--
2.25.1
@@ -0,0 +1,675 @@
From: uazo <uazo@users.noreply.github.com>
Date: Thu, 16 Feb 2023 15:28:16 +0000
Subject: Add setting to clear data on exit
---
chrome/android/chrome_java_sources.gni | 1 +
.../chrome/browser/ChromeTabbedActivity.java | 7 +-
.../ClearBrowsingDataFragment.java | 6 ++
.../ClearBrowsingDataFragmentAtStart.java | 74 +++++++++++++++++++
.../ClearBrowsingDataTabsFragment.java | 7 +-
chrome/app/settings_strings.grdp | 10 +++
.../browsing_data/browsing_data_bridge.cc | 2 +-
.../chrome_browsing_data_lifetime_manager.cc | 22 +++++-
.../chrome_browsing_data_remover_delegate.cc | 11 +++
.../api/settings_private/prefs_util.cc | 17 +++++
.../browser/profiles/ProfileManagerUtils.java | 5 ++
.../profiles/android/profile_manager_utils.cc | 5 ++
chrome/browser/profiles/profile_manager.cc | 13 ++++
chrome/browser/profiles/profile_manager.h | 2 +
.../clear_browsing_data_dialog.html | 44 +++++++++++
.../clear_browsing_data_dialog.ts | 1 +
.../strings/android_chrome_strings.grd | 3 +
.../settings_localized_strings_provider.cc | 1 +
.../core/browsing_data_policies_utils.cc | 16 ++--
.../core/browsing_data_policies_utils.h | 11 +++
.../browsing_data/core/browsing_data_utils.cc | 34 +++++++++
.../core/clear_browsing_data_tab.h | 2 +-
components/browsing_data/core/pref_names.cc | 27 +++++++
components/browsing_data/core/pref_names.h | 9 +++
24 files changed, 316 insertions(+), 14 deletions(-)
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragmentAtStart.java
diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni
--- a/chrome/android/chrome_java_sources.gni
+++ b/chrome/android/chrome_java_sources.gni
@@ -292,6 +292,7 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragmentAdvanced.java",
"java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragmentBasic.java",
"java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataTabsFragment.java",
+ "java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragmentAtStart.java",
"java/src/org/chromium/chrome/browser/browsing_data/ConfirmImportantSitesDialogFragment.java",
"java/src/org/chromium/chrome/browser/browsing_data/OtherFormsOfHistoryDialogFragment.java",
"java/src/org/chromium/chrome/browser/browsing_data/UrlFilter.java",
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
@@ -138,6 +138,7 @@ import org.chromium.chrome.browser.profiles.ProfileManager;
import org.chromium.chrome.browser.quick_delete.QuickDeleteController;
import org.chromium.chrome.browser.quick_delete.QuickDeleteDelegateImpl;
import org.chromium.chrome.browser.quick_delete.QuickDeleteMetricsDelegate;
+import org.chromium.chrome.browser.profiles.ProfileManagerUtils;
import org.chromium.chrome.browser.read_later.ReadingListBackPressHandler;
import org.chromium.chrome.browser.read_later.ReadingListUtils;
import org.chromium.chrome.browser.reengagement.ReengagementNotificationController;
@@ -1318,7 +1319,11 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
Intent intent = getIntent();
boolean hadCipherData =
- CipherFactory.getInstance().restoreFromBundle(getSavedInstanceState());
+ CipherFactory.getInstance().restoreFromBundle(getSavedInstanceState()); //
+ if (!hadCipherData) {
+ Log.i(TAG, "Removing browsing data");
+ ProfileManagerUtils.removeBrowsingDataAtStart();
+ }
String PREF_CLOSE_TABS_ON_EXIT = "close_tabs_on_exit";
boolean noRestoreState =
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragment.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragment.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragment.java
@@ -417,6 +417,10 @@ public abstract class ClearBrowsingDataFragment extends PreferenceFragmentCompat
*/
protected abstract @ClearBrowsingDataTab int getClearBrowsingDataTabType();
+ protected boolean shouldClearBrowsingData() {
+ return true;
+ }
+
/**
* Returns the Array of time periods. Options are displayed in the same order as they appear
* in the array.
@@ -515,6 +519,7 @@ public abstract class ClearBrowsingDataFragment extends PreferenceFragmentCompat
* options.
*/
private void onClearButtonClicked() {
+ if (!shouldClearBrowsingData()) return;
if (shouldShowImportantSitesDialog()) {
showImportantDialogThenClear();
return;
@@ -548,6 +553,7 @@ public abstract class ClearBrowsingDataFragment extends PreferenceFragmentCompat
Button clearButton = (Button) getView().findViewById(R.id.clear_button);
boolean isEnabled = !getSelectedOptions().isEmpty();
clearButton.setEnabled(isEnabled);
+ clearButton.setVisibility(shouldClearBrowsingData() ? View.VISIBLE : View.INVISIBLE);
}
private int getSpinnerIndex(
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragmentAtStart.java b/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragmentAtStart.java
new file mode 100644
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragmentAtStart.java
@@ -0,0 +1,74 @@
+/*
+ This file is part of Bromite.
+
+ Bromite is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bromite is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bromite. If not, see <https://www.gnu.org/licenses/>.
+*/
+
+package org.chromium.chrome.browser.browsing_data;
+
+import android.content.Context;
+import android.os.Bundle;
+import android.view.View;
+
+import androidx.annotation.IntDef;
+import androidx.preference.Preference;
+
+import org.chromium.base.Callback;
+import org.chromium.chrome.R;
+import org.chromium.chrome.browser.profiles.Profile;
+import org.chromium.components.browser_ui.settings.SpinnerPreference;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.util.Arrays;
+import java.util.List;
+
+public class ClearBrowsingDataFragmentAtStart extends ClearBrowsingDataFragment {
+ static final String PREF_TIME_RANGE = "time_period_spinner";
+
+ @Override
+ public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
+ super.onCreatePreferences(savedInstanceState, rootKey);
+
+ SpinnerPreference spinner = (SpinnerPreference) findPreference(PREF_TIME_RANGE);
+ if (spinner != null) {
+ getPreferenceScreen().removePreference(spinner);
+ }
+ }
+
+ private boolean isHistorySyncEnabled() {
+ return false;
+ }
+
+ @Override
+ protected int getClearBrowsingDataTabType() {
+ return ClearBrowsingDataTab.AT_START;
+ }
+
+ @Override
+ protected List<Integer> getDialogOptions() {
+ return Arrays.asList(DialogOption.CLEAR_HISTORY, DialogOption.CLEAR_COOKIES_AND_SITE_DATA,
+ DialogOption.CLEAR_CACHE, DialogOption.CLEAR_PASSWORDS,
+ DialogOption.CLEAR_FORM_DATA, DialogOption.CLEAR_SITE_SETTINGS);
+ }
+
+ @Override
+ protected void onClearBrowsingData() {
+ }
+
+ @Override
+ protected boolean shouldClearBrowsingData() {
+ return false;
+ }
+}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataTabsFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataTabsFragment.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataTabsFragment.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataTabsFragment.java
@@ -34,7 +34,7 @@ import org.chromium.components.browser_ui.util.TraceEventVectorDrawableCompat;
*/
public class ClearBrowsingDataTabsFragment
extends Fragment implements FragmentHelpAndFeedbackLauncher {
- public static final int CBD_TAB_COUNT = 2;
+ public static final int CBD_TAB_COUNT = 3;
private ClearBrowsingDataFetcher mFetcher;
private HelpAndFeedbackLauncher mHelpAndFeedbackLauncher;
@@ -93,6 +93,8 @@ public class ClearBrowsingDataTabsFragment
return getActivity().getString(R.string.clear_browsing_data_basic_tab_title);
case 1:
return getActivity().getString(R.string.prefs_section_advanced);
+ case 2:
+ return getActivity().getString(R.string.clear_browsing_data_atstart_tab_title);
default:
throw new RuntimeException("invalid position: " + position);
}
@@ -130,6 +132,9 @@ public class ClearBrowsingDataTabsFragment
case 1:
fragment = new ClearBrowsingDataFragmentAdvanced();
break;
+ case 2:
+ fragment = new ClearBrowsingDataFragmentAtStart();
+ break;
default:
throw new RuntimeException("invalid position: " + position);
}
diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp
--- a/chrome/app/settings_strings.grdp
+++ b/chrome/app/settings_strings.grdp
@@ -2694,6 +2694,16 @@
<message name="IDS_SETTINGS_CLEAR_BROWSING_DATA" desc="Text for clear browsing data button in Privacy options">
Clear browsing data
</message>
+ <if expr="is_win">
+ <message name="IDS_CLEAR_BROWSING_DATA_ATSTART_TAB_TITLE" desc="The title of the tab showing the at start clear browsing data options.">
+ At Close
+ </message>
+ </if>
+ <if expr="is_android">
+ <message name="IDS_CLEAR_BROWSING_DATA_ATSTART_TAB_TITLE" desc="The title of the tab showing the at start clear browsing data options.">
+ At Startup
+ </message>
+ </if>
<message name="IDS_SETTINGS_CLEAR_DATA_DESCRIPTION" desc="Description for clear browsing data button in Privacy options. 'History' refers to browsing history. 'Cookies' refers to the technical meaning of a cookie, i.e. data saved by a website on the user's computer, as in when a website saves your preferences.">
Clear history, cookies, cache, and more
</message>
diff --git a/chrome/browser/android/browsing_data/browsing_data_bridge.cc b/chrome/browser/android/browsing_data/browsing_data_bridge.cc
--- a/chrome/browser/android/browsing_data/browsing_data_bridge.cc
+++ b/chrome/browser/android/browsing_data/browsing_data_bridge.cc
@@ -326,7 +326,7 @@ static void JNI_BrowsingDataBridge_SetLastClearBrowsingDataTab(
const JavaParamRef<jobject>& obj,
jint tab_index) {
DCHECK_GE(tab_index, 0);
- DCHECK_LT(tab_index, 2);
+ DCHECK_LT(tab_index, 3);
GetPrefService()->SetInteger(browsing_data::prefs::kLastClearBrowsingDataTab,
tab_index);
}
diff --git a/chrome/browser/browsing_data/chrome_browsing_data_lifetime_manager.cc b/chrome/browser/browsing_data/chrome_browsing_data_lifetime_manager.cc
--- a/chrome/browser/browsing_data/chrome_browsing_data_lifetime_manager.cc
+++ b/chrome/browser/browsing_data/chrome_browsing_data_lifetime_manager.cc
@@ -326,8 +326,25 @@ void ChromeBrowsingDataLifetimeManager::Shutdown() {
void ChromeBrowsingDataLifetimeManager::ClearBrowsingDataForOnExitPolicy(
bool keep_browser_alive) {
- const base::Value::List& data_types = profile_->GetPrefs()->GetList(
- browsing_data::prefs::kClearBrowsingDataOnExitList);
+ base::Value::List data_types = profile_->GetPrefs()->GetList(
+ browsing_data::prefs::kClearBrowsingDataOnExitList).Clone();
+
+ if (profile_->GetPrefs()->GetBoolean(browsing_data::prefs::kDeleteBrowsingHistoryAtStart))
+ data_types.Append(browsing_data::policy_data_types::kBrowsingHistoryName);
+ if (profile_->GetPrefs()->GetBoolean(browsing_data::prefs::kDeleteDownloadHistoryAtStart))
+ data_types.Append(browsing_data::policy_data_types::kDownloadHistoryName);
+ if (profile_->GetPrefs()->GetBoolean(browsing_data::prefs::kDeleteCacheAtStart))
+ data_types.Append(browsing_data::policy_data_types::kCachedImagesAndFilesName);
+ if (profile_->GetPrefs()->GetBoolean(browsing_data::prefs::kDeleteCookiesAtStart))
+ data_types.Append(browsing_data::policy_data_types::kCookiesAndOtherSiteDataName);
+ if (profile_->GetPrefs()->GetBoolean(browsing_data::prefs::kDeletePasswordsAtStart))
+ data_types.Append(browsing_data::policy_data_types::kPasswordSigninName);
+ if (profile_->GetPrefs()->GetBoolean(browsing_data::prefs::kDeleteFormDataAtStart))
+ data_types.Append(browsing_data::policy_data_types::kAutofillName);
+ if (profile_->GetPrefs()->GetBoolean(browsing_data::prefs::kDeleteHostedAppsDataAtStart))
+ data_types.Append(browsing_data::policy_data_types::kHostedAppDataName);
+ if (profile_->GetPrefs()->GetBoolean(browsing_data::prefs::kDeleteSiteSettingsAtStart))
+ data_types.Append(browsing_data::policy_data_types::kSiteSettingsName);
if (IsConditionSatisfiedForBrowsingDataRemoval(GetSyncTypesForPolicyPref(
profile_, browsing_data::prefs::kClearBrowsingDataOnExitList))) {
@@ -426,6 +443,7 @@ void ChromeBrowsingDataLifetimeManager::StartScheduledBrowsingDataRemoval() {
bool ChromeBrowsingDataLifetimeManager::
IsConditionSatisfiedForBrowsingDataRemoval(
const syncer::UserSelectableTypeSet sync_types) {
+ if ((true)) return true;
bool sync_disabled = !SyncServiceFactory::IsSyncAllowed(profile_);
// Return the state of sync if
// `features::kDataRetentionPoliciesDisableSyncTypesNeeded` is disabled or if
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
@@ -421,6 +421,9 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
delete_end_, CreateTaskCompletionClosure(TracingDataType::kHistory),
&history_task_tracker_);
}
+ }
+
+ if (remove_mask & content::BrowsingDataRemover::DATA_TYPE_CACHE) {
if (ClipboardRecentContent::GetInstance())
ClipboardRecentContent::GetInstance()->SuppressClipboardContent();
@@ -471,7 +474,9 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
prerender::NoStatePrefetchManager::CLEAR_PRERENDER_CONTENTS |
prerender::NoStatePrefetchManager::CLEAR_PRERENDER_HISTORY);
}
+ }
+ if ((remove_mask & constants::DATA_TYPE_HISTORY) && may_delete_history) {
// The saved Autofill profiles and credit cards can include the origin from
// which these profiles and credit cards were learned. These are a form of
// history, so clear them as well.
@@ -492,7 +497,9 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
if (data_manager)
data_manager->Refresh();
}
+ }
+ if (remove_mask & content::BrowsingDataRemover::DATA_TYPE_CACHE) {
base::ThreadPool::PostTaskAndReply(
FROM_HERE, {base::TaskPriority::USER_VISIBLE, base::MayBlock()},
base::BindOnce(
@@ -578,9 +585,13 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
CreateTaskCompletionClosure(TracingDataType::kExploreSites));
}
#endif
+ }
+ if ((remove_mask & constants::DATA_TYPE_HISTORY) && may_delete_history) {
CreateCrashUploadList()->Clear(delete_begin_, delete_end_);
+ }
+ if (remove_mask & content::BrowsingDataRemover::DATA_TYPE_CACHE) {
FindBarStateFactory::GetForBrowserContext(profile_)->SetLastSearchText(
std::u16string());
diff --git a/chrome/browser/extensions/api/settings_private/prefs_util.cc b/chrome/browser/extensions/api/settings_private/prefs_util.cc
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
@@ -497,6 +497,23 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlistedKeys() {
(*s_allowlist)[browsing_data::prefs::kLastClearBrowsingDataTab] =
settings_api::PrefType::PREF_TYPE_NUMBER;
+ (*s_allowlist)[browsing_data::prefs::kDeleteBrowsingHistoryAtStart] =
+ settings_api::PrefType::PREF_TYPE_BOOLEAN;
+ (*s_allowlist)[browsing_data::prefs::kDeleteDownloadHistoryAtStart] =
+ settings_api::PrefType::PREF_TYPE_BOOLEAN;
+ (*s_allowlist)[browsing_data::prefs::kDeleteCacheAtStart] =
+ settings_api::PrefType::PREF_TYPE_BOOLEAN;
+ (*s_allowlist)[browsing_data::prefs::kDeleteCookiesAtStart] =
+ settings_api::PrefType::PREF_TYPE_BOOLEAN;
+ (*s_allowlist)[browsing_data::prefs::kDeletePasswordsAtStart] =
+ settings_api::PrefType::PREF_TYPE_BOOLEAN;
+ (*s_allowlist)[browsing_data::prefs::kDeleteFormDataAtStart] =
+ settings_api::PrefType::PREF_TYPE_BOOLEAN;
+ (*s_allowlist)[browsing_data::prefs::kDeleteSiteSettingsAtStart] =
+ settings_api::PrefType::PREF_TYPE_BOOLEAN;
+ (*s_allowlist)[browsing_data::prefs::kDeleteHostedAppsDataAtStart] =
+ settings_api::PrefType::PREF_TYPE_BOOLEAN;
+
// Accessibility.
(*s_allowlist)[::prefs::kAccessibilityImageLabelsEnabled] =
settings_api::PrefType::PREF_TYPE_BOOLEAN;
diff --git a/chrome/browser/profiles/android/java/src/org/chromium/chrome/browser/profiles/ProfileManagerUtils.java b/chrome/browser/profiles/android/java/src/org/chromium/chrome/browser/profiles/ProfileManagerUtils.java
--- a/chrome/browser/profiles/android/java/src/org/chromium/chrome/browser/profiles/ProfileManagerUtils.java
+++ b/chrome/browser/profiles/android/java/src/org/chromium/chrome/browser/profiles/ProfileManagerUtils.java
@@ -52,9 +52,14 @@ public class ProfileManagerUtils {
}
}
+ public static void removeBrowsingDataAtStart() {
+ ProfileManagerUtilsJni.get().removeBrowsingDataAtStart();
+ }
+
@NativeMethods
interface Natives {
void flushPersistentDataForAllProfiles();
void removeSessionCookiesForAllProfiles();
+ void removeBrowsingDataAtStart();
}
}
diff --git a/chrome/browser/profiles/android/profile_manager_utils.cc b/chrome/browser/profiles/android/profile_manager_utils.cc
--- a/chrome/browser/profiles/android/profile_manager_utils.cc
+++ b/chrome/browser/profiles/android/profile_manager_utils.cc
@@ -67,3 +67,8 @@ static void JNI_ProfileManagerUtils_RemoveSessionCookiesForAllProfiles(
g_browser_process->profile_manager()->GetLoadedProfiles(),
RemoveSessionCookiesForProfile);
}
+
+static void JNI_ProfileManagerUtils_RemoveBrowsingDataAtStart(
+ JNIEnv* env) {
+ g_browser_process->profile_manager()->RemoveBrowsingDataAtStart();
+}
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -1444,6 +1444,19 @@ void ProfileManager::DoFinalInit(ProfileInfo* profile_info,
}
}
+void ProfileManager::RemoveBrowsingDataAtStart() {
+ base::ranges::for_each(
+ GetLoadedProfiles(),
+ [](Profile* profile) {
+ auto* browsing_data_lifetime_manager =
+ ChromeBrowsingDataLifetimeManagerFactory::GetForProfile(profile);
+ if (browsing_data_lifetime_manager && !profile->IsOffTheRecord()) {
+ browsing_data_lifetime_manager->ClearBrowsingDataForOnExitPolicy(
+ /*keep_browser_alive=*/false);
+ }
+ });
+}
+
void ProfileManager::DoFinalInitForServices(Profile* profile,
bool go_off_the_record) {
if (!do_final_services_init_ ||
diff --git a/chrome/browser/profiles/profile_manager.h b/chrome/browser/profiles/profile_manager.h
--- a/chrome/browser/profiles/profile_manager.h
+++ b/chrome/browser/profiles/profile_manager.h
@@ -198,6 +198,8 @@ class ProfileManager : public Profile::Delegate {
// profiles.
std::vector<Profile*> GetLoadedProfiles() const;
+ void RemoveBrowsingDataAtStart();
+
// If a profile with the given path is currently managed by this object and
// fully initialized, return a pointer to the corresponding Profile object;
// otherwise return null.
diff --git a/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.html b/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.html
--- a/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.html
+++ b/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.html
@@ -285,6 +285,50 @@
disabled="[[clearingInProgress_]]" no-set-pref>
</settings-checkbox>
</div>
+ <div id="atstart-tab">
+ <settings-checkbox
+ pref="{{prefs.browser.clear_data.browsing_history_at_start}}"
+ label="$i18n{clearBrowsingHistory}"
+ sub-label="[[counters_.browsing_history]]">
+ </settings-checkbox>
+ <settings-checkbox
+ pref="{{prefs.browser.clear_data.download_history_at_start}}"
+ label="$i18n{clearDownloadHistory}"
+ sub-label="[[counters_.download_history]]">
+ </settings-checkbox>
+ <settings-checkbox
+ class="cookies-checkbox"
+ pref="{{prefs.browser.clear_data.cookies_at_start}}"
+ label="$i18n{clearCookies}"
+ sub-label="[[counters_.cookies]]">
+ </settings-checkbox>
+ <settings-checkbox
+ class="cache-checkbox"
+ pref="{{prefs.browser.clear_data.cache_at_start}}"
+ label="$i18n{clearCache}"
+ sub-label="[[counters_.cache]]">
+ </settings-checkbox>
+ <settings-checkbox
+ pref="{{prefs.browser.clear_data.passwords_at_start}}"
+ label="$i18n{clearPasswords}"
+ sub-label="[[counters_.passwords]]">
+ </settings-checkbox>
+ <settings-checkbox
+ pref="{{prefs.browser.clear_data.form_data_at_start}}"
+ label="$i18n{clearFormData}"
+ sub-label="[[counters_.form_data]]">
+ </settings-checkbox>
+ <settings-checkbox
+ pref="{{prefs.browser.clear_data.site_settings_at_start}}"
+ label="$i18nPolymer{siteSettings}"
+ sub-label="[[counters_.site_settings]]">
+ </settings-checkbox>
+ <settings-checkbox
+ pref="{{prefs.browser.clear_data.hosted_apps_data_at_start}}"
+ label="$i18n{clearHostedAppData}"
+ sub-label="[[counters_.hosted_apps_data]]">
+ </settings-checkbox>
+ </div>
</iron-pages>
</div>
<div slot="button-container">
diff --git a/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.ts b/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.ts
--- a/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.ts
+++ b/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.ts
@@ -202,6 +202,7 @@ export class SettingsClearBrowsingDataDialogElement extends
value: () =>
[loadTimeData.getString('basicPageTitle'),
loadTimeData.getString('advancedPageTitle'),
+ loadTimeData.getString('atStartPageTitle'),
],
},
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -1547,6 +1547,9 @@ Your Google account may have other forms of browsing history like searches and a
<message name="IDS_CLEAR_BROWSING_DATA_BASIC_TAB_TITLE" desc="The title of the tab showing the basic clear browsing data options.">
Basic
</message>
+ <message name="IDS_CLEAR_BROWSING_DATA_ATSTART_TAB_TITLE" desc="The title of the tab showing the at start clear browsing data options.">
+ At Startup
+ </message>
<message name="IDS_ANDROID_HISTORY_OTHER_FORMS_OF_HISTORY" desc="The notification at the top of the history page indicating that deleting Chrome browsing history will not delete other forms of history stored at Google My Activity.">
Your Google Account may have other forms of browsing history at <ph name="BEGIN_LINK">&lt;link&gt;</ph>myactivity.google.com<ph name="END_LINK">&lt;/link&gt;</ph>.
</message>
diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
@@ -1716,6 +1716,7 @@ void AddPrivacyStrings(content::WebUIDataSource* html_source,
{"clearedData", IDS_SETTINGS_CLEARED_DATA},
{"clearBrowsingData", IDS_SETTINGS_CLEAR_BROWSING_DATA},
{"clearBrowsingDataDescription", IDS_SETTINGS_CLEAR_DATA_DESCRIPTION},
+ {"atStartPageTitle", IDS_CLEAR_BROWSING_DATA_ATSTART_TAB_TITLE},
{"titleAndCount", IDS_SETTINGS_TITLE_AND_COUNT},
{"safeBrowsingEnableExtendedReportingDesc",
IDS_SETTINGS_SAFEBROWSING_ENABLE_REPORTING_DESC},
diff --git a/components/browsing_data/core/browsing_data_policies_utils.cc b/components/browsing_data/core/browsing_data_policies_utils.cc
--- a/components/browsing_data/core/browsing_data_policies_utils.cc
+++ b/components/browsing_data/core/browsing_data_policies_utils.cc
@@ -19,15 +19,15 @@ namespace browsing_data {
namespace policy_data_types {
// Data retention policy types that require sync to be disabled.
-const char kBrowsingHistoryName[] = "browsing_history";
-const char kPasswordSigninName[] = "password_signin";
-const char kAutofillName[] = "autofill";
-const char kSiteSettingsName[] = "site_settings";
+extern const char kBrowsingHistoryName[] = "browsing_history";
+extern const char kPasswordSigninName[] = "password_signin";
+extern const char kAutofillName[] = "autofill";
+extern const char kSiteSettingsName[] = "site_settings";
// Data retention policy types that do not require sync to be disabled.
-const char kHostedAppDataName[] = "hosted_app_data";
-const char kDownloadHistoryName[] = "download_history";
-const char kCookiesAndOtherSiteDataName[] = "cookies_and_other_site_data";
-const char kCachedImagesAndFilesName[] = "cached_images_and_files";
+extern const char kHostedAppDataName[] = "hosted_app_data";
+extern const char kDownloadHistoryName[] = "download_history";
+extern const char kCookiesAndOtherSiteDataName[] = "cookies_and_other_site_data";
+extern const char kCachedImagesAndFilesName[] = "cached_images_and_files";
} // namespace policy_data_types
namespace {
diff --git a/components/browsing_data/core/browsing_data_policies_utils.h b/components/browsing_data/core/browsing_data_policies_utils.h
--- a/components/browsing_data/core/browsing_data_policies_utils.h
+++ b/components/browsing_data/core/browsing_data_policies_utils.h
@@ -12,6 +12,17 @@
namespace browsing_data {
+namespace policy_data_types {
+extern const char kBrowsingHistoryName[];
+extern const char kDownloadHistoryName[];
+extern const char kCookiesAndOtherSiteDataName[];
+extern const char kCachedImagesAndFilesName[];
+extern const char kPasswordSigninName[];
+extern const char kAutofillName[];
+extern const char kSiteSettingsName[];
+extern const char kHostedAppDataName[];
+} // namespace policy_data_types
+
// The data types of the BrowsingDataSettings policy.
enum class PolicyDataType {
kBrowsingHistory = 0,
diff --git a/components/browsing_data/core/browsing_data_utils.cc b/components/browsing_data/core/browsing_data_utils.cc
--- a/components/browsing_data/core/browsing_data_utils.cc
+++ b/components/browsing_data/core/browsing_data_utils.cc
@@ -318,6 +318,40 @@ bool GetDeletionPreferenceFromDataType(
BrowsingDataType data_type,
ClearBrowsingDataTab clear_browsing_data_tab,
std::string* out_pref) {
+ if (clear_browsing_data_tab == ClearBrowsingDataTab::AT_START) {
+ switch (data_type) {
+ case BrowsingDataType::HISTORY:
+ *out_pref = prefs::kDeleteBrowsingHistoryAtStart;
+ return true;
+ case BrowsingDataType::CACHE:
+ *out_pref = prefs::kDeleteCacheAtStart;
+ return true;
+ case BrowsingDataType::COOKIES:
+ *out_pref = prefs::kDeleteCookiesAtStart;
+ return true;
+ case BrowsingDataType::PASSWORDS:
+ *out_pref = prefs::kDeletePasswordsAtStart;
+ return true;
+ case BrowsingDataType::FORM_DATA:
+ *out_pref = prefs::kDeleteFormDataAtStart;
+ return true;
+ case BrowsingDataType::BOOKMARKS:
+ return false;
+ case BrowsingDataType::SITE_SETTINGS:
+ *out_pref = prefs::kDeleteSiteSettingsAtStart;
+ return true;
+ case BrowsingDataType::DOWNLOADS:
+ *out_pref = prefs::kDeleteDownloadHistoryAtStart;
+ return true;
+ case BrowsingDataType::HOSTED_APPS_DATA:
+ *out_pref = prefs::kDeleteHostedAppsDataAtStart;
+ return true;
+ case BrowsingDataType::NUM_TYPES:
+ NOTREACHED(); // This is not an actual type.
+ return false;
+ }
+ }
+
if (clear_browsing_data_tab == ClearBrowsingDataTab::BASIC) {
switch (data_type) {
case BrowsingDataType::HISTORY:
diff --git a/components/browsing_data/core/clear_browsing_data_tab.h b/components/browsing_data/core/clear_browsing_data_tab.h
--- a/components/browsing_data/core/clear_browsing_data_tab.h
+++ b/components/browsing_data/core/clear_browsing_data_tab.h
@@ -18,7 +18,7 @@ namespace browsing_data {
//
// A Java counterpart will be generated for this enum.
// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.browsing_data
-enum class ClearBrowsingDataTab { BASIC, ADVANCED, NUM_TYPES };
+enum class ClearBrowsingDataTab { BASIC, ADVANCED, AT_START, NUM_TYPES };
} // namespace browsing_data
diff --git a/components/browsing_data/core/pref_names.cc b/components/browsing_data/core/pref_names.cc
--- a/components/browsing_data/core/pref_names.cc
+++ b/components/browsing_data/core/pref_names.cc
@@ -26,6 +26,16 @@ const char kClearBrowsingDataOnExitDeletionPending[] =
// delete just before browser shutdown.
const char kClearBrowsingDataOnExitList[] = "browser.clear_data.clear_on_exit";
+// Clear Browsing Data dialog datatype preferences.
+const char kDeleteBrowsingHistoryAtStart[] = "browser.clear_data.browsing_history_at_start";
+const char kDeleteDownloadHistoryAtStart[] = "browser.clear_data.download_history_at_start";
+const char kDeleteCacheAtStart[] = "browser.clear_data.cache_at_start";
+const char kDeleteCookiesAtStart[] = "browser.clear_data.cookies_at_start";
+const char kDeletePasswordsAtStart[] = "browser.clear_data.passwords_at_start";
+const char kDeleteFormDataAtStart[] = "browser.clear_data.form_data_at_start";
+const char kDeleteHostedAppsDataAtStart[] = "browser.clear_data.hosted_apps_data_at_start";
+const char kDeleteSiteSettingsAtStart[] = "browser.clear_data.site_settings_at_start";
+
// Clear browsing data deletion time period.
const char kDeleteTimePeriod[] = "browser.clear_data.time_period";
const char kDeleteTimePeriodBasic[] = "browser.clear_data.time_period_basic";
@@ -85,6 +95,23 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterIntegerPref(
kClearBrowsingDataHistoryNoticeShownTimes, 0);
+ registry->RegisterBooleanPref(
+ kDeleteBrowsingHistoryAtStart, false);
+ registry->RegisterBooleanPref(
+ kDeleteDownloadHistoryAtStart, false);
+ registry->RegisterBooleanPref(
+ kDeleteCacheAtStart, false);
+ registry->RegisterBooleanPref(
+ kDeleteCookiesAtStart, false);
+ registry->RegisterBooleanPref(
+ kDeletePasswordsAtStart, false);
+ registry->RegisterBooleanPref(
+ kDeleteFormDataAtStart, false);
+ registry->RegisterBooleanPref(
+ kDeleteHostedAppsDataAtStart, false);
+ registry->RegisterBooleanPref(
+ kDeleteSiteSettingsAtStart, false);
+
#if !BUILDFLAG(IS_IOS)
registry->RegisterBooleanPref(
kDeleteDownloadHistory, true,
diff --git a/components/browsing_data/core/pref_names.h b/components/browsing_data/core/pref_names.h
--- a/components/browsing_data/core/pref_names.h
+++ b/components/browsing_data/core/pref_names.h
@@ -17,6 +17,15 @@ extern const char kBrowsingDataLifetime[];
extern const char kClearBrowsingDataOnExitDeletionPending[];
extern const char kClearBrowsingDataOnExitList[];
+extern const char kDeleteBrowsingHistoryAtStart[];
+extern const char kDeleteDownloadHistoryAtStart[];
+extern const char kDeleteCacheAtStart[];
+extern const char kDeleteCookiesAtStart[];
+extern const char kDeletePasswordsAtStart[];
+extern const char kDeleteFormDataAtStart[];
+extern const char kDeleteHostedAppsDataAtStart[];
+extern const char kDeleteSiteSettingsAtStart[];
+
extern const char kDeleteTimePeriod[];
extern const char kDeleteTimePeriodBasic[];
--
2.25.1
@@ -0,0 +1,536 @@
From: uazo <uazo@users.noreply.github.com>
Date: Wed, 12 Apr 2023 08:22:00 +0000
Subject: Add setting to invert tap and long tap
Reverses single tap to long tap in android for accessibility reasons.
The feature can be activated from the accessibility settings.
---
chrome/android/java/res/values/ids.xml | 1 +
.../ChromeAccessibilitySettingsDelegate.java | 18 +++++++++++
.../contextmenu/ChromeContextMenuItem.java | 5 ++-
.../ChromeContextMenuPopulator.java | 5 +++
.../tab/TabContextMenuItemDelegate.java | 8 +++++
chrome/browser/about_flags.cc | 5 +++
.../contextmenu/ContextMenuItemDelegate.java | 2 ++
chrome/browser/flag_descriptions.cc | 4 +++
chrome/browser/flag_descriptions.h | 3 ++
.../browser/flags/ChromeFeatureList.java | 4 +++
.../strings/android_chrome_strings.grd | 9 ++++++
.../res/xml/accessibility_preferences.xml | 5 +++
.../accessibility/AccessibilitySettings.java | 11 +++++++
.../AccessibilitySettingsDelegate.java | 2 ++
third_party/blink/common/features.cc | 4 +++
third_party/blink/public/common/features.h | 2 ++
.../renderer/core/html/html_anchor_element.cc | 12 ++++++-
.../renderer/core/html/html_anchor_element.h | 2 +-
.../renderer/core/html/html_image_element.cc | 17 ++++++++++
.../renderer/core/html/html_image_element.h | 2 ++
.../core/page/context_menu_controller.cc | 32 +++++++++++++------
.../core/page/context_menu_controller.h | 5 +--
22 files changed, 144 insertions(+), 14 deletions(-)
diff --git a/chrome/android/java/res/values/ids.xml b/chrome/android/java/res/values/ids.xml
--- a/chrome/android/java/res/values/ids.xml
+++ b/chrome/android/java/res/values/ids.xml
@@ -91,6 +91,7 @@ found in the LICENSE file.
<!-- Menu item IDs for FullscreenActivities -->
<item type="id" name="contextmenu_open_in_chrome" />
+ <item type="id" name="contextmenu_open_in_tab" />
<!-- Tags -->
<item type="id" name="highlight_color" />
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/ChromeAccessibilitySettingsDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/ChromeAccessibilitySettingsDelegate.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/ChromeAccessibilitySettingsDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/ChromeAccessibilitySettingsDelegate.java
@@ -148,6 +148,24 @@ public class ChromeAccessibilitySettingsDelegate implements AccessibilitySetting
mSnackbarManager.showSnackbar(mSnackbar);
}
+ private static class ShowAlwaysContextMenuOnLinksDelegate implements BooleanPreferenceDelegate {
+ @Override
+ public boolean isEnabled() {
+ return ChromeFeatureList.sShowAlwaysContextMenuOnLinks.isEnabled();
+ }
+
+ @Override
+ public void setEnabled(boolean value) {
+ CachedFeatureFlags.setFlagEnabled(ChromeFeatureList.SHOW_ALWAYS_CONTEXT_MENU_ON_LINKS,
+ "show-always-context-menu-on-links", value);
+ }
+ }
+
+ @Override
+ public BooleanPreferenceDelegate getShowAlwaysContextMenuOnLinksDelegate() {
+ return new ShowAlwaysContextMenuOnLinksDelegate();
+ }
+
@Override
public void addExtraPreferences(PreferenceFragmentCompat fragment) {
if (ImageDescriptionsController.getInstance().shouldShowImageDescriptionsMenuItem()) {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuItem.java b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuItem.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuItem.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuItem.java
@@ -89,8 +89,9 @@ class ChromeContextMenuItem {
int SHARE_HIGHLIGHT = 32;
int REMOVE_HIGHLIGHT = 33;
int LEARN_MORE = 34;
+ int FOLLOW_LINK = 35;
// ALWAYS UPDATE!
- int NUM_ENTRIES = 35;
+ int NUM_ENTRIES = 36;
}
/**
@@ -132,6 +133,7 @@ class ChromeContextMenuItem {
R.id.contextmenu_share_highlight, // Item.SHARE_HIGHLIGHT
R.id.contextmenu_remove_highlight, // Item.REMOVE_HIGHLIGHT
R.id.contextmenu_learn_more, // Item.LEARN_MORE
+ R.id.contextmenu_open_in_tab, // Item.OPEN_IN_NEW_CHROME_TAB
};
/**
@@ -173,6 +175,7 @@ class ChromeContextMenuItem {
R.string.contextmenu_share_highlight, // Item.SHARE_HIGHLIGHT
R.string.contextmenu_remove_highlight, // Item.REMOVE_HIGHLIGHT
R.string.contextmenu_learn_more, // Item.LEARN_MORE
+ R.string.contextmenu_open_in_tab, // Item.OPEN_IN_NEW_CHROME_TAB:
};
/**
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java
@@ -243,6 +243,9 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator {
if (mParams.isAnchor()) {
ModelList linkGroup = new ModelList();
+ if (ChromeFeatureList.sShowAlwaysContextMenuOnLinks.isEnabled()) {
+ linkGroup.add(createListItem(Item.FOLLOW_LINK));
+ }
if (FirstRunStatus.getFirstRunFlowComplete() && !isEmptyUrl(mParams.getUrl())
&& UrlUtilities.isAcceptedScheme(mParams.getUrl())) {
if (mMode == ContextMenuMode.NORMAL) {
@@ -601,6 +604,8 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator {
ShareHelper.shareDirectly(
params, ShareHelper.getLastShareComponentName(), getProfile(), false);
});
+ } else if (itemId == R.id.contextmenu_open_in_tab) {
+ mItemDelegate.onOpenUrl(mParams.getUrl(), mParams.getReferrer());
} else if (itemId == R.id.contextmenu_open_in_chrome) {
recordContextMenuSelection(ContextMenuUma.Action.OPEN_IN_CHROME);
mItemDelegate.onOpenInChrome(mParams.getUrl(), mParams.getPageUrl());
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java
@@ -249,6 +249,14 @@ public class TabContextMenuItemDelegate implements ContextMenuItemDelegate {
mTab.loadUrl(loadUrlParams);
}
+ @Override
+ public void onOpenUrl(GURL url, Referrer referrer) {
+ LoadUrlParams loadUrlParams = new LoadUrlParams(url.getSpec());
+ loadUrlParams.setTransitionType(PageTransition.LINK);
+ loadUrlParams.setReferrer(referrer);
+ mTab.loadUrl(loadUrlParams);
+ }
+
@Override
public void onOpenImageInNewTab(GURL url, Referrer referrer) {
LoadUrlParams loadUrlParams = new LoadUrlParams(url.getSpec());
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
@@ -7874,6 +7874,11 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kMoveTopToolbarToBottomDescription, kOsAndroid,
FEATURE_VALUE_TYPE(features::kMoveTopToolbarToBottom)},
+ {"show-always-context-menu-on-links",
+ flag_descriptions::kShowAlwaysContextMenuOnLinksName,
+ flag_descriptions::kShowAlwaysContextMenuOnLinksDescription, kOsAndroid,
+ FEATURE_VALUE_TYPE(blink::features::kShowAlwaysContextMenuOnLinks)},
+
{"scroll-unification", flag_descriptions::kScrollUnificationName,
flag_descriptions::kScrollUnificationDescription, kOsAll,
FEATURE_VALUE_TYPE(features::kScrollUnification)},
diff --git a/chrome/browser/contextmenu/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuItemDelegate.java b/chrome/browser/contextmenu/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuItemDelegate.java
--- a/chrome/browser/contextmenu/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuItemDelegate.java
+++ b/chrome/browser/contextmenu/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuItemDelegate.java
@@ -109,6 +109,8 @@ public interface ContextMenuItemDelegate {
*/
void onOpenImageUrl(GURL url, Referrer referrer);
+ void onOpenUrl(GURL url, Referrer referrer);
+
/**
* Called when the {@code url} is of an image and should be opened in a new tab.
* @param url The image URL to open.
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
@@ -1880,6 +1880,10 @@ const char kMoveTopToolbarToBottomName[] = "Move top toolbar to bottom";
const char kMoveTopToolbarToBottomDescription[] =
"Move the top toolbar to the bottom.";
+const char kShowAlwaysContextMenuOnLinksName[] = "Always show contextmenu on links";
+const char kShowAlwaysContextMenuOnLinksDescription[] =
+ "Use accessibility settings to set it.";
+
const char kIncognitoDownloadsWarningName[] =
"Enable Incognito downloads warning";
const char kIncognitoDownloadsWarningDescription[] =
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
@@ -1053,6 +1053,9 @@ extern const char kImprovedKeyboardShortcutsDescription[];
extern const char kMoveTopToolbarToBottomName[];
extern const char kMoveTopToolbarToBottomDescription[];
+extern const char kShowAlwaysContextMenuOnLinksName[];
+extern const char kShowAlwaysContextMenuOnLinksDescription[];
+
extern const char kIncognitoReauthenticationForAndroidName[];
extern const char kIncognitoReauthenticationForAndroidDescription[];
diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
--- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
+++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
@@ -306,6 +306,8 @@ public abstract class ChromeFeatureList {
public static final String METRICS_SETTINGS_ANDROID = "MetricsSettingsAndroid";
public static final String MOVE_TOP_TOOLBAR_TO_BOTTOM =
"MoveTopToolbarToBottom";
+ public static final String SHOW_ALWAYS_CONTEXT_MENU_ON_LINKS =
+ "ShowAlwaysContextMenuOnLinks";
public static final String NOTIFICATION_PERMISSION_VARIANT = "NotificationPermissionVariant";
public static final String NOTIFICATION_PERMISSION_BOTTOM_SHEET =
"NotificationPermissionBottomSheet";
@@ -557,6 +559,8 @@ public abstract class ChromeFeatureList {
new CachedFlag(OMNIBOX_MATCH_TOOLBAR_AND_STATUS_BAR_COLOR, false);
public static final CachedFlag sMoveTopToolbarToBottom =
new CachedFlag(MOVE_TOP_TOOLBAR_TO_BOTTOM, false);
+ public static final CachedFlag sShowAlwaysContextMenuOnLinks =
+ new CachedFlag(SHOW_ALWAYS_CONTEXT_MENU_ON_LINKS, false);
public static final CachedFlag sOmniboxModernizeVisualUpdate =
new CachedFlag(OMNIBOX_MODERNIZE_VISUAL_UPDATE, false);
public static final CachedFlag sOmniboxMostVisitedTilesAddRecycledViewPool =
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -1714,6 +1714,12 @@ Your Google account may have other forms of browsing history like searches and a
<message name="IDS_MOVE_TOOLBAR_BOTTOM_SUMMARY" desc="Summary of the preference that allows the user to move toolbar on bottom.">
Move toolbar to bottom
</message>
+ <message name="IDS_ALWAYS_SHOW_CONTEXTMENU_ON_LINKS_TITLE" desc="Title of the preference that open the context menu in links.">
+ Always open the context menu in the links
+ </message>
+ <message name="IDS_ALWAYS_SHOW_CONTEXTMENU_ON_LINKS_SUMMARY" desc="Summary of the preference that open the context menu in links.">
+ Allows the context menu to be opened with a tap and follow the link with long press
+ </message>
<!-- Safety check -->
<message name="IDS_PREFS_SAFETY_CHECK" desc="Title of the Safety check element in settings, allowing the user to check multiple areas of browser safety. [CHAR_LIMIT=32]">
@@ -2715,6 +2721,9 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
<message name="IDS_CONTEXTMENU_OPEN_IN_NEW_CHROME_TAB" desc="Context sensitive menu item to open the selected link in a new Chrome tab from Chrome Custom Tab. [CHAR_LIMIT=30]">
Open in new Chrome tab
</message>
+ <message name="IDS_CONTEXTMENU_OPEN_IN_TAB" desc="Context sensitive menu item to open the selected link in tab. [CHAR_LIMIT=30]">
+ Open in current tab
+ </message>
<message name="IDS_CONTEXTMENU_OPEN_IN_CHROME_INCOGNITO_TAB" desc="Context sensitive menu item to open the selected link in a Chrome Incognito tab from Chrome Custom Tab. [CHAR_LIMIT=30]">
Open in Incognito tab
</message>
diff --git a/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml b/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml
--- a/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml
+++ b/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml
@@ -26,6 +26,11 @@ found in the LICENSE file.
android:summary="@string/page_zoom_always_show_preference_summary"
android:title="@string/page_zoom_always_show_preference_title" />
+ <org.chromium.components.browser_ui.settings.ChromeSwitchPreference
+ android:key="always_show_contextmenu_on_links"
+ android:summary="@string/always_show_contextmenu_on_links_summary"
+ android:title="@string/always_show_contextmenu_on_links_title" />
+
<org.chromium.components.browser_ui.settings.ChromeSwitchPreference
android:key="force_enable_zoom"
android:summary="@string/force_enable_zoom_summary"
diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java
--- a/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java
+++ b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java
@@ -37,6 +37,7 @@ public class AccessibilitySettings extends PreferenceFragmentCompat
private BooleanPreferenceDelegate mForceTabletUIDelegate;
static final String PREF_FORCE_TABLET_UI = "force_tablet_ui";
static final String PREF_MOVE_TOOLBAR_TO_BOTTOM = "move_toolbar_bottom";
+ static final String PREF_ALWAYS_SHOW_CONTEXTMENU_ON_LINKS = "always_show_contextmenu_on_links";
private TextScalePreference mTextScalePref;
private PageZoomPreference mPageZoomDefaultZoomPref;
private ChromeSwitchPreference mPageZoomAlwaysShowPref;
@@ -47,6 +48,7 @@ public class AccessibilitySettings extends PreferenceFragmentCompat
private BooleanPreferenceDelegate mAccessibilityTabSwitcherDelegate;
private double mPageZoomLatestDefaultZoomPrefValue;
private BooleanPreferenceDelegate mMoveTopToolbarToBottomDelegate;
+ private BooleanPreferenceDelegate mShowAlwaysContextMenuOnLinksDelegate;
private FontSizePrefs mFontSizePrefs;
private FontSizePrefsObserver mFontSizePrefsObserver = new FontSizePrefsObserver() {
@@ -143,6 +145,12 @@ public class AccessibilitySettings extends PreferenceFragmentCompat
mMoveToolbarToBottomPref.setChecked(mMoveTopToolbarToBottomDelegate.isEnabled());
mMoveToolbarToBottomPref.setOnPreferenceChangeListener(this);
+ ChromeSwitchPreference mShowAlwaysContextMenuOnLinksPref =
+ (ChromeSwitchPreference) findPreference(PREF_ALWAYS_SHOW_CONTEXTMENU_ON_LINKS);
+ mShowAlwaysContextMenuOnLinksDelegate = mDelegate.getShowAlwaysContextMenuOnLinksDelegate();
+ mShowAlwaysContextMenuOnLinksPref.setChecked(mShowAlwaysContextMenuOnLinksDelegate.isEnabled());
+ mShowAlwaysContextMenuOnLinksPref.setOnPreferenceChangeListener(this);
+
Preference captions = findPreference(PREF_CAPTIONS);
captions.setOnPreferenceClickListener(preference -> {
Intent intent = new Intent(Settings.ACTION_CAPTIONING_SETTINGS);
@@ -205,6 +213,9 @@ public class AccessibilitySettings extends PreferenceFragmentCompat
} else if (PREF_MOVE_TOOLBAR_TO_BOTTOM.equals(preference.getKey())) {
mMoveTopToolbarToBottomDelegate.setEnabled((Boolean) newValue);
mDelegate.requestRestart(getActivity());
+ } else if (PREF_ALWAYS_SHOW_CONTEXTMENU_ON_LINKS.equals(preference.getKey())) {
+ mShowAlwaysContextMenuOnLinksDelegate.setEnabled((Boolean) newValue);
+ mDelegate.requestRestart(getActivity());
}
return true;
diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettingsDelegate.java b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettingsDelegate.java
--- a/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettingsDelegate.java
+++ b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettingsDelegate.java
@@ -33,6 +33,8 @@ public interface AccessibilitySettingsDelegate {
BooleanPreferenceDelegate getMoveTopToolbarToBottomDelegate();
+ BooleanPreferenceDelegate getShowAlwaysContextMenuOnLinksDelegate();
+
/**
* @return The BrowserContextHandle that should be used to read and update settings.
*/
diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc
--- a/third_party/blink/common/features.cc
+++ b/third_party/blink/common/features.cc
@@ -1031,6 +1031,10 @@ BASE_FEATURE(kScopeMemoryCachePerContext,
"ScopeMemoryCachePerContext",
base::FEATURE_DISABLED_BY_DEFAULT);
+BASE_FEATURE(kShowAlwaysContextMenuOnLinks,
+ "ShowAlwaysContextMenuOnLinks",
+ base::FEATURE_DISABLED_BY_DEFAULT);
+
// Used to configure a per-origin allowlist of performance.mark events that are
// permitted to be included in slow reports traces. See crbug.com/1181774.
BASE_FEATURE(kBackgroundTracingPerformanceMark,
diff --git a/third_party/blink/public/common/features.h b/third_party/blink/public/common/features.h
--- a/third_party/blink/public/common/features.h
+++ b/third_party/blink/public/common/features.h
@@ -434,6 +434,8 @@ BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kScopeMemoryCachePerContext);
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kEnablePenetratingImageSelection);
+BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kShowAlwaysContextMenuOnLinks);
+
// Used to configure a per-origin allowlist of performance.mark events that are
// permitted to be included in slow reports traces. See crbug.com/1181774.
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kBackgroundTracingPerformanceMark);
diff --git a/third_party/blink/renderer/core/html/html_anchor_element.cc b/third_party/blink/renderer/core/html/html_anchor_element.cc
--- a/third_party/blink/renderer/core/html/html_anchor_element.cc
+++ b/third_party/blink/renderer/core/html/html_anchor_element.cc
@@ -55,6 +55,7 @@
#include "third_party/blink/renderer/core/loader/ping_loader.h"
#include "third_party/blink/renderer/core/navigation_api/navigation_api.h"
#include "third_party/blink/renderer/core/page/chrome_client.h"
+#include "third_party/blink/renderer/core/page/context_menu_controller.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/core/speculation_rules/document_speculation_rules.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
@@ -425,7 +426,7 @@ void HTMLAnchorElement::SendPings(const KURL& destination_url) const {
}
}
-void HTMLAnchorElement::HandleClick(Event& event) {
+void HTMLAnchorElement::HandleClick(Event& event, bool do_not_show_context_menu) {
event.SetDefaultHandled();
LocalDOMWindow* window = GetDocument().domWindow();
@@ -566,6 +567,15 @@ void HTMLAnchorElement::HandleClick(Event& event) {
/*element=*/this));
}
+ if (!do_not_show_context_menu &&
+ base::FeatureList::IsEnabled(features::kShowAlwaysContextMenuOnLinks)) {
+ if (Page* page = GetDocument().GetPage()) {
+ page->GetContextMenuController().HandleContextMenuEvent(
+ To<MouseEvent>(&event), /*do_not_show_context_menu*/true);
+ return;
+ }
+ }
+
Frame* target_frame =
frame->Tree().FindOrCreateFrameForNavigation(frame_request, target).frame;
diff --git a/third_party/blink/renderer/core/html/html_anchor_element.h b/third_party/blink/renderer/core/html/html_anchor_element.h
--- a/third_party/blink/renderer/core/html/html_anchor_element.h
+++ b/third_party/blink/renderer/core/html/html_anchor_element.h
@@ -98,6 +98,7 @@ class CORE_EXPORT HTMLAnchorElement : public HTMLElement, public DOMURLUtils {
void SendPings(const KURL& destination_url) const;
void Trace(Visitor*) const override;
+ void HandleClick(Event&, bool do_not_show_context_menu = false);
protected:
void ParseAttribute(const AttributeModificationParams&) override;
@@ -119,7 +120,6 @@ class CORE_EXPORT HTMLAnchorElement : public HTMLElement, public DOMURLUtils {
bool IsInteractiveContent() const final;
InsertionNotificationRequest InsertedInto(ContainerNode&) override;
void RemovedFrom(ContainerNode&) override;
- void HandleClick(Event&);
unsigned link_relations_ : 31;
mutable LinkHash cached_visited_link_hash_;
diff --git a/third_party/blink/renderer/core/html/html_image_element.cc b/third_party/blink/renderer/core/html/html_image_element.cc
--- a/third_party/blink/renderer/core/html/html_image_element.cc
+++ b/third_party/blink/renderer/core/html/html_image_element.cc
@@ -36,6 +36,7 @@
#include "third_party/blink/renderer/core/dom/events/event_dispatch_forbidden_scope.h"
#include "third_party/blink/renderer/core/dom/node_traversal.h"
#include "third_party/blink/renderer/core/dom/shadow_root.h"
+#include "third_party/blink/renderer/core/events/mouse_event.h"
#include "third_party/blink/renderer/core/frame/attribution_src_loader.h"
#include "third_party/blink/renderer/core/frame/deprecation/deprecation.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
@@ -62,6 +63,7 @@
#include "third_party/blink/renderer/core/media_type_names.h"
#include "third_party/blink/renderer/core/page/chrome_client.h"
#include "third_party/blink/renderer/core/page/page.h"
+#include "third_party/blink/renderer/core/page/context_menu_controller.h"
#include "third_party/blink/renderer/core/paint/timing/paint_timing.h"
#include "third_party/blink/renderer/core/probe/core_probes.h"
#include "third_party/blink/renderer/core/style/content_data.h"
@@ -719,6 +721,21 @@ void HTMLImageElement::DidFinishLifecycleUpdate(
}
}
+void HTMLImageElement::DefaultEventHandler(Event& event) {
+ if (base::FeatureList::IsEnabled(features::kShowAlwaysContextMenuOnLinks)) {
+ auto* mouse_event = DynamicTo<MouseEvent>(&event);
+ if (mouse_event && mouse_event->type() == event_type_names::kClick) {
+ if (Page* page = GetDocument().GetPage()) {
+ page->GetContextMenuController().HandleContextMenuEvent(
+ mouse_event, /*do_not_show_context_menu*/true);
+ return;
+ }
+ }
+ }
+
+ HTMLElement::DefaultEventHandler(event);
+}
+
bool HTMLImageElement::draggable() const {
// Image elements are draggable by default.
return !EqualIgnoringASCIICase(FastGetAttribute(html_names::kDraggableAttr),
diff --git a/third_party/blink/renderer/core/html/html_image_element.h b/third_party/blink/renderer/core/html/html_image_element.h
--- a/third_party/blink/renderer/core/html/html_image_element.h
+++ b/third_party/blink/renderer/core/html/html_image_element.h
@@ -217,6 +217,8 @@ class CORE_EXPORT HTMLImageElement final
void DidAddUserAgentShadowRoot(ShadowRoot&) override;
void AdjustStyle(ComputedStyleBuilder&) override;
+ void DefaultEventHandler(Event&) override;
+
private:
bool AreAuthorShadowsAllowed() const override { return false; }
diff --git a/third_party/blink/renderer/core/page/context_menu_controller.cc b/third_party/blink/renderer/core/page/context_menu_controller.cc
--- a/third_party/blink/renderer/core/page/context_menu_controller.cc
+++ b/third_party/blink/renderer/core/page/context_menu_controller.cc
@@ -171,14 +171,16 @@ void ContextMenuController::DocumentDetached(Document* document) {
}
}
-void ContextMenuController::HandleContextMenuEvent(MouseEvent* mouse_event) {
- DCHECK(mouse_event->type() == event_type_names::kContextmenu);
+void ContextMenuController::HandleContextMenuEvent(MouseEvent* mouse_event, bool do_not_show_context_menu) {
+ if (!base::FeatureList::IsEnabled(features::kShowAlwaysContextMenuOnLinks)) {
+ DCHECK(mouse_event->type() == event_type_names::kContextmenu);
+ }
LocalFrame* frame = mouse_event->target()->ToNode()->GetDocument().GetFrame();
PhysicalOffset location =
PhysicalOffset::FromPointFRound(mouse_event->AbsoluteLocation());
if (ShowContextMenu(frame, location, mouse_event->GetMenuSourceType(),
- mouse_event))
+ mouse_event, do_not_show_context_menu))
mouse_event->SetDefaultHandled();
}
@@ -414,7 +416,8 @@ bool ContextMenuController::ShouldShowContextMenuFromTouch(
bool ContextMenuController::ShowContextMenu(LocalFrame* frame,
const PhysicalOffset& point,
WebMenuSourceType source_type,
- const MouseEvent* mouse_event) {
+ const MouseEvent* mouse_event,
+ bool do_not_show_context_menu) {
// Displaying the context menu in this function is a big hack as we don't
// have context, i.e. whether this is being invoked via a script or in
// response to user input (Mouse event WM_RBUTTONDOWN,
@@ -437,6 +440,15 @@ bool ContextMenuController::ShowContextMenu(LocalFrame* frame,
if (!result.InnerNodeOrImageMapImage())
return false;
+ if (!do_not_show_context_menu &&
+ base::FeatureList::IsEnabled(features::kShowAlwaysContextMenuOnLinks)) {
+ if (auto* anchor_element = DynamicTo<HTMLAnchorElement>(result.URLElement())) {
+ Event event;
+ anchor_element->HandleClick(event, /*do_not_show_context_menu*/true);
+ return true;
+ }
+ }
+
// Clear any previously set cached results if we are resetting the hit test
// result.
image_selection_cached_result_ = nullptr;
@@ -776,11 +788,13 @@ bool ContextMenuController::ShowContextMenu(LocalFrame* frame,
data.form_renderer_id = GetFormRendererId(result);
data.field_renderer_id = GetFieldRendererId(result);
- const bool from_touch = source_type == kMenuSourceTouch ||
- source_type == kMenuSourceLongPress ||
- source_type == kMenuSourceLongTap;
- if (from_touch && !ShouldShowContextMenuFromTouch(data))
- return false;
+ if (!base::FeatureList::IsEnabled(features::kShowAlwaysContextMenuOnLinks)) {
+ const bool from_touch = source_type == kMenuSourceTouch ||
+ source_type == kMenuSourceLongPress ||
+ source_type == kMenuSourceLongTap;
+ if (from_touch && !ShouldShowContextMenuFromTouch(data))
+ return false;
+ }
WebLocalFrameImpl* selected_web_frame =
WebLocalFrameImpl::FromFrame(selected_frame);
diff --git a/third_party/blink/renderer/core/page/context_menu_controller.h b/third_party/blink/renderer/core/page/context_menu_controller.h
--- a/third_party/blink/renderer/core/page/context_menu_controller.h
+++ b/third_party/blink/renderer/core/page/context_menu_controller.h
@@ -57,7 +57,7 @@ class CORE_EXPORT ContextMenuController final
void DocumentDetached(Document*);
- void HandleContextMenuEvent(MouseEvent*);
+ void HandleContextMenuEvent(MouseEvent*, bool do_not_show_context_menu = false);
void ShowContextMenuAtPoint(LocalFrame*,
float x,
float y,
@@ -123,7 +123,8 @@ class CORE_EXPORT ContextMenuController final
bool ShowContextMenu(LocalFrame*,
const PhysicalOffset&,
WebMenuSourceType,
- const MouseEvent* mouse_event = nullptr);
+ const MouseEvent* mouse_event = nullptr,
+ bool do_not_show_context_menu = false);
bool ShouldShowContextMenuFromTouch(const ContextMenuData&);
--
2.25.1
@@ -0,0 +1,45 @@
From: Your Name <you@example.com>
Date: Wed, 28 Dec 2022 07:19:58 +0000
Subject: Always open browser controls in new tab
---
.../chrome/browser/tab/TabContextMenuItemDelegate.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java
@@ -20,6 +20,7 @@ import org.chromium.base.IntentUtils;
import org.chromium.base.PackageManagerUtils;
import org.chromium.base.metrics.RecordUserAction;
import org.chromium.base.supplier.Supplier;
+import org.chromium.cc.input.BrowserControlsState;
import org.chromium.chrome.browser.DefaultBrowserInfo;
import org.chromium.chrome.browser.IntentHandler;
import org.chromium.chrome.browser.bookmarks.BookmarkModel;
@@ -34,6 +35,7 @@ import org.chromium.chrome.browser.multiwindow.MultiWindowUtils;
import org.chromium.chrome.browser.offlinepages.OfflinePageBridge;
import org.chromium.chrome.browser.offlinepages.RequestCoordinatorBridge;
import org.chromium.chrome.browser.profiles.Profile;
+import org.chromium.chrome.browser.tab.TabBrowserControlsConstraintsHelper;
import org.chromium.chrome.browser.tab.state.CriticalPersistedTabData;
import org.chromium.chrome.browser.tabmodel.TabModelSelector;
import org.chromium.chrome.browser.tabmodel.document.TabDelegate;
@@ -204,6 +206,7 @@ public class TabContextMenuItemDelegate implements ContextMenuItemDelegate {
@Override
public void onOpenInNewTab(
GURL url, Referrer referrer, boolean navigateToTab, @Nullable Impression impression) {
+ TabBrowserControlsConstraintsHelper.get(mTab).update(BrowserControlsState.SHOWN, true);
RecordUserAction.record("MobileNewTabOpened");
RecordUserAction.record("LinkOpenedInNewTab");
LoadUrlParams loadUrlParams = new LoadUrlParams(url.getSpec());
@@ -217,6 +220,7 @@ public class TabContextMenuItemDelegate implements ContextMenuItemDelegate {
@Override
public void onOpenInNewTabInGroup(GURL url, Referrer referrer) {
+ TabBrowserControlsConstraintsHelper.get(mTab).update(BrowserControlsState.SHOWN, true);
RecordUserAction.record("MobileNewTabOpened");
RecordUserAction.record("LinkOpenedInNewTab");
LoadUrlParams loadUrlParams = new LoadUrlParams(url.getSpec());
--
2.25.1
@@ -0,0 +1,91 @@
From: uazo <uazo@users.noreply.github.com>
Date: Wed, 19 Apr 2023 09:59:18 +0000
Subject: Clear CORS Preflight Cache on clearing data
---
services/network/cors/preflight_cache.cc | 4 ++++
services/network/cors/preflight_cache.h | 2 ++
services/network/cors/preflight_controller.cc | 4 ++++
services/network/cors/preflight_controller.h | 2 ++
services/network/cors/preflight_result.cc | 2 +-
services/network/network_context.cc | 2 ++
6 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/services/network/cors/preflight_cache.cc b/services/network/cors/preflight_cache.cc
--- a/services/network/cors/preflight_cache.cc
+++ b/services/network/cors/preflight_cache.cc
@@ -201,6 +201,10 @@ void PreflightCache::MayPurgeForTesting(size_t max_entries, size_t purge_unit) {
MayPurge(max_entries, purge_unit);
}
+void PreflightCache::ClearAll() {
+ cache_.clear();
+}
+
void PreflightCache::MayPurge(size_t max_entries, size_t purge_unit) {
if (cache_.size() <= max_entries) {
return;
diff --git a/services/network/cors/preflight_cache.h b/services/network/cors/preflight_cache.h
--- a/services/network/cors/preflight_cache.h
+++ b/services/network/cors/preflight_cache.h
@@ -78,6 +78,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) PreflightCache final {
// `max_entries` for testing.
void MayPurgeForTesting(size_t max_entries, size_t purge_unit);
+ void ClearAll();
+
private:
void MayPurge(size_t max_entries, size_t purge_unit);
diff --git a/services/network/cors/preflight_controller.cc b/services/network/cors/preflight_controller.cc
--- a/services/network/cors/preflight_controller.cc
+++ b/services/network/cors/preflight_controller.cc
@@ -674,6 +674,10 @@ void PreflightController::ClearCorsPreflightCache(
cache_.ClearCache(std::move(url_filter));
}
+void PreflightController::ClearCache() {
+ cache_.ClearAll();
+}
+
void PreflightController::RemoveLoader(PreflightLoader* loader) {
auto it = loaders_.find(loader);
DCHECK(it != loaders_.end());
diff --git a/services/network/cors/preflight_controller.h b/services/network/cors/preflight_controller.h
--- a/services/network/cors/preflight_controller.h
+++ b/services/network/cors/preflight_controller.h
@@ -139,6 +139,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) PreflightController final {
const net::NetLogWithSource& net_log,
bool acam_preflight_spec_conformant);
+ void ClearCache();
+
// Clears the CORS preflight cache. The time range is always "all time" as
// the preflight cache max age is capped to 2hrs. in Chrome.
// It clears origins selectively when the url filter is not null, otherwise
diff --git a/services/network/cors/preflight_result.cc b/services/network/cors/preflight_result.cc
--- a/services/network/cors/preflight_result.cc
+++ b/services/network/cors/preflight_result.cc
@@ -37,7 +37,7 @@ constexpr base::TimeDelta kDefaultTimeout = base::Seconds(5);
// Maximum cache expiry time. Even if a CORS-preflight response contains
// Access-Control-Max-Age header that specifies a longer expiry time, this
// maximum time is applied.
-constexpr base::TimeDelta kMaxTimeout = base::Hours(2);
+constexpr base::TimeDelta kMaxTimeout = base::Seconds(600);
// Holds TickClock instance to overwrite TimeTicks::Now() for testing.
const base::TickClock* tick_clock_for_testing = nullptr;
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -1041,6 +1041,8 @@ void NetworkContext::ClearHttpCache(base::Time start_time,
base::BindOnce(&NetworkContext::OnHttpCacheCleared,
base::Unretained(this), std::move(callback))));
+ cors_preflight_controller_.ClearCache();
+
NetworkServiceMemoryCache* memory_cache = GetMemoryCache();
if (memory_cache)
memory_cache->Clear();
--
2.25.1
@@ -0,0 +1,25 @@
From: uazo <uazo@users.noreply.github.com>
Date: Mon, 5 Jun 2023 17:02:33 +0000
Subject: Deprecate Data URL in SVGUseElement
---
.../blink/renderer/platform/runtime_enabled_features.json5 | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
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
@@ -2939,9 +2939,8 @@
status: "stable",
},
{
- name: "RemoveDataUrlInSvgUse",
- status: "experimental",
- base_feature: "none",
+ name: "RemoveDataUrlInSvgUse", // enabled by default
+ status: "stable",
},
{
name: "RemoveLegacySizeComputation",
--
2.25.1
@@ -0,0 +1,26 @@
From: Your Name <you@example.com>
Date: Tue, 14 Feb 2023 16:29:12 +0000
Subject: Disable BackForwardCache
---
content/public/common/content_features.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
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
@@ -97,9 +97,9 @@ BASE_FEATURE(kBackgroundFetch,
base::FEATURE_ENABLED_BY_DEFAULT);
// Enable using the BackForwardCache.
-BASE_FEATURE(kBackForwardCache,
- "BackForwardCache",
- base::FEATURE_ENABLED_BY_DEFAULT);
+BASE_FEATURE(kBackForwardCache, // ****
+ "BackForwardCache", // always disabled
+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite
// Enable showing a page preview during back/forward navigations.
BASE_FEATURE(kBackForwardTransitions,
--
2.25.1
@@ -0,0 +1,46 @@
From: Your Name <you@example.com>
Date: Tue, 8 Nov 2022 12:41:22 +0000
Subject: Disable Component Updates
---
chrome/browser/component_updater/registration.cc | 1 +
components/component_updater/component_installer.cc | 1 +
components/component_updater/component_updater_service.cc | 2 +-
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/chrome/browser/component_updater/registration.cc b/chrome/browser/component_updater/registration.cc
--- a/chrome/browser/component_updater/registration.cc
+++ b/chrome/browser/component_updater/registration.cc
@@ -101,6 +101,7 @@
namespace component_updater {
void RegisterComponentsForUpdate() {
+ if ((true)) return;
auto* const cus = g_browser_process->component_updater();
#if BUILDFLAG(IS_WIN)
diff --git a/components/component_updater/component_installer.cc b/components/component_updater/component_installer.cc
--- a/components/component_updater/component_installer.cc
+++ b/components/component_updater/component_installer.cc
@@ -88,6 +88,7 @@ void ComponentInstaller::Register(RegisterCallback register_callback,
base::OnceClosure callback,
base::TaskPriority task_priority,
const base::Version& registered_version) {
+ if ((true)) return;
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
task_runner_ = base::ThreadPool::CreateSequencedTaskRunner(
diff --git a/components/component_updater/component_updater_service.cc b/components/component_updater/component_updater_service.cc
--- a/components/component_updater/component_updater_service.cc
+++ b/components/component_updater/component_updater_service.cc
@@ -521,7 +521,7 @@ std::unique_ptr<ComponentUpdateService> ComponentUpdateServiceFactory(
// Register prefs required by the component update service.
void RegisterComponentUpdateServicePrefs(PrefRegistrySimple* registry) {
// The component updates are enabled by default, if the preference is not set.
- registry->RegisterBooleanPref(prefs::kComponentUpdatesEnabled, true);
+ registry->RegisterBooleanPref(prefs::kComponentUpdatesEnabled, false);
}
} // namespace component_updater
--
2.25.1
@@ -0,0 +1,34 @@
From: uazo <uazo@users.noreply.github.com>
Date: Sat, 3 Jun 2023 15:04:55 +0000
Subject: Disable Compression Dictionary Transport
---
.../renderer/platform/runtime_enabled_features.json5 | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
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
@@ -677,16 +677,16 @@
status: "experimental",
},
{
- name: "CompressionDictionaryTransport",
- base_feature_status: "enabled",
- copied_from_base_feature_if: "overridden",
+ name: "CompressionDictionaryTransport", // need to be disabled
origin_trial_feature_name: "CompressionDictionaryTransport",
public: true,
+ status: "experimental",
},
{
- name: "CompressionDictionaryTransportBackend",
+ name: "CompressionDictionaryTransportBackend", // need to be disabled
base_feature_status: "disabled",
public: true,
+ status: "experimental",
},
{
name: "ComputedAccessibilityInfo",
--
2.25.1
+35
View File
@@ -0,0 +1,35 @@
From: Your Name <you@example.com>
Date: Tue, 14 Feb 2023 16:26:17 +0000
Subject: Disable FedCm
---
content/public/common/content_features.cc | 2 +-
.../blink/renderer/platform/runtime_enabled_features.json5 | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
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
@@ -395,7 +395,7 @@ BASE_FEATURE(kExtraSafelistedRequestHeadersForOutOfBlinkCors,
// by the flag in RuntimeEnabledFeatures on the blink side. See also
// the use of kSetOnlyIfOverridden in content/child/runtime_features.cc.
// We enable it here by default to support use in origin trials.
-BASE_FEATURE(kFedCm, "FedCm", base::FEATURE_ENABLED_BY_DEFAULT);
+BASE_FEATURE(kFedCm, "FedCm", base::FEATURE_DISABLED_BY_DEFAULT);
// Field trial boolean parameter which indicates whether FedCM IDP sign-out
// is enabled.
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
@@ -1574,7 +1574,7 @@
{
name: "FedCm",
public: true,
- status: "stable",
+ status: "test",
base_feature: "none",
},
{
--
2.25.1
@@ -0,0 +1,39 @@
From: uazo <uazo@users.noreply.github.com>
Date: Tue, 2 May 2023 15:26:46 +0000
Subject: Disable FirstPartySets and StorageAccessAPI
---
components/privacy_sandbox/privacy_sandbox_prefs.cc | 2 +-
content/public/common/content_features.cc | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/components/privacy_sandbox/privacy_sandbox_prefs.cc b/components/privacy_sandbox/privacy_sandbox_prefs.cc
--- a/components/privacy_sandbox/privacy_sandbox_prefs.cc
+++ b/components/privacy_sandbox/privacy_sandbox_prefs.cc
@@ -155,7 +155,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
registry->RegisterBooleanPref(
prefs::kPrivacySandboxFirstPartySetsDataAccessAllowedInitialized, false);
registry->RegisterBooleanPref(
- prefs::kPrivacySandboxFirstPartySetsEnabled, true,
+ prefs::kPrivacySandboxFirstPartySetsEnabled, false,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
registry->RegisterBooleanPref(prefs::kPrivacySandboxTopicsConsentGiven,
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
@@ -474,9 +474,9 @@ BASE_FEATURE(kWebIdentityMDocs,
base::FEATURE_DISABLED_BY_DEFAULT);
// Enables usage of First Party Sets to determine cookie availability.
-BASE_FEATURE(kFirstPartySets,
- "FirstPartySets",
- base::FEATURE_DISABLED_BY_DEFAULT);
+BASE_FEATURE(kFirstPartySets, // always
+ "FirstPartySets", // disabled
+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite
// Controls whether to clear sites data on FPS transitions.
const base::FeatureParam<bool> kFirstPartySetsClearSiteDataOnChangedSets{
--
2.25.1
@@ -0,0 +1,160 @@
From: uazo <uazo@users.noreply.github.com>
Date: Sun, 7 May 2023 14:01:56 +0000
Subject: Disable GSA by default
---
.../org/chromium/chrome/browser/IntentHandler.java | 5 -----
.../org/chromium/chrome/browser/share/LensUtils.java | 12 +-----------
chrome/browser/flags/android/chrome_feature_list.cc | 8 ++++----
.../org/chromium/chrome/browser/gsa/GSAState.java | 11 +++++------
4 files changed, 10 insertions(+), 26 deletions(-)
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java
@@ -44,7 +44,6 @@ import org.chromium.chrome.browser.document.ChromeLauncherActivity;
import org.chromium.chrome.browser.externalnav.IntentWithRequestMetadataHandler;
import org.chromium.chrome.browser.externalnav.IntentWithRequestMetadataHandler.RequestMetadata;
import org.chromium.chrome.browser.flags.ChromeFeatureList;
-import org.chromium.chrome.browser.gsa.GSAState;
import org.chromium.chrome.browser.offlinepages.OfflinePageUtils;
import org.chromium.chrome.browser.omnibox.suggestions.AutocompleteControllerProvider;
import org.chromium.chrome.browser.profiles.Profile;
@@ -265,8 +264,6 @@ public class IntentHandler {
private static int sReferrerId;
private static String sPendingIncognitoUrl;
- public static final String PACKAGE_GSA = GSAState.PACKAGE_NAME;
-
private static final String PACKAGE_GMAIL = "com.google.android.gm";
private static final String PACKAGE_PLUS = "com.google.android.apps.plus";
private static final String PACKAGE_HANGOUTS = "com.google.android.talk";
@@ -498,8 +495,6 @@ public class IntentHandler {
return ExternalAppId.LINE;
} else if (packageName.equals(PACKAGE_WHATSAPP)) {
return ExternalAppId.WHATSAPP;
- } else if (packageName.equals(PACKAGE_GSA)) {
- return ExternalAppId.GSA;
} else if (packageName.equals(ContextUtils.getApplicationContext().getPackageName())) {
return ExternalAppId.CHROME;
} else if (packageName.startsWith(WEBAPK_PACKAGE_PREFIX)) {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/share/LensUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/share/LensUtils.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/share/LensUtils.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/share/LensUtils.java
@@ -11,7 +11,6 @@ import android.text.TextUtils;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.IntentHandler;
import org.chromium.chrome.browser.flags.ChromeFeatureList;
-import org.chromium.chrome.browser.gsa.GSAState;
import org.chromium.components.externalauth.ExternalAuthUtils;
/**
@@ -62,12 +61,7 @@ public class LensUtils {
if (context == null) {
return "";
}
- String agsaVersion = GSAState.getInstance().getAgsaVersionName();
- if (agsaVersion == null) {
return "";
- } else {
- return agsaVersion;
- }
}
}
@@ -119,11 +113,7 @@ public class LensUtils {
* @return Whether the package is valid.
*/
public static boolean isValidAgsaPackage(final ExternalAuthUtils externalAuthUtils) {
- if (sFakePassableLensEnvironmentForTesting) {
- return true;
- }
-
- return externalAuthUtils.isGoogleSigned(IntentHandler.PACKAGE_GSA);
+ return false;
}
public static boolean isGoogleLensFeatureEnabled(boolean isIncognito) {
diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc
--- a/chrome/browser/flags/android/chrome_feature_list.cc
+++ b/chrome/browser/flags/android/chrome_feature_list.cc
@@ -677,8 +677,8 @@ BASE_FEATURE(kContextMenuGoogleLensSearchOptimizations,
base::FEATURE_DISABLED_BY_DEFAULT);
BASE_FEATURE(kContextMenuSearchWithGoogleLens,
- "ContextMenuSearchWithGoogleLens",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ "ContextMenuSearchWithGoogleLens", // always disabled
+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite
BASE_FEATURE(kContextMenuShopWithGoogleLens,
"ContextMenuShopWithGoogleLens",
@@ -759,8 +759,8 @@ BASE_FEATURE(kOfflineIndicatorV2,
base::FEATURE_ENABLED_BY_DEFAULT);
BASE_FEATURE(kExperimentsForAgsa,
- "ExperimentsForAgsa",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ "ExperimentsForAgsa", // disabled by default
+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite
BASE_FEATURE(kExploreSites, "ExploreSites", base::FEATURE_DISABLED_BY_DEFAULT);
diff --git a/chrome/browser/gsa/java/src/org/chromium/chrome/browser/gsa/GSAState.java b/chrome/browser/gsa/java/src/org/chromium/chrome/browser/gsa/GSAState.java
--- a/chrome/browser/gsa/java/src/org/chromium/chrome/browser/gsa/GSAState.java
+++ b/chrome/browser/gsa/java/src/org/chromium/chrome/browser/gsa/GSAState.java
@@ -33,8 +33,6 @@ import java.util.regex.Pattern;
* A class responsible for representing the current state of Chrome's integration with GSA.
*/
public class GSAState {
- public static final String PACKAGE_NAME = "com.google.android.googlequicksearchbox";
-
/** Used to observe state changes in the class. */
public interface Observer {
/** Called when the GSA account name is set. */
@@ -74,7 +72,7 @@ public class GSAState {
/**
* Caches the result of a computation on whether GSA is available.
*/
- private Boolean mGsaAvailable;
+ private Boolean mGsaAvailable = false;
/**
* The Google account email address being used by GSA according to the latest update we have
@@ -155,7 +153,7 @@ public class GSAState {
/** Returns whether the GSA package is installed on device. */
public boolean isGsaInstalled() {
- return PackageUtils.isPackageInstalled(PACKAGE_NAME);
+ return false;
}
/**
@@ -178,6 +176,7 @@ public class GSAState {
*/
public boolean isAgsaVersionBelowMinimum(
String installedVersionName, String minimumVersionName) {
+ if ((true)) return true;
if (TextUtils.isEmpty(installedVersionName) || TextUtils.isEmpty(minimumVersionName)) {
return true;
}
@@ -209,7 +208,7 @@ public class GSAState {
* @return Whether the given intent can be handled by Agsa.
*/
public boolean canAgsaHandleIntent(@NonNull Intent intent) {
- if (!intent.getPackage().equals(PACKAGE_NAME)) return false;
+ if ((true)) return false;
ComponentName activity =
intent.resolveActivity(ContextUtils.getApplicationContext().getPackageManager());
@@ -223,7 +222,7 @@ public class GSAState {
* @return The version name of the Agsa package or null if it can't be found.
*/
public @Nullable String getAgsaVersionName() {
- PackageInfo packageInfo = PackageUtils.getPackageInfo(PACKAGE_NAME, 0);
+ PackageInfo packageInfo = null;
return packageInfo == null ? null : packageInfo.versionName;
}
--
2.25.1
@@ -0,0 +1,67 @@
From: uazo <uazo@users.noreply.github.com>
Date: Sun, 7 May 2023 13:13:47 +0000
Subject: Disable GetInstalledRelatedApps API
---
.../components/installedapp/InstalledAppProviderImpl.java | 1 +
.../browser/installedapp/installed_app_provider_impl_win.cc | 1 +
content/public/common/content_features.cc | 4 ++--
.../blink/renderer/platform/runtime_enabled_features.json5 | 2 +-
4 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/components/installedapp/android/java/src/org/chromium/components/installedapp/InstalledAppProviderImpl.java b/components/installedapp/android/java/src/org/chromium/components/installedapp/InstalledAppProviderImpl.java
--- a/components/installedapp/android/java/src/org/chromium/components/installedapp/InstalledAppProviderImpl.java
+++ b/components/installedapp/android/java/src/org/chromium/components/installedapp/InstalledAppProviderImpl.java
@@ -155,6 +155,7 @@ public class InstalledAppProviderImpl implements InstalledAppProvider {
@UiThread
public void filterInstalledApps(final RelatedApplication[] relatedApps, final Url manifestUrl,
final FilterInstalledApps_Response callback) {
+ assert false;
GURL url = mRenderFrameHost.getLastCommittedURL();
final GURL frameUrl = url == null ? GURL.emptyGURL() : url;
int delayMillis = 0;
diff --git a/content/browser/installedapp/installed_app_provider_impl_win.cc b/content/browser/installedapp/installed_app_provider_impl_win.cc
--- a/content/browser/installedapp/installed_app_provider_impl_win.cc
+++ b/content/browser/installedapp/installed_app_provider_impl_win.cc
@@ -112,6 +112,7 @@ void FilterInstalledAppsForWin(
std::vector<blink::mojom::RelatedApplicationPtr> related_apps,
blink::mojom::InstalledAppProvider::FilterInstalledAppsCallback callback,
const GURL frame_url) {
+ CHECK(true);
ComPtr<ILauncherStatics4> launcher_statics;
HRESULT hr = base::win::RoActivateInstance(
base::win::ScopedHString::Create(RuntimeClass_Windows_System_Launcher)
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
@@ -573,12 +573,12 @@ BASE_FEATURE(kInnerFrameCompositorSurfaceEviction,
base::FEATURE_ENABLED_BY_DEFAULT); // guard this
// Kill switch for the GetInstalledRelatedApps API.
-BASE_FEATURE(kInstalledApp, "InstalledApp", base::FEATURE_ENABLED_BY_DEFAULT);
+BASE_FEATURE(kInstalledApp, "InstalledApp", base::FEATURE_DISABLED_BY_DEFAULT);
// Allow Windows specific implementation for the GetInstalledRelatedApps API.
BASE_FEATURE(kInstalledAppProvider,
"InstalledAppProvider",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ base::FEATURE_DISABLED_BY_DEFAULT);
// Enable support for isolated web apps. This will guard features like serving
// isolated web apps via the isolated-app:// scheme, and other advanced isolated
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
@@ -2050,9 +2050,9 @@
name: "FingerprintingCanvasImageDataNoise",
},
{
+ // disable GetInstalledRelatedApps
name: "InstalledApp",
public: true,
- status: "stable",
base_feature: "none",
},
{
--
2.25.1
@@ -0,0 +1,29 @@
From: uazo <uazo@users.noreply.github.com>
Date: Mon, 15 May 2023 12:33:18 +0000
Subject: Disable PrivateStateTokens API
---
services/network/public/cpp/features.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/services/network/public/cpp/features.cc b/services/network/public/cpp/features.cc
--- a/services/network/public/cpp/features.cc
+++ b/services/network/public/cpp/features.cc
@@ -147,12 +147,12 @@ BASE_FEATURE(kAttributionReportingCrossAppWeb,
// set, and handling their responses, according to the protocol.
// (See https://github.com/WICG/trust-token-api.)
BASE_FEATURE(kPrivateStateTokens,
- "PrivateStateTokens",
- base::FEATURE_DISABLED_BY_DEFAULT);
+ "PrivateStateTokens", // must be disabled
+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite
// Secondary flag used by the FLEDGE ads experiment in the interim before
// PSTs are fully rolled out to stable.
-BASE_FEATURE(kFledgePst, "TrustTokens", base::FEATURE_DISABLED_BY_DEFAULT);
+BASE_FEATURE(kFledgePst, "TrustTokens", base::FEATURE_DISABLED_BY_DEFAULT); // must be disabled
// Determines which Trust Tokens operations require the TrustTokens origin trial
// active in order to be used. This is runtime-configurable so that the Trust
--
2.25.1
@@ -0,0 +1,24 @@
From: uazo <uazo@users.noreply.github.com>
Date: Tue, 18 Apr 2023 14:17:19 +0000
Subject: Disable SHA1 Server Signature
---
net/base/features.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/base/features.cc b/net/base/features.cc
--- a/net/base/features.cc
+++ b/net/base/features.cc
@@ -79,8 +79,8 @@ BASE_FEATURE(kUseDnsHttpsSvcbAlpn,
base::FEATURE_DISABLED_BY_DEFAULT);
BASE_FEATURE(kSHA1ServerSignature,
- "SHA1ServerSignature",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ "SHA1ServerSignature", // disabled
+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite
BASE_FEATURE(kEnableTLS13EarlyData,
"EnableTLS13EarlyData",
--
2.25.1
+35
View File
@@ -0,0 +1,35 @@
From: uazo <uazo@users.noreply.github.com>
Date: Mon, 1 May 2023 12:07:49 +0000
Subject: Disable WebGPU
---
gpu/config/gpu_finch_features.cc | 2 +-
.../blink/renderer/platform/runtime_enabled_features.json5 | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gpu/config/gpu_finch_features.cc b/gpu/config/gpu_finch_features.cc
--- a/gpu/config/gpu_finch_features.cc
+++ b/gpu/config/gpu_finch_features.cc
@@ -267,7 +267,7 @@ BASE_FEATURE(kEnableDrDcVulkan,
BASE_FEATURE(kWebGPUService,
"WebGPUService",
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH)
- base::FEATURE_ENABLED_BY_DEFAULT
+ base::FEATURE_DISABLED_BY_DEFAULT
#else
base::FEATURE_DISABLED_BY_DEFAULT
#endif
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
@@ -3957,7 +3957,7 @@
// Note that this isn't enough to enable WebGPU and that access to
// WebGPU is further gated on the "WebGPUService" feature exposing GPU
// process access to WebGPU to the renderer process.
- status: "stable",
+ status: "test",
},
{
// WebGPU developer features are deliberately not enabled by experimental
--
2.25.1
+37
View File
@@ -0,0 +1,37 @@
From: Your Name <you@example.com>
Date: Sun, 26 Feb 2023 19:46:04 +0000
Subject: Disable csp reports
---
third_party/blink/renderer/core/loader/ping_loader.cc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/third_party/blink/renderer/core/loader/ping_loader.cc b/third_party/blink/renderer/core/loader/ping_loader.cc
--- a/third_party/blink/renderer/core/loader/ping_loader.cc
+++ b/third_party/blink/renderer/core/loader/ping_loader.cc
@@ -68,6 +68,7 @@ bool SendBeaconCommon(const ScriptState& state,
LocalFrame* frame,
const KURL& url,
const BeaconData& beacon) {
+ if ((true)) return true;
if (!frame->DomWindow()
->GetContentSecurityPolicyForWorld(&state.World())
->AllowConnectToSource(url, url, RedirectStatus::kNoRedirect)) {
@@ -103,6 +104,7 @@ bool SendBeaconCommon(const ScriptState& state,
void PingLoader::SendLinkAuditPing(LocalFrame* frame,
const KURL& ping_url,
const KURL& destination_url) {
+ if ((true)) return;
if (!ping_url.ProtocolIsInHTTPFamily())
return;
@@ -139,6 +141,7 @@ void PingLoader::SendLinkAuditPing(LocalFrame* frame,
void PingLoader::SendViolationReport(ExecutionContext* execution_context,
const KURL& report_url,
scoped_refptr<EncodedFormData> report) {
+ if ((true)) return;
ResourceRequest request(report_url);
request.SetHttpMethod(http_names::kPOST);
request.SetHTTPContentType("application/csp-report");
--
2.25.1
@@ -0,0 +1,31 @@
From: uazo <uazo@users.noreply.github.com>
Date: Mon, 17 Apr 2023 12:38:44 +0000
Subject: Disable devtools remote and custom protocols
---
chrome/browser/ui/webui/devtools_ui_data_source.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/chrome/browser/ui/webui/devtools_ui_data_source.cc b/chrome/browser/ui/webui/devtools_ui_data_source.cc
--- a/chrome/browser/ui/webui/devtools_ui_data_source.cc
+++ b/chrome/browser/ui/webui/devtools_ui_data_source.cc
@@ -175,7 +175,7 @@ void DevToolsDataSource::StartDataRequest(
// Serve request to devtools://remote from remote location.
std::string remote_path_prefix(chrome::kChromeUIDevToolsRemotePath);
remote_path_prefix += "/";
- if (base::StartsWith(path, remote_path_prefix,
+ if ((false) && base::StartsWith(path, remote_path_prefix,
base::CompareCase::INSENSITIVE_ASCII)) {
if (MaybeHandleCustomRequest(path.substr(remote_path_prefix.length()),
&callback)) {
@@ -198,7 +198,7 @@ void DevToolsDataSource::StartDataRequest(
// Serve request to devtools://custom from custom URL.
std::string custom_path_prefix(chrome::kChromeUIDevToolsCustomPath);
custom_path_prefix += "/";
- if (base::StartsWith(path, custom_path_prefix,
+ if ((false) && base::StartsWith(path, custom_path_prefix,
base::CompareCase::INSENSITIVE_ASCII)) {
GURL custom_devtools_frontend = GetCustomDevToolsFrontendURL();
if (!custom_devtools_frontend.is_empty()) {
--
2.25.1
@@ -0,0 +1,157 @@
From: uazo <uazo@users.noreply.github.com>
Date: Tue, 14 Mar 2023 15:59:38 +0000
Subject: Disable privacy issues in password manager
---
chrome/android/java/AndroidManifest.xml | 9 --------
.../generated_password_leak_detection_pref.cc | 3 +--
.../affiliation/affiliation_backend.cc | 1 +
.../affiliation/affiliation_service_impl.cc | 4 ++++
.../core/browser/affiliation/facet_manager.cc | 23 +++----------------
.../leak_detection_check_factory_impl.cc | 5 ++++
.../leak_detection_check_impl.cc | 4 +---
.../core/common/password_manager_features.cc | 4 ++--
8 files changed, 17 insertions(+), 36 deletions(-)
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
@@ -468,15 +468,6 @@ by a child template that "extends" this file.
</intent-filter>
</receiver>
- <!-- Phishing Protection related -->
- <receiver android:name="org.chromium.chrome.browser.safe_browsing.PasswordProtectionBroadcastReceiver"
- android:exported="true"
- android:permission="com.google.android.gms.permission.INTERNAL_BROADCAST">
- <intent-filter>
- <action android:name="com.android.chrome.safe_browsing.LOGIN" />
- </intent-filter>
- </receiver>
-
<!-- Upgrade related -->
<receiver android:name="org.chromium.chrome.browser.upgrade.PackageReplacedBroadcastReceiver"
android:exported="false">
diff --git a/chrome/browser/password_manager/generated_password_leak_detection_pref.cc b/chrome/browser/password_manager/generated_password_leak_detection_pref.cc
--- a/chrome/browser/password_manager/generated_password_leak_detection_pref.cc
+++ b/chrome/browser/password_manager/generated_password_leak_detection_pref.cc
@@ -20,8 +20,7 @@ namespace {
// Returns whether the user can use the leak detection feature.
bool IsUserAllowedToUseLeakDetection(Profile* profile) {
- return !profile->IsGuestSession() &&
- IdentityManagerFactory::GetForProfileIfExists(profile);
+ return false;
}
// Returns whether the effective value of the Safe Browsing preferences for
diff --git a/components/password_manager/core/browser/affiliation/affiliation_backend.cc b/components/password_manager/core/browser/affiliation/affiliation_backend.cc
--- a/components/password_manager/core/browser/affiliation/affiliation_backend.cc
+++ b/components/password_manager/core/browser/affiliation/affiliation_backend.cc
@@ -403,6 +403,7 @@ void AffiliationBackend::OnMalformedResponse(
}
bool AffiliationBackend::OnCanSendNetworkRequest() {
+ if ((true)) return false;
DCHECK(!fetcher_);
std::vector<FacetURI> requested_facet_uris;
for (const auto& facet_manager_pair : facet_managers_) {
diff --git a/components/password_manager/core/browser/affiliation/affiliation_service_impl.cc b/components/password_manager/core/browser/affiliation/affiliation_service_impl.cc
--- a/components/password_manager/core/browser/affiliation/affiliation_service_impl.cc
+++ b/components/password_manager/core/browser/affiliation/affiliation_service_impl.cc
@@ -138,6 +138,10 @@ void AffiliationServiceImpl::Shutdown() {
void AffiliationServiceImpl::PrefetchChangePasswordURLs(
const std::vector<GURL>& urls,
base::OnceClosure callback) {
+ if ((true)) {
+ std::move(callback).Run();
+ return;
+ }
std::vector<FacetURI> facets;
std::vector<url::SchemeHostPort> tuple_origins;
for (const auto& url : urls) {
diff --git a/components/password_manager/core/browser/affiliation/facet_manager.cc b/components/password_manager/core/browser/affiliation/facet_manager.cc
--- a/components/password_manager/core/browser/affiliation/facet_manager.cc
+++ b/components/password_manager/core/browser/affiliation/facet_manager.cc
@@ -117,25 +117,7 @@ void FacetManager::GetAffiliationsAndBranding(
RequestInfo request_info;
request_info.callback = std::move(callback);
request_info.callback_task_runner = callback_task_runner;
- if (IsCachedDataFresh()) {
- AffiliatedFacetsWithUpdateTime affiliation;
- if (!backend_->ReadAffiliationsAndBrandingFromDatabase(facet_uri_,
- &affiliation)) {
- ServeRequestWithFailure(std::move(request_info));
- return;
- }
- DCHECK_EQ(affiliation.last_update_time, last_update_time_) << facet_uri_;
- ServeRequestWithSuccess(std::move(request_info), affiliation.facets);
- } else if (cache_miss_strategy == StrategyOnCacheMiss::FETCH_OVER_NETWORK) {
- pending_requests_.push_back(std::move(request_info));
- backend_->SignalNeedNetworkRequest();
- } else if (cache_miss_strategy ==
- StrategyOnCacheMiss::TRY_ONCE_OVER_NETWORK) {
- pending_one_time_requests_.push_back(std::move(request_info));
- backend_->SignalNeedNetworkRequest();
- } else {
- ServeRequestWithFailure(std::move(request_info));
- }
+ ServeRequestWithFailure(std::move(request_info));
}
void FacetManager::Prefetch(const base::Time& keep_fresh_until) {
@@ -254,7 +236,8 @@ void FacetManager::ServeRequestWithSuccess(
const AffiliatedFacets& affiliation) {
request_info.callback_task_runner->PostTask(
FROM_HERE,
- base::BindOnce(std::move(request_info.callback), affiliation, true));
+ base::BindOnce(std::move(request_info.callback),
+ AffiliatedFacets(), false));
}
// static
diff --git a/components/password_manager/core/browser/leak_detection/leak_detection_check_factory_impl.cc b/components/password_manager/core/browser/leak_detection/leak_detection_check_factory_impl.cc
--- a/components/password_manager/core/browser/leak_detection/leak_detection_check_factory_impl.cc
+++ b/components/password_manager/core/browser/leak_detection/leak_detection_check_factory_impl.cc
@@ -46,6 +46,11 @@ LeakDetectionCheckFactoryImpl::TryCreateLeakCheck(
version_info::Channel channel) const {
CHECK(identity_manager);
+ if ((true)) {
+ delegate->OnError(LeakDetectionError::kNotSignIn);
+ return nullptr;
+ }
+
return std::make_unique<LeakDetectionCheckImpl>(
delegate, identity_manager, std::move(url_loader_factory),
GetAPIKey(LeakDetectionCheckImpl::HasAccountForRequest(identity_manager),
diff --git a/components/password_manager/core/browser/leak_detection/leak_detection_check_impl.cc b/components/password_manager/core/browser/leak_detection/leak_detection_check_impl.cc
--- a/components/password_manager/core/browser/leak_detection/leak_detection_check_impl.cc
+++ b/components/password_manager/core/browser/leak_detection/leak_detection_check_impl.cc
@@ -190,9 +190,7 @@ bool LeakDetectionCheckImpl::HasAccountForRequest(
// always return something if the user is signed in.
// On Android it will be empty if the user isn't syncing. Thus,
// GetAccountsWithRefreshTokens() check is necessary.
- return identity_manager &&
- (identity_manager->HasPrimaryAccount(signin::ConsentLevel::kSignin) ||
- !identity_manager->GetAccountsWithRefreshTokens().empty());
+ return false;
}
void LeakDetectionCheckImpl::Start(LeakDetectionInitiator initiator,
diff --git a/components/password_manager/core/common/password_manager_features.cc b/components/password_manager/core/common/password_manager_features.cc
--- a/components/password_manager/core/common/password_manager_features.cc
+++ b/components/password_manager/core/common/password_manager_features.cc
@@ -87,8 +87,8 @@ BASE_FEATURE(kFillingAcrossGroupedSites,
// Enables the experiment for the password manager to only fill on account
// selection, rather than autofilling on page load, with highlighting of fields.
BASE_FEATURE(kFillOnAccountSelect,
- "fill-on-account-select",
- base::FEATURE_DISABLED_BY_DEFAULT);
+ "fill-on-account-select", // always enabled
+ base::FEATURE_ENABLED_BY_DEFAULT); // in bromite
// Enables logging the content of chrome://password-manager-internals to the
// terminal.
--
2.25.1
@@ -0,0 +1,186 @@
From: uazo <uazo@users.noreply.github.com>
Date: Thu, 20 Apr 2023 15:03:13 +0000
Subject: Disable speechSynthesis getVoices API
Adds flag disable-speechsynthesis-voice-list to disable
SpeechSynthesis.getVoices() call.
If not active the user must also set the system timezone override
to enable it.
Disable LiveCaption
Require: Timezone-customization.patch
---
chrome/browser/about_flags.cc | 5 +++++
.../renderer/chrome_content_renderer_client.cc | 2 +-
.../renderer/content_settings_agent_impl.cc | 9 ++++++++-
.../renderer/content_settings_agent_impl.h | 2 ++
media/base/media_switches.cc | 8 ++++----
third_party/blink/common/features.cc | 4 ++++
third_party/blink/public/common/features.h | 2 ++
.../platform/web_content_settings_client.h | 2 ++
.../renderer/modules/speech/speech_synthesis.cc | 17 ++++++++++++++---
9 files changed, 42 insertions(+), 9 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
@@ -7444,6 +7444,11 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kFileHandlingIconsDescription, kOsDesktop,
FEATURE_VALUE_TYPE(blink::features::kFileHandlingIcons)},
+ {"disable-speechsynthesis-voice-list",
+ "Disable speechSynthesis.getVoices()",
+ "Disables access to the list of items installed on the device", kOsAll,
+ FEATURE_VALUE_TYPE(blink::features::kDisableSpeechSynthesisVoiceList)},
+
{"strict-origin-isolation", flag_descriptions::kStrictOriginIsolationName,
flag_descriptions::kStrictOriginIsolationDescription, kOsAll,
FEATURE_VALUE_TYPE(features::kStrictOriginIsolation)},
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
@@ -1585,7 +1585,7 @@ ChromeContentRendererClient::CreateWorkerContentSettingsClient(
std::unique_ptr<media::SpeechRecognitionClient>
ChromeContentRendererClient::CreateSpeechRecognitionClient(
content::RenderFrame* render_frame) {
- return std::make_unique<ChromeSpeechRecognitionClient>(render_frame);
+ return nullptr;
}
#endif // BUILDFLAG(ENABLE_SPEECH_SERVICE)
diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc b/components/content_settings/renderer/content_settings_agent_impl.cc
--- a/components/content_settings/renderer/content_settings_agent_impl.cc
+++ b/components/content_settings/renderer/content_settings_agent_impl.cc
@@ -496,6 +496,14 @@ bool ContentSettingsAgentImpl::IsAllowlistedForContentSettings() const {
return false;
}
+bool ContentSettingsAgentImpl::IsTimezoneChanged() {
+ if (!content_setting_rules_)
+ return false;
+ // CONTENT_SETTING_ALLOW = use system time
+ return CONTENT_SETTING_ALLOW != GetContentSetting(
+ ContentSettingsType::TIMEZONE_OVERRIDE, CONTENT_SETTING_ALLOW);
+}
+
bool ContentSettingsAgentImpl::UpdateOverrides() {
// Evaluate the content setting rules
ContentSetting setting = CONTENT_SETTING_ALLOW;
@@ -506,7 +514,6 @@ bool ContentSettingsAgentImpl::UpdateOverrides() {
}
return UpdateTimeZoneOverride(
setting, content_setting_rules_->timezone_override_value);
- //&& UpdateLocaleOverride(setting);
}
bool ContentSettingsAgentImpl::UpdateTimeZoneOverride(
diff --git a/components/content_settings/renderer/content_settings_agent_impl.h b/components/content_settings/renderer/content_settings_agent_impl.h
--- a/components/content_settings/renderer/content_settings_agent_impl.h
+++ b/components/content_settings/renderer/content_settings_agent_impl.h
@@ -117,6 +117,8 @@ class ContentSettingsAgentImpl
void SetRendererContentSettingRulesForTest(
const RendererContentSettingRules& rules);
+ bool IsTimezoneChanged() override;
+
protected:
// Allow this to be overridden by tests.
virtual void BindContentSettingsManager(
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
@@ -840,7 +840,7 @@ const base::FeatureParam<std::string> kMediaFoundationClearKeyCdmPathForTesting{
#endif // BUILDFLAG(IS_WIN)
// Enables the Live Caption feature on supported devices.
-BASE_FEATURE(kLiveCaption, "LiveCaption", base::FEATURE_ENABLED_BY_DEFAULT);
+BASE_FEATURE(kLiveCaption, "LiveCaption", base::FEATURE_DISABLED_BY_DEFAULT);
// Controls whether a "Share this tab instead" button should be shown for
// getDisplayMedia captures. Note: This flag does not control if the "Share this
@@ -877,9 +877,9 @@ BASE_FEATURE(kLiveCaptionRightClick,
base::FEATURE_DISABLED_BY_DEFAULT);
// Enable or disable Live Caption support for WebAudio.
-BASE_FEATURE(kLiveCaptionWebAudio,
- "LiveCaptionWebAudio",
- base::FEATURE_ENABLED_BY_DEFAULT);
+BASE_FEATURE(kLiveCaptionWebAudio, // disabled by
+ "LiveCaptionWebAudio", // default
+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite
// Live Caption runs system-wide on ChromeOS, as opposed to just in the browser.
BASE_FEATURE(kLiveCaptionSystemWideOnChromeOS,
diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc
--- a/third_party/blink/common/features.cc
+++ b/third_party/blink/common/features.cc
@@ -1611,6 +1611,10 @@ BASE_FEATURE(kStylusPointerAdjustment,
"StylusPointerAdjustment",
base::FEATURE_DISABLED_BY_DEFAULT);
+BASE_FEATURE(kDisableSpeechSynthesisVoiceList,
+ "DisableSpeechSynthesisVoiceList",
+ base::FEATURE_ENABLED_BY_DEFAULT);
+
BASE_FEATURE(kDisableArrayBufferSizeLimitsForTesting,
"DisableArrayBufferSizeLimitsForTesting",
base::FEATURE_DISABLED_BY_DEFAULT);
diff --git a/third_party/blink/public/common/features.h b/third_party/blink/public/common/features.h
--- a/third_party/blink/public/common/features.h
+++ b/third_party/blink/public/common/features.h
@@ -823,6 +823,8 @@ BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kAndroidExtendedKeyboardShortcuts);
// enabling functions like writing into a nearby input element.
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kStylusPointerAdjustment);
+BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kDisableSpeechSynthesisVoiceList);
+
// TODO(https://crbug.com/1201109): temporary flag to disable new ArrayBuffer
// size limits, so that tests can be written against code receiving these
// buffers. Remove when the bindings code instituting these limits is removed.
diff --git a/third_party/blink/public/platform/web_content_settings_client.h b/third_party/blink/public/platform/web_content_settings_client.h
--- a/third_party/blink/public/platform/web_content_settings_client.h
+++ b/third_party/blink/public/platform/web_content_settings_client.h
@@ -119,6 +119,8 @@ class WebContentSettingsClient {
// frame.
virtual bool ShouldAutoupgradeMixedContent() { return true; }
+ virtual bool IsTimezoneChanged() { return false; }
+
// Controls whether the ViewTransition callback needs to be larger than
// default.
virtual bool IncreaseViewTransitionCallbackTimeout() const { return false; }
diff --git a/third_party/blink/renderer/modules/speech/speech_synthesis.cc b/third_party/blink/renderer/modules/speech/speech_synthesis.cc
--- a/third_party/blink/renderer/modules/speech/speech_synthesis.cc
+++ b/third_party/blink/renderer/modules/speech/speech_synthesis.cc
@@ -35,6 +35,7 @@
#include "third_party/blink/public/common/privacy_budget/identifiable_token_builder.h"
#include "third_party/blink/public/common/thread_safe_browser_interface_broker_proxy.h"
#include "third_party/blink/public/platform/platform.h"
+#include "third_party/blink/public/platform/web_content_settings_client.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_speech_synthesis_error_event_init.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_speech_synthesis_event_init.h"
#include "third_party/blink/renderer/core/dom/document.h"
@@ -93,9 +94,19 @@ SpeechSynthesis::SpeechSynthesis(LocalDOMWindow& window)
void SpeechSynthesis::OnSetVoiceList(
Vector<mojom::blink::SpeechSynthesisVoicePtr> mojom_voices) {
voice_list_.clear();
- for (auto& mojom_voice : mojom_voices) {
- voice_list_.push_back(
- MakeGarbageCollected<SpeechSynthesisVoice>(std::move(mojom_voice)));
+ bool allowed = !base::FeatureList::IsEnabled(features::kDisableSpeechSynthesisVoiceList);
+ if (allowed) {
+ auto* frame = GetSupplementable()->GetFrame();
+ if (frame) {
+ blink::WebContentSettingsClient* settings = frame->GetContentSettingsClient();
+ if (settings) allowed = !settings->IsTimezoneChanged();
+ }
+ }
+ if (allowed) {
+ for (auto& mojom_voice : mojom_voices) {
+ voice_list_.push_back(
+ MakeGarbageCollected<SpeechSynthesisVoice>(std::move(mojom_voice)));
+ }
}
VoicesDidChange();
}
--
2.25.1
@@ -0,0 +1,64 @@
From: uazo <uazo@users.noreply.github.com>
Date: Tue, 14 Feb 2023 16:41:42 +0000
Subject: Disable visited pseudo class
Disable support for pseduo css visited class
---
components/visitedlink/browser/visitedlink_writer.cc | 8 ++++----
components/visitedlink/common/visitedlink_common.cc | 1 +
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/components/visitedlink/browser/visitedlink_writer.cc b/components/visitedlink/browser/visitedlink_writer.cc
--- a/components/visitedlink/browser/visitedlink_writer.cc
+++ b/components/visitedlink/browser/visitedlink_writer.cc
@@ -234,7 +234,7 @@ VisitedLinkWriter::VisitedLinkWriter(content::BrowserContext* browser_context,
: browser_context_(browser_context),
delegate_(delegate),
listener_(std::make_unique<VisitedLinkEventListener>(browser_context)),
- persist_to_disk_(persist_to_disk) {}
+ persist_to_disk_(false) {}
VisitedLinkWriter::VisitedLinkWriter(Listener* listener,
VisitedLinkDelegate* delegate,
@@ -244,10 +244,10 @@ VisitedLinkWriter::VisitedLinkWriter(Listener* listener,
int32_t default_table_size)
: delegate_(delegate),
listener_(listener),
- persist_to_disk_(persist_to_disk),
+ persist_to_disk_(false),
database_name_override_(filename),
table_size_override_(default_table_size),
- suppress_rebuild_(suppress_rebuild) {
+ suppress_rebuild_(false) {
DCHECK(listener_);
}
@@ -317,6 +317,7 @@ void VisitedLinkWriter::AddURL(const GURL& url, bool update_file) {
}
VisitedLinkWriter::Hash VisitedLinkWriter::TryToAddURL(const GURL& url) {
+ if ((true)) return null_hash_;
// Extra check that we are not incognito. This should not happen.
// TODO(boliu): Move this check to HistoryService when IsOffTheRecord is
// removed from BrowserContext.
@@ -1032,7 +1033,6 @@ bool VisitedLinkWriter::RebuildTableFromDelegate() {
// TODO(brettw) make sure we have reasonable salt!
table_builder_ = new TableBuilder(this, salt_);
- delegate_->RebuildTable(table_builder_);
return true;
}
diff --git a/components/visitedlink/common/visitedlink_common.cc b/components/visitedlink/common/visitedlink_common.cc
--- a/components/visitedlink/common/visitedlink_common.cc
+++ b/components/visitedlink/common/visitedlink_common.cc
@@ -43,6 +43,7 @@ bool VisitedLinkCommon::IsVisited(const GURL& url) const {
}
bool VisitedLinkCommon::IsVisited(Fingerprint fingerprint) const {
+ if ((true)) return false;
// Go through the table until we find the item or an empty spot (meaning it
// wasn't found). This loop will terminate as long as the table isn't full,
// which should be enforced by AddFingerprint.
--
2.25.1
@@ -0,0 +1,25 @@
From: uazo <uazo@users.noreply.github.com>
Date: Sat, 3 Jun 2023 15:09:26 +0000
Subject: Disallow Android App Scheme as referrer
---
chrome/renderer/chrome_content_renderer_client.cc | 5 -----
1 file changed, 5 deletions(-)
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
@@ -525,11 +525,6 @@ void ChromeContentRendererClient::RenderThreadStarted() {
// TODO(nyquist): Add test to ensure this happens when the flag is set.
WebSecurityPolicy::RegisterURLSchemeAsDisplayIsolated(dom_distiller_scheme);
-#if BUILDFLAG(IS_ANDROID)
- WebSecurityPolicy::RegisterURLSchemeAsAllowedForReferrer(
- WebString::FromUTF8(content::kAndroidAppScheme));
-#endif
-
// chrome-search: pages should not be accessible by bookmarklets
// or javascript: URLs typed in the omnibox.
WebSecurityPolicy::RegisterURLSchemeAsNotAllowingJavascriptURLs(
--
2.25.1
@@ -0,0 +1,22 @@
From: uazo <uazo@users.noreply.github.com>
Date: Sat, 3 Jun 2023 13:11:22 +0000
Subject: Disallowing MIDI permission by default
---
components/permissions/features.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/permissions/features.cc b/components/permissions/features.cc
--- a/components/permissions/features.cc
+++ b/components/permissions/features.cc
@@ -145,7 +145,7 @@ BASE_FEATURE(kWindowManagementPermissionAlias,
// Enables disallowing MIDI permission by default.
BASE_FEATURE(kBlockMidiByDefault,
"BlockMidiByDefault",
- base::FEATURE_DISABLED_BY_DEFAULT);
+ base::FEATURE_ENABLED_BY_DEFAULT);
} // namespace features
namespace feature_params {
--
2.25.1
@@ -0,0 +1,85 @@
From: uazo <uazo@users.noreply.github.com>
Date: Tue, 28 Mar 2023 15:43:18 +0000
Subject: Enable Document Open Inheritance Removal
---
.../blink/renderer/core/dom/document.cc | 51 -------------------
.../platform/runtime_enabled_features.json5 | 3 +-
2 files changed, 1 insertion(+), 53 deletions(-)
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
@@ -3359,57 +3359,6 @@ void Document::open(LocalDOMWindow* entered_window,
// https://chromestatus.com/metrics/feature/timeline/popularity/4375
CountUse(WebFeature::kDocumentOpenMutateSandbox);
}
-
- if (!RuntimeEnabledFeatures::
- DocumentOpenSandboxInheritanceRemovalEnabled()) {
- // We inherit the sandbox flags of the entered document, so mask on
- // the ones contained in the CSP. The operator| is a bitwise operation
- // on the sandbox flags bits. It makes the sandbox policy stricter (or
- // as strict) as both policy.
- //
- // TODO(arthursonzogni): Why merging sandbox flags?
- // This doesn't look great at many levels:
- // - The browser process won't be notified of the update.
- // - The origin won't be made opaque, despite the new flags.
- // - The sandbox flags of the document can't be considered to be an
- // immutable property anymore.
- //
- // Ideally:
- // - javascript-url document.
- // - XSLT document.
- // - document.open.
- // should not mutate the security properties of the current document.
- // From the browser process point of view, all of those operations are
- // not considered to produce new documents. No IPCs are sent, it is as
- // if it was a no-op.
- //
- // TODO(https://crbug.com/1360795) Remove this
- dom_window_->GetSecurityContext().SetSandboxFlags(
- dom_window_->GetSecurityContext().GetSandboxFlags() |
- entered_window->GetSandboxFlags());
-
- dom_window_->GetSecurityContext().SetSecurityOrigin(
- entered_window->GetMutableSecurityOrigin());
-
- // The SecurityOrigin is now shared in between two different window. It
- // means mutating one can have side effect on the other.
- entered_window->GetMutableSecurityOrigin()
- ->set_aliased_by_document_open();
- }
-
- // Question: Should we remove the inheritance of the CookieURL via
- // document.open?
- //
- // Arguments in favor of maintaining this behavior include the fact that
- // document.open can be used to alter the document's URL. According to
- // prior talks, this is necessary for web compatibility. It looks nicer if
- // all URL variations change uniformly and simultaneously.
- //
- // Arguments in favor of eliminating this behavior include the fact that
- // cookie URLs are extremely particular pieces of state that resemble the
- // origin more than they do actual URLs. The less we inherit via
- // document.open, the better.
- cookie_url_ = entered_window->document()->CookieURL();
}
}
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
@@ -1419,8 +1419,7 @@
},
{
name: "DocumentOpenSandboxInheritanceRemoval",
- status: "experimental",
- copied_from_base_feature_if: "overridden",
+ status: "stable",
},
{
name: "DocumentPictureInPictureAPI",
--
2.25.1
@@ -0,0 +1,37 @@
From: Your Name <you@example.com>
Date: Tue, 14 Feb 2023 16:23:08 +0000
Subject: Evict the entire FrameTree like desktop
---
components/viz/common/features.cc | 2 +-
content/public/common/content_features.cc | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/components/viz/common/features.cc b/components/viz/common/features.cc
--- a/components/viz/common/features.cc
+++ b/components/viz/common/features.cc
@@ -233,7 +233,7 @@ BASE_FEATURE(kRendererAllocatesImages,
// evicts itself. This differs from Destkop platforms which evict the entire
// FrameTree along with the topmost viz::Surface. When this feature is enabled,
// Android will begin also evicting the entire FrameTree.
-BASE_FEATURE(kEvictSubtree, "EvictSubtree", base::FEATURE_DISABLED_BY_DEFAULT);
+BASE_FEATURE(kEvictSubtree, "EvictSubtree", base::FEATURE_ENABLED_BY_DEFAULT);
// If enabled, CompositorFrameSinkClient::OnBeginFrame is also treated as the
// DidReceiveCompositorFrameAck. Both in providing the Ack for the previous
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
@@ -569,8 +569,8 @@ BASE_FEATURE(kInMemoryCodeCache,
// frames. Otherwise only toplevel frames and OOPIF are handled, and other
// cases, e.g. PDF tiles are ignored. See https://crbug.com/1360351 for details.
BASE_FEATURE(kInnerFrameCompositorSurfaceEviction,
- "InnerFrameCompositorSurfaceEviction",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ "InnerFrameCompositorSurfaceEviction", // guard this
+ base::FEATURE_ENABLED_BY_DEFAULT); // guard this
// Kill switch for the GetInstalledRelatedApps API.
BASE_FEATURE(kInstalledApp, "InstalledApp", base::FEATURE_ENABLED_BY_DEFAULT);
--
2.25.1
File diff suppressed because one or more lines are too long
@@ -0,0 +1,620 @@
From: uazo <uazo@users.noreply.github.com>
Date: Wed, 1 Mar 2023 15:37:55 +0000
Subject: Fonts fingerprinting mitigation
The patch disables the use of non-standard fonts by blink,
used for device fingerprinting.
Access to local fonts and downloading fonts via Android
Downloadable Fonts API is disabled.
In windows, the patch exposes only fonts from the default
installation based on the user language exposed to the websites,
eliminating the ability to retrieve fonts handled differently
by gdi and directwrite.
It is possible to restore the original behavior via the
fonts-fingerprint-mitigation flag, which is active by default.
---
chrome/browser/about_flags.cc | 5 +
chrome/browser/flag_descriptions.cc | 5 +
chrome/browser/flag_descriptions.h | 3 +
content/public/common/content_features.cc | 4 +-
skia/ext/skia_utils_win.cc | 20 ++
skia/ext/skia_utils_win.h | 3 +
third_party/blink/common/features.cc | 6 +-
third_party/blink/public/common/features.h | 3 +
third_party/blink/renderer/platform/BUILD.gn | 1 +
.../renderer/platform/fonts/font_cache.h | 2 +-
.../fonts/skia/bromite_allowed_fonts.h | 270 ++++++++++++++++++
.../platform/fonts/skia/font_cache_skia.cc | 44 ++-
.../platform/fonts/win/font_cache_skia_win.cc | 7 +-
13 files changed, 361 insertions(+), 12 deletions(-)
create mode 100644 third_party/blink/renderer/platform/fonts/skia/bromite_allowed_fonts.h
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
@@ -9992,6 +9992,11 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kClipboardUnsanitizedContentDescription, kOsAll,
FEATURE_VALUE_TYPE(blink::features::kClipboardUnsanitizedContent)},
+ {"fonts-fingerprint-mitigation",
+ flag_descriptions::kFontsFingerprintMitigationName,
+ flag_descriptions::kFontsFingerprintMitigationDescription, kOsAll,
+ FEATURE_VALUE_TYPE(blink::features::kFontsFingerprintMitigation)},
+
#if BUILDFLAG(IS_CHROMEOS_ASH)
{"enable-media-dynamic-cgroup", flag_descriptions::kMediaDynamicCgroupName,
flag_descriptions::kMediaDynamicCgroupDescription, kOsCrOS,
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
@@ -135,6 +135,11 @@ const char kClipboardUnsanitizedContentDescription[] =
"Allows reading/writing unsanitized content from/to the clipboard. "
"Currently, it is only applicable to HTML format. See crbug.com/1268679.";
+const char kFontsFingerprintMitigationName[] =
+ "Enable fonts fingerprint mitigation";
+const char kFontsFingerprintMitigationDescription[] =
+ "Filters the list of fonts allowing only standard ones to be used.";
+
const char kChromeRootStoreEnabledName[] = "Chrome Root Store";
const char kChromeRootStoreEnabledDescription[] =
"Enable use of Chrome Root Store over platform roots. "
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
@@ -112,6 +112,9 @@ extern const char kClickToCallDescription[];
extern const char kClipboardUnsanitizedContentName[];
extern const char kClipboardUnsanitizedContentDescription[];
+extern const char kFontsFingerprintMitigationName[];
+extern const char kFontsFingerprintMitigationDescription[];
+
extern const char kContentLanguagesInLanguagePickerName[];
extern const char kContentLanguagesInLanguagePickerDescription[];
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
@@ -27,7 +27,7 @@ BASE_FEATURE(kAllowContentInitiatedDataUrlNavigations,
// the service implemented on the Java side.
BASE_FEATURE(kAndroidDownloadableFontsMatching,
"AndroidDownloadableFontsMatching",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ base::FEATURE_DISABLED_BY_DEFAULT);
#if BUILDFLAG(IS_ANDROID)
// Use chromim's implementation of selection magnifier built using surface
@@ -506,7 +506,7 @@ const base::FeatureParam<base::TimeDelta>
// enables a font indexer on Android which we need to test in the field first.
BASE_FEATURE(kFontSrcLocalMatching,
"FontSrcLocalMatching",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ base::FEATURE_DISABLED_BY_DEFAULT);
#if !BUILDFLAG(IS_ANDROID)
// Feature controlling whether or not memory pressure signals will be forwarded
diff --git a/skia/ext/skia_utils_win.cc b/skia/ext/skia_utils_win.cc
--- a/skia/ext/skia_utils_win.cc
+++ b/skia/ext/skia_utils_win.cc
@@ -364,6 +364,26 @@ void CreateBitmapHeaderForXRGB888(int width,
CreateBitmapHeaderWithColorDepth(width, height, 32, hdr);
}
+void DWriteFontTypeface_GetGDIFamilyName(SkTypeface* typeface, SkString* familyName) {
+ DWriteFontTypeface* tf = reinterpret_cast<DWriteFontTypeface*>(typeface);
+ SkString localSkGDIName;
+ SkTScopedComPtr<IDWriteLocalizedStrings> familyNames;
+ BOOL exists = FALSE;
+ if (FAILED(tf->fDWriteFont->GetInformationalStrings(
+ DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES,
+ &familyNames,
+ &exists)) ||
+ !exists ||
+ FAILED(sk_get_locale_string(familyNames.get(), nullptr, &localSkGDIName)))
+ {
+ HRV(tf->fDWriteFontFamily->GetFamilyNames(&familyNames));
+ sk_get_locale_string(familyNames.get(), nullptr/*fMgr->fLocaleName.get()*/, familyName);
+ }
+ if (familyName) {
+ *familyName = localSkGDIName;
+ }
+}
+
base::win::ScopedBitmap CreateHBitmapXRGB8888(int width,
int height,
HANDLE shared_section,
diff --git a/skia/ext/skia_utils_win.h b/skia/ext/skia_utils_win.h
--- a/skia/ext/skia_utils_win.h
+++ b/skia/ext/skia_utils_win.h
@@ -13,6 +13,7 @@
#include "third_party/skia/include/core/SkImageInfo.h"
#include "third_party/skia/include/core/SkMatrix.h"
#include "third_party/skia/include/core/SkRefCnt.h"
+#include "third_party/skia/src/ports/SkTypeface_win_dw.h"
#include "build/build_config.h"
#include <windows.h>
@@ -113,6 +114,8 @@ SK_API void CreateBitmapHeaderForXRGB888(int width,
int height,
BITMAPINFOHEADER* hdr);
+SK_API void DWriteFontTypeface_GetGDIFamilyName(SkTypeface* tf, SkString* familyName);
+
// Creates an HBITMAP backed by 32-bits-per-pixel RGB data (the high bits are
// unused in each pixel).
SK_API base::win::ScopedBitmap CreateHBitmapXRGB8888(
diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc
--- a/third_party/blink/common/features.cc
+++ b/third_party/blink/common/features.cc
@@ -151,7 +151,7 @@ BASE_FEATURE(kExcludeLowEntropyImagesFromLCP,
const base::FeatureParam<double> kMinimumEntropyForLCP{
&kExcludeLowEntropyImagesFromLCP, "min_bpp", 2};
-BASE_FEATURE(kGMSCoreEmoji, "GMSCoreEmoji", base::FEATURE_ENABLED_BY_DEFAULT);
+BASE_FEATURE(kGMSCoreEmoji, "GMSCoreEmoji", base::FEATURE_DISABLED_BY_DEFAULT);
// Enable defer commits to avoid flash of unstyled content, for same origin
// navigation only.
@@ -1619,6 +1619,10 @@ BASE_FEATURE(kClipboardUnsanitizedContent,
"ClipboardUnsanitizedContent",
base::FEATURE_DISABLED_BY_DEFAULT);
+BASE_FEATURE(kFontsFingerprintMitigation,
+ "FontsFingerprintMitigation",
+ base::FEATURE_ENABLED_BY_DEFAULT);
+
BASE_FEATURE(kWebRtcEncoderAsyncEncode,
"WebRtcEncoderAsyncEncode",
base::FEATURE_ENABLED_BY_DEFAULT);
diff --git a/third_party/blink/public/common/features.h b/third_party/blink/public/common/features.h
--- a/third_party/blink/public/common/features.h
+++ b/third_party/blink/public/common/features.h
@@ -840,6 +840,9 @@ BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kCheckHTMLParserBudgetLessOften);
// it is only applicable to HTML format. See crbug.com/1268679.
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kClipboardUnsanitizedContent);
+// Filter the list of fonts allowing the use of only standard fonts
+BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kFontsFingerprintMitigation);
+
// Make RTCVideoEncoder::Encode() asynchronous.
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kWebRtcEncoderAsyncEncode);
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
@@ -724,6 +724,7 @@ component("platform") {
"fonts/simple_font_data.cc",
"fonts/simple_font_data.h",
"fonts/skia/font_cache_skia.cc",
+ "fonts/skia/bromite_allowed_fonts.h",
"fonts/skia/skia_text_metrics.cc",
"fonts/skia/skia_text_metrics.h",
"fonts/skia/sktypeface_factory.cc",
diff --git a/third_party/blink/renderer/platform/fonts/font_cache.h b/third_party/blink/renderer/platform/fonts/font_cache.h
--- a/third_party/blink/renderer/platform/fonts/font_cache.h
+++ b/third_party/blink/renderer/platform/fonts/font_cache.h
@@ -355,7 +355,7 @@ class PLATFORM_EXPORT FontCache final {
sk_sp<SkTypeface> CreateTypeface(const FontDescription&,
const FontFaceCreationParams&,
- std::string& name);
+ std::string& name, std::string& original_name);
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
static AtomicString GetFamilyNameForCharacter(SkFontMgr*,
diff --git a/third_party/blink/renderer/platform/fonts/skia/bromite_allowed_fonts.h b/third_party/blink/renderer/platform/fonts/skia/bromite_allowed_fonts.h
new file mode 100644
--- /dev/null
+++ b/third_party/blink/renderer/platform/fonts/skia/bromite_allowed_fonts.h
@@ -0,0 +1,270 @@
+/*
+ This file is part of Bromite.
+
+ Bromite is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bromite is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bromite. If not, see <https://www.gnu.org/licenses/>.
+*/
+
+#include "base/logging.h"
+#include "base/command_line.h"
+#include "ui/base/ui_base_switches.h"
+#include "base/strings/string_util.h"
+
+namespace blink {
+
+const char16_t* kAllowedFontNames[] = {
+ u"Sans", u"Arial", u"MS UI Gothic", u"Microsoft Sans Serif",
+ u"Segoe UI", u"Calibri", u"Times New Roman", u"Courier New",
+ // also used
+ u"Monospace",
+#if BUILDFLAG(IS_ANDROID)
+ u"default", u"sans-serif", u"serif", u"cursive", u"fantasy",
+ u"Courier", u"Courier 10 Pitch", u"Courier New"
+#endif
+#if BUILDFLAG(IS_WIN)
+ // see https://learn.microsoft.com/en-us/typography/fonts/windows_11_font_list
+ u"Arial", u"Arial Italic", u"Arial Bold", u"Arial Bold Italic", u"Arial Black",
+ u"Bahnschrift", u"Bahnschrift Light", u"Bahnschrift SemiBold",
+ u"Calibri Light", u"Calibri Light Italic", u"Calibri", u"Calibri Italic",
+ u"Calibri Bold", u"Calibri Bold Italic", u"Cambria", u"Cambria Italic",
+ u"Cambria Bold", u"Cambria Bold Italic", u"Cambria Math", u"Candara Light",
+ u"Candara Light Italic", u"Candara", u"Candara Italic", u"Candara Bold",
+ u"Candara Bold Italic", u"Cascadia Code ExtraLight", u"Cascadia Code ExtraLight Italic",
+ u"Cascadia Code Light", u"Cascadia Code Light Italic", u"Cascadia Code SemiLight",
+ u"Cascadia Code SemiLight Italic", u"Cascadia Code Regular", u"Cascadia Code Italic",
+ u"Cascadia Code SemiBold", u"Cascadia Code SemiBold Italic", u"Cascadia Code Bold",
+ u"Cascadia Code Bold Italic", u"Cascadia Mono ExtraLight", u"Cascadia Mono ExtraLight Italic",
+ u"Cascadia Mono Light", u"Cascadia Mono Light Italic", u"Cascadia Mono SemiLight",
+ u"Cascadia Mono SemiLight Italic", u"Cascadia Mono Regular", u"Cascadia Mono Italic",
+ u"Cascadia Mono SemiBold", u"Cascadia Mono SemiBold Italic", u"Cascadia Mono Bold",
+ u"Cascadia Mono Bold Italic", u"Comic Sans MS", u"Comic Sans MS Italic", u"Comic Sans MS Bold",
+ u"Comic Sans MS Bold Italic", u"Consolas", u"Consolas Italic", u"Consolas Bold",
+ u"Consolas Bold Italic", u"Constantia", u"Constantia Italic", u"Constantia Bold",
+ u"Constantia Bold Italic", u"Corbel Light", u"Corbel Light Italic", u"Corbel",
+ u"Corbel Italic", u"Corbel Bold", u"Corbel Bold Italic", u"Courier New",
+ u"Courier New Italic", u"Courier New Bold", u"Courier New Bold Italic", u"Ebrima",
+ u"Ebrima Bold", u"Franklin Gothic", u"Franklin Gothic Medium", u"Franklin Gothic Medium Italic",
+ u"Gabriola", u"Gadugi", u"Gadugi Bold", u"Georgia", u"Georgia Italic",
+ u"Georgia Bold", u"Georgia Bold Italic", u"HoloLens MDL2 Assets", u"Impact",
+ u"Ink Free", u"Javanese Text", u"Leelawadee UI", u"Leelawadee UI Semilight",
+ u"Leelawadee UI Bold", u"Lucida Console", u"Lucida Sans Unicode", u"Malgun Gothic",
+ u"Malgun Gothic Bold", u"Malgun Gothic Semilight", u"Marlett", u"Microsoft Himalaya",
+ u"Microsoft JhengHei Light", u"Microsoft JhengHei", u"Microsoft JhengHei Bold",
+ u"Microsoft JhengHei UI Light", u"Microsoft JhengHei UI", u"Microsoft JhengHei UI Bold",
+ u"Microsoft New Tai Lue", u"Microsoft New Tai Lue Bold", u"Microsoft PhagsPa",
+ u"Microsoft PhagsPa Bold", u"Microsoft Sans Serif", u"Microsoft Tai Le",
+ u"Microsoft Tai Le Bold", u"Microsoft YaHei Light", u"Microsoft YaHei",
+ u"Microsoft YaHei Bold", u"Microsoft YaHei UI Light", u"Microsoft YaHei UI",
+ u"Microsoft YaHei UI Bold", u"Microsoft Yi Baiti", u"MingLiU-ExtB",
+ u"PMingLiU-ExtB", u"MingLiU_HKSCS-ExtB", u"Mongolian Baiti", u"MS Gothic",
+ u"MS PGothic", u"MS UI Gothic", u"MV Boli", u"Myanmar Text", u"Myanmar Text Bold",
+ u"Nirmala UI Semilight", u"Nirmala UI", u"Nirmala UI Bold", u"Palatino Linotype",
+ u"Palatino Linotype Italic", u"Palatino Linotype Bold", u"Palatino Linotype Bold Italic",
+ u"Segoe Fluent Icons", u"Segoe MDL2 Assets", u"Segoe Print", u"Segoe Print Bold",
+ u"Segoe Script", u"Segoe Script Bold", u"Segoe UI Light", u"Segoe UI Light Italic",
+ u"Segoe UI Semilight", u"Segoe UI Semilight Italic", u"Segoe UI", u"Segoe UI Italic",
+ u"Segoe UI Semibold", u"Segoe UI Semibold Italic", u"Segoe UI Bold", u"Segoe UI Bold Italic",
+ u"Segoe UI Black", u"Segoe UI Black Italic", u"Segoe UI Emoji", u"Segoe UI Historic",
+ u"Segoe UI Symbol", u"Segoe UI Variable Display Light", u"Segoe UI Variable Display Semilight",
+ u"Segoe UI Variable Display Regular", u"Segoe UI Variable Display Semibold",
+ u"Segoe UI Variable Display Bold", u"Segoe UI Variable Small Light",
+ u"Segoe UI Variable Small Semilight", u"Segoe UI Variable Small Regular",
+ u"Segoe UI Variable Small Semibold", u"Segoe UI Variable Small Bold",
+ u"Segoe UI Variable Text Light", u"Segoe UI Variable Text Semilight",
+ u"Segoe UI Variable Text Regular", u"Segoe UI Variable Text Semibold",
+ u"Segoe UI Variable Text Bold", u"SimSun", u"NSimSun", u"SimSun-ExtB", u"Sitka Banner",
+ u"Sitka Banner Italic", u"Sitka Banner Semibold", u"Sitka Banner Semibold Italic",
+ u"Sitka Banner Bold", u"Sitka Banner Bold Italic", u"Sitka Display", u"Sitka Display Italic",
+ u"Sitka Display Semibold", u"Sitka Display Semibold Italic", u"Sitka Display Bold",
+ u"Sitka Display Bold Italic", u"Sitka Small", u"Sitka Small Italic", u"Sitka Small Semibold",
+ u"Sitka Small Semibold Italic", u"Sitka Small Bold", u"Sitka Small Bold Italic", u"Sitka Heading",
+ u"Sitka Heading Italic", u"Sitka Heading Semibold", u"Sitka Heading Semibold Italic",
+ u"Sitka Heading Bold", u"Sitka Heading Bold Italic", u"Sitka Subheading",
+ u"Sitka Subheading Italic", u"Sitka Subheading Semibold", u"Sitka Subheading Semibold Italic",
+ u"Sitka Subheading Bold", u"Sitka Subheading Bold Italic", u"Sitka Text",
+ u"Sitka Text Italic", u"Sitka Text Semibold", u"Sitka Text Semibold Italic",
+ u"Sitka Text Bold", u"Sitka Text Bold Italic", u"Sylfaen", u"Symbol",
+ u"Tahoma", u"Tahoma Bold", u"Times New Roman", u"Times New Roman Italic", u"Times New Roman Bold",
+ u"Times New Roman Bold Italic", u"Trebuchet MS", u"Trebuchet MS Italic", u"Trebuchet MS Bold",
+ u"Trebuchet MS Bold Italic", u"Verdana", u"Verdana Italic", u"Verdana Bold",
+ u"Verdana Bold Italic", u"Webdings", u"Wingdings", u"Yu Gothic", u"Yu Gothic Light",
+ u"Yu Gothic Regular", u"Yu Gothic Medium", u"Yu Gothic Bold", u"Yu Gothic UI", u"Yu Gothic UI Light",
+ u"Yu Gothic UI Semilight", u"Yu Gothic UI Regular", u"Yu Gothic UI Semibold", u"Yu Gothic UI Bold",
+#endif
+};
+
+#if BUILDFLAG(IS_WIN)
+
+// List from https://learn.microsoft.com/en-us/windows/deployment/windows-10-missing-fonts
+// and https://learn.microsoft.com/en-us/typography/fonts/windows_11_font_list
+// https://unicode-org.github.io/cldr-staging/charts/37/supplemental/locale_coverage.html
+
+// Languages using Arabic script; e.g., Arabic, Persian, Urdu.
+const char16_t* kAllowedFontNames_ar_fa_ur[] = {
+ u"Aldhabi", u"Andalus", u"Arabic Typesetting", u"Microsoft Uighur",
+ u"Sakkal Majalla", u"Simplified Arabic", u"Traditional Arabic",
+ u"Urdu Typesetting"};
+// Languages using Bangla script; e.g., Assamese, Bangla.
+const char16_t* kAllowedFontNames_as_bn[] = {
+ u"Shonar Bangla", u"Vrinda"};
+// Languages using Canadian Syllabics script; e.g., Inuktitut.
+const char16_t* kAllowedFontNames_iu[] = {
+ u"Euphemia"};
+// Cherokee.
+const char16_t* kAllowedFontNames_chr[] = {
+ u"Plantagenet Cherokee"};
+// Language using Devanagari script; e.g., Hindi, Konkani, Marathi.
+const char16_t* kAllowedFontNames_hi_kok_mr[] = {
+ u"Aparajita", u"Kokila", u"Mangal", u"Sanskrit Text",
+ u"Utsaah"};
+// Languages using Ethiopic script; e.g., Amharic, Tigrinya.
+const char16_t* kAllowedFontNames_am_ti[] = {
+ u"Nyala"};
+// Gujarati; any other language using Gujurati script.
+const char16_t* kAllowedFontNames_gu[] = {
+ u"Shruti"};
+// Panjabi; any other language using Gurmukhi script
+const char16_t* kAllowedFontNames_pa[] = {
+ u"Raavi"};
+// Chinese
+const char16_t* kAllowedFontNames_zh[] = {
+ // Simplified Chinese
+ u"DengXian", u"FangSong", u"KaiTi", u"SimHei",
+ // Traditional Chinese
+ u"DFKai-SB", u"MingLiU"};
+// Hebrew
+const char16_t* kAllowedFontNames_he[] = {
+ u"Aharoni Bold", u"David", u"FrankRuehl", u"Gisha",
+ u"Levenim MT", u"Miriam", u"Narkisim", u"Rod"};
+// Japanese
+const char16_t* kAllowedFontNames_ja[] = {
+ u"BIZ UDGothic", u"BIZ UDMincho Medium", u"Meiryo", u"MS Mincho",
+ u"UD Digi Kyokasho", u"Yu Mincho"};
+// Kannada; any other language using Kannada script.
+const char16_t* kAllowedFontNames_kn[] = {
+ u"Tunga"};
+// Cambodian; any other language using Khmer script.
+const char16_t* kAllowedFontNames_km[] = {
+ u"DaunPenh", u"Khmer UI", u"MoolBoran"};
+// Korean
+const char16_t* kAllowedFontNames_ko[] = {
+ u"Batang", u"Dotum", u"Gulim", u"Gungsuh"};
+// Lao; any other language using Lao script.
+const char16_t* kAllowedFontNames_lo[] = {
+ u"DokChampa", u"Lao UI"};
+// Malayalam; any other language using Malayalam script.
+const char16_t* kAllowedFontNames_ml[] = {
+ u"Kartika"};
+// Odia; any other language using Odia script.
+const char16_t* kAllowedFontNames_or[] = {
+ u"Kalinga"};
+// Sinhala; any other language using Sinhala script.
+const char16_t* kAllowedFontNames_si[] = {
+ u"Iskoola Pota"};
+// Languages using Syriac script.
+const char16_t* kAllowedFontNames_syr[] = {
+ u"Estrangelo Edessa"};
+// Tamil; any other language using Tamil script.
+const char16_t* kAllowedFontNames_ta[] = {
+ u"Latha", u"Vijaya"};
+// Telugu; any other language using Telugu script.
+const char16_t* kAllowedFontNames_te[] = {
+ u"Gautami", u"Vani"};
+// Thai; any other language using Thai script.
+const char16_t* kAllowedFontNames_th[] = {
+ u"Angsana New", u"AngsanaUPC", u"Browallia New", u"BrowalliaUPC",
+ u"Cordia New", u"CordiaUPC", u"DilleniaUPC", u"EucrosiaUPC",
+ u"FreesiaUPC", u"IrisUPC", u"JasmineUPC", u"KodchiangUPC",
+ u"Leelawadee", u"LilyUPC"};
+
+#endif
+
+template<int N>
+bool IsInList(const std::u16string& font_name, const char16_t*(&list)[N]) {
+ for(int t = 0; t < N; ++t)
+ if (base::EqualsCaseInsensitiveASCII(font_name, list[t]))
+ return true;
+ return false;
+}
+
+bool IsFontAllowed(const std::u16string& font_name) {
+ for (const char16_t* last_resort_font_name : kAllowedFontNames) {
+ if (base::EqualsCaseInsensitiveASCII(font_name, last_resort_font_name))
+ return true;
+ }
+
+#if BUILDFLAG(IS_ANDROID)
+ // allow synthetic family names (used for emoji)
+ if (base::EndsWith(font_name, u"##fallback", base::CompareCase::INSENSITIVE_ASCII))
+ return true;
+#endif
+
+#if BUILDFLAG(IS_WIN)
+ // check fonts against locale
+ const base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess();
+ if (command_line.HasSwitch(switches::kLang)) {
+ std::string locale = command_line.GetSwitchValueASCII(::switches::kLang);
+
+ if (locale == "ar" || locale == "fa" || locale == "ur")
+ return IsInList(font_name, kAllowedFontNames_ar_fa_ur);
+ else if (locale == "as" || locale == "bn")
+ return IsInList(font_name, kAllowedFontNames_as_bn);
+ else if (locale == "iu")
+ return IsInList(font_name, kAllowedFontNames_iu);
+ else if (locale == "chr")
+ return IsInList(font_name, kAllowedFontNames_chr);
+ else if (locale == "hi" || locale == "kok" || locale == "mr")
+ return IsInList(font_name, kAllowedFontNames_hi_kok_mr);
+ else if (locale == "am" || locale == "ti")
+ return IsInList(font_name, kAllowedFontNames_am_ti);
+ else if (locale == "gu")
+ return IsInList(font_name, kAllowedFontNames_gu);
+ else if (locale == "pa")
+ return IsInList(font_name, kAllowedFontNames_pa);
+ else if (locale == "zh")
+ return IsInList(font_name, kAllowedFontNames_zh);
+ else if (locale == "he")
+ return IsInList(font_name, kAllowedFontNames_he);
+ else if (locale == "ja")
+ return IsInList(font_name, kAllowedFontNames_ja);
+ else if (locale == "kn")
+ return IsInList(font_name, kAllowedFontNames_kn);
+ else if (locale == "km")
+ return IsInList(font_name, kAllowedFontNames_km);
+ else if (locale == "ko")
+ return IsInList(font_name, kAllowedFontNames_ko);
+ else if (locale == "lo")
+ return IsInList(font_name, kAllowedFontNames_lo);
+ else if (locale == "ml")
+ return IsInList(font_name, kAllowedFontNames_ml);
+ else if (locale == "or")
+ return IsInList(font_name, kAllowedFontNames_or);
+ else if (locale == "si")
+ return IsInList(font_name, kAllowedFontNames_si);
+ else if (locale == "syr")
+ return IsInList(font_name, kAllowedFontNames_syr);
+ else if (locale == "ta")
+ return IsInList(font_name, kAllowedFontNames_ta);
+ else if (locale == "te")
+ return IsInList(font_name, kAllowedFontNames_te);
+ else if (locale == "th")
+ return IsInList(font_name, kAllowedFontNames_th);
+ }
+#endif
+
+ //LOG(INFO) << "---not allowed " << font_name;
+
+ return false;
+}
+
+}
diff --git a/third_party/blink/renderer/platform/fonts/skia/font_cache_skia.cc b/third_party/blink/renderer/platform/fonts/skia/font_cache_skia.cc
--- a/third_party/blink/renderer/platform/fonts/skia/font_cache_skia.cc
+++ b/third_party/blink/renderer/platform/fonts/skia/font_cache_skia.cc
@@ -58,12 +58,35 @@
#error This file should not be used by MacOS.
#endif
+#include "base/feature_list.h"
+#include "base/strings/utf_string_conversions.h"
+#include "third_party/blink/public/common/features.h"
+#include "bromite_allowed_fonts.h"
+#if BUILDFLAG(IS_WIN)
+#include "skia/ext/skia_utils_win.h"
+#endif
+
namespace blink {
AtomicString ToAtomicString(const SkString& str) {
return AtomicString::FromUTF8(str.c_str(), str.size());
}
+sk_sp<SkTypeface> ReturnIfAllowed(sk_sp<SkTypeface> typeface, bool check_fonts) {
+ if (!check_fonts) return typeface;
+#if BUILDFLAG(IS_WIN)
+ if (!typeface) return nullptr;
+
+ SkString skia_family_name;
+ skia::DWriteFontTypeface_GetGDIFamilyName(typeface.get(), &skia_family_name);
+ const AtomicString& family = ToAtomicString(skia_family_name);
+ std::string name = family.Utf8();
+ if (!IsFontAllowed(base::UTF8ToUTF16(name)))
+ return nullptr;
+#endif // BUILDFLAG(IS_WIN)
+ return typeface;
+}
+
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
// This function is called on android or when we are emulating android fonts on
// linux and the embedder has overriden the default fontManager with
@@ -201,7 +224,7 @@ scoped_refptr<SimpleFontData> FontCache::GetLastResortFallbackFont(
sk_sp<SkTypeface> FontCache::CreateTypeface(
const FontDescription& font_description,
const FontFaceCreationParams& creation_params,
- std::string& name) {
+ std::string& name, std::string& original_name) {
#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_FUCHSIA)
// TODO(fuchsia): Revisit this and other font code for Fuchsia.
@@ -219,6 +242,16 @@ sk_sp<SkTypeface> FontCache::CreateTypeface(
DCHECK_NE(family, font_family_names::kSystemUi);
// convert the name to utf8
name = family.Utf8();
+ if (original_name.empty()) original_name = name;
+
+ bool check_fonts = base::FeatureList::IsEnabled(features::kFontsFingerprintMitigation);
+ if (check_fonts) {
+ if (!IsFontAllowed(base::UTF8ToUTF16(name))) {
+ return nullptr;
+ } else if (!IsFontAllowed(base::UTF8ToUTF16(original_name))) {
+ return nullptr;
+ }
+ }
#if BUILDFLAG(IS_ANDROID)
// If this is a locale-specific family, try looking up locale-specific
@@ -226,15 +259,15 @@ sk_sp<SkTypeface> FontCache::CreateTypeface(
if (const char* locale_family = GetLocaleSpecificFamilyName(family)) {
if (sk_sp<SkTypeface> typeface =
CreateLocaleSpecificTypeface(font_description, locale_family))
- return typeface;
+ return ReturnIfAllowed(typeface, check_fonts);
}
#endif // BUILDFLAG(IS_ANDROID)
// TODO(https://crbug.com/1425390: Assign FontCache::font_manager_ in the
// ctor.
auto font_manager = font_manager_ ? font_manager_ : SkFontMgr::RefDefault();
- return sk_sp<SkTypeface>(font_manager->matchFamilyStyle(
- name.empty() ? nullptr : name.c_str(), font_description.SkiaFontStyle()));
+ return ReturnIfAllowed(sk_sp<SkTypeface>(font_manager->matchFamilyStyle(
+ name.empty() ? nullptr : name.c_str(), font_description.SkiaFontStyle())), check_fonts);
}
#if !BUILDFLAG(IS_WIN)
@@ -244,6 +277,7 @@ std::unique_ptr<FontPlatformData> FontCache::CreateFontPlatformData(
float font_size,
AlternateFontName alternate_name) {
std::string name;
+ std::string original_name;
sk_sp<SkTypeface> typeface;
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
@@ -264,7 +298,7 @@ std::unique_ptr<FontPlatformData> FontCache::CreateFontPlatformData(
noto_color_emoji_from_gmscore)) {
typeface = CreateTypefaceFromUniqueName(creation_params);
} else {
- typeface = CreateTypeface(font_description, creation_params, name);
+ typeface = CreateTypeface(font_description, creation_params, name, original_name);
}
#else
typeface = CreateTypeface(font_description, creation_params, name);
diff --git a/third_party/blink/renderer/platform/fonts/win/font_cache_skia_win.cc b/third_party/blink/renderer/platform/fonts/win/font_cache_skia_win.cc
--- a/third_party/blink/renderer/platform/fonts/win/font_cache_skia_win.cc
+++ b/third_party/blink/renderer/platform/fonts/win/font_cache_skia_win.cc
@@ -497,6 +497,7 @@ std::unique_ptr<FontPlatformData> FontCache::CreateFontPlatformData(
sk_sp<SkTypeface> typeface;
std::string name;
+ std::string original_name;
if (alternate_font_name == AlternateFontName::kLocalUniqueFace &&
RuntimeEnabledFeatures::FontSrcLocalMatchingEnabled()) {
@@ -508,7 +509,7 @@ std::unique_ptr<FontPlatformData> FontCache::CreateFontPlatformData(
return nullptr;
} else {
- typeface = CreateTypeface(font_description, creation_params, name);
+ typeface = CreateTypeface(font_description, creation_params, name, original_name);
// For a family match, Windows will always give us a valid pointer here,
// even if the face name is non-existent. We have to double-check and see if
@@ -542,7 +543,7 @@ std::unique_ptr<FontPlatformData> FontCache::CreateFontPlatformData(
FontDescription adjusted_font_description = font_description;
adjusted_font_description.SetWeight(variant_weight);
typeface =
- CreateTypeface(adjusted_font_description, adjusted_params, name);
+ CreateTypeface(adjusted_font_description, adjusted_params, name, original_name);
if (!typeface ||
!TypefacesMatchesFamily(typeface.get(), adjusted_name)) {
return nullptr;
@@ -554,7 +555,7 @@ std::unique_ptr<FontPlatformData> FontCache::CreateFontPlatformData(
FontDescription adjusted_font_description = font_description;
adjusted_font_description.SetStretch(variant_stretch);
typeface =
- CreateTypeface(adjusted_font_description, adjusted_params, name);
+ CreateTypeface(adjusted_font_description, adjusted_params, name, original_name);
if (!typeface ||
!TypefacesMatchesFamily(typeface.get(), adjusted_name)) {
return nullptr;
--
2.25.1
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,42 @@
From: uazo <uazo@users.noreply.github.com>
Date: Mon, 17 Jul 2023 15:24:16 +0000
Subject: Keep Side Panel Companion disabled
---
chrome/browser/companion/core/features.cc | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/chrome/browser/companion/core/features.cc b/chrome/browser/companion/core/features.cc
--- a/chrome/browser/companion/core/features.cc
+++ b/chrome/browser/companion/core/features.cc
@@ -19,14 +19,14 @@ namespace features {
namespace internal {
// This differs from the search companion by providing a separate WebUI that
// contains untrusted content in an iframe.
-BASE_FEATURE(kSidePanelCompanion,
- "SidePanelCompanion",
- base::FEATURE_DISABLED_BY_DEFAULT);
+BASE_FEATURE(kSidePanelCompanion, // keep
+ "SidePanelCompanion", // disabled
+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite
// Dynamically enables the search companion if the user has experiments
// enabled.
-BASE_FEATURE(kCompanionEnabledByObservingExpsNavigations,
- "CompanionEnabledByObservingExpsNavigations",
- base::FEATURE_DISABLED_BY_DEFAULT);
+BASE_FEATURE(kCompanionEnabledByObservingExpsNavigations, // keep
+ "CompanionEnabledByObservingExpsNavigations", // disabled
+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite
} // namespace internal
} // namespace features
@@ -39,6 +39,7 @@ const char kDisableCheckUserPermissionsForCompanion[] =
const char kForceCompanionPinnedState[] = "force-companion-pinned-state";
bool ShouldOverrideCheckingUserPermissionsForCompanion() {
+ if ((true)) return false;
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
return command_line->HasSwitch(kDisableCheckUserPermissionsForCompanion);
}
--
2.25.1
@@ -0,0 +1,285 @@
From: uazo <uazo@users.noreply.github.com>
Date: Tue, 14 Mar 2023 15:48:21 +0000
Subject: Keyboard protection flag
Hides user preference on the system keyboard by setting the standard
eng layout and removing the layout information from the javascript
keyboard events.
---
chrome/browser/about_flags.cc | 3 +
chrome/browser/flag_descriptions.cc | 6 ++
chrome/browser/flag_descriptions.h | 3 +
.../renderer/core/events/keyboard_event.cc | 66 +++++++++++++++++++
.../renderer/core/events/keyboard_event.h | 3 +
ui/base/ui_base_features.cc | 8 +++
ui/base/ui_base_features.h | 2 +
.../dom/dom_keyboard_layout_map_win.cc | 13 ++++
.../keycodes/keyboard_code_conversion.cc | 10 ++-
ui/events/keycodes/keyboard_code_conversion.h | 2 +-
10 files changed, 113 insertions(+), 3 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
@@ -5092,6 +5092,9 @@ const FeatureEntry kFeatureEntries[] = {
{"system-keyboard-lock", flag_descriptions::kSystemKeyboardLockName,
flag_descriptions::kSystemKeyboardLockDescription, kOsDesktop,
FEATURE_VALUE_TYPE(features::kSystemKeyboardLock)},
+ {"system-keyboard-protection", flag_descriptions::kSystemKeyboardProtectionName,
+ flag_descriptions::kSystemKeyboardProtectionDescription, kOsAll,
+ FEATURE_VALUE_TYPE(features::kSystemKeyboardProtection)},
#if BUILDFLAG(IS_ANDROID)
{"add-to-homescreen-iph", flag_descriptions::kAddToHomescreenIPHName,
flag_descriptions::kAddToHomescreenIPHDescription, kOsAndroid,
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
@@ -3161,6 +3161,12 @@ const char kSystemKeyboardLockDescription[] =
"keyboard shortcuts and have the events routed directly to the website "
"when in fullscreen mode.";
+const char kSystemKeyboardProtectionName[] = "System keyboard protection";
+const char kSystemKeyboardProtectionDescription[] =
+ "Hides user preference on the system keyboard by setting the standard "
+ "eng layout and removing the layout information from the "
+ "javascript keyboard events.";
+
const char kSystemSoundsName[] = "Power Sounds";
const char kSystemSoundsDescription[] =
"Enable device charging and low battery warning sounds.";
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
@@ -1784,6 +1784,9 @@ extern const char kSuppressToolbarCapturesDescription[];
extern const char kSystemKeyboardLockName[];
extern const char kSystemKeyboardLockDescription[];
+extern const char kSystemKeyboardProtectionName[];
+extern const char kSystemKeyboardProtectionDescription[];
+
extern const char kSystemSoundsName[];
extern const char kSystemSoundsDescription[];
diff --git a/third_party/blink/renderer/core/events/keyboard_event.cc b/third_party/blink/renderer/core/events/keyboard_event.cc
--- a/third_party/blink/renderer/core/events/keyboard_event.cc
+++ b/third_party/blink/renderer/core/events/keyboard_event.cc
@@ -23,9 +23,12 @@
#include "third_party/blink/renderer/core/events/keyboard_event.h"
#include "build/build_config.h"
+#include "base/feature_list.h"
#include "third_party/blink/public/common/input/web_input_event.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_keyboard_event_init.h"
+#include "third_party/blink/renderer/core/dom/events/event_dispatch_result.h"
+#include "third_party/blink/renderer/core/dom/events/event_dispatcher.h"
#include "third_party/blink/renderer/core/editing/ime/input_method_controller.h"
#include "third_party/blink/renderer/core/event_interface_names.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
@@ -34,7 +37,10 @@
#include "third_party/blink/renderer/platform/bindings/dom_wrapper_world.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"
#include "third_party/blink/renderer/platform/windows_keyboard_codes.h"
+#include "ui/base/ui_base_features.h"
#include "ui/events/keycodes/dom/keycode_converter.h"
+#include "ui/events/keycodes/dom/dom_codes_array.h"
+#include "ui/events/keycodes/keyboard_code_conversion.h"
namespace blink {
@@ -133,6 +139,60 @@ KeyboardEvent::KeyboardEvent(const WebKeyboardEvent& key,
else
key_code_ = char_code_;
+ if (features::IsSystemKeyboardProtectionEnabled()) {
+ // we need character for transformation
+ ui::DomKey ascii_key;
+ ui::DomKey original_dom_key = static_cast<ui::DomKey>(key.dom_key);
+ // 1 <= char_code <= 26: exclude ctrl-a ... control-z
+ if (char_code_ > 26 && original_dom_key.IsCharacter())
+ ascii_key = ui::DomKey::FromCharacter(key.text[0]);
+ else
+ ascii_key = original_dom_key;
+
+ // get domcode of us layout keyboard
+ // we transform the character pressed by the user into
+ // the relevant domkey of the English keyboard
+ // so, for example:
+ // for ascii_key = "
+ // in italian keyboard --> shift + Digit2
+ // in us keybord --> shift + Quote
+ int shift_needed = 0;
+ ui::DomCode us_code = ui::UsLayoutDomKeyToDomCode(ascii_key, &shift_needed);
+ if (shift_needed == 0)
+ modifiers_ &= ~WebInputEvent::kShiftKey;
+ else if (shift_needed == 1)
+ modifiers_ |= WebInputEvent::kShiftKey;
+
+ // convert keyboard code to us layout (platform code)
+ if (type() == event_type_names::kKeydown ||
+ type() == event_type_names::kKeyup) {
+ int windows_key_code = ui::DomCodeToUsLayoutNonLocatedKeyboardCode(us_code);
+ key_code_ = windows_key_code;
+ }
+
+ // regenerate key_ and code_ for us keyboard
+ key_ = FromUTF8(ui::KeycodeConverter::DomKeyToKeyString(ascii_key));
+ code_ = FromUTF8(ui::KeycodeConverter::DomCodeToCodeString(us_code));
+
+ if (ui::KeycodeConverter::IsDomKeyForModifier(original_dom_key) ||
+ original_dom_key.IsDeadKey()) {
+ // suppress event if is ctrl/shift/alt... otherwise key_code of
+ // the next character can be stolen
+ // and do not send dead keys
+ // we cannot do otherwise because some characters are generated
+ // with the shift or without depending on the keyboard
+ suppress_event_ = true;
+ }
+ // do not leak status of numlock/capslock/scrolllock/etc
+ modifiers_ &= ~(WebInputEvent::kSymbolKey | WebInputEvent::kFnKey |
+ WebInputEvent::kAltGrKey | WebInputEvent::kMetaKey |
+ WebInputEvent::kAltKey | WebInputEvent::kIsKeyPad |
+ WebInputEvent::kSymbolKey | WebInputEvent::kScrollLockOn |
+ WebInputEvent::kCapsLockOn | WebInputEvent::kNumLockOn);
+ // always clear location
+ location_ = KeyboardEvent::kDomKeyLocationStandard;
+ }
+
#if BUILDFLAG(IS_ANDROID)
// FIXME: Check to see if this applies to other OS.
// If the key event belongs to IME composition then propagate to JS.
@@ -205,6 +265,12 @@ unsigned KeyboardEvent::which() const {
return (unsigned)keyCode();
}
+DispatchEventResult KeyboardEvent::DispatchEvent(EventDispatcher& dispatcher) {
+ if (suppress_event_)
+ return DispatchEventResult::kNotCanceled;
+ return dispatcher.Dispatch();
+}
+
void KeyboardEvent::InitLocationModifiers(unsigned location) {
switch (location) {
case KeyboardEvent::kDomKeyLocationNumpad:
diff --git a/third_party/blink/renderer/core/events/keyboard_event.h b/third_party/blink/renderer/core/events/keyboard_event.h
--- a/third_party/blink/renderer/core/events/keyboard_event.h
+++ b/third_party/blink/renderer/core/events/keyboard_event.h
@@ -97,6 +97,8 @@ class CORE_EXPORT KeyboardEvent final : public UIEventWithKeyState {
unsigned which() const override;
bool isComposing() const { return is_composing_; }
+ DispatchEventResult DispatchEvent(EventDispatcher&) override;
+
void Trace(Visitor*) const override;
private:
@@ -109,6 +111,7 @@ class CORE_EXPORT KeyboardEvent final : public UIEventWithKeyState {
bool is_composing_ = false;
unsigned char_code_ = 0;
unsigned key_code_ = 0;
+ bool suppress_event_ = false;
};
template <>
diff --git a/ui/base/ui_base_features.cc b/ui/base/ui_base_features.cc
--- a/ui/base/ui_base_features.cc
+++ b/ui/base/ui_base_features.cc
@@ -174,6 +174,14 @@ BASE_FEATURE(kSystemKeyboardLock,
"SystemKeyboardLock",
base::FEATURE_ENABLED_BY_DEFAULT);
+BASE_FEATURE(kSystemKeyboardProtection,
+ "SystemKeyboardProtection",
+ base::FEATURE_ENABLED_BY_DEFAULT);
+
+bool IsSystemKeyboardProtectionEnabled() {
+ return base::FeatureList::IsEnabled(kSystemKeyboardProtection);
+}
+
// Enables GPU rasterization for all UI drawing (where not blocklisted).
BASE_FEATURE(kUiGpuRasterization,
"UiGpuRasterization",
diff --git a/ui/base/ui_base_features.h b/ui/base/ui_base_features.h
--- a/ui/base/ui_base_features.h
+++ b/ui/base/ui_base_features.h
@@ -30,6 +30,8 @@ BASE_DECLARE_FEATURE(kWindowsScrollingPersonality);
COMPONENT_EXPORT(UI_BASE_FEATURES) bool IsPercentBasedScrollingEnabled();
COMPONENT_EXPORT(UI_BASE_FEATURES) BASE_DECLARE_FEATURE(kSystemCaptionStyle);
COMPONENT_EXPORT(UI_BASE_FEATURES) BASE_DECLARE_FEATURE(kSystemKeyboardLock);
+COMPONENT_EXPORT(UI_BASE_FEATURES) BASE_DECLARE_FEATURE(kSystemKeyboardProtection);
+COMPONENT_EXPORT(UI_BASE_FEATURES) bool IsSystemKeyboardProtectionEnabled();
COMPONENT_EXPORT(UI_BASE_FEATURES)
BASE_DECLARE_FEATURE(kUiCompositorScrollWithLayers);
diff --git a/ui/events/keycodes/dom/dom_keyboard_layout_map_win.cc b/ui/events/keycodes/dom/dom_keyboard_layout_map_win.cc
--- a/ui/events/keycodes/dom/dom_keyboard_layout_map_win.cc
+++ b/ui/events/keycodes/dom/dom_keyboard_layout_map_win.cc
@@ -13,6 +13,8 @@
#include "base/containers/flat_map.h"
#include "base/logging.h"
#include "base/ranges/algorithm.h"
+#include "base/feature_list.h"
+#include "ui/base/ui_base_features.h"
#include "ui/events/keycodes/dom/dom_code.h"
#include "ui/events/keycodes/dom/dom_key.h"
#include "ui/events/keycodes/dom/dom_keyboard_layout_map_base.h"
@@ -74,6 +76,17 @@ uint32_t DomKeyboardLayoutMapWin::GetKeyboardLayoutCount() {
iter != keyboard_layout_handles_.end())
std::iter_swap(keyboard_layout_handles_.begin(), iter);
+ if (features::IsSystemKeyboardProtectionEnabled()) {
+ HKL actual_layout = GetKeyboardLayout(0);
+
+ // get handle for en-us keyboard layout
+ keyboard_layout_handles_.clear();
+ keyboard_layout_handles_.resize(1);
+ keyboard_layout_handles_[0] = LoadKeyboardLayoutA("00000409", KLF_ACTIVATE);
+
+ // reactivate user keyboard layout
+ ActivateKeyboardLayout(actual_layout, KLF_SETFORPROCESS);
+ }
return keyboard_layout_handles_.size();
}
diff --git a/ui/events/keycodes/keyboard_code_conversion.cc b/ui/events/keycodes/keyboard_code_conversion.cc
--- a/ui/events/keycodes/keyboard_code_conversion.cc
+++ b/ui/events/keycodes/keyboard_code_conversion.cc
@@ -293,16 +293,22 @@ int ModifierDomKeyToEventFlag(DomKey key) {
// DomKey::SYMBOL_LOCK
}
-DomCode UsLayoutDomKeyToDomCode(DomKey dom_key) {
+DomCode UsLayoutDomKeyToDomCode(DomKey dom_key, int *need_shift) {
if (dom_key.IsCharacter()) {
char16_t c = dom_key.ToCharacter();
for (const auto& it : kPrintableCodeMap) {
- if (it.character[0] == c || it.character[1] == c) {
+ if (it.character[0] == c) {
+ *need_shift = 0;
+ return it.dom_code;
+ }
+ if (it.character[1] == c) {
+ *need_shift = 1;
return it.dom_code;
}
}
}
+ *need_shift = -1;
for (const auto& it : kNonPrintableCodeMap) {
if (it.dom_key == dom_key)
return it.dom_code;
diff --git a/ui/events/keycodes/keyboard_code_conversion.h b/ui/events/keycodes/keyboard_code_conversion.h
--- a/ui/events/keycodes/keyboard_code_conversion.h
+++ b/ui/events/keycodes/keyboard_code_conversion.h
@@ -111,7 +111,7 @@ EVENTS_BASE_EXPORT int ModifierDomKeyToEventFlag(DomKey key);
// Returns the physical DOM code along with a corresponding non-located
// Windows-based key_code.
-EVENTS_BASE_EXPORT DomCode UsLayoutDomKeyToDomCode(DomKey dom_key);
+EVENTS_BASE_EXPORT DomCode UsLayoutDomKeyToDomCode(DomKey dom_key, int *need_shift);
} // namespace ui
--
2.25.1
@@ -0,0 +1,22 @@
From: uazo <uazo@users.noreply.github.com>
Date: Mon, 17 Jul 2023 15:24:54 +0000
Subject: Lock Profile Cookie Database
---
chrome/browser/browser_features.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chrome/browser/browser_features.cc b/chrome/browser/browser_features.cc
--- a/chrome/browser/browser_features.cc
+++ b/chrome/browser/browser_features.cc
@@ -201,7 +201,7 @@ BASE_FEATURE(kAppBoundEncryptionMetrics,
// TODO(crbug.com/1430226): Remove after fully launched.
BASE_FEATURE(kLockProfileCookieDatabase,
"LockProfileCookieDatabase",
- base::FEATURE_DISABLED_BY_DEFAULT);
+ base::FEATURE_ENABLED_BY_DEFAULT);
#endif
// Enables showing the email of the flex org admin that setup CBCM in the
--
2.25.1
@@ -0,0 +1,305 @@
From: uazo <uazo@users.noreply.github.com>
Date: Mon, 5 Jun 2023 17:06:03 +0000
Subject: Log dangling attributes in some html elements
Log for iframes and the base tag all attributes
containing newlines or the less-then sign that can be exploited
to extract or send otherwise inaccessible information.
under enable-log-dangling-attributes about flag
---
chrome/browser/about_flags.cc | 5 ++++-
.../blink/renderer/core/dom/document.cc | 18 +++++++++++++++++
.../blink/renderer/core/dom/element.cc | 20 ++++++++++++++++++-
third_party/blink/renderer/core/dom/element.h | 3 ++-
.../editing/serializers/markup_formatter.cc | 9 +++++++++
.../renderer/core/html/html_base_element.cc | 6 ++++++
.../renderer/core/html/html_base_element.h | 2 ++
.../core/html/html_frame_element_base.cc | 10 ++++++++++
.../renderer/core/html/html_iframe_element.cc | 16 +++++++++++++++
.../renderer/core/html/html_iframe_element.h | 2 ++
.../blink/renderer/core/page/frame_tree.cc | 16 +++++++++++++++
.../platform/runtime_enabled_features.json5 | 10 ++++++++--
12 files changed, 112 insertions(+), 5 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
@@ -5043,7 +5043,10 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kWebShareDescription, kOsWin | kOsCrOS | kOsMac,
FEATURE_VALUE_TYPE(features::kWebShare)},
#endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
-
+ {"enable-log-dangling-attributes",
+ "Log some dangling attributes",
+ "NOTE: log only", kOsAll,
+ FEATURE_VALUE_TYPE(blink::features::kLogDanglingAttributes)},
#if BUILDFLAG(IS_LINUX)
{"ozone-platform-hint", flag_descriptions::kOzonePlatformHintName,
flag_descriptions::kOzonePlatformHintDescription, kOsLinux,
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
@@ -4480,6 +4480,14 @@ void Document::ProcessBaseElement() {
KURL base_element_url;
if (href) {
String stripped_href = StripLeadingAndTrailingHTMLSpaces(*href);
+ if (stripped_href.Contains('\n') || stripped_href.Contains('<')) {
+ AddConsoleMessage(MakeGarbageCollected<ConsoleMessage>(
+ mojom::ConsoleMessageSource::kSecurity,
+ mojom::ConsoleMessageLevel::kInfo,
+ "Bromite Dangling Markup Prevention: '" + stripped_href +
+ "' is not allowed as base href value."));
+ //stripped_href = g_empty_atom;
+ }
if (!stripped_href.empty())
base_element_url = KURL(FallbackBaseURL(), stripped_href);
}
@@ -4498,6 +4506,14 @@ void Document::ProcessBaseElement() {
!GetExecutionContext()->GetSecurityOrigin()->CanRequest(
base_element_url)) {
UseCounter::Count(*this, WebFeature::kBaseWithCrossOriginHref);
+ if (RuntimeEnabledFeatures::LogDanglingAttributesEnabled()) {
+ AddConsoleMessage(MakeGarbageCollected<ConsoleMessage>(
+ mojom::ConsoleMessageSource::kSecurity,
+ mojom::ConsoleMessageLevel::kInfo,
+ "Bromite Dangling Markup Prevention: '" + base_element_url.GetString() +
+ "' URL is cross origin and cannot be used as base URLs for a document."));
+ }
+ // base_element_url = BlankURL();
}
}
@@ -4517,6 +4533,8 @@ void Document::ProcessBaseElement() {
if (target->Contains('<'))
UseCounter::Count(*this, WebFeature::kBaseWithOpenBracketInTarget);
base_target_ = *target;
+ if (target->Contains('\n') || target->Contains('\r') || target->Contains('<'))
+ base_target_ = g_null_atom;
} else {
base_target_ = g_null_atom;
}
diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/renderer/core/dom/element.cc
--- a/third_party/blink/renderer/core/dom/element.cc
+++ b/third_party/blink/renderer/core/dom/element.cc
@@ -2531,8 +2531,26 @@ void Element::StripScriptingAttributes(
attribute_vector.Shrink(destination);
}
+void Element::RemoveDanglingAttributes(
+ Vector<Attribute, kAttributePrealloc>& attribute_vector) {
+ for (auto& attribute : attribute_vector) {
+ auto value = attribute.Value();
+ if (value.Contains('\n') || value.Contains('<')) {
+ if (RuntimeEnabledFeatures::LogDanglingAttributesEnabled()) {
+ GetDocument().AddConsoleMessage(MakeGarbageCollected<ConsoleMessage>(
+ mojom::ConsoleMessageSource::kSecurity,
+ mojom::ConsoleMessageLevel::kWarning,
+ "'" + value + "' is removed from attribute '" +
+ attribute.GetName().ToString() + "' of element '" +
+ tagName() + "' as may contains dangling markup"));
+ }
+ //attribute.SetValue(g_empty_atom);
+ }
+ }
+}
+
void Element::ParserSetAttributes(
- const Vector<Attribute, kAttributePrealloc>& attribute_vector) {
+ Vector<Attribute, kAttributePrealloc>& attribute_vector) {
DCHECK(!isConnected());
DCHECK(!parentNode());
DCHECK(!element_data_);
diff --git a/third_party/blink/renderer/core/dom/element.h b/third_party/blink/renderer/core/dom/element.h
--- a/third_party/blink/renderer/core/dom/element.h
+++ b/third_party/blink/renderer/core/dom/element.h
@@ -568,7 +568,8 @@ class CORE_EXPORT Element : public ContainerNode, public Animatable {
virtual const QualifiedName& SubResourceAttributeName() const;
// Only called by the parser immediately after element construction.
- void ParserSetAttributes(const Vector<Attribute, kAttributePrealloc>&);
+ virtual void ParserSetAttributes(Vector<Attribute, kAttributePrealloc>&);
+ void RemoveDanglingAttributes(Vector<Attribute, kAttributePrealloc>&);
// Remove attributes that might introduce scripting from the vector leaving
// the element unchanged.
diff --git a/third_party/blink/renderer/core/editing/serializers/markup_formatter.cc b/third_party/blink/renderer/core/editing/serializers/markup_formatter.cc
--- a/third_party/blink/renderer/core/editing/serializers/markup_formatter.cc
+++ b/third_party/blink/renderer/core/editing/serializers/markup_formatter.cc
@@ -28,6 +28,8 @@
#include "third_party/blink/renderer/core/editing/serializers/markup_formatter.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-shared.h"
+#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
+#include "third_party/blink/renderer/core/inspector/console_message.h"
#include "third_party/blink/renderer/core/dom/cdata_section.h"
#include "third_party/blink/renderer/core/dom/comment.h"
#include "third_party/blink/renderer/core/dom/document.h"
@@ -216,6 +218,13 @@ void MarkupFormatter::AppendAttributeValue(StringBuilder& result,
const Document& document) {
if (attribute.Contains('<') || attribute.Contains('>')) {
document.CountUse(mojom::blink::WebFeature::kAttributeValueContainsLtOrGt);
+ if (RuntimeEnabledFeatures::LogDanglingAttributesEnabled()) {
+ document.AddConsoleMessage(MakeGarbageCollected<ConsoleMessage>(
+ mojom::ConsoleMessageSource::kSecurity,
+ mojom::ConsoleMessageLevel::kInfo,
+ "Bromite Dangling Markup Prevention: '" + attribute +
+ "' is not allowed as parameter value."));
+ }
}
EntityMask entity_mask =
diff --git a/third_party/blink/renderer/core/html/html_base_element.cc b/third_party/blink/renderer/core/html/html_base_element.cc
--- a/third_party/blink/renderer/core/html/html_base_element.cc
+++ b/third_party/blink/renderer/core/html/html_base_element.cc
@@ -61,6 +61,12 @@ bool HTMLBaseElement::IsURLAttribute(const Attribute& attribute) const {
HTMLElement::IsURLAttribute(attribute);
}
+void HTMLBaseElement::ParserSetAttributes(
+ Vector<Attribute, kAttributePrealloc>& attribute_vector) {
+ Element::RemoveDanglingAttributes(attribute_vector);
+ Element::ParserSetAttributes(attribute_vector);
+}
+
KURL HTMLBaseElement::href() const {
// This does not use the GetURLAttribute function because that will resolve
// relative to the document's base URL; base elements like this one can be
diff --git a/third_party/blink/renderer/core/html/html_base_element.h b/third_party/blink/renderer/core/html/html_base_element.h
--- a/third_party/blink/renderer/core/html/html_base_element.h
+++ b/third_party/blink/renderer/core/html/html_base_element.h
@@ -37,6 +37,8 @@ class CORE_EXPORT HTMLBaseElement final : public HTMLElement {
KURL href() const;
void setHref(const AtomicString&);
+ void ParserSetAttributes(Vector<Attribute, kAttributePrealloc>&) override;
+
private:
bool IsURLAttribute(const Attribute&) const override;
void ParseAttribute(const AttributeModificationParams&) override;
diff --git a/third_party/blink/renderer/core/html/html_frame_element_base.cc b/third_party/blink/renderer/core/html/html_frame_element_base.cc
--- a/third_party/blink/renderer/core/html/html_frame_element_base.cc
+++ b/third_party/blink/renderer/core/html/html_frame_element_base.cc
@@ -119,6 +119,16 @@ void HTMLFrameElementBase::ParseAttribute(
frame_name_ = value;
} else if (name == html_names::kNameAttr) {
frame_name_ = value;
+ if (value.Contains('\n') || value.Contains('<')) {
+ if (RuntimeEnabledFeatures::LogDanglingAttributesEnabled()) {
+ GetDocument().AddConsoleMessage(MakeGarbageCollected<ConsoleMessage>(
+ mojom::ConsoleMessageSource::kSecurity,
+ mojom::ConsoleMessageLevel::kInfo,
+ "Bromite Dangling Markup Prevention: '" + frame_name_ +
+ "' is not allowed as name value."));
+ }
+ //frame_name_ = g_empty_atom;
+ }
} else if (name == html_names::kMarginwidthAttr) {
SetMarginWidth(value.ToInt());
} else if (name == html_names::kMarginheightAttr) {
diff --git a/third_party/blink/renderer/core/html/html_iframe_element.cc b/third_party/blink/renderer/core/html/html_iframe_element.cc
--- a/third_party/blink/renderer/core/html/html_iframe_element.cc
+++ b/third_party/blink/renderer/core/html/html_iframe_element.cc
@@ -167,6 +167,12 @@ void HTMLIFrameElement::CollectStyleForPresentationAttribute(
}
}
+void HTMLIFrameElement::ParserSetAttributes(
+ Vector<Attribute, kAttributePrealloc>& attribute_vector) {
+ Element::RemoveDanglingAttributes(attribute_vector);
+ Element::ParserSetAttributes(attribute_vector);
+}
+
void HTMLIFrameElement::ParseAttribute(
const AttributeModificationParams& params) {
const QualifiedName& name = params.name;
@@ -181,6 +187,16 @@ void HTMLIFrameElement::ParseAttribute(
}
AtomicString old_name = name_;
name_ = value;
+ if (name_.Contains('\n') || name_.Contains('<')) {
+ if (RuntimeEnabledFeatures::LogDanglingAttributesEnabled()) {
+ GetDocument().AddConsoleMessage(MakeGarbageCollected<ConsoleMessage>(
+ mojom::ConsoleMessageSource::kSecurity,
+ mojom::ConsoleMessageLevel::kInfo,
+ "Bromite Dangling Markup Prevention: '" + name_ +
+ "' is not allowed as name value."));
+ }
+ //name_ = g_empty_atom;
+ }
if (name_ != old_name) {
FrameOwnerPropertiesChanged();
should_call_did_change_attributes = true;
diff --git a/third_party/blink/renderer/core/html/html_iframe_element.h b/third_party/blink/renderer/core/html/html_iframe_element.h
--- a/third_party/blink/renderer/core/html/html_iframe_element.h
+++ b/third_party/blink/renderer/core/html/html_iframe_element.h
@@ -61,6 +61,8 @@ class CORE_EXPORT HTMLIFrameElement : public HTMLFrameElementBase,
bool Credentialless() const override { return credentialless_; }
+ void ParserSetAttributes(Vector<Attribute, kAttributePrealloc>&) override;
+
private:
void SetCollapsed(bool) override;
diff --git a/third_party/blink/renderer/core/page/frame_tree.cc b/third_party/blink/renderer/core/page/frame_tree.cc
--- a/third_party/blink/renderer/core/page/frame_tree.cc
+++ b/third_party/blink/renderer/core/page/frame_tree.cc
@@ -21,6 +21,9 @@
#include "third_party/blink/renderer/core/page/frame_tree.h"
#include "third_party/blink/renderer/core/dom/document.h"
+#include "third_party/blink/renderer/core/execution_context/execution_context.h"
+#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
+#include "third_party/blink/renderer/core/inspector/console_message.h"
#include "third_party/blink/renderer/core/frame/frame_client.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
@@ -239,6 +242,19 @@ FrameTree::FindResult FrameTree::FindOrCreateFrameForNavigation(
LogDanglingMarkupHistogram(current_frame->GetDocument(), name);
}
+ if (ContainsNewLineAndLessThan(name)) {
+ // if the name contains a \n or <, the search is always deactivated
+ if (RuntimeEnabledFeatures::LogDanglingAttributesEnabled()) {
+ if (current_frame->GetDocument()) {
+ current_frame->GetDocument()->AddConsoleMessage(MakeGarbageCollected<ConsoleMessage>(
+ mojom::ConsoleMessageSource::kSecurity,
+ mojom::ConsoleMessageLevel::kWarning,
+ "Bromite Dangling Markup Prevention: '" + name.GetString() + "' is not allowed as frame name destination"));
+ }
+ // return FindResult(nullptr, false);
+ }
+ }
+
const KURL& url = request.GetResourceRequest().Url();
Frame* frame = FindFrameForNavigationInternal(name, url, &request);
bool new_window = false;
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
@@ -1493,8 +1493,8 @@
// Experiment with preventing some instances of mutation XSS
// by escaping "<" and ">" in attribute values.
// See: crbug.com/1175016
- name: "EscapeLtGtInAttributes",
- status: "experimental",
+ name: "EscapeLtGtInAttributes", // enabled by default
+ status: "stable",
},
{
// Non-standard API Event.path. Should be replaced by Event.composedPath.
@@ -2196,6 +2196,12 @@
// Use LongAnimationFrameMonitor to emit longtask entries
name: "LongTaskFromLongAnimationFrame"
},
+ {
+ // Enables log of some dangling attributes
+ // on the javascript console
+ name: "LogDanglingAttributes",
+ status: "experimental"
+ },
{
name: "MachineLearningCommon",
implied_by: ["MachineLearningModelLoader", "MachineLearningNeuralNetwork"],
--
2.25.1
@@ -0,0 +1,94 @@
From: uazo <uazo@users.noreply.github.com>
Date: Thu, 20 Apr 2023 07:45:37 +0000
Subject: Multi-Screen Window Placement API fix
Links the use of screen.isExtended to WINDOW_MANAGEMENT permission
granted by user
---
.../blink/renderer/core/frame/screen.cc | 25 +++++++++++++++++--
.../blink/renderer/core/frame/screen.h | 8 ++++++
2 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/third_party/blink/renderer/core/frame/screen.cc b/third_party/blink/renderer/core/frame/screen.cc
--- a/third_party/blink/renderer/core/frame/screen.cc
+++ b/third_party/blink/renderer/core/frame/screen.cc
@@ -35,6 +35,7 @@
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/page/chrome_client.h"
+#include "third_party/blink/renderer/modules/permissions/permission_utils.h"
#include "ui/display/screen_info.h"
#include "ui/display/screen_infos.h"
@@ -49,7 +50,26 @@ Screen::Screen(LocalDOMWindow* window,
bool use_size_override)
: ExecutionContextClient(window),
display_id_(display_id),
- use_size_override_(use_size_override) {}
+ use_size_override_(use_size_override),
+ permission_service_(window) {
+ if (!permission_service_.is_bound()) {
+ ConnectToPermissionService(
+ window, permission_service_.BindNewPipeAndPassReceiver(
+ window->GetTaskRunner(TaskType::kMiscPlatformAPI)));
+ }
+
+ permission_service_->HasPermission(
+ CreatePermissionDescriptor(mojom::blink::PermissionName::WINDOW_MANAGEMENT),
+ WTF::BindOnce(&Screen::DidGetPermissionState,
+ WrapPersistent(this)));
+}
+
+void Screen::DidGetPermissionState(
+ mojom::blink::PermissionStatus status) {
+ has_permission_ =
+ status == mojom::blink::PermissionStatus::GRANTED;
+ permission_service_.reset();
+}
// static
bool Screen::AreWebExposedScreenPropertiesEqual(
@@ -159,6 +179,7 @@ int Screen::availWidth() const {
}
void Screen::Trace(Visitor* visitor) const {
+ visitor->Trace(permission_service_);
EventTargetWithInlineData::Trace(visitor);
ExecutionContextClient::Trace(visitor);
Supplementable<Screen>::Trace(visitor);
@@ -181,7 +202,7 @@ bool Screen::isExtended() const {
return false;
}
- return GetScreenInfo().is_extended;
+ return GetScreenInfo().is_extended && has_permission_;
}
gfx::Rect Screen::GetRect(bool available) const {
diff --git a/third_party/blink/renderer/core/frame/screen.h b/third_party/blink/renderer/core/frame/screen.h
--- a/third_party/blink/renderer/core/frame/screen.h
+++ b/third_party/blink/renderer/core/frame/screen.h
@@ -33,6 +33,8 @@
#include "third_party/blink/renderer/core/dom/events/event_target.h"
#include "third_party/blink/renderer/core/execution_context/execution_context_lifecycle_observer.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
+#include "third_party/blink/public/mojom/permissions/permission.mojom-blink.h"
+#include "third_party/blink/renderer/platform/mojo/heap_mojo_remote.h"
#include "third_party/blink/renderer/platform/supplementable.h"
#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h"
#include "ui/gfx/geometry/rect.h"
@@ -99,6 +101,12 @@ class CORE_EXPORT Screen : public EventTargetWithInlineData,
// dimensions match window.innerWidth/innerHeight while a page is fullscreen,
// but that is not always true. crbug.com/1367416
const bool use_size_override_;
+
+ private:
+ void DidGetPermissionState(mojom::blink::PermissionStatus status);
+
+ bool has_permission_ = false;
+ HeapMojoRemote<mojom::blink::PermissionService> permission_service_;
};
} // namespace blink
--
2.25.1
@@ -0,0 +1,698 @@
From: uazo <uazo@users.noreply.github.com>
Date: Thu, 16 Mar 2023 14:17:22 +0000
Subject: Partition HSTS cache by NAK
---
.../https_only_mode_upgrade_interceptor.cc | 1 +
.../browser/ssl/https_upgrades_interceptor.cc | 1 +
.../webui/net_internals/net_internals_ui.cc | 14 ++-
.../core/browser/hsts_query.cc | 1 +
net/http/transport_security_state.cc | 98 +++++++++++++------
net/http/transport_security_state.h | 32 +++---
net/quic/crypto/proof_verifier_chromium.cc | 2 +-
net/socket/ssl_client_socket_impl.cc | 2 +-
.../url_request_context_builder.cc | 14 ---
net/url_request/url_request_http_job.cc | 6 +-
services/network/network_context.cc | 26 +++--
services/network/network_context.h | 11 ++-
.../public/mojom/network_context.mojom | 8 +-
13 files changed, 132 insertions(+), 84 deletions(-)
diff --git a/chrome/browser/ssl/https_only_mode_upgrade_interceptor.cc b/chrome/browser/ssl/https_only_mode_upgrade_interceptor.cc
--- a/chrome/browser/ssl/https_only_mode_upgrade_interceptor.cc
+++ b/chrome/browser/ssl/https_only_mode_upgrade_interceptor.cc
@@ -131,6 +131,7 @@ void HttpsOnlyModeUpgradeInterceptor::MaybeCreateLoader(
network::mojom::NetworkContext* network_context =
profile->GetDefaultStoragePartition()->GetNetworkContext();
network_context->IsHSTSActiveForHost(
+ tentative_resource_request.trusted_params->isolation_info.network_anonymization_key(),
tentative_resource_request.url.host(),
mojo::WrapCallbackWithDefaultInvokeIfNotRun(
std::move(query_complete_callback),
diff --git a/chrome/browser/ssl/https_upgrades_interceptor.cc b/chrome/browser/ssl/https_upgrades_interceptor.cc
--- a/chrome/browser/ssl/https_upgrades_interceptor.cc
+++ b/chrome/browser/ssl/https_upgrades_interceptor.cc
@@ -341,6 +341,7 @@ void HttpsUpgradesInterceptor::MaybeCreateLoader(
network::mojom::NetworkContext* network_context =
profile->GetDefaultStoragePartition()->GetNetworkContext();
network_context->IsHSTSActiveForHost(
+ tentative_resource_request.trusted_params->isolation_info.network_anonymization_key(),
tentative_resource_request.url.host(),
mojo::WrapCallbackWithDefaultInvokeIfNotRun(
std::move(query_complete_callback),
diff --git a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
--- a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
+++ b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
@@ -299,7 +299,10 @@ void NetInternalsMessageHandler::OnDomainSecurityPolicyDelete(
// There cannot be a unicode entry in the HSTS set.
return;
}
+ url::Origin unsafe_origin = url::Origin::CreateFromNormalizedTuple(
+ "https", *domain, 443);
GetNetworkContext()->DeleteDynamicDataForHost(
+ net::IsolationInfo::CreateForInternalRequest(unsafe_origin).network_anonymization_key(),
*domain, base::BindOnce(&IgnoreBoolCallback));
}
@@ -309,7 +312,10 @@ void NetInternalsMessageHandler::OnHSTSQuery(const base::Value::List& list) {
DCHECK(callback_id && domain);
AllowJavascript();
+ url::Origin unsafe_origin = url::Origin::CreateFromNormalizedTuple(
+ "https", *domain, 443);
GetNetworkContext()->GetHSTSState(
+ net::IsolationInfo::CreateForInternalRequest(unsafe_origin).network_anonymization_key(),
*domain,
base::BindOnce(&NetInternalsMessageHandler::ResolveCallbackWithResult,
weak_factory_.GetWeakPtr(), *callback_id));
@@ -335,8 +341,12 @@ void NetInternalsMessageHandler::OnHSTSAdd(const base::Value::List& list) {
const bool sts_include_subdomains = list[1].GetBool();
base::Time expiry = base::Time::Now() + base::Days(1000);
- GetNetworkContext()->AddHSTS(*domain, expiry, sts_include_subdomains,
- base::DoNothing());
+ url::Origin unsafe_origin = url::Origin::CreateFromNormalizedTuple(
+ "https", *domain, 443);
+ GetNetworkContext()->AddHSTS(
+ net::IsolationInfo::CreateForInternalRequest(unsafe_origin).network_anonymization_key(),
+ *domain, expiry, sts_include_subdomains,
+ base::DoNothing());
}
void NetInternalsMessageHandler::OnFlushSocketPools(
diff --git a/components/password_manager/core/browser/hsts_query.cc b/components/password_manager/core/browser/hsts_query.cc
--- a/components/password_manager/core/browser/hsts_query.cc
+++ b/components/password_manager/core/browser/hsts_query.cc
@@ -58,6 +58,7 @@ void PostHSTSQueryForHostAndNetworkContext(
scoped_refptr<HSTSCallbackHelper> callback_helper =
base::MakeRefCounted<HSTSCallbackHelper>(std::move(callback));
network_context->IsHSTSActiveForHost(
+ net::IsolationInfo::CreateForInternalRequest(origin).network_anonymization_key(),
origin.host(),
mojo::WrapCallbackWithDropHandler(
base::BindOnce(&HSTSCallbackHelper::ReportResult, callback_helper),
diff --git a/net/http/transport_security_state.cc b/net/http/transport_security_state.cc
--- a/net/http/transport_security_state.cc
+++ b/net/http/transport_security_state.cc
@@ -215,7 +215,7 @@ bool AddHash(const char* sha256_hash, HashValueVector* out) {
// Converts |hostname| from dotted form ("www.google.com") to the form
// used in DNS: "\x03www\x06google\x03com", lowercases that, and returns
// the result.
-std::vector<uint8_t> CanonicalizeHost(const std::string& host) {
+std::vector<uint8_t> CanonicalizeHostWithoutNak(const std::string& host) {
// We cannot perform the operations as detailed in the spec here as `host`
// has already undergone IDN processing before it reached us. Thus, we
// lowercase the input (probably redudnant since most input here has been
@@ -236,6 +236,29 @@ std::vector<uint8_t> CanonicalizeHost(const std::string& host) {
return new_host.value();
}
+std::vector<uint8_t> CanonicalizeHost(const NetworkAnonymizationKey& nak,
+ const std::string& host) {
+ std::vector<uint8_t> hostname = CanonicalizeHostWithoutNak(host);
+ if (hostname.empty()) {
+ return hostname;
+ }
+
+ // esclude opaque or transient nak
+ if (!nak.IsFullyPopulated() || nak.IsTransient())
+ return std::vector<uint8_t>();
+
+ std::string lowered_host = base::ToLowerASCII(
+ nak.ToDebugString() + " " + host);
+ std::vector<uint8_t> vector =
+ std::vector<uint8_t>(lowered_host.begin(), lowered_host.end());
+ if (vector.size() > 254)
+ return std::vector<uint8_t>();
+
+ vector.emplace(vector.begin(), vector.size());
+ vector.emplace(vector.end(), 0);
+ return vector;
+}
+
// PreloadResult is the result of resolving a specific name in the preloaded
// data.
struct PreloadResult {
@@ -327,7 +350,7 @@ bool DecodeHSTSPreload(const std::string& search_hostname, PreloadResult* out) {
// Ensure that |search_hostname| is a valid hostname before
// processing.
- if (CanonicalizeHost(search_hostname).empty()) {
+ if (CanonicalizeHostWithoutNak(search_hostname).empty()) {
return false;
}
// Normalize any trailing '.' used for DNS suffix searches.
@@ -394,18 +417,19 @@ TransportSecurityState::TransportSecurityState(
// Both HSTS and HPKP cause fatal SSL errors, so return true if a
// host has either.
-bool TransportSecurityState::ShouldSSLErrorsBeFatal(const std::string& host) {
+bool TransportSecurityState::ShouldSSLErrorsBeFatal(const NetworkAnonymizationKey& nak, const std::string& host) {
STSState unused_sts;
PKPState unused_pkp;
- return GetSTSState(host, &unused_sts) || GetPKPState(host, &unused_pkp);
+ return GetSTSState(nak, host, &unused_sts) || GetPKPState(nak, host, &unused_pkp);
}
base::Value::Dict TransportSecurityState::NetLogUpgradeToSSLParam(
+ const NetworkAnonymizationKey& nak,
const std::string& host) {
STSState sts_state;
base::Value::Dict dict;
dict.Set("host", host);
- dict.Set("get_sts_state_result", GetSTSState(host, &sts_state));
+ dict.Set("get_sts_state_result", GetSTSState(nak, host, &sts_state));
dict.Set("should_upgrade_to_ssl", sts_state.ShouldUpgradeToSSL());
dict.Set("host_found_in_hsts_bypass_list",
hsts_host_bypass_list_.find(host) != hsts_host_bypass_list_.end());
@@ -413,13 +437,14 @@ base::Value::Dict TransportSecurityState::NetLogUpgradeToSSLParam(
}
bool TransportSecurityState::ShouldUpgradeToSSL(
+ const NetworkAnonymizationKey& nak,
const std::string& host,
const NetLogWithSource& net_log) {
STSState sts_state;
net_log.AddEvent(
NetLogEventType::TRANSPORT_SECURITY_STATE_SHOULD_UPGRADE_TO_SSL,
- [&] { return NetLogUpgradeToSSLParam(host); });
- return GetSTSState(host, &sts_state) && sts_state.ShouldUpgradeToSSL();
+ [&] { return NetLogUpgradeToSSLParam(nak, host); });
+ return GetSTSState(nak, host, &sts_state) && sts_state.ShouldUpgradeToSSL();
}
TransportSecurityState::PKPStatus TransportSecurityState::CheckPublicKeyPins(
@@ -432,7 +457,7 @@ TransportSecurityState::PKPStatus TransportSecurityState::CheckPublicKeyPins(
const NetworkAnonymizationKey& network_anonymization_key,
std::string* pinning_failure_log) {
// Perform pin validation only if the server actually has public key pins.
- if (!HasPublicKeyPins(host_port_pair.host())) {
+ if (!HasPublicKeyPins(network_anonymization_key, host_port_pair.host())) {
return PKPStatus::OK;
}
@@ -451,9 +476,9 @@ TransportSecurityState::PKPStatus TransportSecurityState::CheckPublicKeyPins(
return pin_validity;
}
-bool TransportSecurityState::HasPublicKeyPins(const std::string& host) {
+bool TransportSecurityState::HasPublicKeyPins(const NetworkAnonymizationKey& nak, const std::string& host) {
PKPState pkp_state;
- return GetPKPState(host, &pkp_state) && pkp_state.HasPublicKeyPins();
+ return GetPKPState(nak, host, &pkp_state) && pkp_state.HasPublicKeyPins();
}
TransportSecurityState::CTRequirementsStatus
@@ -589,12 +614,13 @@ void TransportSecurityState::UpdatePinList(
}
void TransportSecurityState::AddHSTSInternal(
+ const NetworkAnonymizationKey& nak,
const std::string& host,
TransportSecurityState::STSState::UpgradeMode upgrade_mode,
const base::Time& expiry,
bool include_subdomains) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
- const std::vector<uint8_t> canonicalized_host = CanonicalizeHost(host);
+ const std::vector<uint8_t> canonicalized_host = CanonicalizeHost(nak, host);
if (canonicalized_host.empty())
return;
@@ -618,14 +644,15 @@ void TransportSecurityState::AddHSTSInternal(
DirtyNotify();
}
-void TransportSecurityState::AddHPKPInternal(const std::string& host,
+void TransportSecurityState::AddHPKPInternal(const NetworkAnonymizationKey& nak,
+ const std::string& host,
const base::Time& last_observed,
const base::Time& expiry,
bool include_subdomains,
const HashValueVector& hashes,
const GURL& report_uri) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
- const std::vector<uint8_t> canonicalized_host = CanonicalizeHost(host);
+ const std::vector<uint8_t> canonicalized_host = CanonicalizeHost(nak, host);
if (canonicalized_host.empty())
return;
@@ -711,10 +738,12 @@ TransportSecurityState::CheckPinsAndMaybeSendReport(
return PKPStatus::VIOLATED;
}
-bool TransportSecurityState::DeleteDynamicDataForHost(const std::string& host) {
+bool TransportSecurityState::DeleteDynamicDataForHost(
+ const NetworkAnonymizationKey& nak,
+ const std::string& host) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
- const std::vector<uint8_t> canonicalized_host = CanonicalizeHost(host);
+ const std::vector<uint8_t> canonicalized_host = CanonicalizeHost(nak, host);
if (canonicalized_host.empty())
return false;
@@ -791,7 +820,8 @@ void TransportSecurityState::DirtyNotify() {
delegate_->StateIsDirty(this);
}
-bool TransportSecurityState::AddHSTSHeader(const std::string& host,
+bool TransportSecurityState::AddHSTSHeader(const NetworkAnonymizationKey& nak,
+ const std::string& host,
const std::string& value) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
@@ -810,24 +840,26 @@ bool TransportSecurityState::AddHSTSHeader(const std::string& host,
upgrade_mode = STSState::MODE_FORCE_HTTPS;
}
- AddHSTSInternal(host, upgrade_mode, now + max_age, include_subdomains);
+ AddHSTSInternal(nak, host, upgrade_mode, now + max_age, include_subdomains);
return true;
}
-void TransportSecurityState::AddHSTS(const std::string& host,
+void TransportSecurityState::AddHSTS(const NetworkAnonymizationKey& nak,
+ const std::string& host,
const base::Time& expiry,
bool include_subdomains) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
- AddHSTSInternal(host, STSState::MODE_FORCE_HTTPS, expiry, include_subdomains);
+ AddHSTSInternal(nak, host, STSState::MODE_FORCE_HTTPS, expiry, include_subdomains);
}
-void TransportSecurityState::AddHPKP(const std::string& host,
+void TransportSecurityState::AddHPKP(const NetworkAnonymizationKey& nak,
+ const std::string& host,
const base::Time& expiry,
bool include_subdomains,
const HashValueVector& hashes,
const GURL& report_uri) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
- AddHPKPInternal(host, base::Time::Now(), expiry, include_subdomains, hashes,
+ AddHPKPInternal(nak, host, base::Time::Now(), expiry, include_subdomains, hashes,
report_uri);
}
@@ -862,7 +894,7 @@ TransportSecurityState::CheckPublicKeyPinsImpl(
const NetworkAnonymizationKey& network_anonymization_key,
std::string* failure_log) {
PKPState pkp_state;
- bool found_state = GetPKPState(host_port_pair.host(), &pkp_state);
+ bool found_state = GetPKPState(network_anonymization_key, host_port_pair.host(), &pkp_state);
// HasPublicKeyPins should have returned true in order for this method to have
// been called.
@@ -906,7 +938,7 @@ bool TransportSecurityState::GetStaticPKPState(const std::string& host,
PreloadResult result;
if (host_pins_.has_value()) {
// Ensure that |host| is a valid hostname before processing.
- if (CanonicalizeHost(host).empty()) {
+ if (CanonicalizeHostWithoutNak(host).empty()) {
return false;
}
// Normalize any trailing '.' used for DNS suffix searches.
@@ -994,21 +1026,24 @@ bool TransportSecurityState::GetStaticPKPState(const std::string& host,
return false;
}
-bool TransportSecurityState::GetSTSState(const std::string& host,
+bool TransportSecurityState::GetSTSState(const NetworkAnonymizationKey& nak,
+ const std::string& host,
STSState* result) {
- return GetDynamicSTSState(host, result) || GetStaticSTSState(host, result);
+ return GetDynamicSTSState(nak, host, result) || GetStaticSTSState(host, result);
}
-bool TransportSecurityState::GetPKPState(const std::string& host,
+bool TransportSecurityState::GetPKPState(const NetworkAnonymizationKey& nak,
+ const std::string& host,
PKPState* result) {
- return GetDynamicPKPState(host, result) || GetStaticPKPState(host, result);
+ return GetDynamicPKPState(nak, host, result) || GetStaticPKPState(host, result);
}
-bool TransportSecurityState::GetDynamicSTSState(const std::string& host,
+bool TransportSecurityState::GetDynamicSTSState(const NetworkAnonymizationKey& nak,
+ const std::string& host,
STSState* result) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
- const std::vector<uint8_t> canonicalized_host = CanonicalizeHost(host);
+ const std::vector<uint8_t> canonicalized_host = CanonicalizeHost(nak, host);
if (canonicalized_host.empty())
return false;
@@ -1045,11 +1080,12 @@ bool TransportSecurityState::GetDynamicSTSState(const std::string& host,
return false;
}
-bool TransportSecurityState::GetDynamicPKPState(const std::string& host,
+bool TransportSecurityState::GetDynamicPKPState(const NetworkAnonymizationKey& nak,
+ const std::string& host,
PKPState* result) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
- const std::vector<uint8_t> canonicalized_host = CanonicalizeHost(host);
+ const std::vector<uint8_t> canonicalized_host = CanonicalizeHost(nak, host);
if (canonicalized_host.empty())
return false;
diff --git a/net/http/transport_security_state.h b/net/http/transport_security_state.h
--- a/net/http/transport_security_state.h
+++ b/net/http/transport_security_state.h
@@ -328,8 +328,8 @@ class NET_EXPORT TransportSecurityState {
// primary public interface; direct access to STS and PKP states is best
// left to tests. The caller needs to handle the optional pinning override
// when is_issued_by_known_root is false.
- bool ShouldSSLErrorsBeFatal(const std::string& host);
- bool ShouldUpgradeToSSL(const std::string& host,
+ bool ShouldSSLErrorsBeFatal(const NetworkAnonymizationKey& nak, const std::string& host);
+ bool ShouldUpgradeToSSL(const NetworkAnonymizationKey& nak, const std::string& host,
const NetLogWithSource& net_log = NetLogWithSource());
PKPStatus CheckPublicKeyPins(
const HostPortPair& host_port_pair,
@@ -340,7 +340,7 @@ class NET_EXPORT TransportSecurityState {
const PublicKeyPinReportStatus report_status,
const NetworkAnonymizationKey& network_anonymization_key,
std::string* failure_log);
- bool HasPublicKeyPins(const std::string& host);
+ bool HasPublicKeyPins(const NetworkAnonymizationKey& nak, const std::string& host);
// Returns CT_REQUIREMENTS_NOT_MET if a connection violates CT policy
// requirements: that is, if a connection to |host|, using the validated
@@ -429,7 +429,7 @@ class NET_EXPORT TransportSecurityState {
//
// If an entry is deleted, the new state will be persisted through
// the Delegate (if any).
- bool DeleteDynamicDataForHost(const std::string& host);
+ bool DeleteDynamicDataForHost(const NetworkAnonymizationKey& nak, const std::string& host);
// Returns true and updates |*result| if |host| has dynamic or static
// HSTS/HPKP (respectively) state. If multiple entries match |host|, dynamic
@@ -439,8 +439,8 @@ class NET_EXPORT TransportSecurityState {
//
// Note that these methods are not const because they opportunistically remove
// entries that have expired.
- bool GetSTSState(const std::string& host, STSState* sts_result);
- bool GetPKPState(const std::string& host, PKPState* pkp_result);
+ bool GetSTSState(const NetworkAnonymizationKey& nak, const std::string& host, STSState* sts_result);
+ bool GetPKPState(const NetworkAnonymizationKey& nak, const std::string& host, PKPState* pkp_result);
// Returns true and updates |*result| iff |host| has static HSTS/HPKP
// (respectively) state. If multiple entries match |host|, the most specific
@@ -454,22 +454,24 @@ class NET_EXPORT TransportSecurityState {
//
// Note that these methods are not const because they opportunistically remove
// entries that have expired.
- bool GetDynamicSTSState(const std::string& host, STSState* result);
- bool GetDynamicPKPState(const std::string& host, PKPState* result);
+ bool GetDynamicSTSState(const NetworkAnonymizationKey& nak, const std::string& host, STSState* result);
+ bool GetDynamicPKPState(const NetworkAnonymizationKey& nak, const std::string& host, PKPState* result);
// Processes an HSTS header value from the host, adding entries to
// dynamic state if necessary.
- bool AddHSTSHeader(const std::string& host, const std::string& value);
+ bool AddHSTSHeader(const NetworkAnonymizationKey& nak, const std::string& host, const std::string& value);
// Adds explicitly-specified data as if it was processed from an
// HSTS header (used for net-internals and unit tests).
- void AddHSTS(const std::string& host,
+ void AddHSTS(const NetworkAnonymizationKey& nak,
+ const std::string& host,
const base::Time& expiry,
bool include_subdomains);
// Adds explicitly-specified data as if it was processed from an HPKP header.
// Note: dynamic PKP data is not persisted.
- void AddHPKP(const std::string& host,
+ void AddHPKP(const NetworkAnonymizationKey& nak,
+ const std::string& host,
const base::Time& expiry,
bool include_subdomains,
const HashValueVector& hashes,
@@ -517,7 +519,7 @@ class NET_EXPORT TransportSecurityState {
typedef ExpiringCache<std::string, bool, base::TimeTicks, std::less<>>
ReportCache;
- base::Value::Dict NetLogUpgradeToSSLParam(const std::string& host);
+ base::Value::Dict NetLogUpgradeToSSLParam(const NetworkAnonymizationKey& nak, const std::string& host);
// IsBuildTimely returns true if the current build is new enough ensure that
// built in security information (i.e. HSTS preloading and pinning
@@ -543,11 +545,13 @@ class NET_EXPORT TransportSecurityState {
// any previous state for the |host|, including static entries.
//
// The new state for |host| is persisted using the Delegate (if any).
- void AddHSTSInternal(const std::string& host,
+ void AddHSTSInternal(const NetworkAnonymizationKey& nak,
+ const std::string& host,
STSState::UpgradeMode upgrade_mode,
const base::Time& expiry,
bool include_subdomains);
- void AddHPKPInternal(const std::string& host,
+ void AddHPKPInternal(const NetworkAnonymizationKey& nak,
+ const std::string& host,
const base::Time& last_observed,
const base::Time& expiry,
bool include_subdomains,
diff --git a/net/quic/crypto/proof_verifier_chromium.cc b/net/quic/crypto/proof_verifier_chromium.cc
--- a/net/quic/crypto/proof_verifier_chromium.cc
+++ b/net/quic/crypto/proof_verifier_chromium.cc
@@ -440,7 +440,7 @@ int ProofVerifierChromium::Job::DoVerifyCertComplete(int result) {
verify_details_->is_fatal_cert_error =
IsCertStatusError(cert_status) &&
result != ERR_CERT_KNOWN_INTERCEPTION_BLOCKED &&
- transport_security_state_->ShouldSSLErrorsBeFatal(hostname_);
+ transport_security_state_->ShouldSSLErrorsBeFatal(proof_verifier_->network_anonymization_key_, hostname_);
if (result != OK) {
std::string error_string = ErrorToString(result);
diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket_impl.cc
--- a/net/socket/ssl_client_socket_impl.cc
+++ b/net/socket/ssl_client_socket_impl.cc
@@ -1343,7 +1343,7 @@ ssl_verify_result_t SSLClientSocketImpl::HandleVerifyResult() {
IsCertStatusError(server_cert_verify_result_.cert_status) &&
result != ERR_CERT_KNOWN_INTERCEPTION_BLOCKED &&
context_->transport_security_state()->ShouldSSLErrorsBeFatal(
- host_and_port_.host());
+ ssl_config_.network_anonymization_key, host_and_port_.host());
if (IsCertificateError(result)) {
if (!GetECHNameOverride().empty()) {
diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/url_request_context_builder.cc
--- a/net/url_request/url_request_context_builder.cc
+++ b/net/url_request/url_request_context_builder.cc
@@ -392,20 +392,6 @@ std::unique_ptr<URLRequestContext> URLRequestContextBuilder::Build() {
context->set_transport_security_state(
std::make_unique<TransportSecurityState>(hsts_policy_bypass_list_));
- if (!transport_security_persister_file_path_.empty()) {
- // Use a low priority because saving this should not block anything
- // user-visible. Block shutdown to ensure it does get persisted to disk,
- // since it contains security-relevant information.
- scoped_refptr<base::SequencedTaskRunner> task_runner(
- base::ThreadPool::CreateSequencedTaskRunner(
- {base::MayBlock(), base::TaskPriority::BEST_EFFORT,
- base::TaskShutdownBehavior::BLOCK_SHUTDOWN}));
-
- context->set_transport_security_persister(
- std::make_unique<TransportSecurityPersister>(
- context->transport_security_state(), task_runner,
- transport_security_persister_file_path_));
- }
if (http_server_properties_) {
context->set_http_server_properties(std::move(http_server_properties_));
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
@@ -203,7 +203,7 @@ std::unique_ptr<URLRequestJob> URLRequestHttpJob::Create(URLRequest* request) {
// Check for HSTS upgrade.
TransportSecurityState* hsts =
request->context()->transport_security_state();
- if (hsts && hsts->ShouldUpgradeToSSL(url.host(), request->net_log())) {
+ if (hsts && hsts->ShouldUpgradeToSSL(request->isolation_info().network_anonymization_key(), url.host(), request->net_log())) {
return std::make_unique<URLRequestRedirectJob>(
request, UpgradeSchemeToCryptographic(url),
// Use status code 307 to preserve the method, so POST requests work.
@@ -992,7 +992,7 @@ void URLRequestHttpJob::ProcessStrictTransportSecurityHeader() {
HttpResponseHeaders* headers = GetResponseHeaders();
std::string value;
if (headers->EnumerateHeader(nullptr, "Strict-Transport-Security", &value))
- security_state->AddHSTSHeader(request_info_.url.host(), value);
+ security_state->AddHSTSHeader(request_info_.network_anonymization_key, request_info_.url.host(), value);
}
void URLRequestHttpJob::OnStartCompleted(int result) {
@@ -1062,7 +1062,7 @@ void URLRequestHttpJob::OnStartCompleted(int result) {
TransportSecurityState* state = context->transport_security_state();
NotifySSLCertificateError(
result, transaction_->GetResponseInfo()->ssl_info,
- state->ShouldSSLErrorsBeFatal(request_info_.url.host()) &&
+ state->ShouldSSLErrorsBeFatal(request_->isolation_info().network_anonymization_key(), request_info_.url.host()) &&
result != ERR_CERT_KNOWN_INTERCEPTION_BLOCKED);
} else if (result == ERR_SSL_CLIENT_AUTH_CERT_NEEDED) {
NotifyCertificateRequested(
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -1799,17 +1799,19 @@ void NetworkContext::SetCorsOriginAccessListsForOrigin(
std::move(callback).Run();
}
-void NetworkContext::AddHSTS(const std::string& host,
+void NetworkContext::AddHSTS(const net::NetworkAnonymizationKey& nak,
+ const std::string& host,
base::Time expiry,
bool include_subdomains,
AddHSTSCallback callback) {
net::TransportSecurityState* state =
url_request_context_->transport_security_state();
- state->AddHSTS(host, expiry, include_subdomains);
+ state->AddHSTS(nak, host, expiry, include_subdomains);
std::move(callback).Run();
}
-void NetworkContext::IsHSTSActiveForHost(const std::string& host,
+void NetworkContext::IsHSTSActiveForHost(const net::NetworkAnonymizationKey& nak,
+ const std::string& host,
IsHSTSActiveForHostCallback callback) {
net::TransportSecurityState* security_state =
url_request_context_->transport_security_state();
@@ -1819,10 +1821,10 @@ void NetworkContext::IsHSTSActiveForHost(const std::string& host,
return;
}
- std::move(callback).Run(security_state->ShouldUpgradeToSSL(host));
+ std::move(callback).Run(security_state->ShouldUpgradeToSSL(nak, host));
}
-void NetworkContext::GetHSTSState(const std::string& domain,
+void NetworkContext::GetHSTSState(const net::NetworkAnonymizationKey& nak, const std::string& domain,
GetHSTSStateCallback callback) {
base::Value::Dict result;
@@ -1858,10 +1860,10 @@ void NetworkContext::GetHSTSState(const std::string& domain,
net::TransportSecurityState::STSState dynamic_sts_state;
net::TransportSecurityState::PKPState dynamic_pkp_state;
bool found_sts_dynamic = transport_security_state->GetDynamicSTSState(
- domain, &dynamic_sts_state);
+ nak, domain, &dynamic_sts_state);
bool found_pkp_dynamic = transport_security_state->GetDynamicPKPState(
- domain, &dynamic_pkp_state);
+ nak, domain, &dynamic_pkp_state);
if (found_sts_dynamic) {
result.Set("dynamic_upgrade_mode",
static_cast<int>(dynamic_sts_state.upgrade_mode));
@@ -1897,6 +1899,7 @@ void NetworkContext::GetHSTSState(const std::string& domain,
}
void NetworkContext::DeleteDynamicDataForHost(
+ const net::NetworkAnonymizationKey& nak,
const std::string& host,
DeleteDynamicDataForHostCallback callback) {
net::TransportSecurityState* transport_security_state =
@@ -1907,7 +1910,7 @@ void NetworkContext::DeleteDynamicDataForHost(
}
std::move(callback).Run(
- transport_security_state->DeleteDynamicDataForHost(host));
+ transport_security_state->DeleteDynamicDataForHost(nak, host));
}
void NetworkContext::EnableStaticKeyPinningForTesting(
@@ -1948,7 +1951,7 @@ void NetworkContext::PreconnectSockets(
DCHECK(!require_network_anonymization_key_ ||
!network_anonymization_key.IsEmpty());
- GURL url = GetHSTSRedirect(original_url);
+ GURL url = GetHSTSRedirect(network_anonymization_key, original_url);
// |PreconnectSockets| may receive arguments from the renderer, which is not
// guaranteed to validate them.
@@ -2736,12 +2739,15 @@ void NetworkContext::OnConnectionError() {
std::move(on_connection_close_callback_).Run(this);
}
-GURL NetworkContext::GetHSTSRedirect(const GURL& original_url) {
+GURL NetworkContext::GetHSTSRedirect(
+ const net::NetworkAnonymizationKey& network_anonymization_key,
+ const GURL& original_url) {
// TODO(lilyhoughton) This needs to be gotten rid of once explicit
// construction with a URLRequestContext is no longer supported.
if (!url_request_context_->transport_security_state() ||
!original_url.SchemeIs("http") ||
!url_request_context_->transport_security_state()->ShouldUpgradeToSSL(
+ network_anonymization_key,
original_url.host())) {
return original_url;
}
diff --git a/services/network/network_context.h b/services/network/network_context.h
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -418,15 +418,17 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
const std::string& ocsp_result,
const std::string& sct_list,
VerifyCertForSignedExchangeCallback callback) override;
- void AddHSTS(const std::string& host,
+ void AddHSTS(const net::NetworkAnonymizationKey& nak,
+ const std::string& host,
base::Time expiry,
bool include_subdomains,
AddHSTSCallback callback) override;
- void IsHSTSActiveForHost(const std::string& host,
+ void IsHSTSActiveForHost(const net::NetworkAnonymizationKey& nak, const std::string& host,
IsHSTSActiveForHostCallback callback) override;
- void GetHSTSState(const std::string& domain,
+ void GetHSTSState(const net::NetworkAnonymizationKey& nak, const std::string& domain,
GetHSTSStateCallback callback) override;
void DeleteDynamicDataForHost(
+ const net::NetworkAnonymizationKey& nak,
const std::string& host,
DeleteDynamicDataForHostCallback callback) override;
void SetCorsOriginAccessListsForOrigin(
@@ -679,7 +681,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
mojo::PendingRemote<mojom::CookieAccessObserver> cookie_observer,
net::FirstPartySetMetadata first_party_set_metadata);
- GURL GetHSTSRedirect(const GURL& original_url);
+ GURL GetHSTSRedirect(const net::NetworkAnonymizationKey& network_anonymization_key,
+ const GURL& original_url);
#if BUILDFLAG(IS_P2P_ENABLED)
void DestroySocketManager(P2PSocketManager* socket_manager);
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -1414,16 +1414,16 @@ interface NetworkContext {
// Adds explicitly-specified data as if it was processed from an
// HSTS header. Used by tests and implementation of chrome://net-internals.
- AddHSTS(string host, mojo_base.mojom.Time expiry,
+ AddHSTS(NetworkAnonymizationKey nak, string host, mojo_base.mojom.Time expiry,
bool include_subdomains) => ();
// Returns true if it is known that |host| has requested to always be
// accessed via HTTPS.
- IsHSTSActiveForHost(string host) => (bool result);
+ IsHSTSActiveForHost(NetworkAnonymizationKey nak, string host) => (bool result);
// Retrieve values from the HSTS state from the associated contexts
// transport security state.
- GetHSTSState(string domain)
+ GetHSTSState(NetworkAnonymizationKey nak, string domain)
=> (mojo_base.mojom.DictionaryValue state);
// Sets allowed and blocked origins respectively for the URLLoaderFactory
@@ -1442,7 +1442,7 @@ interface NetworkContext {
// Deletes any dynamic data stored for |host| from the transport
// security state. Returns true iff an entry was deleted.
// See net::TransportSecurityState::DeleteDynamicDataForHost for more detail.
- DeleteDynamicDataForHost(string host) => (bool result);
+ DeleteDynamicDataForHost(NetworkAnonymizationKey nak, string host) => (bool result);
// Sets whether the HTTP auth cache will be split the NetworkAnonymizationKey.
// Only affects server (not proxy) credentials. Whenever the effective value
--
2.25.1
@@ -0,0 +1,235 @@
From: uazo <uazo@users.noreply.github.com>
Date: Mon, 9 Jan 2023 12:02:05 +0000
Subject: Partitioning all cookies by top frame domain
Enables cookie partitioning by top frame etld, respecting the
user's possible wish to disable all third-party cookies.
Disabling the flag via the ui restores the normal mode, where
samesite=none first-party cookies are sent in third-party contexts.
---
net/base/features.cc | 8 ++++----
net/cookies/canonical_cookie.cc | 12 +-----------
net/cookies/cookie_deletion_info.cc | 3 ++-
net/cookies/parsed_cookie.h | 7 ++++++-
net/extras/sqlite/sqlite_persistent_cookie_store.cc | 10 ++++++++++
services/network/cookie_settings.cc | 12 ++++++++++--
services/network/restricted_cookie_manager.cc | 3 +++
.../renderer/modules/cookie_store/cookie_init.idl | 2 +-
.../renderer/modules/cookie_store/cookie_store.cc | 12 ++++++++++++
.../cookie_store/cookie_store_delete_options.idl | 2 +-
10 files changed, 50 insertions(+), 21 deletions(-)
diff --git a/net/base/features.cc b/net/base/features.cc
--- a/net/base/features.cc
+++ b/net/base/features.cc
@@ -247,8 +247,8 @@ BASE_FEATURE(kWaitForFirstPartySetsInit,
base::FEATURE_ENABLED_BY_DEFAULT);
BASE_FEATURE(kPartitionedCookies,
- "PartitionedCookies",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ "PartitionedCookies", // guard this
+ base::FEATURE_ENABLED_BY_DEFAULT); // guard this
BASE_FEATURE(kNoncedPartitionedCookies,
"NoncedPartitionedCookies",
@@ -263,8 +263,8 @@ BASE_FEATURE(kStaticKeyPinningEnforcement,
base::FEATURE_ENABLED_BY_DEFAULT);
BASE_FEATURE(kCookieDomainRejectNonASCII,
- "CookieDomainRejectNonASCII",
- base::FEATURE_DISABLED_BY_DEFAULT);
+ "CookieDomainRejectNonASCII", // guard this
+ base::FEATURE_ENABLED_BY_DEFAULT); // guard this
BASE_FEATURE(kBlockSetCookieHeader,
"BlockSetCookieHeader",
diff --git a/net/cookies/canonical_cookie.cc b/net/cookies/canonical_cookie.cc
--- a/net/cookies/canonical_cookie.cc
+++ b/net/cookies/canonical_cookie.cc
@@ -1575,8 +1575,6 @@ bool CanonicalCookie::IsCanonicalForFromStorage() const {
if (IsPartitioned()) {
if (CookiePartitionKey::HasNonce(partition_key_))
return true;
- if (!secure_)
- return false;
}
return true;
@@ -1850,15 +1848,7 @@ bool CanonicalCookie::IsCookiePartitionedValid(const GURL& url,
bool secure,
bool is_partitioned,
bool partition_has_nonce) {
- if (!is_partitioned)
- return true;
- if (partition_has_nonce)
- return true;
- CookieAccessScheme scheme = cookie_util::ProvisionalAccessScheme(url);
- bool result = (scheme != CookieAccessScheme::kNonCryptographic) && secure;
- DLOG_IF(WARNING, !result)
- << "CanonicalCookie has invalid Partitioned attribute";
- return result;
+ return true;
}
CookieAndLineWithAccessResult::CookieAndLineWithAccessResult() = default;
diff --git a/net/cookies/cookie_deletion_info.cc b/net/cookies/cookie_deletion_info.cc
--- a/net/cookies/cookie_deletion_info.cc
+++ b/net/cookies/cookie_deletion_info.cc
@@ -131,7 +131,8 @@ bool CookieDeletionInfo::Matches(const CanonicalCookie& cookie,
return false;
}
- if (cookie.IsPartitioned() &&
+ // opened bug https://bugs.chromium.org/p/chromium/issues/detail?id=1405772
+ if (cookie.IsPartitioned() && !cookie_partition_key_collection.IsEmpty() &&
!cookie_partition_key_collection.Contains(*cookie.PartitionKey())) {
return false;
}
diff --git a/net/cookies/parsed_cookie.h b/net/cookies/parsed_cookie.h
--- a/net/cookies/parsed_cookie.h
+++ b/net/cookies/parsed_cookie.h
@@ -11,6 +11,7 @@
#include <utility>
#include <vector>
+#include "net/base/features.h"
#include "net/base/net_export.h"
#include "net/cookies/cookie_constants.h"
@@ -83,7 +84,11 @@ class NET_EXPORT ParsedCookie {
CookieSameSiteString* samesite_string = nullptr) const;
CookiePriority Priority() const;
bool IsSameParty() const { return same_party_index_ != 0; }
- bool IsPartitioned() const { return partitioned_index_ != 0; }
+ bool IsPartitioned() const {
+ if (base::FeatureList::IsEnabled(net::features::kPartitionedCookies))
+ return true;
+ return partitioned_index_ != 0;
+ }
bool HasInternalHtab() const { return internal_htab_; }
TruncatingCharacterInCookieStringType
GetTruncatingCharacterInCookieStringType() const {
diff --git a/net/extras/sqlite/sqlite_persistent_cookie_store.cc b/net/extras/sqlite/sqlite_persistent_cookie_store.cc
--- a/net/extras/sqlite/sqlite_persistent_cookie_store.cc
+++ b/net/extras/sqlite/sqlite_persistent_cookie_store.cc
@@ -864,6 +864,16 @@ bool SQLitePersistentCookieStore::Backend::DoInitializeDatabase() {
if (!restore_old_session_cookies_)
DeleteSessionCookiesOnStartup();
+ // Since there is no automatic transition to partitioned cookies
+ // (the information would be missing), we clean the current ones
+ // present because they would otherwise be sent in third-party contexts
+ // even if the flag is active.
+ if (base::FeatureList::IsEnabled(features::kPartitionedCookies)) {
+ if (!db()->Execute("DELETE FROM cookies WHERE top_frame_site_key = ''")) {
+ LOG(WARNING) << "Unable to delete unpartitioned cookies.";
+ }
+ }
+
return true;
}
diff --git a/services/network/cookie_settings.cc b/services/network/cookie_settings.cc
--- a/services/network/cookie_settings.cc
+++ b/services/network/cookie_settings.cc
@@ -35,6 +35,11 @@ bool IsExplicitSetting(const ContentSettingPatternSource& setting) {
!setting.secondary_pattern.MatchesAllHosts();
}
+bool IsThirdPartyAllowed(const ContentSettingPatternSource& setting) {
+ return setting.primary_pattern.MatchesAllHosts() &&
+ !setting.secondary_pattern.MatchesAllHosts();
+}
+
const ContentSettingPatternSource* FindMatchingSetting(
const GURL& primary_url,
const GURL& secondary_url,
@@ -193,11 +198,14 @@ net::NetworkDelegate::PrivacySetting CookieSettings::IsPrivacyModeEnabled(
CookieSettings::ThirdPartyBlockingScope
CookieSettings::GetThirdPartyBlockingScope(const GURL& first_party_url) const {
- // If cookies are allowed for the first-party URL then we allow
+ // If cookies are allowed for the thirdy-party URL then we allow
// partitioned cross-site cookies.
+ // partitioned are the default for all cookies, so we allow all cookies
+ // if the user want so.
if (const ContentSettingPatternSource* match = FindMatchingSetting(
first_party_url, first_party_url, content_settings_);
- !match || match->GetContentSetting() == CONTENT_SETTING_ALLOW) {
+ match && IsThirdPartyAllowed(*match) &&
+ match->GetContentSetting() == CONTENT_SETTING_ALLOW) {
return ThirdPartyBlockingScope::kUnpartitionedOnly;
}
return ThirdPartyBlockingScope::kUnpartitionedAndPartitioned;
diff --git a/services/network/restricted_cookie_manager.cc b/services/network/restricted_cookie_manager.cc
--- a/services/network/restricted_cookie_manager.cc
+++ b/services/network/restricted_cookie_manager.cc
@@ -773,6 +773,9 @@ void RestrictedCookieManager::SetCookieFromString(
std::move(callback).Run(site_for_cookies_ok, top_frame_origin_ok);
callback = base::DoNothing();
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=911299
+ if (!site_for_cookies_ok || !top_frame_origin_ok) return;
+
net::CookieInclusionStatus status;
std::unique_ptr<net::CanonicalCookie> parsed_cookie =
net::CanonicalCookie::Create(url, cookie, base::Time::Now(),
diff --git a/third_party/blink/renderer/modules/cookie_store/cookie_init.idl b/third_party/blink/renderer/modules/cookie_store/cookie_init.idl
--- a/third_party/blink/renderer/modules/cookie_store/cookie_init.idl
+++ b/third_party/blink/renderer/modules/cookie_store/cookie_init.idl
@@ -17,5 +17,5 @@ dictionary CookieInit {
USVString path = "/";
DOMHighResTimeStamp? expires = null;
CookieSameSite sameSite = "strict";
- [RuntimeEnabled=PartitionedCookies] boolean partitioned = false;
+ [RuntimeEnabled=PartitionedCookies] boolean partitioned = true;
};
diff --git a/third_party/blink/renderer/modules/cookie_store/cookie_store.cc b/third_party/blink/renderer/modules/cookie_store/cookie_store.cc
--- a/third_party/blink/renderer/modules/cookie_store/cookie_store.cc
+++ b/third_party/blink/renderer/modules/cookie_store/cookie_store.cc
@@ -321,6 +321,10 @@ ScriptPromise CookieStore::set(ScriptState* script_state,
CookieInit* set_options = CookieInit::Create();
set_options->setName(name);
set_options->setValue(value);
+ if (RuntimeEnabledFeatures::PartitionedCookiesEnabled(
+ CurrentExecutionContext(script_state->GetIsolate()))) {
+ set_options->setPartitioned(true);
+ }
return set(script_state, set_options, exception_state);
}
@@ -343,6 +347,10 @@ ScriptPromise CookieStore::Delete(ScriptState* script_state,
set_options->setName(name);
set_options->setValue("deleted");
set_options->setExpires(0);
+ if (RuntimeEnabledFeatures::PartitionedCookiesEnabled(
+ CurrentExecutionContext(script_state->GetIsolate()))) {
+ set_options->setPartitioned(true);
+ }
return DoWrite(script_state, set_options, exception_state);
}
@@ -357,6 +365,10 @@ ScriptPromise CookieStore::Delete(ScriptState* script_state,
set_options->setPath(options->path());
set_options->setSameSite("strict");
set_options->setPartitioned(options->partitioned());
+ if (RuntimeEnabledFeatures::PartitionedCookiesEnabled(
+ CurrentExecutionContext(script_state->GetIsolate()))) {
+ set_options->setPartitioned(true);
+ }
return DoWrite(script_state, set_options, exception_state);
}
diff --git a/third_party/blink/renderer/modules/cookie_store/cookie_store_delete_options.idl b/third_party/blink/renderer/modules/cookie_store/cookie_store_delete_options.idl
--- a/third_party/blink/renderer/modules/cookie_store/cookie_store_delete_options.idl
+++ b/third_party/blink/renderer/modules/cookie_store/cookie_store_delete_options.idl
@@ -8,5 +8,5 @@ dictionary CookieStoreDeleteOptions {
required USVString name;
USVString? domain = null;
USVString path = "/";
- [RuntimeEnabled=PartitionedCookies] boolean partitioned = false;
+ [RuntimeEnabled=PartitionedCookies] boolean partitioned = true;
};
--
2.25.1
@@ -0,0 +1,284 @@
From: uazo <uazo@users.noreply.github.com>
Date: Sat, 15 Apr 2023 11:46:48 +0000
Subject: Remove ChromiumNetworkAdapter
Removes from java code the ability to make http connections
without asking the native code
---
.../browser/download/OMADownloadHandler.java | 38 -------------
.../browser/feedback/ConnectivityChecker.java | 37 +------------
.../ConnectivityDetector.java | 54 -------------------
.../chrome/browser/omaha/OmahaBase.java | 3 +-
.../util/HttpURLConnectionFactoryImpl.java | 7 +--
.../firstrun/VariationsSeedFetcher.java | 26 +--------
.../chromium/net/ChromiumNetworkAdapter.java | 12 -----
7 files changed, 4 insertions(+), 173 deletions(-)
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/OMADownloadHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/download/OMADownloadHandler.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/OMADownloadHandler.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/OMADownloadHandler.java
@@ -970,44 +970,6 @@ public class OMADownloadHandler extends BroadcastReceiver {
protected Boolean doInBackground() {
HttpURLConnection urlConnection = null;
boolean success = false;
- try {
- URL url = new URL(mOMAInfo.getValue(OMA_INSTALL_NOTIFY_URI));
- urlConnection = (HttpURLConnection) ChromiumNetworkAdapter.openConnection(
- url, TRAFFIC_ANNOTATION);
- urlConnection.setDoOutput(true);
- urlConnection.setUseCaches(false);
- urlConnection.setRequestMethod("POST");
- String userAgent = mDownloadInfo.getUserAgent();
- if (TextUtils.isEmpty(userAgent)) {
- userAgent = ContentUtils.getBrowserUserAgent();
- }
- urlConnection.setRequestProperty("User-Agent", userAgent);
- urlConnection.setRequestProperty("cookie", mDownloadInfo.getCookie());
-
- DataOutputStream dos = new DataOutputStream(urlConnection.getOutputStream());
- try {
- dos.writeBytes(mStatusMessage);
- dos.flush();
- } catch (IOException e) {
- Log.w(TAG, "Cannot write status message.", e);
- } finally {
- dos.close();
- }
- int responseCode = urlConnection.getResponseCode();
- if (responseCode == HttpURLConnection.HTTP_OK || responseCode == -1) {
- success = true;
- } else {
- success = false;
- }
- } catch (MalformedURLException e) {
- Log.w(TAG, "Invalid notification URL.", e);
- } catch (IOException e) {
- Log.w(TAG, "Cannot connect to server.", e);
- } catch (IllegalStateException e) {
- Log.w(TAG, "Cannot connect to server.", e);
- } finally {
- if (urlConnection != null) urlConnection.disconnect();
- }
if (success) {
String path = mDownloadInfo.getFilePath();
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/feedback/ConnectivityChecker.java b/chrome/android/java/src/org/chromium/chrome/browser/feedback/ConnectivityChecker.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/feedback/ConnectivityChecker.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/feedback/ConnectivityChecker.java
@@ -137,42 +137,7 @@ public final class ConnectivityChecker {
postResult(callback, ConnectivityCheckResult.ERROR);
return;
}
- new AsyncTask<Integer>() {
- @Override
- protected Integer doInBackground() {
- try {
- HttpURLConnection conn =
- (HttpURLConnection) ChromiumNetworkAdapter.openConnection(
- url, TRAFFIC_ANNOTATION);
- conn.setInstanceFollowRedirects(false);
- conn.setRequestMethod("GET");
- conn.setDoInput(false);
- conn.setDoOutput(false);
- conn.setConnectTimeout(timeoutMs);
- conn.setReadTimeout(timeoutMs);
-
- conn.connect();
- int responseCode = conn.getResponseCode();
- if (responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
- return ConnectivityCheckResult.CONNECTED;
- } else {
- return ConnectivityCheckResult.NOT_CONNECTED;
- }
- } catch (SocketTimeoutException e) {
- return ConnectivityCheckResult.TIMEOUT;
- } catch (ProtocolException e) {
- return ConnectivityCheckResult.ERROR;
- } catch (IOException e) {
- return ConnectivityCheckResult.NOT_CONNECTED;
- }
- }
-
- @Override
- protected void onPostExecute(Integer result) {
- callback.onResult(result);
- }
- }
- .executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
+ postResult(callback, ConnectivityCheckResult.ERROR);
}
/**
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/net/connectivitydetector/ConnectivityDetector.java b/chrome/android/java/src/org/chromium/chrome/browser/net/connectivitydetector/ConnectivityDetector.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/net/connectivitydetector/ConnectivityDetector.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/net/connectivitydetector/ConnectivityDetector.java
@@ -389,60 +389,6 @@ public class ConnectivityDetector implements NetworkChangeNotifier.ConnectionTyp
new AsyncTask<Integer>() {
@Override
protected Integer doInBackground() {
- HttpURLConnection urlConnection = null;
- try {
- RecordHistogram.recordCount1MHistogram(
- "ConnectivityDetector.SentHttpProbe." + mClientName, 1);
- Log.i(TAG, "Sending HTTP Probe now to url:" + urlString);
-
- URL url = new URL(urlString);
- urlConnection = (HttpURLConnection) ChromiumNetworkAdapter.openConnection(
- url, NetworkTrafficAnnotationTag.MISSING_TRAFFIC_ANNOTATION);
- urlConnection.setInstanceFollowRedirects(false);
- urlConnection.setRequestMethod(sProbeMethod);
- urlConnection.setConnectTimeout(timeoutMs);
- urlConnection.setReadTimeout(timeoutMs);
- urlConnection.setUseCaches(false);
- urlConnection.setRequestProperty(USER_AGENT_HEADER_NAME, mUserAgentString);
-
- long requestTimestamp = SystemClock.elapsedRealtime();
- urlConnection.connect();
- long responseTimestamp = SystemClock.elapsedRealtime();
- int responseCode = urlConnection.getResponseCode();
-
- Log.i(TAG,
- "Probe " + urlString + " time=" + (responseTimestamp - requestTimestamp)
- + "ms ret=" + responseCode
- + " headers=" + urlConnection.getHeaderFields());
-
- if (responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
- return ProbeResult.VALIDATED_WITH_NO_CONTENT;
- } else if (responseCode >= 400) {
- return ProbeResult.SERVER_ERROR;
- } else if (responseCode == HttpURLConnection.HTTP_OK) {
- // Treat 200 response with zero content length to not be a captive portal
- // because the user cannot sign in to an empty page. Probably this is due to
- // a broken transparent proxy.
- if (urlConnection.getContentLength() == 0) {
- return ProbeResult.VALIDATED_WITH_OK_BUT_ZERO_CONTENT_LENGTH;
- } else if (urlConnection.getContentLength() == -1) {
- // When no Content-length (default value == -1), attempt to read a byte
- // from the response.
- if (urlConnection.getInputStream().read() == -1) {
- return ProbeResult.VALIDATED_WITH_OK_BUT_NO_CONTENT_LENGTH;
- }
- }
- }
- } catch (IOException e) {
- Log.i(TAG, "Probe " + urlString + " failed w/ exception " + e);
- // Most likely the exception is thrown due to host name not resolved or socket
- // timeout.
- return ProbeResult.NO_INTERNET;
- } finally {
- if (urlConnection != null) {
- urlConnection.disconnect();
- }
- }
// The result returned from a well-known URL doesn't match the expected result,
// probably due to that the traffic is intercepted by the captive portal.
return ProbeResult.NOT_VALIDATED;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase.java b/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase.java
@@ -461,8 +461,7 @@ public class OmahaBase {
+ "}");
try {
URL url = new URL(getRequestGenerator().getServerUrl());
- HttpURLConnection connection =
- (HttpURLConnection) ChromiumNetworkAdapter.openConnection(url, annotation);
+ HttpURLConnection connection = null;
connection.setConnectTimeout(MS_CONNECTION_TIMEOUT);
connection.setReadTimeout(MS_CONNECTION_TIMEOUT);
return connection;
diff --git a/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/util/HttpURLConnectionFactoryImpl.java b/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/util/HttpURLConnectionFactoryImpl.java
--- a/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/util/HttpURLConnectionFactoryImpl.java
+++ b/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/util/HttpURLConnectionFactoryImpl.java
@@ -37,11 +37,6 @@ public class HttpURLConnectionFactoryImpl implements HttpURLConnectionFactory {
@Override
public HttpURLConnection createHttpURLConnection(String url) {
- try {
- return (HttpURLConnection) ChromiumNetworkAdapter.openConnection(
- new URL(url), TRAFFIC_ANNOTATION);
- } catch (IOException e) {
- return null;
- }
+ return null;
}
}
diff --git a/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedFetcher.java b/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedFetcher.java
--- a/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedFetcher.java
+++ b/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedFetcher.java
@@ -184,14 +184,6 @@ public class VariationsSeedFetcher {
sInstance = fetcher;
}
- @VisibleForTesting
- protected HttpURLConnection getServerConnection(SeedFetchParameters params)
- throws MalformedURLException, IOException {
- String urlString = getConnectionString(params);
- URL url = new URL(urlString);
- return (HttpURLConnection) ChromiumNetworkAdapter.openConnection(url, TRAFFIC_ANNOTATION);
- }
-
@VisibleForTesting
protected List<String> getAvailableInstanceManipulations() {
List<String> compressions = new ArrayList<String>();
@@ -486,24 +478,8 @@ public class VariationsSeedFetcher {
HttpURLConnection connection = null;
try {
long startTimeMillis = SystemClock.elapsedRealtime();
- connection = getServerConnection(params);
- connection.setReadTimeout(READ_TIMEOUT);
- connection.setConnectTimeout(REQUEST_TIMEOUT);
- connection.setDoInput(true);
- if (currInfo != null) {
- VariationsSeed currentVariationsSeed = currInfo.getParsedVariationsSeed();
- if (currentVariationsSeed != null) {
- String serialNumber = currentVariationsSeed.getSerialNumber();
- if (!serialNumber.isEmpty()) {
- connection.setRequestProperty("If-None-Match", serialNumber);
- }
- }
- }
List<String> requestedInstanceManipulations = getAvailableInstanceManipulations();
- connection.setRequestProperty("A-IM", String.join(",", requestedInstanceManipulations));
- connection.connect();
- int responseCode = connection.getResponseCode();
- fetchInfo.seedFetchResult = responseCode;
+ int responseCode = 400;
if (responseCode == HttpURLConnection.HTTP_OK) {
recordSeedConnectTime(SystemClock.elapsedRealtime() - startTimeMillis);
diff --git a/net/android/java/src/org/chromium/net/ChromiumNetworkAdapter.java b/net/android/java/src/org/chromium/net/ChromiumNetworkAdapter.java
--- a/net/android/java/src/org/chromium/net/ChromiumNetworkAdapter.java
+++ b/net/android/java/src/org/chromium/net/ChromiumNetworkAdapter.java
@@ -25,10 +25,6 @@ public final class ChromiumNetworkAdapter {
* what data gets sent, what triggers it, etc.
* @return a URLConnection linking to the URL.
*/
- public static URLConnection openConnection(
- URL url, NetworkTrafficAnnotationTag trafficAnnotation) throws IOException {
- return url.openConnection();
- }
/**
* Wrapper around URL#openConnection(Proxy), with an extra argument for static analysis/privacy
@@ -40,10 +36,6 @@ public final class ChromiumNetworkAdapter {
* what data gets sent, what triggers it, etc.
* @return a URLConnection linking to the URL.
*/
- public static URLConnection openConnection(URL url, Proxy proxy,
- NetworkTrafficAnnotationTag trafficAnnotation) throws IOException {
- return url.openConnection(proxy);
- }
/**
* Wrapper around URL#openStream(), with an extra argument for static analysis/privacy
@@ -54,8 +46,4 @@ public final class ChromiumNetworkAdapter {
* what data gets sent, what triggers it, etc.
* @return an InputStream linking to the URL.
*/
- public static InputStream openStream(URL url, NetworkTrafficAnnotationTag trafficAnnotation)
- throws IOException {
- return url.openStream();
- }
}
--
2.25.1
@@ -0,0 +1,37 @@
From: uazo <uazo@users.noreply.github.com>
Date: Wed, 19 Apr 2023 06:53:19 +0000
Subject: Remove auth header upon cross origin redirect
---
.../blink/renderer/platform/loader/fetch/resource_loader.cc | 3 +++
.../platform/loader/fetch/url_loader/sync_load_context.cc | 3 +++
2 files changed, 6 insertions(+)
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_loader.cc b/third_party/blink/renderer/platform/loader/fetch/resource_loader.cc
--- a/third_party/blink/renderer/platform/loader/fetch/resource_loader.cc
+++ b/third_party/blink/renderer/platform/loader/fetch/resource_loader.cc
@@ -837,6 +837,9 @@ bool ResourceLoader::WillFollowRedirect(
new_url)) {
fetcher_->GetUseCounter().CountUse(
mojom::WebFeature::kAuthorizationCrossOrigin);
+ if (removed_headers) {
+ removed_headers->push_back(net::HttpRequestHeaders::kAuthorization);
+ }
}
if (removed_headers) {
diff --git a/third_party/blink/renderer/platform/loader/fetch/url_loader/sync_load_context.cc b/third_party/blink/renderer/platform/loader/fetch/url_loader/sync_load_context.cc
--- a/third_party/blink/renderer/platform/loader/fetch/url_loader/sync_load_context.cc
+++ b/third_party/blink/renderer/platform/loader/fetch/url_loader/sync_load_context.cc
@@ -172,6 +172,9 @@ bool SyncLoadContext::OnReceivedRedirect(
if (has_authorization_header_ &&
!url::IsSameOriginWith(response_->url, redirect_info.new_url)) {
response_->has_authorization_header_between_cross_origin_redirect_ = true;
+ if (removed_headers) {
+ removed_headers->push_back(net::HttpRequestHeaders::kAuthorization);
+ }
}
if (removed_headers) {
--
2.25.1
@@ -0,0 +1,22 @@
From: uazo <uazo@users.noreply.github.com>
Date: Mon, 17 Apr 2023 12:43:19 +0000
Subject: Remove detection of captive portals
---
chrome/browser/net/profile_network_context_service.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chrome/browser/net/profile_network_context_service.cc b/chrome/browser/net/profile_network_context_service.cc
--- a/chrome/browser/net/profile_network_context_service.cc
+++ b/chrome/browser/net/profile_network_context_service.cc
@@ -389,7 +389,7 @@ void ProfileNetworkContextService::UpdateAdditionalCertificates() {
void ProfileNetworkContextService::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(
- embedder_support::kAlternateErrorPagesEnabled, true,
+ embedder_support::kAlternateErrorPagesEnabled, false,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
registry->RegisterBooleanPref(prefs::kQuicAllowed, true);
registry->RegisterBooleanPref(prefs::kGloballyScopeHTTPAuthCacheEnabled,
--
2.25.1
@@ -0,0 +1,25 @@
From: Your Name <you@example.com>
Date: Mon, 30 Jan 2023 15:20:53 +0000
Subject: Remove experimental-relative-c++-abi-vtables
---
build/config/compiler/BUILD.gn | 5 -----
1 file changed, 5 deletions(-)
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
@@ -679,11 +679,6 @@ config("compiler") {
cflags_cc += [ "-Wno-trigraphs" ]
}
- if (use_relative_vtables_abi) {
- cflags_cc += [ "-fexperimental-relative-c++-abi-vtables" ]
- ldflags += [ "-fexperimental-relative-c++-abi-vtables" ]
- }
-
# Add flags for link-time optimization. These flags enable
# optimizations/transformations that require whole-program visibility at link
# time, so they need to be applied to all translation units, and we may end up
--
2.25.1
@@ -0,0 +1,24 @@
From: uazo <uazo@users.noreply.github.com>
Date: Thu, 20 Apr 2023 15:03:56 +0000
Subject: Remove https connection from chrome://discards
---
chrome/browser/resources/discards/graph_doc_template.html | 4 ----
1 file changed, 4 deletions(-)
diff --git a/chrome/browser/resources/discards/graph_doc_template.html b/chrome/browser/resources/discards/graph_doc_template.html
--- a/chrome/browser/resources/discards/graph_doc_template.html
+++ b/chrome/browser/resources/discards/graph_doc_template.html
@@ -82,10 +82,6 @@ URL. As result, this document needs to be self-contained, hence inline scripts.
}
</style>
- <script src="https://ajax.googleapis.com/ajax/libs/d3js/5.7.0/d3.min.js"
- integrity="sha384-HL96dun1KbYEq6UT/ZlsspAODCyQ+Zp4z318ajUPBPSMzy5dvxl6ziwmnil8/Cpd"
- crossorigin="anonymous">
- </script>
<script type="application/javascript">
${javascript_file}
</script>
--
2.25.1
@@ -0,0 +1,192 @@
From: uazo <uazo@users.noreply.github.com>
Date: Tue, 27 Jun 2023 11:11:53 +0000
Subject: Remove support for device memory and cpu recovery
---
storage/browser/blob/blob_memory_controller.cc | 13 +++++++++++--
.../browser/quota/quota_device_info_helper.cc | 17 +++++++++++++++--
.../device_memory/approximated_device_memory.cc | 7 ++++++-
third_party/blink/common/features.cc | 4 ++--
.../core/frame/navigator_concurrent_hardware.cc | 8 ++++++--
.../blink/renderer/core/timing/memory_info.cc | 14 +++++++++++---
.../renderer/core/timing/window_performance.cc | 2 +-
7 files changed, 52 insertions(+), 13 deletions(-)
diff --git a/storage/browser/blob/blob_memory_controller.cc b/storage/browser/blob/blob_memory_controller.cc
--- a/storage/browser/blob/blob_memory_controller.cc
+++ b/storage/browser/blob/blob_memory_controller.cc
@@ -49,6 +49,15 @@ using MemoryAllocation = BlobMemoryController::MemoryAllocation;
using QuotaAllocationTask = BlobMemoryController::QuotaAllocationTask;
using DiskSpaceFuncPtr = BlobMemoryController::DiskSpaceFuncPtr;
+// static
+#if BUILDFLAG(IS_ANDROID)
+float approximated_device_memory_gb_ = 4.0;
+constexpr size_t approximated_device_disk_size = 8ull * 1024 * 1024 * 1024;
+#else
+float approximated_device_memory_gb_ = 8.0;
+constexpr size_t approximated_device_disk_size = 200ull * 1024 * 1024 * 1024;
+#endif
+
File::Error CreateBlobDirectory(const FilePath& blob_storage_dir) {
File::Error error = File::FILE_OK;
base::CreateDirectoryAndGetError(blob_storage_dir, &error);
@@ -78,9 +87,9 @@ BlobStorageLimits CalculateBlobStorageLimitsImpl(
int64_t disk_size = 0ull;
uint64_t memory_size = optional_memory_size_for_testing
? optional_memory_size_for_testing.value()
- : base::SysInfo::AmountOfPhysicalMemory();
+ : approximated_device_memory_gb_;
if (disk_enabled && CreateBlobDirectory(storage_dir) == base::File::FILE_OK)
- disk_size = base::SysInfo::AmountOfTotalDiskSpace(storage_dir);
+ disk_size = approximated_device_disk_size;
BlobStorageLimits limits;
diff --git a/storage/browser/quota/quota_device_info_helper.cc b/storage/browser/quota/quota_device_info_helper.cc
--- a/storage/browser/quota/quota_device_info_helper.cc
+++ b/storage/browser/quota/quota_device_info_helper.cc
@@ -8,17 +8,30 @@
namespace storage {
+namespace {
+
+// static
+#if BUILDFLAG(IS_ANDROID)
+float approximated_device_memory_gb_ = 4.0;
+constexpr size_t approximated_device_disk_size = 8ull * 1024 * 1024 * 1024;
+#else
+float approximated_device_memory_gb_ = 8.0;
+constexpr size_t approximated_device_disk_size = 200ull * 1024 * 1024 * 1024;
+#endif
+
+}
+
QuotaDeviceInfoHelper::~QuotaDeviceInfoHelper() = default;
int64_t QuotaDeviceInfoHelper::AmountOfTotalDiskSpace(
const base::FilePath& path) const {
- int64_t disk_space = base::SysInfo::AmountOfTotalDiskSpace(path);
+ int64_t disk_space = approximated_device_disk_size;
UMA_HISTOGRAM_BOOLEAN("Quota.TotalDiskSpaceIsZero", disk_space <= 0);
return disk_space;
}
uint64_t QuotaDeviceInfoHelper::AmountOfPhysicalMemory() const {
- return base::SysInfo::AmountOfPhysicalMemory();
+ return approximated_device_memory_gb_;
}
} // namespace storage
diff --git a/third_party/blink/common/device_memory/approximated_device_memory.cc b/third_party/blink/common/device_memory/approximated_device_memory.cc
--- a/third_party/blink/common/device_memory/approximated_device_memory.cc
+++ b/third_party/blink/common/device_memory/approximated_device_memory.cc
@@ -4,13 +4,18 @@
#include "third_party/blink/public/common/device_memory/approximated_device_memory.h"
+#include "build/build_config.h"
#include "base/check_op.h"
#include "base/system/sys_info.h"
namespace blink {
// static
-float ApproximatedDeviceMemory::approximated_device_memory_gb_ = 0.0;
+#if BUILDFLAG(IS_ANDROID)
+float ApproximatedDeviceMemory::approximated_device_memory_gb_ = 4.0;
+#else
+float ApproximatedDeviceMemory::approximated_device_memory_gb_ = 8.0;
+#endif
int64_t ApproximatedDeviceMemory::physical_memory_mb_ = 0;
// static
diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc
--- a/third_party/blink/common/features.cc
+++ b/third_party/blink/common/features.cc
@@ -400,8 +400,8 @@ BASE_FEATURE(kV8OptimizeWorkersForPerformance,
// Controls whether the implementation of the performance.measureMemory
// web API uses PerformanceManager or not.
BASE_FEATURE(kWebMeasureMemoryViaPerformanceManager,
- "WebMeasureMemoryViaPerformanceManager",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ "WebMeasureMemoryViaPerformanceManager", // need to be
+ base::FEATURE_DISABLED_BY_DEFAULT); // disabled by default
// Enables negotiation of experimental multiplex codec in SDP.
BASE_FEATURE(kWebRtcMultiplexCodec,
diff --git a/third_party/blink/renderer/core/frame/navigator_concurrent_hardware.cc b/third_party/blink/renderer/core/frame/navigator_concurrent_hardware.cc
--- a/third_party/blink/renderer/core/frame/navigator_concurrent_hardware.cc
+++ b/third_party/blink/renderer/core/frame/navigator_concurrent_hardware.cc
@@ -3,13 +3,17 @@
// found in the LICENSE file.
#include "third_party/blink/renderer/core/frame/navigator_concurrent_hardware.h"
-
+#include "build/build_config.h"
#include "base/system/sys_info.h"
namespace blink {
unsigned NavigatorConcurrentHardware::hardwareConcurrency() const {
- return static_cast<unsigned>(base::SysInfo::NumberOfProcessors());
+#if BUILDFLAG(IS_ANDROID)
+ return static_cast<unsigned>(2);
+#else
+ return static_cast<unsigned>(8);
+#endif
}
} // namespace blink
diff --git a/third_party/blink/renderer/core/timing/memory_info.cc b/third_party/blink/renderer/core/timing/memory_info.cc
--- a/third_party/blink/renderer/core/timing/memory_info.cc
+++ b/third_party/blink/renderer/core/timing/memory_info.cc
@@ -34,6 +34,8 @@
#include "base/time/default_tick_clock.h"
#include "base/time/time.h"
+#include "base/rand_util.h"
+#include "build/build_config.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/wtf/math_extras.h"
@@ -43,15 +45,21 @@ namespace blink {
static constexpr base::TimeDelta kTwentyMinutes = base::Minutes(20);
static constexpr base::TimeDelta kFiftyMs = base::Milliseconds(50);
+#if BUILDFLAG(IS_ANDROID)
+static constexpr size_t heap_size_limit = 528744448;
+#else
+static constexpr size_t heap_size_limit = 4294705152;
+#endif
static void GetHeapSize(HeapInfo& info) {
v8::HeapStatistics heap_statistics;
v8::Isolate::GetCurrent()->GetHeapStatistics(&heap_statistics);
+ const double scale_factor = 1.0 + base::RandInt(-300, 300) / 10000.0;
info.used_js_heap_size =
- heap_statistics.used_heap_size() + heap_statistics.external_memory();
+ (heap_statistics.used_heap_size() + heap_statistics.external_memory()) * scale_factor;
info.total_js_heap_size =
- heap_statistics.total_physical_size() + heap_statistics.external_memory();
- info.js_heap_size_limit = heap_statistics.heap_size_limit();
+ (heap_statistics.total_physical_size() + heap_statistics.external_memory()) * scale_factor;
+ info.js_heap_size_limit = heap_size_limit;
}
class HeapSizeCache {
diff --git a/third_party/blink/renderer/core/timing/window_performance.cc b/third_party/blink/renderer/core/timing/window_performance.cc
--- a/third_party/blink/renderer/core/timing/window_performance.cc
+++ b/third_party/blink/renderer/core/timing/window_performance.cc
@@ -253,7 +253,7 @@ MemoryInfo* WindowPerformance::memory(ScriptState* script_state) const {
auto* memory_info = MakeGarbageCollected<MemoryInfo>(
Platform::Current()->IsLockedToSite()
? MemoryInfo::Precision::kPrecise
- : MemoryInfo::Precision::kBucketized);
+ : MemoryInfo::Precision::kPrecise);
// Record Web Memory UKM.
const uint64_t kBytesInKB = 1024;
auto* execution_context = ExecutionContext::From(script_state);
--
2.25.1
@@ -0,0 +1,416 @@
From: uazo <uazo@users.noreply.github.com>
Date: Tue, 30 May 2023 15:13:31 +0000
Subject: Restore LastTabStandingTracker
---
chrome/browser/BUILD.gn | 10 ++++
.../host_content_settings_map_factory.cc | 2 +
.../permissions/last_tab_standing_tracker.cc | 59 +++++++++++++++++++
.../permissions/last_tab_standing_tracker.h | 40 +++++++++++++
.../last_tab_standing_tracker_factory.cc | 35 +++++++++++
.../last_tab_standing_tracker_factory.h | 40 +++++++++++++
.../last_tab_standing_tracker_observer.h | 24 ++++++++
.../last_tab_standing_tracker_tab_helper.cc | 42 +++++++++++++
.../last_tab_standing_tracker_tab_helper.h | 37 ++++++++++++
...hrome_browser_main_extra_parts_profiles.cc | 2 +
chrome/browser/ui/tab_helpers.cc | 2 +
11 files changed, 293 insertions(+)
create mode 100644 chrome/browser/permissions/last_tab_standing_tracker.cc
create mode 100644 chrome/browser/permissions/last_tab_standing_tracker.h
create mode 100644 chrome/browser/permissions/last_tab_standing_tracker_factory.cc
create mode 100644 chrome/browser/permissions/last_tab_standing_tracker_factory.h
create mode 100644 chrome/browser/permissions/last_tab_standing_tracker_observer.h
create mode 100644 chrome/browser/permissions/last_tab_standing_tracker_tab_helper.cc
create mode 100644 chrome/browser/permissions/last_tab_standing_tracker_tab_helper.h
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -1863,6 +1863,16 @@ static_library("browser") {
"webid/federated_identity_permission_context_factory.h",
]
+ sources += [
+ "permissions/last_tab_standing_tracker.cc",
+ "permissions/last_tab_standing_tracker.h",
+ "permissions/last_tab_standing_tracker_factory.cc",
+ "permissions/last_tab_standing_tracker_factory.h",
+ "permissions/last_tab_standing_tracker_observer.h",
+ "permissions/last_tab_standing_tracker_tab_helper.cc",
+ "permissions/last_tab_standing_tracker_tab_helper.h",
+ ]
+
if (is_android) {
sources += [
"importer/profile_writer.cc",
diff --git a/chrome/browser/content_settings/host_content_settings_map_factory.cc b/chrome/browser/content_settings/host_content_settings_map_factory.cc
--- a/chrome/browser/content_settings/host_content_settings_map_factory.cc
+++ b/chrome/browser/content_settings/host_content_settings_map_factory.cc
@@ -11,6 +11,7 @@
#include "build/buildflag.h"
#include "chrome/browser/content_settings/one_time_permission_provider.h"
#include "chrome/browser/permissions/one_time_permissions_tracker_factory.h"
+#include "chrome/browser/permissions/last_tab_standing_tracker_factory.h"
#include "chrome/browser/profiles/off_the_record_profile_impl.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
@@ -60,6 +61,7 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory()
// Guest mode.
.WithGuest(ProfileSelection::kOwnInstance)
.Build()) {
+ DependsOn(LastTabStandingTrackerFactory::GetInstance());
#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
DependsOn(SupervisedUserSettingsServiceFactory::GetInstance());
#endif
diff --git a/chrome/browser/permissions/last_tab_standing_tracker.cc b/chrome/browser/permissions/last_tab_standing_tracker.cc
new file mode 100644
--- /dev/null
+++ b/chrome/browser/permissions/last_tab_standing_tracker.cc
@@ -0,0 +1,59 @@
+// Copyright 2020 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/permissions/last_tab_standing_tracker.h"
+
+#include "base/observer_list.h"
+#include "url/gurl.h"
+
+LastTabStandingTracker::LastTabStandingTracker(content::BrowserContext* context)
+ : context_(context) {}
+
+LastTabStandingTracker::~LastTabStandingTracker() = default;
+
+void LastTabStandingTracker::Shutdown() {
+ for (auto& observer : observer_list_) {
+ observer.OnShutdown();
+ }
+ observer_list_.Clear();
+}
+
+void LastTabStandingTracker::AddObserver(
+ LastTabStandingTrackerObserver* observer) {
+ observer_list_.AddObserver(observer);
+}
+
+void LastTabStandingTracker::RemoveObserver(
+ LastTabStandingTrackerObserver* observer) {
+ observer_list_.RemoveObserver(observer);
+}
+
+void LastTabStandingTracker::WebContentsLoadedOrigin(
+ const url::Origin& origin) {
+ if (origin.opaque())
+ return;
+ // There are cases where chrome://newtab/ and chrome://new-tab-page/ are
+ // used synonymously causing inconsistencies in the map. So we just ignore
+ // them.
+ if (origin == url::Origin::Create(GURL("chrome://newtab/")) ||
+ origin == url::Origin::Create(GURL("chrome://new-tab-page/")))
+ return;
+ tab_counter_[origin]++;
+}
+
+void LastTabStandingTracker::WebContentsUnloadedOrigin(
+ const url::Origin& origin) {
+ if (origin.opaque())
+ return;
+ if (origin == url::Origin::Create(GURL("chrome://newtab/")) ||
+ origin == url::Origin::Create(GURL("chrome://new-tab-page/")))
+ return;
+ DCHECK(tab_counter_.find(origin) != tab_counter_.end());
+ tab_counter_[origin]--;
+ if (tab_counter_[origin] <= 0) {
+ tab_counter_.erase(origin);
+ for (auto& observer : observer_list_) {
+ observer.OnLastPageFromOriginClosed(origin);
+ }
+}
diff --git a/chrome/browser/permissions/last_tab_standing_tracker.h b/chrome/browser/permissions/last_tab_standing_tracker.h
new file mode 100644
--- /dev/null
+++ b/chrome/browser/permissions/last_tab_standing_tracker.h
@@ -0,0 +1,40 @@
+// Copyright 2020 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_PERMISSIONS_LAST_TAB_STANDING_TRACKER_H_
+#define CHROME_BROWSER_PERMISSIONS_LAST_TAB_STANDING_TRACKER_H_
+
+#include <map>
+
+#include "base/observer_list.h"
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/permissions/last_tab_standing_tracker_observer.h"
+#include "components/keyed_service/core/keyed_service.h"
+#include "url/origin.h"
+
+// This class keep tracks of all open tabs. And notifies its observers when
+// all tabs of a particular origin have been closed or navigated away from.
+class LastTabStandingTracker : public KeyedService {
+ public:
+ LastTabStandingTracker(content::BrowserContext* context);
+ ~LastTabStandingTracker() override;
+
+ LastTabStandingTracker(const LastTabStandingTracker&) = delete;
+ LastTabStandingTracker& operator=(const LastTabStandingTracker&) = delete;
+
+ void WebContentsLoadedOrigin(const url::Origin& origin);
+ void WebContentsUnloadedOrigin(const url::Origin& origin);
+ void AddObserver(LastTabStandingTrackerObserver* observer);
+ void RemoveObserver(LastTabStandingTrackerObserver* observer);
+
+ void Shutdown() override;
+
+ private:
+ base::ObserverList<LastTabStandingTrackerObserver> observer_list_;
+ raw_ptr<content::BrowserContext> context_;
+ // Tracks how many tabs of a particular origin are open at any given time.
+ std::map<url::Origin, int> tab_counter_;
+};
+
+#endif // CHROME_BROWSER_PERMISSIONS_LAST_TAB_STANDING_TRACKER_H_
diff --git a/chrome/browser/permissions/last_tab_standing_tracker_factory.cc b/chrome/browser/permissions/last_tab_standing_tracker_factory.cc
new file mode 100644
--- /dev/null
+++ b/chrome/browser/permissions/last_tab_standing_tracker_factory.cc
@@ -0,0 +1,35 @@
+// Copyright 2020 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/permissions/last_tab_standing_tracker_factory.h"
+
+#include "base/memory/singleton.h"
+#include "chrome/browser/permissions/last_tab_standing_tracker.h"
+#include "chrome/browser/profiles/profile.h"
+
+LastTabStandingTracker* LastTabStandingTrackerFactory::GetForBrowserContext(
+ content::BrowserContext* browser_context) {
+ return static_cast<LastTabStandingTracker*>(
+ GetInstance()->GetServiceForBrowserContext(browser_context, true));
+}
+
+LastTabStandingTrackerFactory* LastTabStandingTrackerFactory::GetInstance() {
+ return base::Singleton<LastTabStandingTrackerFactory>::get();
+}
+
+LastTabStandingTrackerFactory::LastTabStandingTrackerFactory()
+ : ProfileKeyedServiceFactory(
+ "LastTabStandingTrackerKeyedService",
+ ProfileSelections::BuildForRegularAndIncognito()) {}
+
+LastTabStandingTrackerFactory::~LastTabStandingTrackerFactory() = default;
+
+bool LastTabStandingTrackerFactory::ServiceIsCreatedWithBrowserContext() const {
+ return true;
+}
+
+KeyedService* LastTabStandingTrackerFactory::BuildServiceInstanceFor(
+ content::BrowserContext* context) const {
+ return new LastTabStandingTracker(context);
+}
diff --git a/chrome/browser/permissions/last_tab_standing_tracker_factory.h b/chrome/browser/permissions/last_tab_standing_tracker_factory.h
new file mode 100644
--- /dev/null
+++ b/chrome/browser/permissions/last_tab_standing_tracker_factory.h
@@ -0,0 +1,40 @@
+// Copyright 2020 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_PERMISSIONS_LAST_TAB_STANDING_TRACKER_FACTORY_H_
+#define CHROME_BROWSER_PERMISSIONS_LAST_TAB_STANDING_TRACKER_FACTORY_H_
+
+#include "chrome/browser/profiles/profile_keyed_service_factory.h"
+
+namespace base {
+template <typename T>
+struct DefaultSingletonTraits;
+}
+class LastTabStandingTracker;
+
+class LastTabStandingTrackerFactory : public ProfileKeyedServiceFactory {
+ public:
+ LastTabStandingTrackerFactory(const LastTabStandingTrackerFactory&) = delete;
+ LastTabStandingTrackerFactory& operator=(
+ const LastTabStandingTrackerFactory&) = delete;
+
+ static LastTabStandingTracker* GetForBrowserContext(
+ content::BrowserContext* context);
+ static LastTabStandingTrackerFactory* GetInstance();
+
+ protected:
+ bool ServiceIsCreatedWithBrowserContext() const override;
+
+ private:
+ friend struct base::DefaultSingletonTraits<LastTabStandingTrackerFactory>;
+
+ LastTabStandingTrackerFactory();
+ ~LastTabStandingTrackerFactory() override;
+
+ // BrowserContextKeyedServiceFactory:
+ KeyedService* BuildServiceInstanceFor(
+ content::BrowserContext* context) const override;
+};
+
+#endif // CHROME_BROWSER_PERMISSIONS_LAST_TAB_STANDING_TRACKER_FACTORY_H_
diff --git a/chrome/browser/permissions/last_tab_standing_tracker_observer.h b/chrome/browser/permissions/last_tab_standing_tracker_observer.h
new file mode 100644
--- /dev/null
+++ b/chrome/browser/permissions/last_tab_standing_tracker_observer.h
@@ -0,0 +1,24 @@
+// Copyright 2020 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_PERMISSIONS_LAST_TAB_STANDING_TRACKER_OBSERVER_H_
+#define CHROME_BROWSER_PERMISSIONS_LAST_TAB_STANDING_TRACKER_OBSERVER_H_
+
+#include "base/observer_list_types.h"
+#include "url/origin.h"
+
+class LastTabStandingTrackerObserver : public base::CheckedObserver {
+ public:
+ // Event fired when the last tab in a given Profile whose top-level document
+ // is from |origin| is closed or navigated away.
+ virtual void OnLastPageFromOriginClosed(const url::Origin&) = 0;
+
+ // Event fired to let the observers know that the BrowserContext is going to
+ // shut down.
+ // The observers don't need to take care of removing themselves as an
+ // observer.
+ virtual void OnShutdown() = 0;
+};
+
+#endif // CHROME_BROWSER_PERMISSIONS_LAST_TAB_STANDING_TRACKER_OBSERVER_H_
diff --git a/chrome/browser/permissions/last_tab_standing_tracker_tab_helper.cc b/chrome/browser/permissions/last_tab_standing_tracker_tab_helper.cc
new file mode 100644
--- /dev/null
+++ b/chrome/browser/permissions/last_tab_standing_tracker_tab_helper.cc
@@ -0,0 +1,42 @@
+// Copyright 2020 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/permissions/last_tab_standing_tracker_tab_helper.h"
+
+#include "chrome/browser/permissions/last_tab_standing_tracker.h"
+#include "chrome/browser/permissions/last_tab_standing_tracker_factory.h"
+#include "content/public/browser/navigation_handle.h"
+
+LastTabStandingTrackerTabHelper::~LastTabStandingTrackerTabHelper() = default;
+
+void LastTabStandingTrackerTabHelper::WebContentsDestroyed() {
+ if (last_committed_origin_) {
+ LastTabStandingTrackerFactory::GetForBrowserContext(
+ web_contents()->GetBrowserContext())
+ ->WebContentsUnloadedOrigin(*last_committed_origin_);
+ }
+}
+
+void LastTabStandingTrackerTabHelper::PrimaryPageChanged(content::Page& page) {
+ url::Origin new_origin = page.GetMainDocument().GetLastCommittedOrigin();
+ if (last_committed_origin_ && *last_committed_origin_ == new_origin)
+ return;
+ auto* last_tab_standing_tracker =
+ LastTabStandingTrackerFactory::GetForBrowserContext(
+ web_contents()->GetBrowserContext());
+ if (last_committed_origin_) {
+ last_tab_standing_tracker->WebContentsUnloadedOrigin(
+ *last_committed_origin_);
+ }
+ last_tab_standing_tracker->WebContentsLoadedOrigin(new_origin);
+ last_committed_origin_ = std::move(new_origin);
+}
+
+LastTabStandingTrackerTabHelper::LastTabStandingTrackerTabHelper(
+ content::WebContents* web_contents)
+ : content::WebContentsObserver(web_contents),
+ content::WebContentsUserData<LastTabStandingTrackerTabHelper>(
+ *web_contents) {}
+
+WEB_CONTENTS_USER_DATA_KEY_IMPL(LastTabStandingTrackerTabHelper);
diff --git a/chrome/browser/permissions/last_tab_standing_tracker_tab_helper.h b/chrome/browser/permissions/last_tab_standing_tracker_tab_helper.h
new file mode 100644
--- /dev/null
+++ b/chrome/browser/permissions/last_tab_standing_tracker_tab_helper.h
@@ -0,0 +1,37 @@
+// Copyright 2020 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_PERMISSIONS_LAST_TAB_STANDING_TRACKER_TAB_HELPER_H_
+#define CHROME_BROWSER_PERMISSIONS_LAST_TAB_STANDING_TRACKER_TAB_HELPER_H_
+
+#include "content/public/browser/web_contents_observer.h"
+#include "content/public/browser/web_contents_user_data.h"
+
+// This class informs LastTabStandingTracker of pages being loaded, navigated or
+// destroyed in each tab. This information is then used by the
+// OneTimeGeolocationPermissionProvider to revoke permissions.
+class LastTabStandingTrackerTabHelper
+ : public content::WebContentsObserver,
+ public content::WebContentsUserData<LastTabStandingTrackerTabHelper> {
+ public:
+ ~LastTabStandingTrackerTabHelper() override;
+
+ LastTabStandingTrackerTabHelper(const LastTabStandingTrackerTabHelper&) =
+ delete;
+ LastTabStandingTrackerTabHelper& operator=(
+ const LastTabStandingTrackerTabHelper&) = delete;
+
+ // content::WebContentObserver
+ void PrimaryPageChanged(content::Page& page) override;
+ void WebContentsDestroyed() override;
+
+ private:
+ explicit LastTabStandingTrackerTabHelper(content::WebContents* webContents);
+ friend class content::WebContentsUserData<LastTabStandingTrackerTabHelper>;
+ absl::optional<url::Origin> last_committed_origin_;
+
+ WEB_CONTENTS_USER_DATA_KEY_DECL();
+};
+
+#endif // CHROME_BROWSER_PERMISSIONS_LAST_TAB_STANDING_TRACKER_TAB_HELPER_H_
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
@@ -99,6 +99,7 @@
#include "chrome/browser/password_manager/password_reuse_manager_factory.h"
#include "chrome/browser/password_manager/password_store_factory.h"
#include "chrome/browser/permissions/adaptive_quiet_notification_permission_ui_enabler.h"
+#include "chrome/browser/permissions/last_tab_standing_tracker_factory.h"
#include "chrome/browser/permissions/notification_permission_review_service_factory.h"
#include "chrome/browser/permissions/notifications_engagement_service_factory.h"
#include "chrome/browser/permissions/one_time_permissions_tracker_factory.h"
@@ -689,6 +690,7 @@ void ChromeBrowserMainExtraPartsProfiles::
#endif
KAnonymityServiceFactory::GetInstance();
LanguageModelManagerFactory::GetInstance();
+ LastTabStandingTrackerFactory::GetInstance();
#if !BUILDFLAG(IS_ANDROID)
if (base::FeatureList::IsEnabled(permissions::features::kOneTimePermission)) {
OneTimePermissionsTrackerFactory::GetInstance();
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
@@ -54,6 +54,7 @@
#include "chrome/browser/page_info/page_info_features.h"
#include "chrome/browser/page_load_metrics/page_load_metrics_initialize.h"
#include "chrome/browser/password_manager/chrome_password_manager_client.h"
+#include "chrome/browser/permissions/last_tab_standing_tracker_tab_helper.h"
#include "chrome/browser/permissions/one_time_permissions_tracker_helper.h"
#include "chrome/browser/permissions/unused_site_permissions_service_factory.h"
#include "chrome/browser/predictors/loading_predictor_factory.h"
@@ -363,6 +364,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
HttpsOnlyModeTabHelper::CreateForWebContents(web_contents);
webapps::InstallableManager::CreateForWebContents(web_contents);
webapps::MLInstallabilityPromoter::CreateForWebContents(web_contents);
+ LastTabStandingTrackerTabHelper::CreateForWebContents(web_contents);
login_detection::LoginDetectionTabHelper::MaybeCreateForWebContents(
web_contents);
if (MediaEngagementService::IsEnabled())
--
2.25.1
@@ -0,0 +1,26 @@
From: uazo <uazo@users.noreply.github.com>
Date: Mon, 17 Jul 2023 15:26:11 +0000
Subject: Show warnings on downloads over HTTP
---
chrome/common/chrome_features.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
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
@@ -1136,9 +1136,9 @@ BASE_FEATURE(kTreatUnsafeDownloadsAsActive,
base::FEATURE_ENABLED_BY_DEFAULT);
// Show warnings on downloads not delivered over HTTPS.
-BASE_FEATURE(kInsecureDownloadWarnings,
- "InsecureDownloadWarnings",
- base::FEATURE_DISABLED_BY_DEFAULT);
+BASE_FEATURE(kInsecureDownloadWarnings, // enabled by
+ "InsecureDownloadWarnings", // default
+ base::FEATURE_ENABLED_BY_DEFAULT); // in bromite
// TrustSafetySentimentSurvey
#if !BUILDFLAG(IS_ANDROID)
--
2.25.1
@@ -0,0 +1,21 @@
From: uazo <uazo@users.noreply.github.com>
Date: Fri, 19 May 2023 12:26:37 +0000
Subject: TEMP Add a log to track strange behavior
---
net/spdy/spdy_session.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -3262,6 +3262,7 @@ void SpdySession::OnHeaders(spdy::SpdyStreamId stream_id,
if (it == active_streams_.end()) {
// NOTE: it may just be that the stream was cancelled.
LOG(WARNING) << "Received HEADERS for invalid stream " << stream_id;
+ LOG(WARNING) << "--- " << headers.DebugString();
return;
}
--
2.25.1
@@ -0,0 +1,22 @@
From: Your Name <you@example.com>
Date: Tue, 20 Dec 2022 15:09:46 +0000
Subject: Temp Disable kAutomaticLazyFrameLoadingToEmbeds
---
third_party/blink/common/features.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc
--- a/third_party/blink/common/features.cc
+++ b/third_party/blink/common/features.cc
@@ -65,7 +65,7 @@ const base::FeatureParam<int> kSkipFrameCountForLazyAds(
// Vitals.
BASE_FEATURE(kAutomaticLazyFrameLoadingToEmbeds,
"AutomaticLazyFrameLoadingToEmbeds", // must be enabled
- base::FEATURE_ENABLED_BY_DEFAULT); // in Bromite
+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite
// The timeout value that forces loading iframes that are lazy loaded by
// LazyEmbeds. After this timeout, the frame loading is triggered even when the
--
2.25.1
@@ -0,0 +1,26 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 11:36:56 +0000
Subject: WIN ADDTO AImageReader CFI crash mitigations
---
gpu/ipc/service/gpu_init.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gpu/ipc/service/gpu_init.cc b/gpu/ipc/service/gpu_init.cc
--- a/gpu/ipc/service/gpu_init.cc
+++ b/gpu/ipc/service/gpu_init.cc
@@ -614,10 +614,12 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line,
}
#endif // BUILDFLAG(IS_WIN)
+#if BUILDFLAG(IS_ANDROID)
// Disable AImageReader if the workaround is enabled.
if (gpu_feature_info_.IsWorkaroundEnabled(DISABLE_AIMAGEREADER)) {
base::android::AndroidImageReader::DisableSupport();
}
+#endif
if (gpu_feature_info_.status_values[GPU_FEATURE_TYPE_VULKAN] !=
kGpuFeatureStatusEnabled ||
--
2.25.1
@@ -0,0 +1,26 @@
From: Your Name <you@example.com>
Date: Mon, 19 Dec 2022 11:23:10 +0000
Subject: WIN ADDTO Add AllowUserCertificates flag
---
chrome/browser/about_flags.cc | 2 ++
1 file changed, 2 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
@@ -9226,10 +9226,12 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kHttpsUpgradesDescription, kOsDesktop | kOsAndroid,
FEATURE_VALUE_TYPE(features::kHttpsUpgrades)},
+#if BUILDFLAG(IS_ANDROID)
{"allow-user-certificates",
flag_descriptions::kAllowUserCertificatesName,
flag_descriptions::kAllowUserCertificatesDescription, kOsAndroid,
FEATURE_VALUE_TYPE(chrome::android::kAllowUserCertificates)},
+#endif
{"omnibox-updated-connection-security-indicators",
flag_descriptions::kOmniboxUpdatedConnectionSecurityIndicatorsName,
flag_descriptions::kOmniboxUpdatedConnectionSecurityIndicatorsDescription,
--
2.25.1
@@ -0,0 +1,39 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 10:59:27 +0000
Subject: WIN ADDTO Add a proxy configuration page
---
chrome/browser/browser_resources.grd | 6 ++----
chrome/browser/extensions/api/proxy/proxy_api_helpers.cc | 2 +-
2 files changed, 3 insertions(+), 5 deletions(-)
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
@@ -293,10 +293,8 @@
<include name="IDR_ADDITIONAL_MODULE_IDS" file="${additional_modules_list_file}" use_base_dir="false" type="BINDATA" />
</if>
<!-- Bromite Proxy Configuration UI -->
- <if expr="is_android">
- <include name="IDR_PROXY_CONFIG_HTML" file="resources\proxy_config.html" flattenhtml="true" type="BINDATA" compress="gzip" />
- <include name="IDR_PROXY_CONFIG_JS" file="resources\proxy_config.js" type="BINDATA" compress="gzip" />
- </if>
+ <include name="IDR_PROXY_CONFIG_HTML" file="resources\proxy_config.html" flattenhtml="true" type="BINDATA" compress="gzip" />
+ <include name="IDR_PROXY_CONFIG_JS" file="resources\proxy_config.js" type="BINDATA" compress="gzip" />
<if expr="not is_android">
<include name="IDR_ABOUT_SYS_HTML" file="resources\about_sys\about_sys.html" type="BINDATA" />
<include name="IDR_ABOUT_SYS_CSS" file="resources\about_sys\about_sys.css" type="BINDATA" />
diff --git a/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc b/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
--- a/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
+++ b/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
@@ -388,7 +388,7 @@ absl::optional<base::Value::Dict> CreateProxyConfigDict(
return absl::nullopt;
}
return ProxyConfigDictionary::CreateFixedServers(proxy_rules_string,
- bypass_list);
+ bypass_list, /*reverse_bypass*/false);
}
case ProxyPrefs::MODE_SYSTEM:
return ProxyConfigDictionary::CreateSystem();
--
2.25.1
@@ -0,0 +1,62 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 09:09:26 +0000
Subject: WIN ADDTO Add an always-incognito mode
---
.../browser/autocomplete/chrome_autocomplete_provider_client.cc | 2 ++
.../content_settings/host_content_settings_map_factory.cc | 2 ++
chrome/browser/history/history_tab_helper.cc | 2 ++
3 files changed, 6 insertions(+)
diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
--- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
+++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
@@ -355,9 +355,11 @@ ChromeAutocompleteProviderClient::GetOnDeviceTailModelService() const {
}
bool ChromeAutocompleteProviderClient::IsAlwaysIncognitoEnabled() const {
+#if BUILDFLAG(IS_ANDROID)
if (profile_->GetPrefs()->GetBoolean(prefs::kAlwaysIncognitoEnabled)) {
return true;
}
+#endif
return false;
}
diff --git a/chrome/browser/content_settings/host_content_settings_map_factory.cc b/chrome/browser/content_settings/host_content_settings_map_factory.cc
--- a/chrome/browser/content_settings/host_content_settings_map_factory.cc
+++ b/chrome/browser/content_settings/host_content_settings_map_factory.cc
@@ -125,6 +125,7 @@ scoped_refptr<RefcountedKeyedService>
bool always_incognito_enabled = false;
bool force_save_site_settings = false;
+#if BUILDFLAG(IS_ANDROID)
PrefService* prefService = original_profile->GetPrefs();
if (prefService->GetBoolean(prefs::kAlwaysIncognitoEnabled)) {
always_incognito_enabled = true;
@@ -134,6 +135,7 @@ scoped_refptr<RefcountedKeyedService>
profile = original_profile;
force_save_site_settings = true;
}
+#endif
scoped_refptr<HostContentSettingsMap> settings_map(new HostContentSettingsMap(
profile->GetPrefs(),
diff --git a/chrome/browser/history/history_tab_helper.cc b/chrome/browser/history/history_tab_helper.cc
--- a/chrome/browser/history/history_tab_helper.cc
+++ b/chrome/browser/history/history_tab_helper.cc
@@ -493,10 +493,12 @@ history::HistoryService* HistoryTabHelper::GetHistoryService() {
// static
void HistoryTabHelper::RegisterProfilePrefs(PrefRegistrySimple* registry) {
+#if BUILDFLAG(IS_ANDROID)
registry->RegisterBooleanPref(prefs::kIncognitoTabHistoryEnabled,
/*default_value=*/false);
registry->RegisterBooleanPref(prefs::kIncognitoSaveSiteSettingEnabled,
/*default_value=*/false);
+#endif
}
void HistoryTabHelper::WebContentsDestroyed() {
--
2.25.1
@@ -0,0 +1,96 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 11:30:34 +0000
Subject: WIN ADDTO Add bookmark import/export actions
---
chrome/browser/about_flags.cc | 2 ++
chrome/browser/bookmarks/bookmark_html_writer.cc | 7 ++++++-
.../lib/browser/headless_select_file_dialog_factory.cc | 4 ++++
ui/shell_dialogs/select_file_dialog_win.cc | 5 +++++
4 files changed, 17 insertions(+), 1 deletion(-)
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
@@ -9451,11 +9451,13 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(net::features::kIsCleartextPermitted)},
#endif
+#if BUILDFLAG(IS_ANDROID)
{"export-bookmarks-use-saf",
flag_descriptions::kBookmarksExportUseSafName,
flag_descriptions::kBookmarksExportUseSafDescription, kOsAndroid,
FEATURE_VALUE_TYPE(
chrome::android::kBookmarksExportUseSaf)},
+#endif
#if BUILDFLAG(IS_CHROMEOS_ASH)
{"video-conference", flag_descriptions::kVideoConferenceName,
diff --git a/chrome/browser/bookmarks/bookmark_html_writer.cc b/chrome/browser/bookmarks/bookmark_html_writer.cc
--- a/chrome/browser/bookmarks/bookmark_html_writer.cc
+++ b/chrome/browser/bookmarks/bookmark_html_writer.cc
@@ -27,7 +27,9 @@
#include "base/task/thread_pool.h"
#include "base/time/time.h"
#include "base/values.h"
+#if BUILDFLAG(IS_ANDROID)
#include "base/android/content_uri_utils.h"
+#endif
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/favicon/favicon_service_factory.h"
#include "chrome/browser/profiles/profile.h"
@@ -234,12 +236,15 @@ class Writer : public base::RefCountedThreadSafe<Writer> {
// Opens the file, returning true on success.
bool OpenFile() {
int flags = base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE;
+#if BUILDFLAG(IS_ANDROID)
if (path_.IsContentUri()) {
file_ = std::make_unique<base::File>(base::OpenContentUriForWrite(path_));
} else {
file_ = std::make_unique<base::File>(path_, flags);
}
-
+#else
+ file_ = std::make_unique<base::File>(path_, flags);
+#endif
if (!file_->IsValid()) {
PLOG(ERROR) << "Could not create " << path_;
return false;
diff --git a/headless/lib/browser/headless_select_file_dialog_factory.cc b/headless/lib/browser/headless_select_file_dialog_factory.cc
--- a/headless/lib/browser/headless_select_file_dialog_factory.cc
+++ b/headless/lib/browser/headless_select_file_dialog_factory.cc
@@ -57,6 +57,10 @@ class HeadlessSelectFileDialog : public ui::SelectFileDialog {
// ui::SelectFileDialog:
bool HasMultipleFileTypeChoicesImpl() override { return false; }
+ void ShowToast(const std::string& message) override {
+ // nothing to do, used only on android
+ }
+
SelectFileDialogCallback callback_;
};
diff --git a/ui/shell_dialogs/select_file_dialog_win.cc b/ui/shell_dialogs/select_file_dialog_win.cc
--- a/ui/shell_dialogs/select_file_dialog_win.cc
+++ b/ui/shell_dialogs/select_file_dialog_win.cc
@@ -193,6 +193,7 @@ class SelectFileDialogImpl : public ui::SelectFileDialog,
int index);
bool HasMultipleFileTypeChoicesImpl() override;
+ void ShowToast(const std::string& message) override;
// Returns the filter to be used while displaying the open/save file dialog.
// This is computed from the extensions for the file types being opened.
@@ -271,6 +272,10 @@ bool SelectFileDialogImpl::HasMultipleFileTypeChoicesImpl() {
return has_multiple_file_type_choices_;
}
+void SelectFileDialogImpl::ShowToast(const std::string& message) {
+ // nothing to do, used only on android
+}
+
bool SelectFileDialogImpl::IsRunning(gfx::NativeWindow owning_window) const {
if (!owning_window->GetRootWindow())
return false;
--
2.25.1
@@ -0,0 +1,25 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 12:00:43 +0000
Subject: WIN ADDTO Add flag to disable external intent re
---
chrome/browser/about_flags.cc | 2 ++
1 file changed, 2 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
@@ -3848,9 +3848,11 @@ const FeatureEntry kFeatureEntries[] = {
{"ui-disable-partial-swap", flag_descriptions::kUiPartialSwapName,
flag_descriptions::kUiPartialSwapDescription, kOsAll,
SINGLE_DISABLE_VALUE_TYPE(switches::kUIDisablePartialSwap)},
+#if BUILDFLAG(IS_ANDROID)
{"disable-external-intent-requests", flag_descriptions::kDisableExternalIntentRequestsName,
flag_descriptions::kDisableExternalIntentRequestsDescription, kOsAll,
SINGLE_DISABLE_VALUE_TYPE("disable-external-intent-requests")},
+#endif
{"disable-webrtc-hw-decoding", flag_descriptions::kWebrtcHwDecodingName,
flag_descriptions::kWebrtcHwDecodingDescription, kOsAndroid | kOsCrOS,
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding)},
--
2.25.1
@@ -0,0 +1,22 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 11:52:11 +0000
Subject: WIN ADDTO Add lifetime options for permissions
---
.../ui/views/permissions/permission_prompt_bubble_base_view.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chrome/browser/ui/views/permissions/permission_prompt_bubble_base_view.cc b/chrome/browser/ui/views/permissions/permission_prompt_bubble_base_view.cc
--- a/chrome/browser/ui/views/permissions/permission_prompt_bubble_base_view.cc
+++ b/chrome/browser/ui/views/permissions/permission_prompt_bubble_base_view.cc
@@ -336,7 +336,7 @@ void PermissionPromptBubbleBaseView::RunButtonCallbacks(
delegate_->Accept();
return;
case PermissionDialogButton::kAcceptOnce:
- delegate_->AcceptThisTime();
+ delegate_->AcceptThisTime(content_settings::LifetimeMode::Always);
return;
case PermissionDialogButton::kDeny:
delegate_->Deny();
--
2.25.1
@@ -0,0 +1,29 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 12:02:16 +0000
Subject: WIN ADDTO Disable requests for single-word Omni
---
chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc b/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc
--- a/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc
+++ b/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc
@@ -76,6 +76,7 @@ bool OnlyChangeIsFromHTTPToHTTPS(const GURL& origin, const GURL& destination) {
return origin_with_https == destination;
}
+#if BUILDFLAG(IS_ANDROID)
// Choose the appropriate URLLoaderFactory: either an explicitly specified or a
// default for the given profile.
network::mojom::URLLoaderFactory* GetURLLoaderFactory(
@@ -87,6 +88,7 @@ network::mojom::URLLoaderFactory* GetURLLoaderFactory(
->GetURLLoaderFactoryForBrowserProcess()
.get();
}
+#endif
// Helper to keep ChromeOmniboxNavigationObserver alive while the initiated
// navigation is pending.
--
2.25.1
@@ -0,0 +1,45 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 11:53:36 +0000
Subject: WIN ADDTO Disable various metrics
---
chrome/browser/ui/search/ntp_user_data_logger.cc | 4 ----
components/ntp_tiles/custom_links_manager_impl.cc | 1 -
2 files changed, 5 deletions(-)
diff --git a/chrome/browser/ui/search/ntp_user_data_logger.cc b/chrome/browser/ui/search/ntp_user_data_logger.cc
--- a/chrome/browser/ui/search/ntp_user_data_logger.cc
+++ b/chrome/browser/ui/search/ntp_user_data_logger.cc
@@ -394,8 +394,6 @@ void NTPUserDataLogger::LogMostVisitedImpression(
void NTPUserDataLogger::LogMostVisitedNavigation(
const ntp_tiles::NTPTileImpression& impression) {
- ntp_tiles::metrics::RecordTileClick(impression);
-
// Records the action. This will be available as a time-stamped stream
// server-side and can be used to compute time-to-long-dwell.
base::RecordAction(base::UserMetricsAction("MostVisited_Clicked"));
@@ -424,10 +422,8 @@ void NTPUserDataLogger::EmitNtpStatistics(base::TimeDelta load_time,
if (!impression.has_value()) {
break;
}
- ntp_tiles::metrics::RecordTileImpression(*impression);
++tiles_count;
}
- ntp_tiles::metrics::RecordPageImpression(tiles_count);
DVLOG(1) << "Emitting NTP load time: " << load_time << ", "
<< "number of tiles: " << tiles_count;
diff --git a/components/ntp_tiles/custom_links_manager_impl.cc b/components/ntp_tiles/custom_links_manager_impl.cc
--- a/components/ntp_tiles/custom_links_manager_impl.cc
+++ b/components/ntp_tiles/custom_links_manager_impl.cc
@@ -203,7 +203,6 @@ void CustomLinksManagerImpl::RemoveCustomLinksForPreinstalledApps() {
}
}
if (default_app_links_deleted) {
- metrics::RecordsMigratedDefaultAppDeleted(DeletedTileType::kCustomLink);
prefs_->SetBoolean(prefs::kCustomLinksForPreinstalledAppsRemoved, true);
}
}
--
2.25.1
@@ -0,0 +1,23 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 11:58:29 +0000
Subject: WIN ADDTO Do not build API keys infobar
---
chrome/browser/ui/startup/infobar_utils.cc | 3 ---
1 file changed, 3 deletions(-)
diff --git a/chrome/browser/ui/startup/infobar_utils.cc b/chrome/browser/ui/startup/infobar_utils.cc
--- a/chrome/browser/ui/startup/infobar_utils.cc
+++ b/chrome/browser/ui/startup/infobar_utils.cc
@@ -133,9 +133,6 @@ void AddInfoBarsIfNecessary(Browser* browser,
infobars::ContentInfoBarManager* infobar_manager =
infobars::ContentInfoBarManager::FromWebContents(web_contents);
- if (!google_apis::HasAPIKeyConfigured())
- GoogleApiKeysInfoBarDelegate::Create(infobar_manager);
-
if (ObsoleteSystem::IsObsoleteNowOrSoon()) {
PrefService* local_state = g_browser_process->local_state();
if (!local_state ||
--
2.25.1
@@ -0,0 +1,337 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 09:19:46 +0000
Subject: WIN ADDTO Experimental user scripts support
---
chrome/browser/BUILD.gn | 12 +++++++-----
chrome/browser/about_flags.cc | 2 ++
chrome/browser/prefs/browser_prefs.cc | 2 ++
chrome/browser/profiles/BUILD.gn | 4 +++-
...chrome_browser_main_extra_parts_profiles.cc | 4 ++++
chrome/browser/profiles/profile_manager.cc | 4 ++++
chrome/browser/profiles/renderer_updater.cc | 11 ++++++++++-
chrome/browser/profiles/renderer_updater.h | 2 ++
.../webui/chrome_web_ui_controller_factory.cc | 2 ++
chrome/renderer/BUILD.gn | 7 ++++++-
.../renderer/chrome_content_renderer_client.cc | 18 ++++++++++++++++++
.../renderer/chrome_render_thread_observer.cc | 2 ++
12 files changed, 62 insertions(+), 8 deletions(-)
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -3528,11 +3528,13 @@ static_library("browser") {
]
deps += [ "//chrome/android/modules/dev_ui/provider:native" ]
}
- deps += [
- "//components/user_scripts/common",
- "//components/user_scripts/browser",
- "//components/user_scripts/android",
- ]
+ if (is_android) {
+ deps += [
+ "//components/user_scripts/common",
+ "//components/user_scripts/browser",
+ "//components/user_scripts/android",
+ ]
+ }
} else {
#!is_android
sources += [
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
@@ -8124,9 +8124,11 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(ash::features::kClipboardHistoryReorder)},
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
+#if BUILDFLAG(IS_ANDROID)
{"enable-userscripts-log", flag_descriptions::kEnableLoggingUserScriptsName,
flag_descriptions::kEnableLoggingUserScriptsDescription, kOsDesktop | kOsAndroid,
FEATURE_VALUE_TYPE(user_scripts::features::kEnableLoggingUserScripts)},
+#endif
#if BUILDFLAG(IS_WIN)
{"enable-media-foundation-video-capture",
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -1533,7 +1533,9 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
translate::TranslatePrefs::RegisterProfilePrefs(registry);
omnibox::RegisterProfilePrefs(registry);
ZeroSuggestProvider::RegisterProfilePrefs(registry);
+#if BUILDFLAG(IS_ANDROID)
user_scripts::UserScriptsPrefs::RegisterProfilePrefs(registry);
+#endif
#if BUILDFLAG(ENABLE_SESSION_SERVICE)
RegisterSessionServiceLogProfilePrefs(registry);
diff --git a/chrome/browser/profiles/BUILD.gn b/chrome/browser/profiles/BUILD.gn
--- a/chrome/browser/profiles/BUILD.gn
+++ b/chrome/browser/profiles/BUILD.gn
@@ -57,10 +57,12 @@ source_set("profile") {
"//components/profile_metrics",
"//components/sync/service",
"//components/variations",
- "//components/user_scripts/browser",
"//content/public/browser",
"//extensions/buildflags",
]
+ if (is_android) {
+ deps += [ "//components/user_scripts/browser" ]
+ }
if (enable_extensions) {
deps += [ "//extensions/browser" ]
}
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
@@ -450,7 +450,9 @@
#include "chrome/browser/net/nss_service_factory.h"
#endif
+#if BUILDFLAG(IS_ANDROID)
#include "components/user_scripts/browser/userscripts_browser_client.h"
+#endif
namespace chrome {
@@ -1040,7 +1042,9 @@ void ChromeBrowserMainExtraPartsProfiles::
#endif
WebDataServiceFactory::GetInstance();
webrtc_event_logging::WebRtcEventLogManagerKeyedServiceFactory::GetInstance();
+#if BUILDFLAG(IS_ANDROID)
user_scripts::UserScriptsBrowserClient::GetInstance();
+#endif
}
void ChromeBrowserMainExtraPartsProfiles::PreProfileInit() {
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -106,7 +106,9 @@
#include "extensions/common/manifest.h"
#endif
+#if BUILDFLAG(IS_ANDROID)
#include "components/user_scripts/browser/userscripts_browser_client.h"
+#endif
#if BUILDFLAG(ENABLE_SESSION_SERVICE)
#include "chrome/browser/sessions/app_session_service_factory.h"
@@ -1491,11 +1493,13 @@ void ProfileManager::DoFinalInitForServices(Profile* profile,
#endif
+#if BUILDFLAG(IS_ANDROID)
user_scripts::UserScriptsBrowserClient* userscript_client =
user_scripts::UserScriptsBrowserClient::GetInstance();
if (userscript_client) {
userscript_client->SetProfile(profile);
}
+#endif
#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
// Initialization needs to happen after extension system initialization (for
diff --git a/chrome/browser/profiles/renderer_updater.cc b/chrome/browser/profiles/renderer_updater.cc
--- a/chrome/browser/profiles/renderer_updater.cc
+++ b/chrome/browser/profiles/renderer_updater.cc
@@ -78,7 +78,9 @@ RendererUpdater::RendererUpdater(Profile* profile)
force_youtube_restrict_.Init(policy::policy_prefs::kForceYouTubeRestrict,
pref_service);
allowed_domains_for_apps_.Init(prefs::kAllowedDomainsForApps, pref_service);
+#if BUILDFLAG(IS_ANDROID)
activate_userscripts_.Init(user_scripts::prefs::kUserScriptsEnabled, pref_service);
+#endif
pref_change_registrar_.Init(pref_service);
pref_change_registrar_.Add(
@@ -93,10 +95,12 @@ RendererUpdater::RendererUpdater(Profile* profile)
prefs::kAllowedDomainsForApps,
base::BindRepeating(&RendererUpdater::UpdateAllRenderers,
base::Unretained(this)));
+#if BUILDFLAG(IS_ANDROID)
pref_change_registrar_.Add(
user_scripts::prefs::kUserScriptsEnabled,
base::BindRepeating(&RendererUpdater::UpdateAllRenderers,
base::Unretained(this)));
+#endif
}
RendererUpdater::~RendererUpdater() {
@@ -250,5 +254,10 @@ chrome::mojom::DynamicParamsPtr RendererUpdater::CreateRendererDynamicParams()
#endif
force_google_safesearch_.GetValue(), force_youtube_restrict_.GetValue(),
allowed_domains_for_apps_.GetValue(),
- activate_userscripts_.GetValue());
+#if BUILDFLAG(IS_ANDROID)
+ activate_userscripts_.GetValue()
+#else
+ false
+#endif
+ );
}
diff --git a/chrome/browser/profiles/renderer_updater.h b/chrome/browser/profiles/renderer_updater.h
--- a/chrome/browser/profiles/renderer_updater.h
+++ b/chrome/browser/profiles/renderer_updater.h
@@ -108,7 +108,9 @@ class RendererUpdater : public KeyedService,
// Prefs that we sync to the renderers.
BooleanPrefMember force_google_safesearch_;
+#if BUILDFLAG(IS_ANDROID)
BooleanPrefMember activate_userscripts_;
+#endif
IntegerPrefMember force_youtube_restrict_;
StringPrefMember allowed_domains_for_apps_;
};
diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
--- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
+++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
@@ -519,8 +519,10 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
return &NewWebUI<UserActionsUI>;
if (url.host_piece() == chrome::kChromeUIVersionHost)
return &NewWebUI<VersionUI>;
+#if BUILDFLAG(IS_ANDROID)
if (url.host_piece() == user_scripts::kChromeUIUserScriptsHost)
return &NewWebUI<user_scripts::UserScriptsUI>;
+#endif
#if !BUILDFLAG(IS_ANDROID)
#if !BUILDFLAG(IS_CHROMEOS)
diff --git a/chrome/renderer/BUILD.gn b/chrome/renderer/BUILD.gn
--- a/chrome/renderer/BUILD.gn
+++ b/chrome/renderer/BUILD.gn
@@ -153,7 +153,6 @@ static_library("renderer") {
"//components/content_capture/common",
"//components/content_capture/renderer",
"//components/content_settings/common:mojom",
- "//components/user_scripts/renderer",
"//components/content_settings/renderer",
"//components/continuous_search/renderer",
"//components/dom_distiller/content/renderer",
@@ -231,6 +230,12 @@ static_library("renderer") {
"//v8",
]
+ if (is_android) {
+ deps += [
+ "//components/user_scripts/renderer",
+ ]
+ }
+
data_deps = [ "//tools/v8_context_snapshot" ]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
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
@@ -252,8 +252,10 @@
#include "chrome/renderer/media/chrome_key_systems.h"
#endif
+#if BUILDFLAG(IS_ANDROID)
#include "components/user_scripts/common/user_scripts_features.h"
#include "components/user_scripts/renderer/user_scripts_renderer_client.h"
+#endif
using autofill::AutofillAgent;
using autofill::PasswordAutofillAgent;
@@ -431,11 +433,13 @@ void ChromeContentRendererClient::RenderThreadStarted() {
WebString::FromASCII(extensions::kExtensionScheme));
#endif
+#if BUILDFLAG(IS_ANDROID)
user_scripts::UserScriptsRendererClient* userscript_client =
user_scripts::UserScriptsRendererClient::GetInstance();
if (userscript_client) {
userscript_client->RenderThreadStarted(GetChromeObserver());
}
+#endif
#if BUILDFLAG(ENABLE_SPELLCHECK)
if (!spellcheck_)
@@ -605,12 +609,14 @@ void ChromeContentRendererClient::RenderFrameCreated(
render_frame, registry);
#endif
+#if BUILDFLAG(IS_ANDROID)
user_scripts::UserScriptsRendererClient* userscript_client =
user_scripts::UserScriptsRendererClient::GetInstance();
if (userscript_client) {
userscript_client->RenderFrameCreated(
render_frame, registry);
}
+#endif
#if BUILDFLAG(ENABLE_PPAPI)
new PepperHelper(render_frame);
@@ -1610,6 +1616,9 @@ void ChromeContentRendererClient::RunScriptsAtDocumentStart(
ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentStart(
render_frame);
// |render_frame| might be dead by now.
+#endif
+#if BUILDFLAG(IS_ANDROID)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
static_assert(false, "Compiler error: extensions cannot be enabled with user scripts");
#endif
user_scripts::UserScriptsRendererClient* userscript_client =
@@ -1618,6 +1627,7 @@ void ChromeContentRendererClient::RunScriptsAtDocumentStart(
userscript_client->RunScriptsAtDocumentStart(
render_frame);
}
+#endif
}
void ChromeContentRendererClient::RunScriptsAtDocumentEnd(
@@ -1626,6 +1636,9 @@ void ChromeContentRendererClient::RunScriptsAtDocumentEnd(
ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentEnd(
render_frame);
// |render_frame| might be dead by now.
+#endif
+#if BUILDFLAG(IS_ANDROID)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
static_assert(false, "Compiler error: extensions cannot be enabled with user scripts");
#endif
user_scripts::UserScriptsRendererClient* userscript_client =
@@ -1634,6 +1647,7 @@ void ChromeContentRendererClient::RunScriptsAtDocumentEnd(
userscript_client->RunScriptsAtDocumentEnd(
render_frame);
}
+#endif
}
void ChromeContentRendererClient::RunScriptsAtDocumentIdle(
@@ -1642,6 +1656,9 @@ void ChromeContentRendererClient::RunScriptsAtDocumentIdle(
ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentIdle(
render_frame);
// |render_frame| might be dead by now.
+#endif
+#if BUILDFLAG(IS_ANDROID)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
static_assert(false, "Compiler error: extensions cannot be enabled with user scripts");
#endif
user_scripts::UserScriptsRendererClient* userscript_client =
@@ -1650,6 +1667,7 @@ void ChromeContentRendererClient::RunScriptsAtDocumentIdle(
userscript_client->RunScriptsAtDocumentIdle(
render_frame);
}
+#endif
}
void ChromeContentRendererClient::
diff --git a/chrome/renderer/chrome_render_thread_observer.cc b/chrome/renderer/chrome_render_thread_observer.cc
--- a/chrome/renderer/chrome_render_thread_observer.cc
+++ b/chrome/renderer/chrome_render_thread_observer.cc
@@ -219,7 +219,9 @@ void ChromeRenderThreadObserver::SetConfiguration(
chrome::mojom::DynamicParamsPtr params) {
base::AutoLock lock(dynamic_params_lock_);
dynamic_params_ = std::move(params);
+#if BUILDFLAG(IS_ANDROID)
user_scripts::UserScriptsRendererClient::GetInstance()->ConfigurationUpdated();
+#endif
}
void ChromeRenderThreadObserver::OnRendererConfigurationAssociatedRequest(
--
2.25.1
@@ -0,0 +1,81 @@
From: Your Name <you@example.com>
Date: Thu, 13 Oct 2022 11:27:08 +0000
Subject: WIN ADDTO Logcat crash reports UI
---
chrome/browser/ui/webui/crashes_ui.cc | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/chrome/browser/ui/webui/crashes_ui.cc b/chrome/browser/ui/webui/crashes_ui.cc
--- a/chrome/browser/ui/webui/crashes_ui.cc
+++ b/chrome/browser/ui/webui/crashes_ui.cc
@@ -44,7 +44,9 @@
#include "base/files/scoped_temp_dir.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
+#if BUILDFLAG(IS_ANDROID)
#include "base/android/path_utils.h"
+#endif
#include "net/base/filename_util.h"
#include "third_party/zlib/google/zip.h"
@@ -146,6 +148,9 @@ CrashesDOMHandler::CrashesDOMHandler(content::WebContents* web_contents)
: list_available_(false), first_load_(true),
web_contents_(web_contents) {
upload_list_ = CreateCrashUploadList();
+#if !BUILDFLAG(IS_ANDROID)
+ web_contents_ = nullptr;
+#endif
}
CrashesDOMHandler::~CrashesDOMHandler() {
@@ -276,6 +281,7 @@ void CrashesDOMHandler::HandleRequestSingleCrashUpload(
}
std::string CrashesDOMHandler::RequestSingleUpload(const std::string& local_id) const {
+#if BUILDFLAG(IS_ANDROID)
// get crash file path
std::string info_file_path = upload_list_->GetFilePathByLocalId(local_id);
if (info_file_path.empty()) {
@@ -323,13 +329,14 @@ std::string CrashesDOMHandler::RequestSingleUpload(const std::string& local_id)
if (result) {
return zip_file_name.value();
}
-
+#endif
LOG(ERROR) << "Crash report: cannot create zip content";
return std::string();
}
void CrashesDOMHandler::RequestSingleUploadCallback(const std::string& local_id,
const std::string& file_name) {
+#if BUILDFLAG(IS_ANDROID)
if (!file_name.empty()) {
upload_list_->RequestSingleUploadAsync(local_id);
@@ -337,6 +344,7 @@ void CrashesDOMHandler::RequestSingleUploadCallback(const std::string& local_id,
web_contents_->GetController().LoadURL(
net::FilePathToFileURL(file_path), {}, {}, {});
}
+#endif
}
void CrashesDOMHandler::HandleRequestNewExtraction(
@@ -361,6 +369,7 @@ void CrashesDOMHandler::HandleRequestClearAll(
}
void CrashesDOMHandler::ClearAll() {
+#if BUILDFLAG(IS_ANDROID)
// get android crash report dir
base::FilePath cache_dir;
base::android::GetCacheDirectory(&cache_dir);
@@ -374,6 +383,7 @@ void CrashesDOMHandler::ClearAll() {
// remove all files, don't care for result
base::DeleteFile(full_name);
}
+#endif
}
} // namespace
--
2.25.1
@@ -0,0 +1,49 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 11:41:35 +0000
Subject: WIN ADDTO Remove binary blob integrations
---
components/gcm_driver/gcm_client_impl.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/components/gcm_driver/gcm_client_impl.cc b/components/gcm_driver/gcm_client_impl.cc
--- a/components/gcm_driver/gcm_client_impl.cc
+++ b/components/gcm_driver/gcm_client_impl.cc
@@ -450,7 +450,7 @@ void GCMClientImpl::StartGCM() {
void GCMClientImpl::InitializeMCSClient() {
DCHECK(network_connection_tracker_);
- return;
+ if ((true)) return;
std::vector<GURL> endpoints;
endpoints.push_back(gservices_settings_.GetMCSMainEndpoint());
GURL fallback_endpoint = gservices_settings_.GetMCSFallbackEndpoint();
@@ -644,7 +644,7 @@ void GCMClientImpl::AddHeartbeatInterval(const std::string& scope,
int interval_ms) {
DCHECK(io_task_runner_->RunsTasksInCurrentSequence());
DCHECK(mcs_client_);
- return;
+ if ((true)) return;
mcs_client_->AddHeartbeatInterval(scope, interval_ms);
}
@@ -656,7 +656,7 @@ void GCMClientImpl::RemoveHeartbeatInterval(const std::string& scope) {
void GCMClientImpl::StartCheckin() {
DCHECK(io_task_runner_->RunsTasksInCurrentSequence());
- return;
+ if ((true)) return;
// Make sure no checkin is in progress.
if (checkin_request_)
@@ -739,7 +739,7 @@ void GCMClientImpl::SetGServicesSettingsCallback(bool success) {
void GCMClientImpl::SchedulePeriodicCheckin() {
DCHECK(io_task_runner_->RunsTasksInCurrentSequence());
- return;
+ if ((true)) return;
// Make sure no checkin is in progress.
if (checkin_request_.get() || !device_checkin_info_.accounts_set)
--
2.25.1
@@ -0,0 +1,25 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 12:01:37 +0000
Subject: WIN ADDTO Restore Search Ready Omnibox flag
---
chrome/browser/about_flags.cc | 2 ++
1 file changed, 2 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
@@ -9423,9 +9423,11 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kDesksTemplatesDescription, kOsCrOS,
FEATURE_VALUE_TYPE(ash::features::kDesksTemplates)},
#endif
+#if BUILDFLAG(IS_ANDROID)
{"enable-search-ready-omnibox", flag_descriptions::kSearchReadyOmniboxName,
flag_descriptions::kSearchReadyOmniboxDescription, kOsAndroid,
FEATURE_VALUE_TYPE(chrome::android::kSearchReadyOmniboxFeature)},
+#endif
{"large-favicon-from-google",
flag_descriptions::kLargeFaviconFromGoogleName,
--
2.25.1
@@ -0,0 +1,29 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 11:59:30 +0000
Subject: WIN ADDTO Revert flags: remove num-raster-thre
---
chrome/browser/about_flags.cc | 2 ++
1 file changed, 2 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
@@ -383,6 +383,7 @@ const FeatureEntry::Choice kOverlayStrategiesChoices[] = {
"single-fullscreen,single-on-top,underlay"},
};
+#if BUILDFLAG(IS_ANDROID)
const FeatureEntry::Choice kNumRasterThreadsChoices[] = {
{flags_ui::kGenericExperimentChoiceDefault, "", ""},
{flag_descriptions::kNumRasterThreadsOne, cc::switches::kNumRasterThreads, "1"},
@@ -391,6 +392,7 @@ const FeatureEntry::Choice kNumRasterThreadsChoices[] = {
"3"},
{flag_descriptions::kNumRasterThreadsFour, cc::switches::kNumRasterThreads,
"4"}};
+#endif
const FeatureEntry::Choice kTouchTextSelectionStrategyChoices[] = {
{flags_ui::kGenericExperimentChoiceDefault, "", ""},
--
2.25.1
@@ -0,0 +1,26 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 11:31:11 +0000
Subject: WIN ADDTO openH264: enable ARM/ARM64 optimizati
---
.../blink/renderer/modules/mediarecorder/h264_encoder.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/third_party/blink/renderer/modules/mediarecorder/h264_encoder.cc b/third_party/blink/renderer/modules/mediarecorder/h264_encoder.cc
--- a/third_party/blink/renderer/modules/mediarecorder/h264_encoder.cc
+++ b/third_party/blink/renderer/modules/mediarecorder/h264_encoder.cc
@@ -213,9 +213,9 @@ bool H264Encoder::ConfigureEncoder(const gfx::Size& size) {
init_params.iRCMode = RC_OFF_MODE;
}
-#if BUILDFLAG(OS_MACOSX)
- // Threading model: Set to 1 due to https://crbug.com/583348.
- init_params.iMultipleThreadIdc = 1;
+#if BUILDFLAG(IS_MAC)
+ // Threading model: Set to 1 due to https://crbug.com/583348.
+ init_params.iMultipleThreadIdc = 1;
#else
init_params.iMultipleThreadIdc = 0;
#endif
--
2.25.1
@@ -0,0 +1,22 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 10:04:39 +0000
Subject: WIN ADDTO ungoogled-chr: Disable profile avatar
---
chrome/browser/profiles/profile_attributes_storage.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chrome/browser/profiles/profile_attributes_storage.cc b/chrome/browser/profiles/profile_attributes_storage.cc
--- a/chrome/browser/profiles/profile_attributes_storage.cc
+++ b/chrome/browser/profiles/profile_attributes_storage.cc
@@ -845,7 +845,7 @@ void ProfileAttributesStorage::DownloadHighResAvatarIfNeeded(
void ProfileAttributesStorage::DownloadHighResAvatar(
size_t icon_index,
const base::FilePath& profile_path) {
-#if !BUILDFLAG(IS_ANDROID)
+#if false
const char* file_name =
profiles::GetDefaultAvatarIconFileNameAtIndex(icon_index);
DCHECK(file_name);
--
2.25.1
@@ -0,0 +1,28 @@
From: uazo <uazo@users.noreply.github.com>
Date: Mon, 15 May 2023 13:35:24 +0000
Subject: WIN Add some prefs to secure preferences
---
chrome/browser/prefs/chrome_pref_service_factory.cc | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/chrome/browser/prefs/chrome_pref_service_factory.cc b/chrome/browser/prefs/chrome_pref_service_factory.cc
--- a/chrome/browser/prefs/chrome_pref_service_factory.cc
+++ b/chrome/browser/prefs/chrome_pref_service_factory.cc
@@ -117,6 +117,14 @@ bool g_disable_domain_check_for_testing = false;
// See CleanupDeprecatedTrackedPreferences() in pref_hash_filter.cc to remove a
// deprecated tracked preference.
const prefs::TrackedPreferenceMetadata kTrackedPrefs[] = {
+#if BUILDFLAG(IS_WIN)
+ {200, prefs::kFileOrDirectoryPickerWithoutGestureAllowedForOrigins, EnforcementLevel::ENFORCE_ON_LOAD,
+ PrefTrackingStrategy::ATOMIC, ValueType::IMPERSONAL},
+ {201, prefs::kAutoplayAllowlist, EnforcementLevel::ENFORCE_ON_LOAD,
+ PrefTrackingStrategy::ATOMIC, ValueType::IMPERSONAL},
+ {202, prefs::kScreenCaptureWithoutGestureAllowedForOrigins, EnforcementLevel::ENFORCE_ON_LOAD,
+ PrefTrackingStrategy::ATOMIC, ValueType::IMPERSONAL},
+#endif
{0, prefs::kShowHomeButton, EnforcementLevel::ENFORCE_ON_LOAD,
PrefTrackingStrategy::ATOMIC, ValueType::IMPERSONAL},
{1, prefs::kHomePageIsNewTabPage, EnforcementLevel::ENFORCE_ON_LOAD,
--
2.25.1
@@ -0,0 +1,25 @@
From: uazo <uazo@users.noreply.github.com>
Date: Tue, 14 Mar 2023 15:58:00 +0000
Subject: WIN Disable TabHoverCard images
---
chrome/browser/ui/ui_features.cc | 4 ----
1 file changed, 4 deletions(-)
diff --git a/chrome/browser/ui/ui_features.cc b/chrome/browser/ui/ui_features.cc
--- a/chrome/browser/ui/ui_features.cc
+++ b/chrome/browser/ui/ui_features.cc
@@ -212,11 +212,7 @@ BASE_FEATURE(kTabGroupsSaveSyncIntegration,
// https://crbug.com/928954
BASE_FEATURE(kTabHoverCardImages,
"TabHoverCardImages",
-#if BUILDFLAG(IS_MAC)
base::FEATURE_DISABLED_BY_DEFAULT
-#else
- base::FEATURE_ENABLED_BY_DEFAULT
-#endif
);
const char kTabHoverCardImagesNotReadyDelayParameterName[] =
--
2.25.1
@@ -0,0 +1,22 @@
From: uazo <uazo@users.noreply.github.com>
Date: Sun, 7 May 2023 14:18:46 +0000
Subject: WIN Disable first run
---
chrome/browser/ui/startup/first_run_service.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chrome/browser/ui/startup/first_run_service.cc b/chrome/browser/ui/startup/first_run_service.cc
--- a/chrome/browser/ui/startup/first_run_service.cc
+++ b/chrome/browser/ui/startup/first_run_service.cc
@@ -177,7 +177,7 @@ bool IsFirstRunMarkedFinishedInPrefs() {
// static
void FirstRunService::RegisterLocalStatePrefs(PrefRegistrySimple* registry) {
- registry->RegisterBooleanPref(prefs::kFirstRunFinished, false);
+ registry->RegisterBooleanPref(prefs::kFirstRunFinished, true);
registry->RegisterStringPref(prefs::kFirstRunStudyGroup, "");
}
--
2.25.1
@@ -0,0 +1,22 @@
From: uazo <uazo@users.noreply.github.com>
Date: Sat, 3 Jun 2023 15:39:31 +0000
Subject: WIN Disable search for image
---
components/renderer_context_menu/context_menu_content_type.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/renderer_context_menu/context_menu_content_type.cc b/components/renderer_context_menu/context_menu_content_type.cc
--- a/components/renderer_context_menu/context_menu_content_type.cc
+++ b/components/renderer_context_menu/context_menu_content_type.cc
@@ -99,7 +99,7 @@ bool ContextMenuContentType::SupportsGroupInternal(int group) {
case ITEM_GROUP_SEARCHWEBFORIMAGE:
// Image menu items imply search web for image item.
- return SupportsGroupInternal(ITEM_GROUP_MEDIA_IMAGE);
+ return false;
case ITEM_GROUP_MEDIA_VIDEO:
return params_.media_type == ContextMenuDataMediaType::kVideo;
--
2.25.1
@@ -0,0 +1,59 @@
From: Your Name <you@example.com>
Date: Fri, 17 Feb 2023 16:22:00 +0000
Subject: WIN Disable sharing hub
---
chrome/browser/sharing_hub/sharing_hub_features.cc | 2 +-
chrome/browser/ui/browser_command_controller.cc | 8 ++++----
.../qrcode_generator_bubble_controller.cc | 5 +----
3 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/chrome/browser/sharing_hub/sharing_hub_features.cc b/chrome/browser/sharing_hub/sharing_hub_features.cc
--- a/chrome/browser/sharing_hub/sharing_hub_features.cc
+++ b/chrome/browser/sharing_hub/sharing_hub_features.cc
@@ -73,7 +73,7 @@ BASE_FEATURE(kDesktopScreenshots,
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
void RegisterProfilePrefs(PrefRegistrySimple* registry) {
- registry->RegisterBooleanPref(prefs::kDesktopSharingHubEnabled, true);
+ registry->RegisterBooleanPref(prefs::kDesktopSharingHubEnabled, false);
}
#endif
diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -1638,12 +1638,12 @@ void BrowserCommandController::UpdateCommandsForFullscreenMode() {
command_updater_.UpdateCommandEnabled(IDC_CHROME_TIPS, show_main_ui);
command_updater_.UpdateCommandEnabled(IDC_CHROME_WHATS_NEW, show_main_ui);
#endif
- command_updater_.UpdateCommandEnabled(IDC_QRCODE_GENERATOR, show_main_ui);
+ command_updater_.UpdateCommandEnabled(IDC_QRCODE_GENERATOR, false);
command_updater_.UpdateCommandEnabled(IDC_CONTENT_CONTEXT_SHARING_SUBMENU,
- show_main_ui);
- command_updater_.UpdateCommandEnabled(IDC_SHARING_HUB, show_main_ui);
+ false);
+ command_updater_.UpdateCommandEnabled(IDC_SHARING_HUB, false);
command_updater_.UpdateCommandEnabled(IDC_SHARING_HUB_SCREENSHOT,
- show_main_ui);
+ false);
command_updater_.UpdateCommandEnabled(IDC_SHOW_APP_MENU, show_main_ui);
command_updater_.UpdateCommandEnabled(IDC_SEND_TAB_TO_SELF, show_main_ui);
command_updater_.UpdateCommandEnabled(IDC_SHOW_MANAGEMENT_PAGE, true);
diff --git a/chrome/browser/ui/qrcode_generator/qrcode_generator_bubble_controller.cc b/chrome/browser/ui/qrcode_generator/qrcode_generator_bubble_controller.cc
--- a/chrome/browser/ui/qrcode_generator/qrcode_generator_bubble_controller.cc
+++ b/chrome/browser/ui/qrcode_generator/qrcode_generator_bubble_controller.cc
@@ -23,10 +23,7 @@ QRCodeGeneratorBubbleController::~QRCodeGeneratorBubbleController() {
// static
bool QRCodeGeneratorBubbleController::IsGeneratorAvailable(const GURL& url) {
- if (!url.SchemeIsHTTPOrHTTPS())
- return false;
-
- return true;
+ return false;
}
// static
--
2.25.1
+106
View File
@@ -0,0 +1,106 @@
From: uazo <uazo@users.noreply.github.com>
Date: Sun, 7 May 2023 14:03:55 +0000
Subject: WIN Disable updater
---
.../browser_process_platform_part_win.cc | 3 ++
chrome/browser/updater/BUILD.gn | 9 ------
.../browser/updater/browser_updater_client.cc | 32 +------------------
3 files changed, 4 insertions(+), 40 deletions(-)
diff --git a/chrome/browser/browser_process_platform_part_win.cc b/chrome/browser/browser_process_platform_part_win.cc
--- a/chrome/browser/browser_process_platform_part_win.cc
+++ b/chrome/browser/browser_process_platform_part_win.cc
@@ -5,12 +5,15 @@
#include "chrome/browser/browser_process_platform_part_win.h"
#include "chrome/browser/active_use_util.h"
+#include "chrome/install_static/buildflags.h"
BrowserProcessPlatformPart::BrowserProcessPlatformPart() = default;
BrowserProcessPlatformPart::~BrowserProcessPlatformPart() = default;
void BrowserProcessPlatformPart::PlatformSpecificCommandLineProcessing(
const base::CommandLine& command_line) {
+#if BUILDFLAG(USE_GOOGLE_UPDATE_INTEGRATION)
if (!did_run_updater_ && ShouldRecordActiveUse(command_line))
did_run_updater_.emplace();
+#endif
}
diff --git a/chrome/browser/updater/BUILD.gn b/chrome/browser/updater/BUILD.gn
--- a/chrome/browser/updater/BUILD.gn
+++ b/chrome/browser/updater/BUILD.gn
@@ -22,15 +22,6 @@ source_set("browser_updater_client") {
"//components/version_info",
]
- if (is_win) {
- sources += [ "browser_updater_client_win.cc" ]
-
- deps += [
- "//chrome/browser/google",
- "//chrome/install_static:install_static_util",
- ]
- }
-
if (is_mac) {
sources += [
"browser_updater_client_mac.mm",
diff --git a/chrome/browser/updater/browser_updater_client.cc b/chrome/browser/updater/browser_updater_client.cc
--- a/chrome/browser/updater/browser_updater_client.cc
+++ b/chrome/browser/updater/browser_updater_client.cc
@@ -29,19 +29,6 @@ BrowserUpdaterClient::~BrowserUpdaterClient() = default;
void BrowserUpdaterClient::Register(base::OnceClosure complete) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
- base::ThreadPool::PostTaskAndReplyWithResult(
- FROM_HERE, {base::MayBlock()},
- base::BindOnce(&BrowserUpdaterClient::GetRegistrationRequest, this),
- base::BindOnce(
- [](base::OnceCallback<void(int)> callback,
- scoped_refptr<updater::UpdateService> update_service,
- const updater::RegistrationRequest& request) {
- update_service->RegisterApp(request, std::move(callback));
- },
- base::BindPostTaskToCurrentDefault(
- base::BindOnce(&BrowserUpdaterClient::RegistrationCompleted, this,
- std::move(complete))),
- update_service_));
}
void BrowserUpdaterClient::RegistrationCompleted(base::OnceClosure complete,
@@ -72,18 +59,6 @@ void BrowserUpdaterClient::GetUpdaterVersionCompleted(
void BrowserUpdaterClient::CheckForUpdate(
updater::UpdateService::StateChangeCallback version_updater_callback) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-
- updater::UpdateService::UpdateState update_state;
- update_state.state =
- updater::UpdateService::UpdateState::State::kCheckingForUpdates;
- version_updater_callback.Run(update_state);
- update_service_->Update(
- GetAppId(), {}, updater::UpdateService::Priority::kForeground,
- updater::UpdateService::PolicySameVersionUpdate::kNotAllowed,
- base::BindPostTaskToCurrentDefault(version_updater_callback),
- base::BindPostTaskToCurrentDefault(
- base::BindOnce(&BrowserUpdaterClient::UpdateCompleted, this,
- version_updater_callback)));
}
void BrowserUpdaterClient::UpdateCompleted(
@@ -129,12 +104,7 @@ void BrowserUpdaterClient::IsBrowserRegisteredCompleted(
base::OnceCallback<void(bool)> callback,
const std::vector<updater::UpdateService::AppState>& apps) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
- const std::string app_id = GetAppId();
- std::move(callback).Run(
- std::find_if(apps.begin(), apps.end(),
- [&](const updater::UpdateService::AppState& app) {
- return app.app_id == app_id;
- }) != apps.end());
+ std::move(callback).Run(true);
}
scoped_refptr<BrowserUpdaterClient> BrowserUpdaterClient::Create(
--
2.25.1
@@ -0,0 +1,40 @@
From: Your Name <you@example.com>
Date: Fri, 17 Feb 2023 16:23:20 +0000
Subject: WIN Enable Network Service Sandbox and CIG
---
chrome/browser/chrome_content_browser_client.cc | 2 +-
sandbox/policy/features.cc | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
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
@@ -769,7 +769,7 @@ BASE_FEATURE(kRendererCodeIntegrity,
// https://blogs.windows.com/blog/tag/code-integrity-guard/.
BASE_FEATURE(kNetworkServiceCodeIntegrity,
"NetworkServiceCodeIntegrity",
- base::FEATURE_DISABLED_BY_DEFAULT);
+ base::FEATURE_ENABLED_BY_DEFAULT);
#endif // BUILDFLAG(IS_WIN) && !defined(COMPONENT_BUILD) &&
// !defined(ADDRESS_SANITIZER)
diff --git a/sandbox/policy/features.cc b/sandbox/policy/features.cc
--- a/sandbox/policy/features.cc
+++ b/sandbox/policy/features.cc
@@ -14,8 +14,12 @@ namespace sandbox::policy::features {
// Enables network service sandbox.
// (Only causes an effect when feature kNetworkServiceInProcess is disabled.)
BASE_FEATURE(kNetworkServiceSandbox,
- "NetworkServiceSandbox",
+ "NetworkServiceSandbox", // enabled only in windows
+#if BUILDFLAG(IS_WIN)
+ base::FEATURE_ENABLED_BY_DEFAULT);
+#else
base::FEATURE_DISABLED_BY_DEFAULT);
+#endif
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
// Enables a fine-grained seccomp-BPF syscall filter for the network service.
--
2.25.1
+97
View File
@@ -0,0 +1,97 @@
From: uazo <uazo@users.noreply.github.com>
Date: Fri, 14 Apr 2023 13:55:58 +0000
Subject: WIN Fix log to file
Allows log activation without opening the console window.
Log rotation enabled by default.
---
chrome/common/logging_chrome.cc | 10 +++++++---
chrome/common/logging_chrome.h | 6 ++++--
content/app/content_main.cc | 6 +++++-
3 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc
--- a/chrome/common/logging_chrome.cc
+++ b/chrome/common/logging_chrome.cc
@@ -185,7 +185,7 @@ LoggingDestination DetermineLoggingDestination(
return kDefaultLoggingMode;
}
-#if BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_WIN)
bool RotateLogFile(const base::FilePath& target_path) {
DCHECK(!target_path.empty());
// If the old log file doesn't exist, do nothing.
@@ -230,7 +230,7 @@ bool RotateLogFile(const base::FilePath& target_path) {
return true;
}
-#endif // BUILDFLAG(IS_CHROMEOS)
+#endif // BUILDFLAG(IS_WIN)
#if BUILDFLAG(IS_CHROMEOS_ASH)
base::FilePath SetUpSymlinkIfNeeded(const base::FilePath& symlink_path,
@@ -392,6 +392,10 @@ void InitChromeLogging(const base::CommandLine& command_line,
// since that will remove the newly created link instead.
delete_old_log_file = APPEND_TO_OLD_LOG_FILE;
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
+
+#if BUILDFLAG(IS_WIN)
+ RotateLogFile(log_path);
+#endif
} else {
log_locking_state = DONT_LOCK_LOG_FILE;
}
@@ -546,7 +550,7 @@ bool DialogsAreSuppressed() {
return dialogs_are_suppressed_;
}
-#if BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN)
base::FilePath GenerateTimestampedName(const base::FilePath& base_path,
base::Time timestamp) {
base::Time::Exploded time_deets;
diff --git a/chrome/common/logging_chrome.h b/chrome/common/logging_chrome.h
--- a/chrome/common/logging_chrome.h
+++ b/chrome/common/logging_chrome.h
@@ -41,10 +41,12 @@ LoggingDestination DetermineLoggingDestination(
// write new logs to the latest log file. Otherwise, we reuse the existing file
// if exists.
base::FilePath SetUpLogFile(const base::FilePath& target_path, bool new_log);
+#endif // BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_WIN)
// Allow external calls to the internal method for testing.
bool RotateLogFile(const base::FilePath& target_path);
-#endif // BUILDFLAG(IS_CHROMEOS)
+#endif // BUILDFLAG(IS_WIN)
#if BUILDFLAG(IS_CHROMEOS_ASH)
#if defined(UNIT_TEST)
@@ -76,7 +78,7 @@ base::FilePath GetLogFileName(const base::CommandLine& command_line);
// otherwise.
bool DialogsAreSuppressed();
-#if BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN)
// Inserts timestamp before file extension (if any) in the form
// "_yymmdd-hhmmss".
base::FilePath GenerateTimestampedName(const base::FilePath& base_path,
diff --git a/content/app/content_main.cc b/content/app/content_main.cc
--- a/content/app/content_main.cc
+++ b/content/app/content_main.cc
@@ -308,7 +308,11 @@ RunContentProcess(ContentMainParams params,
// Route stdio to parent console (if any) or create one.
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableLogging)) {
- base::RouteStdioToConsole(true);
+ std::string logging_destination =
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kEnableLogging);
+ if (logging_destination == "stderr") {
+ base::RouteStdioToConsole(true);
+ }
}
#endif
--
2.25.1
@@ -0,0 +1,24 @@
From: Your Name <you@example.com>
Date: Wed, 28 Dec 2022 15:46:59 +0000
Subject: WIN disable annotate downloads
---
components/download/internal/common/download_file_impl.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/components/download/internal/common/download_file_impl.cc b/components/download/internal/common/download_file_impl.cc
--- a/components/download/internal/common/download_file_impl.cc
+++ b/components/download/internal/common/download_file_impl.cc
@@ -358,8 +358,8 @@ void DownloadFileImpl::RenameAndAnnotate(
std::unique_ptr<RenameParameters> parameters(new RenameParameters(
ANNOTATE_WITH_SOURCE_INFORMATION, full_path, std::move(callback)));
parameters->client_guid = client_guid;
- parameters->source_url = source_url;
- parameters->referrer_url = referrer_url;
+ parameters->source_url = GURL();
+ parameters->referrer_url = GURL();
parameters->remote_quarantine = std::move(remote_quarantine);
RenameWithRetryInternal(std::move(parameters));
}
--
2.25.1
@@ -0,0 +1,29 @@
From: Your Name <you@example.com>
Date: Wed, 28 Dec 2022 15:47:58 +0000
Subject: WIN enable HighEfficiencyMode by default
---
components/performance_manager/user_tuning/prefs.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/components/performance_manager/user_tuning/prefs.cc b/components/performance_manager/user_tuning/prefs.cc
--- a/components/performance_manager/user_tuning/prefs.cc
+++ b/components/performance_manager/user_tuning/prefs.cc
@@ -35,13 +35,13 @@ const char kManagedTabDiscardingExceptions[] =
"performance_tuning.tab_discarding.exceptions_managed";
void RegisterLocalStatePrefs(PrefRegistrySimple* registry) {
- registry->RegisterBooleanPref(kHighEfficiencyModeEnabled, false);
+ registry->RegisterBooleanPref(kHighEfficiencyModeEnabled, true);
registry->RegisterIntegerPref(
kHighEfficiencyModeTimeBeforeDiscardInMinutes,
kDefaultHighEfficiencyModeTimeBeforeDiscardInMinutes);
registry->RegisterIntegerPref(
kHighEfficiencyModeState,
- static_cast<int>(HighEfficiencyModeState::kDisabled));
+ static_cast<int>(HighEfficiencyModeState::kEnabled));
registry->RegisterIntegerPref(
kBatterySaverModeState,
static_cast<int>(BatterySaverModeState::kEnabledBelowThreshold));
--
2.25.1
@@ -0,0 +1,33 @@
From: Your Name <you@example.com>
Date: Tue, 14 Feb 2023 16:32:30 +0000
Subject: WIN enable file system access blocklist
---
content/browser/file_system_access/features.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/content/browser/file_system_access/features.cc b/content/browser/file_system_access/features.cc
--- a/content/browser/file_system_access/features.cc
+++ b/content/browser/file_system_access/features.cc
@@ -15,7 +15,7 @@ namespace content::features {
// some applications.
BASE_FEATURE(kFileSystemAccessDragAndDropCheckBlocklist,
"FileSystemAccessDragAndDropCheckBlocklist",
- base::FEATURE_DISABLED_BY_DEFAULT);
+ base::FEATURE_ENABLED_BY_DEFAULT);
// TODO(crbug.com/1381621): Remove this flag eventually.
// When enabled, move() will result in a promise rejection when the specified
@@ -51,8 +51,8 @@ BASE_FEATURE(kFileSystemAccessRemoveEntryExclusiveLock,
// When enabled, a user gesture is required to rename a file if the site does
// not have write access to the parent. See http://b/254157070 for more context.
BASE_FEATURE(kFileSystemAccessRenameWithoutParentAccessRequiresUserActivation,
- "FileSystemAccessRenameWithoutParentAccessRequiresUserActivation",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ "FileSystemAccessRenameWithoutParentAccessRequiresUserActivation", // enabled by default
+ base::FEATURE_ENABLED_BY_DEFAULT); // in bromite
// TODO(crbug.com/1247850): Remove this flag eventually.
// When enabled, move operations within the same file system that do not change
--
2.25.1
@@ -0,0 +1,23 @@
From: Your Name <you@example.com>
Date: Wed, 28 Dec 2022 15:46:38 +0000
Subject: WIN enable pdf plugin
---
third_party/blink/renderer/core/frame/local_frame.cc | 2 ++
1 file changed, 2 insertions(+)
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
@@ -2005,7 +2005,9 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() {
}
PluginData* LocalFrame::GetPluginData() const {
+ if (!Loader().AllowPlugins())
return nullptr;
+ return GetPage()->GetPluginData();
}
void LocalFrame::SetAdTrackerForTesting(AdTracker* ad_tracker) {
--
2.25.1
@@ -0,0 +1,72 @@
From: uazo <uazo@users.noreply.github.com>
Date: Sat, 15 Apr 2023 10:25:33 +0000
Subject: WIN minimum data to enable install extensions
The amount of information sent is minimized without disabling
the ability to install extensions (which is under user control)
---
chrome/browser/extensions/webstore_install_helper.cc | 2 +-
chrome/browser/extensions/webstore_installer.cc | 2 +-
.../update_client/chrome_update_query_params_delegate.cc | 8 ++++----
components/update_client/update_query_params.cc | 5 ++---
4 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/chrome/browser/extensions/webstore_install_helper.cc b/chrome/browser/extensions/webstore_install_helper.cc
--- a/chrome/browser/extensions/webstore_install_helper.cc
+++ b/chrome/browser/extensions/webstore_install_helper.cc
@@ -46,7 +46,7 @@ void WebstoreInstallHelper::Start(
data_decoder::DataDecoder::ParseJsonIsolated(
manifest_, base::BindOnce(&WebstoreInstallHelper::OnJSONParsed, this));
- if (icon_url_.is_empty()) {
+ if ((true) || icon_url_.is_empty()) {
icon_decode_complete_ = true;
} else {
// No existing |icon_fetcher_| to avoid unbalanced AddRef().
diff --git a/chrome/browser/extensions/webstore_installer.cc b/chrome/browser/extensions/webstore_installer.cc
--- a/chrome/browser/extensions/webstore_installer.cc
+++ b/chrome/browser/extensions/webstore_installer.cc
@@ -640,7 +640,7 @@ void WebstoreInstaller::StartDownload(const std::string& extension_id,
download_url_, render_process_host_id, render_frame_host->GetRoutingID(),
traffic_annotation));
params->set_file_path(file);
- if (controller.GetVisibleEntry()) {
+ if ((false) && controller.GetVisibleEntry()) {
content::Referrer referrer = content::Referrer::SanitizeForRequest(
download_url_,
content::Referrer(controller.GetVisibleEntry()->GetURL(),
diff --git a/chrome/browser/update_client/chrome_update_query_params_delegate.cc b/chrome/browser/update_client/chrome_update_query_params_delegate.cc
--- a/chrome/browser/update_client/chrome_update_query_params_delegate.cc
+++ b/chrome/browser/update_client/chrome_update_query_params_delegate.cc
@@ -30,10 +30,10 @@ ChromeUpdateQueryParamsDelegate::GetInstance() {
}
std::string ChromeUpdateQueryParamsDelegate::GetExtraParams() {
- return base::StrCat({"&prodchannel=",
- chrome::GetChannelName(chrome::WithExtendedStable(true)),
- "&prodversion=", version_info::GetVersionNumber(),
- "&lang=", GetLang()});
+ return base::StrCat({
+ "&prodversion=",
+ version_info::GetMajorVersionNumber().c_str(),
+ ".0.0.0"});
}
// static
diff --git a/components/update_client/update_query_params.cc b/components/update_client/update_query_params.cc
--- a/components/update_client/update_query_params.cc
+++ b/components/update_client/update_query_params.cc
@@ -88,9 +88,8 @@ UpdateQueryParamsDelegate* g_delegate = nullptr;
// static
std::string UpdateQueryParams::Get(ProdId prod) {
return base::StringPrintf(
- "os=%s&arch=%s&os_arch=%s&nacl_arch=%s&prod=%s%s&acceptformat=crx3,puff",
- kOs, kArch, base::SysInfo().OperatingSystemArchitecture().c_str(),
- GetNaclArch(), GetProdIdString(prod),
+ "prod=%s%s&acceptformat=crx3",
+ GetProdIdString(prod),
g_delegate ? g_delegate->GetExtraParams().c_str() : "");
}
--
2.25.1
@@ -0,0 +1,209 @@
From: uazo <uazo@users.noreply.github.com>
Date: Fri, 24 Mar 2023 07:50:59 +0000
Subject: Warning message for unsupported hardware aes
In boringssl the lack of support for native aes instructions in the cpu
leads to a change in the order of the encryption methods in the
tls1.3 stack and thus to an additional fingerprint bit.
The use of software aes is discouraged due to possible side channel
attacks, so it is better to warn the user of the presence of an
unsupported device.
you can remove the message by going to chrome://flags/#no-hw-aes-warning
---
base/base_switches.cc | 2 ++
base/base_switches.h | 1 +
chrome/BUILD.gn | 3 +++
chrome/app/chrome_main_delegate.cc | 10 ++++++++++
chrome/app/generated_resources.grd | 4 ++++
chrome/browser/about_flags.cc | 4 ++++
chrome/browser/flag_descriptions.cc | 4 ++++
chrome/browser/flag_descriptions.h | 3 +++
chrome/browser/ui/startup/bad_flags_prompt.cc | 9 +++++++++
.../browser/renderer_host/render_process_host_impl.cc | 1 +
content/public/common/content_features.cc | 5 +++++
content/public/common/content_features.h | 1 +
12 files changed, 47 insertions(+)
diff --git a/base/base_switches.cc b/base/base_switches.cc
--- a/base/base_switches.cc
+++ b/base/base_switches.cc
@@ -176,6 +176,8 @@ extern const char kEnableCrashpad[] = "enable-crashpad";
const char kDesktopModeViewportMetaEnabled[] = "dm-viewport-meta-enabled";
+const char kNoAESHardware[] = "no-aes-hardware";
+
#if BUILDFLAG(IS_CHROMEOS)
// Override the default scheduling boosting value for urgent tasks.
// This can be adjusted if a specific chromeos device shows better perf/power
diff --git a/base/base_switches.h b/base/base_switches.h
--- a/base/base_switches.h
+++ b/base/base_switches.h
@@ -35,6 +35,7 @@ extern const char kTraceToFileName[];
extern const char kV[];
extern const char kVModule[];
extern const char kWaitForDebugger[];
+extern const char kNoAESHardware[];
#if BUILDFLAG(IS_WIN)
extern const char kDisableHighResTimer[];
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -452,6 +452,7 @@ if (is_win) {
"//components/policy:generated",
"//content/public/app",
"//crypto",
+ "//third_party/boringssl",
"//headless:headless_non_renderer",
"//headless:headless_shell_browser_lib",
"//net:net_resources",
@@ -1696,6 +1697,8 @@ if (is_android) {
"//chrome/common/profiler",
"//chrome/gpu",
"//chrome/renderer",
+ "//crypto",
+ "//third_party/boringssl",
"//components/minidump_uploader",
"//components/safe_browsing:buildflags",
"//components/safe_browsing/android:safe_browsing_api_handler",
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc
--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -104,6 +104,9 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/resource/scoped_startup_resource_bundle.h"
#include "ui/base/ui_base_switches.h"
+#include "base/base_switches.h"
+#include "crypto/openssl_util.h"
+#include "third_party/boringssl/src/include/openssl/ssl.h"
#if BUILDFLAG(IS_WIN)
#include <malloc.h>
@@ -1070,6 +1073,13 @@ absl::optional<int> ChromeMainDelegate::BasicStartupComplete() {
return chrome::RESULT_CODE_INVALID_SANDBOX_STATE;
#endif
+if (!command_line.HasSwitch(switches::kProcessType)) {
+ crypto::EnsureOpenSSLInit();
+ if (EVP_has_aes_hardware() == 0) {
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(switches::kNoAESHardware);
+ }
+}
+
#if BUILDFLAG(IS_MAC)
// Give the browser process a longer treadmill, since crashes
// there have more impact.
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -6489,6 +6489,10 @@ Keep your key file in a safe place. You will need it to create new versions of y
You are using an unsupported feature flag: <ph name="BAD_FLAG">$1<ex>SignedHTTPExchange</ex></ph>. Stability and security will suffer.
</message>
+ <message name="IDS_UNSUPPORTED_AES_HARDWARE" desc="Message shown when an unsupported hardware">
+ Your device does not support hardware aes, so it is easier to track you at the network level.
+ </message>
+
<!-- Bad Environment Variables Infobar-->
<message name="IDS_BAD_ENVIRONMENT_VARIABLES_WARNING_MESSAGE" desc="Message shown when an unsupported environment variable is used [Keep it short so it fits in the infobar.]">
You are using an unsupported environment variable: <ph name="BAD_VAR">$1<ex>SSLKEYLOGFILE</ex></ph>. Stability and security will suffer.
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
@@ -7888,6 +7888,10 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kDevicePostureDescription, kOsAll,
FEATURE_VALUE_TYPE(features::kDevicePosture)},
+ {"no-hw-aes-warning", flag_descriptions::kNoAESHardwareMessageName,
+ flag_descriptions::kNoAESHardwareMessageDescription, kOsDesktop | kOsAndroid,
+ FEATURE_VALUE_TYPE(features::kNoAESHardwareMessage)},
+
#if BUILDFLAG(IS_CHROMEOS_ASH)
{"device-force-scheduled-reboot",
flag_descriptions::kDeviceForceScheduledRebootName,
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
@@ -774,6 +774,10 @@ const char kDevicePostureName[] = "Device Posture API";
const char kDevicePostureDescription[] =
"Enables Device Posture API (foldable devices)";
+const char kNoAESHardwareMessageName[] = "Enable no aes warning message";
+const char kNoAESHardwareMessageDescription[] =
+ "Displays a warning message if the device does not have aes support in the hardware";
+
const char kDiscountConsentV2Name[] = "Discount Consent V2";
const char kDiscountConsentV2Description[] = "Enables Discount Consent V2";
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
@@ -582,6 +582,9 @@ extern const char kDeviceForceScheduledRebootDescription[];
extern const char kDevicePostureName[];
extern const char kDevicePostureDescription[];
+extern const char kNoAESHardwareMessageName[];
+extern const char kNoAESHardwareMessageDescription[];
+
extern const char kEnablePreinstalledWebAppDuplicationFixerName[];
extern const char kEnablePreinstalledWebAppDuplicationFixerDescription[];
diff --git a/chrome/browser/ui/startup/bad_flags_prompt.cc b/chrome/browser/ui/startup/bad_flags_prompt.cc
--- a/chrome/browser/ui/startup/bad_flags_prompt.cc
+++ b/chrome/browser/ui/startup/bad_flags_prompt.cc
@@ -221,6 +221,15 @@ void ShowBadFlagsPrompt(content::WebContents* web_contents) {
return;
}
}
+
+ if (base::FeatureList::IsEnabled(features::kNoAESHardwareMessage) &&
+ base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoAESHardware)) {
+ CreateSimpleAlertInfoBar(
+ infobars::ContentInfoBarManager::FromWebContents(web_contents),
+ infobars::InfoBarDelegate::BAD_FLAGS_INFOBAR_DELEGATE, nullptr,
+ l10n_util::GetStringUTF16(IDS_UNSUPPORTED_AES_HARDWARE),
+ /*auto_expire=*/false, /*should_animate=*/false);
+ }
}
void ShowBadFlagsInfoBar(content::WebContents* web_contents,
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -3633,6 +3633,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
switches::kLacrosUseChromeosProtectedAv1,
#endif
switches::kDesktopModeViewportMetaEnabled,
+ switches::kNoAESHardware,
};
renderer_cmd->CopySwitchesFrom(browser_cmd, kSwitchNames,
std::size(kSwitchNames));
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
@@ -776,6 +776,11 @@ BASE_FEATURE(kNoStatePrefetchHoldback,
"NoStatePrefetchHoldback",
base::FEATURE_DISABLED_BY_DEFAULT);
+// Show a warning message to user if aes hardware is not found
+BASE_FEATURE(kNoAESHardwareMessage,
+ "NoAESHardwareMessage",
+ base::FEATURE_ENABLED_BY_DEFAULT);
+
// Controls the Origin-Agent-Cluster header. Tracking bug
// https://crbug.com/1042415; flag removal bug (for when this is fully launched)
// https://crbug.com/1148057.
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
@@ -172,6 +172,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kNetworkServiceInProcess);
CONTENT_EXPORT BASE_DECLARE_FEATURE(kNotificationContentImage);
CONTENT_EXPORT BASE_DECLARE_FEATURE(kNotificationTriggers);
CONTENT_EXPORT BASE_DECLARE_FEATURE(kNoStatePrefetchHoldback);
+CONTENT_EXPORT BASE_DECLARE_FEATURE(kNoAESHardwareMessage);
CONTENT_EXPORT BASE_DECLARE_FEATURE(kOriginIsolationHeader);
CONTENT_EXPORT BASE_DECLARE_FEATURE(kOverscrollHistoryNavigation);
CONTENT_EXPORT BASE_DECLARE_FEATURE(kPeriodicBackgroundSync);
--
2.25.1
+733
View File
@@ -0,0 +1,733 @@
From: uazo <uazo@users.noreply.github.com>
Date: Tue, 22 Nov 2022 16:49:58 +0000
Subject: Add browser policy
---
base/win/win_util.cc | 63 +--------
.../privacy_preferences_manager_impl.cc | 5 +
.../metrics/chrome_feature_list_creator.cc | 12 ++
.../policy/chrome_browser_policy_connector.cc | 2 -
...nfiguration_policy_handler_list_factory.cc | 6 +-
.../account_consistency_mode_manager.cc | 5 +-
chrome/browser/signin/chrome_signin_client.cc | 7 +-
.../ui/webui/policy/policy_ui_handler.cc | 104 +++++++++++++-
.../ui/webui/policy/policy_ui_handler.h | 2 +
.../core/browser/browser_policy_connector.cc | 3 +
.../common/command_line_policy_provider.cc | 3 +
.../core/common/policy_loader_command_line.cc | 128 +++++++++++++++---
.../policy/core/common/policy_pref_names.cc | 3 +
.../policy/core/common/policy_pref_names.h | 1 +
.../policy/core/common/policy_service_impl.cc | 3 +
.../policy/core/common/policy_switches.cc | 2 +
.../policy/core/common/policy_switches.h | 1 +
.../Miscellaneous/SyncDisabled.yaml | 2 +-
.../policy/resources/webui/policy_row.html | 1 +
.../policy/resources/webui/policy_row.ts | 12 ++
components/policy_strings.grdp | 4 +-
.../gaia_cookie_manager_service.cc | 4 +
google_apis/gaia/gaia_auth_fetcher.cc | 1 +
23 files changed, 285 insertions(+), 89 deletions(-)
diff --git a/base/win/win_util.cc b/base/win/win_util.cc
--- a/base/win/win_util.cc
+++ b/base/win/win_util.cc
@@ -126,76 +126,19 @@ bool EnablePerMonitorV2() {
}
bool* GetDomainEnrollmentStateStorage() {
- static bool state = IsOS(OS_DOMAINMEMBER);
+ static bool state = false;
return &state;
}
bool* GetRegisteredWithManagementStateStorage() {
- static bool state = []() {
- // Mitigate the issues caused by loading DLLs on a background thread
- // (http://crbug/973868).
- SCOPED_MAY_LOAD_LIBRARY_AT_BACKGROUND_PRIORITY();
-
- ScopedNativeLibrary library(
- FilePath(FILE_PATH_LITERAL("MDMRegistration.dll")));
- if (!library.is_valid())
- return false;
-
- using IsDeviceRegisteredWithManagementFunction =
- decltype(&::IsDeviceRegisteredWithManagement);
- IsDeviceRegisteredWithManagementFunction
- is_device_registered_with_management_function =
- reinterpret_cast<IsDeviceRegisteredWithManagementFunction>(
- library.GetFunctionPointer("IsDeviceRegisteredWithManagement"));
- if (!is_device_registered_with_management_function)
- return false;
-
- BOOL is_managed = FALSE;
- HRESULT hr =
- is_device_registered_with_management_function(&is_managed, 0, nullptr);
- return SUCCEEDED(hr) && is_managed;
- }();
+ static bool state = false;
return &state;
}
// TODO (crbug/1300219): return a DSREG_JOIN_TYPE* instead of bool*.
bool* GetAzureADJoinStateStorage() {
- static bool state = []() {
- base::ElapsedTimer timer;
-
- // Mitigate the issues caused by loading DLLs on a background thread
- // (http://crbug/973868).
- SCOPED_MAY_LOAD_LIBRARY_AT_BACKGROUND_PRIORITY();
-
- ScopedNativeLibrary netapi32(
- base::LoadSystemLibrary(FILE_PATH_LITERAL("netapi32.dll")));
- if (!netapi32.is_valid())
- return false;
-
- const auto net_get_aad_join_information_function =
- reinterpret_cast<decltype(&::NetGetAadJoinInformation)>(
- netapi32.GetFunctionPointer("NetGetAadJoinInformation"));
- if (!net_get_aad_join_information_function)
- return false;
-
- const auto net_free_aad_join_information_function =
- reinterpret_cast<decltype(&::NetFreeAadJoinInformation)>(
- netapi32.GetFunctionPointer("NetFreeAadJoinInformation"));
- DPCHECK(net_free_aad_join_information_function);
-
- DSREG_JOIN_INFO* join_info = nullptr;
- HRESULT hr = net_get_aad_join_information_function(/*pcszTenantId=*/nullptr,
- &join_info);
- const bool is_aad_joined = SUCCEEDED(hr) && join_info;
- if (join_info) {
- net_free_aad_join_information_function(join_info);
- }
-
- base::UmaHistogramTimes("EnterpriseCheck.AzureADJoinStatusCheckTime",
- timer.Elapsed());
- return is_aad_joined;
- }();
+ static bool state = false;
return &state;
}
diff --git a/chrome/browser/android/preferences/privacy_preferences_manager_impl.cc b/chrome/browser/android/preferences/privacy_preferences_manager_impl.cc
--- a/chrome/browser/android/preferences/privacy_preferences_manager_impl.cc
+++ b/chrome/browser/android/preferences/privacy_preferences_manager_impl.cc
@@ -56,6 +56,11 @@ static jboolean
JNI_PrivacyPreferencesManagerImpl_IsMetricsReportingDisabledByPolicy(
JNIEnv* env) {
const PrefService* local_state = g_browser_process->local_state();
+ // this point (policy with 'future') gave me false, false
+ // LOG(INFO) << "---IsMetricsReportingDisabledByPolicy "
+ // << local_state->IsManagedPreference(metrics::prefs::kMetricsReportingEnabled)
+ // << " "
+ // << local_state->GetBoolean(metrics::prefs::kMetricsReportingEnabled);
return local_state->IsManagedPreference(
metrics::prefs::kMetricsReportingEnabled) &&
!local_state->GetBoolean(metrics::prefs::kMetricsReportingEnabled);
diff --git a/chrome/browser/metrics/chrome_feature_list_creator.cc b/chrome/browser/metrics/chrome_feature_list_creator.cc
--- a/chrome/browser/metrics/chrome_feature_list_creator.cc
+++ b/chrome/browser/metrics/chrome_feature_list_creator.cc
@@ -56,6 +56,8 @@
#include "content/public/common/content_switches.h"
#include "services/network/public/cpp/network_switches.h"
#include "ui/base/resource/resource_bundle.h"
+#include "components/policy/core/common/policy_pref_names.h"
+#include "components/policy/core/common/policy_switches.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "chrome/browser/ash/policy/core/browser_policy_connector_ash.h"
@@ -197,6 +199,16 @@ void ChromeFeatureListCreator::CreatePrefService() {
// ManagementService's cache.
if (local_state_pref_store->ReadPrefs() ==
JsonPrefStore::PREF_READ_ERROR_NONE) {
+ // add list of user disabled policies to command line
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+ const base::Value* stored_value = nullptr;
+ if (local_state_pref_store->GetValue(policy::policy_prefs::kDisabledDefaultPoliciesList, &stored_value) &&
+ stored_value->is_string()) {
+ std::string disabled_policies = stored_value->GetString();
+ if (!disabled_policies.empty()) {
+ command_line->AppendSwitchASCII(policy::switches::kForceDisabledPolicies, disabled_policies);
+ }
+ }
auto* platform_management_service =
policy::ManagementServiceFactory::GetForPlatform();
platform_management_service->UsePrefStoreAsCache(local_state_pref_store);
diff --git a/chrome/browser/policy/chrome_browser_policy_connector.cc b/chrome/browser/policy/chrome_browser_policy_connector.cc
--- a/chrome/browser/policy/chrome_browser_policy_connector.cc
+++ b/chrome/browser/policy/chrome_browser_policy_connector.cc
@@ -155,8 +155,6 @@ bool ChromeBrowserPolicyConnector::HasMachineLevelPolicies() {
if (ProviderHasPolicies(machine_level_user_cloud_policy_manager()))
return true;
#endif // !BUILDFLAG(IS_CHROMEOS_ASH)
- if (ProviderHasPolicies(command_line_provider_))
- return true;
return false;
}
diff --git a/chrome/browser/policy/configuration_policy_handler_list_factory.cc b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
--- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc
+++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
@@ -1922,9 +1922,9 @@ bool AreFuturePoliciesEnabledByDefault() {
// Enable future policies for branded browser tests.
if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType))
return true;
- version_info::Channel channel = chrome::GetChannel();
- return channel != version_info::Channel::STABLE &&
- channel != version_info::Channel::BETA;
+ // Future policies are allowed but not active without
+ // kEnableExperimentalPolicies policy
+ return true;
}
} // namespace
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
@@ -199,7 +199,8 @@ AccountConsistencyModeManager::ComputeAccountConsistencyMethod(
#endif
#if BUILDFLAG(ENABLE_MIRROR)
- return AccountConsistencyMethod::kMirror;
+ // always disabled
+ return AccountConsistencyMethod::kDisabled;
#endif
#if BUILDFLAG(ENABLE_DICE_SUPPORT)
@@ -209,7 +210,7 @@ AccountConsistencyModeManager::ComputeAccountConsistencyMethod(
return AccountConsistencyMethod::kDisabled;
}
- return AccountConsistencyMethod::kDice;
+ return AccountConsistencyMethod::kDisabled;
#endif
NOTREACHED();
diff --git a/chrome/browser/signin/chrome_signin_client.cc b/chrome/browser/signin/chrome_signin_client.cc
--- a/chrome/browser/signin/chrome_signin_client.cc
+++ b/chrome/browser/signin/chrome_signin_client.cc
@@ -126,7 +126,9 @@ void ChromeSigninClient::DoFinalInit() {
bool ChromeSigninClient::ProfileAllowsSigninCookies(Profile* profile) {
content_settings::CookieSettings* cookie_settings =
CookieSettingsFactory::GetForProfile(profile).get();
- return signin::SettingsAllowSigninCookies(cookie_settings);
+ // Make ChromeSigninClient compliant to SigninAllowed policy
+ bool cookiesAllowed = signin::SettingsAllowSigninCookies(cookie_settings);
+ return cookiesAllowed && profile->GetPrefs()->GetBoolean(prefs::kSigninAllowed);
}
PrefService* ChromeSigninClient::GetPrefs() { return profile_->GetPrefs(); }
@@ -264,6 +266,9 @@ bool ChromeSigninClient::AreNetworkCallsDelayed() {
}
void ChromeSigninClient::DelayNetworkCall(base::OnceClosure callback) {
+ // Make ChromeSigninClient compliant to SigninAllowed policy
+ if (!AreSigninCookiesAllowed()) return;
+
if (!AreNetworkCallsDelayed()) {
std::move(callback).Run();
return;
diff --git a/chrome/browser/ui/webui/policy/policy_ui_handler.cc b/chrome/browser/ui/webui/policy/policy_ui_handler.cc
--- a/chrome/browser/ui/webui/policy/policy_ui_handler.cc
+++ b/chrome/browser/ui/webui/policy/policy_ui_handler.cc
@@ -21,6 +21,7 @@
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/notreached.h"
+#include "base/strings/string_split.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
@@ -55,6 +56,7 @@
#include "components/policy/core/common/cloud/cloud_policy_refresh_scheduler.h"
#include "components/policy/core/common/cloud/cloud_policy_util.h"
#include "components/policy/core/common/policy_details.h"
+#include "components/policy/core/common/policy_pref_names.h"
#include "components/policy/core/common/policy_scheduler.h"
#include "components/policy/core/common/policy_types.h"
#include "components/policy/core/common/remote_commands/remote_commands_service.h"
@@ -167,6 +169,10 @@ void PolicyUIHandler::RegisterMessages() {
"exportPoliciesJSON",
base::BindRepeating(&PolicyUIHandler::HandleExportPoliciesJson,
base::Unretained(this)));
+ web_ui()->RegisterMessageCallback(
+ "setEnabledPolicy",
+ base::BindRepeating(&PolicyUIHandler::HandleSetEnabledPolicy,
+ base::Unretained(this)));
web_ui()->RegisterMessageCallback(
"listenPoliciesUpdates",
base::BindRepeating(&PolicyUIHandler::HandleListenPoliciesUpdates,
@@ -330,8 +336,102 @@ void PolicyUIHandler::SendPolicies() {
"policies-updated",
base::Value(
policy_value_and_status_aggregator_->GetAggregatedPolicyNames()),
- base::Value(
- policy_value_and_status_aggregator_->GetAggregatedPolicyValues()));
+ base::Value(GetPolicyValues()));
+}
+
+base::Value::Dict PolicyUIHandler::GetPolicyValues() {
+ base::Value::Dict policy =
+ policy_value_and_status_aggregator_->GetAggregatedPolicyValues();
+ base::Value::Dict* policy_values =
+ policy.FindDict(policy::kPolicyValuesKey);
+ DCHECK(policy_values);
+
+ PrefService* local_state = g_browser_process->local_state();
+ DCHECK(local_state);
+
+ // get user disabled list from local state
+ std::string disabled_policies_pref =
+ local_state->GetString(policy::policy_prefs::kDisabledDefaultPoliciesList);
+ std::vector<std::string> disabled_policies =
+ base::SplitString(disabled_policies_pref, ",",
+ base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
+
+ auto* root = policy_values->FindDict(policy::kChromePoliciesId);
+ if (root) {
+ auto* list = root->FindDict(policy::kPoliciesKey);
+ if (list) {
+ // for each policy check if is disabled by the user
+ for (const auto name : *list) {
+ bool disabled = base::Contains(disabled_policies, name.first);
+ name.second.GetDict().Set("disabled", base::Value(disabled));
+ }
+
+ // add disabled policies so user can enable them
+ for (const std::string& name : disabled_policies) {
+ base::Value::Dict value;
+ value.Set("disabled", base::Value(true));
+
+ // set with some value (only for the ui)
+ // see components/policy/core/browser/policy_conversions_client.cc
+ value.Set("value", base::Value(false));
+ value.Set("scope", base::Value("machine"));
+ value.Set("level", base::Value("mandatory"));
+ value.Set("source", base::Value("sourceDefault"));
+ list->Set(name, std::move(value));
+ }
+ }
+ }
+ return policy;
+}
+
+void PolicyUIHandler::HandleSetEnabledPolicy(
+ const base::Value::List& args) {
+ CHECK_EQ(2u, args.size());
+ const std::string policy_name = args[0].GetString();
+ bool enabled = args[1].GetBool();
+
+ // Check if policy exists
+ base::Value::Dict policy =
+ policy_value_and_status_aggregator_->GetAggregatedPolicyValues();
+ base::Value::Dict* policy_values =
+ policy.FindDict(policy::kPolicyValuesKey);
+ DCHECK(policy_values);
+
+ bool exists = false;
+ auto* root = policy_values->FindDict(policy::kChromePoliciesId);
+ if (root && g_browser_process) {
+ auto* list = root->FindDict(policy::kPoliciesKey);
+ if (list) {
+ for (const auto name : *list) {
+ if (name.first == policy_name) {
+ exists = true;
+ break;
+ }
+ }
+ }
+ }
+
+ PrefService* local_state = g_browser_process->local_state();
+ DCHECK(local_state);
+
+ // get user disabled list from local state
+ std::string disabled_policies_pref =
+ local_state->GetString(policy::policy_prefs::kDisabledDefaultPoliciesList);
+ std::vector<std::string> disabled_policies =
+ base::SplitString(disabled_policies_pref, ",",
+ base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
+
+ // remove policy
+ base::EraseIf(disabled_policies,
+ [policy_name](const std::string& name) { return name == policy_name; });
+
+ // readd if exists and enabled
+ if (exists && !enabled)
+ disabled_policies.push_back(policy_name);
+
+ // save current user disabled policy in local state
+ local_state->SetString(policy::policy_prefs::kDisabledDefaultPoliciesList,
+ base::JoinString(disabled_policies, ","));
}
void PolicyUIHandler::SendStatus() {
diff --git a/chrome/browser/ui/webui/policy/policy_ui_handler.h b/chrome/browser/ui/webui/policy/policy_ui_handler.h
--- a/chrome/browser/ui/webui/policy/policy_ui_handler.h
+++ b/chrome/browser/ui/webui/policy/policy_ui_handler.h
@@ -56,6 +56,8 @@ class PolicyUIHandler : public content::WebUIMessageHandler,
private:
void HandleExportPoliciesJson(const base::Value::List& args);
+ void HandleSetEnabledPolicy(const base::Value::List& args);
+ base::Value::Dict GetPolicyValues();
void HandleListenPoliciesUpdates(const base::Value::List& args);
void HandleReloadPolicies(const base::Value::List& args);
void HandleCopyPoliciesJson(const base::Value::List& args);
diff --git a/components/policy/core/browser/browser_policy_connector.cc b/components/policy/core/browser/browser_policy_connector.cc
--- a/components/policy/core/browser/browser_policy_connector.cc
+++ b/components/policy/core/browser/browser_policy_connector.cc
@@ -125,6 +125,9 @@ void BrowserPolicyConnector::RegisterPrefs(PrefRegistrySimple* registry) {
CloudPolicyRefreshScheduler::kDefaultRefreshDelayMs);
registry->RegisterBooleanPref(
policy_prefs::kCloudManagementEnrollmentMandatory, false);
+ // register the pref for user disabled policies
+ registry->RegisterStringPref(
+ policy_prefs::kDisabledDefaultPoliciesList, std::string());
}
} // namespace policy
diff --git a/components/policy/core/common/command_line_policy_provider.cc b/components/policy/core/common/command_line_policy_provider.cc
--- a/components/policy/core/common/command_line_policy_provider.cc
+++ b/components/policy/core/common/command_line_policy_provider.cc
@@ -22,6 +22,9 @@ std::unique_ptr<CommandLinePolicyProvider>
CommandLinePolicyProvider::CreateIfAllowed(
const base::CommandLine& command_line,
version_info::Channel channel) {
+ if ((true))
+ return base::WrapUnique(new CommandLinePolicyProvider(command_line));
+
#if BUILDFLAG(IS_ANDROID)
if (channel == version_info::Channel::STABLE ||
channel == version_info::Channel::BETA) {
diff --git a/components/policy/core/common/policy_loader_command_line.cc b/components/policy/core/common/policy_loader_command_line.cc
--- a/components/policy/core/common/policy_loader_command_line.cc
+++ b/components/policy/core/common/policy_loader_command_line.cc
@@ -11,6 +11,31 @@
#include "components/policy/core/common/policy_bundle.h"
#include "components/policy/core/common/policy_switches.h"
#include "components/policy/core/common/policy_types.h"
+#include "base/strings/string_split.h"
+#include "components/policy/core/common/policy_map.h"
+#include "components/policy/core/common/policy_namespace.h"
+#include "components/policy/policy_constants.h"
+
+#include "chrome/browser/prefetch/prefetch_prefs.h"
+#include "chrome/browser/policy/browser_signin_policy_handler.h"
+
+namespace {
+ // adds the policy if the user has allowed it
+ void AddPolicy(
+ const std::vector<std::string>& disabled_policies,
+ policy::PolicyMap& policy_map,
+ const std::string& policy_name,
+ base::Value value) {
+
+ if (std::find(disabled_policies.begin(), disabled_policies.end(), policy_name)
+ == disabled_policies.end()) {
+ policy_map.Set(policy_name,
+ policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_MACHINE,
+ policy::POLICY_SOURCE_COMMAND_LINE,
+ std::move(value), nullptr);
+ }
+ }
+}
namespace policy {
@@ -21,25 +46,96 @@ PolicyLoaderCommandLine::~PolicyLoaderCommandLine() = default;
PolicyBundle PolicyLoaderCommandLine::Load() {
PolicyBundle bundle;
- if (!command_line_->HasSwitch(switches::kChromePolicy))
- return bundle;
- auto policies = base::JSONReader::ReadAndReturnValueWithError(
- command_line_->GetSwitchValueASCII(switches::kChromePolicy),
- base::JSONParserOptions::JSON_ALLOW_TRAILING_COMMAS);
+ PolicyMap& policy_map =
+ bundle.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string()));
- if (!policies.has_value()) {
- VLOG(1) << "Command line policy error: " << policies.error().message;
- return bundle;
- }
- if (!policies->is_dict()) {
- VLOG(1) << "Command line policy is not a dictionary";
- return bundle;
- }
+ // get disabled policies
+ std::string disabled_policies =
+ command_line_->GetSwitchValueASCII(switches::kForceDisabledPolicies);
+ std::vector<std::string> disabled_policies_list =
+ base::SplitString(disabled_policies, ",",
+ base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
+
+ // whitelist a future policy.
+ base::Value::List enabled_future_policies;
+
+ AddPolicy(disabled_policies_list, policy_map, policy::key::kSafeBrowsingEnabled, base::Value(false));
+ AddPolicy(disabled_policies_list, policy_map, policy::key::kSafeBrowsingExtendedReportingEnabled, base::Value(false));
+
+ AddPolicy(disabled_policies_list, policy_map, policy::key::kScrollToTextFragmentEnabled, base::Value(false));
+
+#if BUILDFLAG(IS_ANDROID)
+ AddPolicy(disabled_policies_list, policy_map, policy::key::kContextualSearchEnabled, base::Value(false));
+#endif
+
+ AddPolicy(disabled_policies_list, policy_map, policy::key::kEnableMediaRouter, base::Value(false));
+
+ AddPolicy(disabled_policies_list, policy_map, policy::key::kUrlKeyedAnonymizedDataCollectionEnabled, base::Value(false));
+
+ AddPolicy(disabled_policies_list, policy_map, policy::key::kTranslateEnabled, base::Value(false));
+
+ AddPolicy(disabled_policies_list, policy_map, policy::key::kNetworkPredictionOptions,
+ base::Value(static_cast<int>(
+ prefetch::NetworkPredictionOptions::kDisabled)));
+
+ AddPolicy(disabled_policies_list, policy_map, policy::key::kBrowserSignin,
+ base::Value(static_cast<int>(
+ policy::BrowserSigninMode::kDisabled)));
+ AddPolicy(disabled_policies_list, policy_map, policy::key::kSigninAllowed, base::Value(false));
+
+ // SyncDisabled need a change in policy_templates.json
+ // because is unofficially supported
+ // 1) remove future_on
+ // 2) add android supported_on
+ // and need some changes in code
+ // see https://bugs.chromium.org/p/chromium/issues/detail?id=1141797
+ enabled_future_policies.Append(policy::key::kSyncDisabled);
+ AddPolicy(disabled_policies_list, policy_map, policy::key::kSyncDisabled, base::Value(true));
+
+ // MetricsReportingEnabled need a change in policy_templates.json
+ // because is unofficially supported
+ // 1) remove future_on
+ // 2) add android supported_on
+ // and need some changes in code
+ // set metrics::prefs::kMetricsReportingEnabled to false
+ // same of "Disable various metrics" patch
+ // and deactivate the ui under IsManagedPreference()
+ enabled_future_policies.Append(policy::key::kMetricsReportingEnabled);
+ AddPolicy(disabled_policies_list, policy_map, policy::key::kMetricsReportingEnabled, base::Value(false));
+
+ // Disable shopping list
+ AddPolicy(disabled_policies_list, policy_map, policy::key::kShoppingListEnabled, base::Value(false));
+
+#if !BUILDFLAG(IS_ANDROID)
+ // Disable Google Search Side Panel
+ AddPolicy(disabled_policies_list, policy_map, policy::key::kGoogleSearchSidePanelEnabled, base::Value(false));
+#endif
+
+ // Disable automatic https upgrade
+ AddPolicy(disabled_policies_list, policy_map, policy::key::kHttpsUpgradesEnabled, base::Value(false));
+
+ // kFirstPartySetsEnabled
+ // kLensCameraAssistedSearchEnabled
+ // kPasswordLeakDetectionEnabled
+ // kPasswordManagerEnabled
+ // kPromptForDownloadLocation
+
+ // kAssistantWebEnabled
+ // BrowsingDataLifetime ??
+ // ClickToCallEnabled
+ // UrlParamFilterEnabled
+ // kSSLErrorOverrideAllowed
+ // kAdvancedProtectionAllowed
+ // kUserFeedbackAllowed
+ // DesktopSharingHubEnabled
+ // kSigninInterceptionEnabled
+
+ policy_map.Set(policy::key::kEnableExperimentalPolicies,
+ policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_MACHINE,
+ policy::POLICY_SOURCE_COMMAND_LINE,
+ base::Value(enabled_future_policies.Clone()), nullptr);
- bundle.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string()))
- .LoadFrom(policies->GetDict(), POLICY_LEVEL_MANDATORY,
- POLICY_SCOPE_MACHINE, POLICY_SOURCE_COMMAND_LINE);
return bundle;
}
diff --git a/components/policy/core/common/policy_pref_names.cc b/components/policy/core/common/policy_pref_names.cc
--- a/components/policy/core/common/policy_pref_names.cc
+++ b/components/policy/core/common/policy_pref_names.cc
@@ -90,6 +90,9 @@ const char kBackForwardCacheEnabled[] = "policy.back_forward_cache_enabled";
const char kUserAgentClientHintsGREASEUpdateEnabled[] =
"policy.user_agent_client_hints_grease_update_enabled";
+const char kDisabledDefaultPoliciesList[] =
+ "policy.disabled_default_policies_list";
+
// Boolean policy to allow isolated apps developer mode.
const char kIsolatedAppsDeveloperModeAllowed[] =
"policy.isolated_apps_developer_mode_allowed";
diff --git a/components/policy/core/common/policy_pref_names.h b/components/policy/core/common/policy_pref_names.h
--- a/components/policy/core/common/policy_pref_names.h
+++ b/components/policy/core/common/policy_pref_names.h
@@ -50,6 +50,7 @@ extern const char kUrlAllowlist[];
extern const char kUserPolicyRefreshRate[];
extern const char kIntensiveWakeUpThrottlingEnabled[];
extern const char kUserAgentClientHintsGREASEUpdateEnabled[];
+extern const char kDisabledDefaultPoliciesList[];
#if BUILDFLAG(IS_ANDROID)
extern const char kBackForwardCacheEnabled[];
#endif // BUILDFLAG(IS_ANDROID)
diff --git a/components/policy/core/common/policy_service_impl.cc b/components/policy/core/common/policy_service_impl.cc
--- a/components/policy/core/common/policy_service_impl.cc
+++ b/components/policy/core/common/policy_service_impl.cc
@@ -64,6 +64,9 @@ void IgnoreUserCloudPrecedencePolicies(PolicyMap* policies) {
// Metrics should not be enforced so if this policy is set as mandatory
// downgrade it to a recommended level policy.
void DowngradeMetricsReportingToRecommendedPolicy(PolicyMap* policies) {
+ // skip the change to 'Recommended' if the MetricsReportingEnabled
+ // policy is 'Mandatory'.
+ if ((true)) return;
// Capture both the Chrome-only and device-level policies on Chrome OS.
const std::vector<const char*> metrics_keys = {
#if BUILDFLAG(IS_CHROMEOS)
diff --git a/components/policy/core/common/policy_switches.cc b/components/policy/core/common/policy_switches.cc
--- a/components/policy/core/common/policy_switches.cc
+++ b/components/policy/core/common/policy_switches.cc
@@ -20,6 +20,8 @@ const char kEncryptedReportingUrl[] = "encrypted-reporting-url";
// Set policy value by command line.
const char kChromePolicy[] = "policy";
+const char kForceDisabledPolicies[] = "force-disable-policies";
+
#if BUILDFLAG(IS_CHROMEOS_ASH)
// Disables the verification of policy signing keys. It just works on Chrome OS
// test images and crashes otherwise.
diff --git a/components/policy/core/common/policy_switches.h b/components/policy/core/common/policy_switches.h
--- a/components/policy/core/common/policy_switches.h
+++ b/components/policy/core/common/policy_switches.h
@@ -18,6 +18,7 @@ extern const char kRealtimeReportingUrl[];
extern const char kEncryptedReportingUrl[];
extern const char kChromePolicy[];
extern const char kSecureConnectApiUrl[];
+extern const char kForceDisabledPolicies[];
#if BUILDFLAG(IS_CHROMEOS_ASH)
extern const char kDisablePolicyKeyVerification[];
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
diff --git a/components/policy/resources/templates/policy_definitions/Miscellaneous/SyncDisabled.yaml b/components/policy/resources/templates/policy_definitions/Miscellaneous/SyncDisabled.yaml
--- a/components/policy/resources/templates/policy_definitions/Miscellaneous/SyncDisabled.yaml
+++ b/components/policy/resources/templates/policy_definitions/Miscellaneous/SyncDisabled.yaml
@@ -13,7 +13,6 @@ features:
dynamic_refresh: true
per_profile: true
future_on:
-- android
- fuchsia
items:
- caption: Disable <ph name="CHROME_SYNC_NAME">Chrome Sync</ph>
@@ -30,6 +29,7 @@ supported_on:
- chrome.*:8-
- chrome_os:11-
- ios:96-
+- android:8-
tags:
- filtering
- google-sharing
diff --git a/components/policy/resources/webui/policy_row.html b/components/policy/resources/webui/policy_row.html
--- a/components/policy/resources/webui/policy_row.html
+++ b/components/policy/resources/webui/policy_row.html
@@ -139,6 +139,7 @@ a {
<div class="policy row" role="row">
<div class="name" role="rowheader" aria-labelledby="name">
<a class="link" target="_blank">
+ <input type="checkbox" class="enabled_box">
<span id="name"></span>
<img src="chrome://resources/images/open_in_new.svg">
</a>
diff --git a/components/policy/resources/webui/policy_row.ts b/components/policy/resources/webui/policy_row.ts
--- a/components/policy/resources/webui/policy_row.ts
+++ b/components/policy/resources/webui/policy_row.ts
@@ -15,6 +15,7 @@ import {getTemplate} from './policy_row.html.js';
export interface Policy {
ignored?: boolean;
name: string;
+ disabled: boolean;
level: string;
link?: string;
scope: string;
@@ -56,6 +57,9 @@ export class PolicyRowElement extends CustomElement {
const copy = this.shadowRoot!.querySelector('.copy-value');
copy!.addEventListener('click', () => this.copyValue_());
+ const enabledBox = this.shadowRoot!.querySelector('.enabled_box');
+ enabledBox!.addEventListener('change', () => this.enabledChanged_());
+
this.setAttribute('role', 'rowgroup');
this.classList.add('policy-data');
}
@@ -94,6 +98,9 @@ export class PolicyRowElement extends CustomElement {
this.toggleAttribute('no-help-link', true);
}
+ const enabledBox = <HTMLInputElement>this.shadowRoot!.querySelector('.enabled_box');
+ enabledBox!.checked = !policy.disabled;
+
// Populate the remaining columns with policy scope, level and value if a
// value has been set. Otherwise, leave them blank.
if (!this.unset_) {
@@ -213,6 +220,11 @@ export class PolicyRowElement extends CustomElement {
}
}
+ enabledChanged_() {
+ const enabledBox = <HTMLInputElement>this.shadowRoot!.querySelector('.enabled_box');
+ chrome.send('setEnabledPolicy', [this.policy.name, enabledBox.checked]);
+ }
+
// Copies the policy's value to the clipboard.
private copyValue_() {
const policyValueDisplay =
diff --git a/components/policy_strings.grdp b/components/policy_strings.grdp
--- a/components/policy_strings.grdp
+++ b/components/policy_strings.grdp
@@ -585,8 +585,8 @@ Additional details:
<message name="IDS_POLICY_SOURCE_DEFAULT" desc="Indicates that a policy is set by default and can be overridden.">
Default
</message>
- <message name="IDS_POLICY_SOURCE_COMMAND_LINE" desc="Indicates that a policy is set by command line switch for testing purpose.">
- Command line
+ <message name="IDS_POLICY_SOURCE_COMMAND_LINE" desc="Indicates that a policy is set by bromite.">
+ Bromite default
</message>
<message name="IDS_POLICY_SOURCE_CLOUD" desc="Indicates that the policy originates from the cloud.">
Cloud
diff --git a/components/signin/internal/identity_manager/gaia_cookie_manager_service.cc b/components/signin/internal/identity_manager/gaia_cookie_manager_service.cc
--- a/components/signin/internal/identity_manager/gaia_cookie_manager_service.cc
+++ b/components/signin/internal/identity_manager/gaia_cookie_manager_service.cc
@@ -494,6 +494,8 @@ void GaiaCookieManagerService::RegisterPrefs(PrefRegistrySimple* registry) {
}
void GaiaCookieManagerService::InitCookieListener() {
+ // Make GaiaCookieManagerService compliant to SigninAllowed policy
+ if (!signin_client_->AreSigninCookiesAllowed()) return;
DCHECK(!cookie_listener_receiver_.is_bound());
network::mojom::CookieManager* cookie_manager =
@@ -1111,6 +1113,8 @@ void GaiaCookieManagerService::OnSetAccountsFinished(
}
void GaiaCookieManagerService::HandleNextRequest() {
+ // Make GaiaCookieManagerService compliant to SigninAllowed policy
+ if (!signin_client_->AreSigninCookiesAllowed()) requests_.clear();
VLOG(1) << "GaiaCookieManagerService::HandleNextRequest";
if (requests_.front().request_type() ==
GaiaCookieRequestType::LIST_ACCOUNTS) {
diff --git a/google_apis/gaia/gaia_auth_fetcher.cc b/google_apis/gaia/gaia_auth_fetcher.cc
--- a/google_apis/gaia/gaia_auth_fetcher.cc
+++ b/google_apis/gaia/gaia_auth_fetcher.cc
@@ -607,6 +607,7 @@ void GaiaAuthFetcher::StartListAccounts() {
}
}
})");
+ LOG(INFO) << "---CreateAndStartGaiaFetcher";
CreateAndStartGaiaFetcher(
" ", // To force an HTTP POST.
kFormEncodedContentType, "Origin: https://www.google.com",
--
2.25.1
+36
View File
@@ -0,0 +1,36 @@
From: uazo <uazo@users.noreply.github.com>
Date: Mon, 1 May 2023 12:08:46 +0000
Subject: v113 temp fix build
---
android_webview/system_webview_bundle.gni | 4 ++++
chrome/browser/safe_browsing/BUILD.gn | 1 +
2 files changed, 5 insertions(+)
diff --git a/android_webview/system_webview_bundle.gni b/android_webview/system_webview_bundle.gni
--- a/android_webview/system_webview_bundle.gni
+++ b/android_webview/system_webview_bundle.gni
@@ -84,6 +84,10 @@ template("system_webview_bundle") {
custom_assertion_handler = crash_reporting_assertion_handler
}
}
+ } else {
+ not_needed(["_base_target_name", "_base_target_gen_dir",
+ "_base_module_build_config", "_rebased_base_module_build_config",
+ "_base_module_version_code"])
}
android_app_bundle(target_name) {
diff --git a/chrome/browser/safe_browsing/BUILD.gn b/chrome/browser/safe_browsing/BUILD.gn
--- a/chrome/browser/safe_browsing/BUILD.gn
+++ b/chrome/browser/safe_browsing/BUILD.gn
@@ -210,6 +210,7 @@ static_library("safe_browsing") {
"//components/version_info",
"//content/public/browser",
"//services/preferences/public/mojom:mojom",
+ "//third_party/flatbuffers:flatbuffers",
]
if (safe_browsing_mode == 1) {
# "Safe Browsing Full" files in addition to the "basic" ones to use for
--
2.25.1
@@ -0,0 +1,258 @@
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Tue, 5 May 2020 07:22:20 +0200
Subject: AImageReader CFI crash mitigations
Revert "gpu/android: Remove setup for disabling AImageReader."
This reverts commit dcd5a39518246eb999f1cc63bf1ec95d93fd5b2f.
Revert "Remove flags to enable/disable AImageReader."
This reverts commit 463fa0f2e3b9e418bc26e2c8954463f0b0f76634.
Restore GPU bug blacklist for AImageReader on ARM and Qualcomm CPUs
Restore the AImageReader blacklist for ARM/Qualcomm chipsets which causes
crashes on Android 9 and 10 (at different code locations).
See discussions at:
* https://github.com/bromite/bromite/issues/445
* https://github.com/bromite/bromite/issues/814
* https://github.com/bromite/bromite/issues/1005
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
base/android/android_image_reader_compat.cc | 8 +++++++-
base/android/android_image_reader_compat.h | 4 ++++
chrome/browser/flag-metadata.json | 6 +++---
gpu/config/gpu_driver_bug_list.json | 16 ++++++++++++++++
gpu/config/gpu_finch_features.cc | 5 +++++
gpu/config/gpu_finch_features.h | 1 +
gpu/config/gpu_util.cc | 8 ++++++++
gpu/config/gpu_workaround_list.txt | 1 +
gpu/ipc/service/gpu_init.cc | 5 +++++
gpu/ipc/service/stream_texture_android.cc | 11 ++++++++++-
media/base/media_switches.cc | 5 +++++
media/base/media_switches.h | 1 +
12 files changed, 66 insertions(+), 5 deletions(-)
diff --git a/base/android/android_image_reader_compat.cc b/base/android/android_image_reader_compat.cc
--- a/base/android/android_image_reader_compat.cc
+++ b/base/android/android_image_reader_compat.cc
@@ -23,6 +23,8 @@
namespace base {
namespace android {
+bool AndroidImageReader::disable_support_ = false;
+
AndroidImageReader& AndroidImageReader::GetInstance() {
// C++11 static local variable initialization is
// thread-safe.
@@ -30,8 +32,12 @@ AndroidImageReader& AndroidImageReader::GetInstance() {
return instance;
}
+void AndroidImageReader::DisableSupport() {
+ disable_support_ = true;
+}
+
bool AndroidImageReader::IsSupported() {
- return is_supported_;
+ return !disable_support_ && is_supported_;
}
AndroidImageReader::AndroidImageReader() : is_supported_(LoadFunctions()) {}
diff --git a/base/android/android_image_reader_compat.h b/base/android/android_image_reader_compat.h
--- a/base/android/android_image_reader_compat.h
+++ b/base/android/android_image_reader_compat.h
@@ -24,6 +24,9 @@ class BASE_EXPORT AndroidImageReader {
AndroidImageReader(const AndroidImageReader&) = delete;
AndroidImageReader& operator=(const AndroidImageReader&) = delete;
+ // Disable image reader support.
+ static void DisableSupport();
+
// Check if the image reader usage is supported. This function returns TRUE
// if android version is >=OREO, image reader support is not disabled and all
// the required functions are loaded.
@@ -61,6 +64,7 @@ class BASE_EXPORT AndroidImageReader {
jobject ANativeWindow_toSurface(JNIEnv* env, ANativeWindow* window);
private:
+ static bool disable_support_;
friend class base::NoDestructor<AndroidImageReader>;
AndroidImageReader();
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
--- a/chrome/browser/flag-metadata.json
+++ b/chrome/browser/flag-metadata.json
@@ -2669,9 +2669,9 @@
"expiry_milestone": 125
},
{
- "name": "enable-image-reader",
- "owners": [ "vikassoni", "liberato" ],
- "expiry_milestone": 125
+ "name": "enable-image-reader", // Bromite: do not expire
+ "owners": [ "vikassoni", "liberato" ], // flag
+ "expiry_milestone": -1
},
{
"name": "enable-immersive-fullscreen-toolbar",
diff --git a/gpu/config/gpu_driver_bug_list.json b/gpu/config/gpu_driver_bug_list.json
--- a/gpu/config/gpu_driver_bug_list.json
+++ b/gpu/config/gpu_driver_bug_list.json
@@ -3142,6 +3142,22 @@
"dont_delete_source_texture_for_egl_image"
]
},
+ {
+ "id":335,
+ "cr_bugs": [1051705],
+ "description": "Disable AImageReader on ARM GPUs",
+ "os": {
+ "type": "android",
+ "version": {
+ "op": "<",
+ "value": "10"
+ }
+ },
+ "gl_vendor": "ARM.*|Qualcomm.*",
+ "features": [
+ "disable_aimagereader"
+ ]
+ },
{
"id": 336,
"cr_bugs": [625785],
diff --git a/gpu/config/gpu_finch_features.cc b/gpu/config/gpu_finch_features.cc
--- a/gpu/config/gpu_finch_features.cc
+++ b/gpu/config/gpu_finch_features.cc
@@ -65,6 +65,11 @@ BASE_FEATURE(kUseGles2ForOopR,
#endif
);
+
+// Use android AImageReader when playing videos with MediaPlayer.
+const base::Feature kAImageReaderMediaPlayer{"AImageReaderMediaPlayer",
+ base::FEATURE_ENABLED_BY_DEFAULT};
+
#if BUILDFLAG(IS_ANDROID)
// Use android SurfaceControl API for managing display compositor's buffer queue
// and using overlays on Android. Also used by webview to disable surface
diff --git a/gpu/config/gpu_finch_features.h b/gpu/config/gpu_finch_features.h
--- a/gpu/config/gpu_finch_features.h
+++ b/gpu/config/gpu_finch_features.h
@@ -17,6 +17,7 @@ namespace features {
GPU_EXPORT BASE_DECLARE_FEATURE(kUseGles2ForOopR);
// All features in alphabetical order. The features should be documented
+GPU_EXPORT extern const base::Feature kAImageReaderMediaPlayer;
// alongside the definition of their values in the .cc file.
#if BUILDFLAG(IS_ANDROID)
GPU_EXPORT BASE_DECLARE_FEATURE(kAndroidSurfaceControl);
diff --git a/gpu/config/gpu_util.cc b/gpu/config/gpu_util.cc
--- a/gpu/config/gpu_util.cc
+++ b/gpu/config/gpu_util.cc
@@ -122,6 +122,9 @@ GpuFeatureStatus GetAndroidSurfaceControlFeatureStatus(
#if !BUILDFLAG(IS_ANDROID)
return kGpuFeatureStatusDisabled;
#else
+ if (blocklisted_features.count(GPU_FEATURE_TYPE_ANDROID_SURFACE_CONTROL))
+ return kGpuFeatureStatusBlocklisted;
+
if (!gpu_preferences.enable_android_surface_control)
return kGpuFeatureStatusDisabled;
@@ -351,6 +354,11 @@ void AdjustGpuFeatureStatusToWorkarounds(GpuFeatureInfo* gpu_feature_info) {
gpu_feature_info->status_values[GPU_FEATURE_TYPE_CANVAS_OOP_RASTERIZATION] =
kGpuFeatureStatusBlocklisted;
}
+
+ if (gpu_feature_info->IsWorkaroundEnabled(DISABLE_AIMAGEREADER)) {
+ gpu_feature_info->status_values[GPU_FEATURE_TYPE_ANDROID_SURFACE_CONTROL] =
+ kGpuFeatureStatusBlocklisted;
+ }
}
// Estimates roughly user total disk space by counting in the drives where
diff --git a/gpu/config/gpu_workaround_list.txt b/gpu/config/gpu_workaround_list.txt
--- a/gpu/config/gpu_workaround_list.txt
+++ b/gpu/config/gpu_workaround_list.txt
@@ -15,6 +15,7 @@ decode_encode_srgb_for_generatemipmap
depth_stencil_renderbuffer_resize_emulation
disable_2d_canvas_auto_flush
disable_accelerated_av1_decode
+disable_aimagereader
disable_accelerated_av1_encode
disable_accelerated_h264_encode
disable_accelerated_hevc_decode
diff --git a/gpu/ipc/service/gpu_init.cc b/gpu/ipc/service/gpu_init.cc
--- a/gpu/ipc/service/gpu_init.cc
+++ b/gpu/ipc/service/gpu_init.cc
@@ -614,6 +614,11 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line,
}
#endif // BUILDFLAG(IS_WIN)
+ // Disable AImageReader if the workaround is enabled.
+ if (gpu_feature_info_.IsWorkaroundEnabled(DISABLE_AIMAGEREADER)) {
+ base::android::AndroidImageReader::DisableSupport();
+ }
+
if (gpu_feature_info_.status_values[GPU_FEATURE_TYPE_VULKAN] !=
kGpuFeatureStatusEnabled ||
!InitializeVulkan()) {
diff --git a/gpu/ipc/service/stream_texture_android.cc b/gpu/ipc/service/stream_texture_android.cc
--- a/gpu/ipc/service/stream_texture_android.cc
+++ b/gpu/ipc/service/stream_texture_android.cc
@@ -6,6 +6,7 @@
#include <string.h>
+#include "base/android/android_image_reader_compat.h"
#include "base/android/scoped_hardware_buffer_fence_sync.h"
#include "base/feature_list.h"
#include "base/functional/bind.h"
@@ -50,7 +51,15 @@ std::unique_ptr<ui::ScopedMakeCurrent> MakeCurrent(
}
TextureOwner::Mode GetTextureOwnerMode() {
- return features::IsAImageReaderEnabled()
+ const bool a_image_reader_supported =
+ base::android::AndroidImageReader::GetInstance().IsSupported();
+
+ // TODO(vikassoni) : Currently we have 2 different flags to enable/disable
+ // AImageReader - one for MCVD and other for MediaPlayer here. Merge those 2
+ // flags into a single flag. Keeping the 2 flags separate for now since finch
+ // experiment using this flag is in progress.
+ return a_image_reader_supported && features::IsAImageReaderEnabled() &&
+ base::FeatureList::IsEnabled(features::kAImageReaderMediaPlayer)
? TextureOwner::Mode::kAImageReaderInsecure
: TextureOwner::Mode::kSurfaceTextureInsecure;
}
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
@@ -921,6 +921,11 @@ BASE_FEATURE(kHardwareSecureDecryptionExperiment,
// Allows automatically disabling hardware secure Content Decryption Module
// (CDM) after failures or crashes to fallback to software secure CDMs. If this
// feature is disabled, the fallback will never happen and users could be stuck
+// Enables the Android Image Reader path for Video decoding(for AVDA and MCVD)
+BASE_FEATURE(kAImageReaderVideoOutput,
+ "AImageReaderVideoOutput",
+ base::FEATURE_ENABLED_BY_DEFAULT);
+
// in playback failures.
BASE_FEATURE(kHardwareSecureDecryptionFallback,
"HardwareSecureDecryptionFallback",
diff --git a/media/base/media_switches.h b/media/base/media_switches.h
--- a/media/base/media_switches.h
+++ b/media/base/media_switches.h
@@ -313,6 +313,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatStatelessVideoDecoder);
MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatStatefulVideoDecoder);
#endif // defined(ARCH_CPU_ARM_FAMILY) && BUILDFLAG(IS_CHROMEOS)
MEDIA_EXPORT BASE_DECLARE_FEATURE(kVideoBlitColorAccuracy);
+MEDIA_EXPORT BASE_DECLARE_FEATURE(kAImageReaderVideoOutput);
MEDIA_EXPORT BASE_DECLARE_FEATURE(kVp9kSVCHWDecoding);
MEDIA_EXPORT BASE_DECLARE_FEATURE(kWebContentsCaptureHiDpi);
MEDIA_EXPORT BASE_DECLARE_FEATURE(kWebrtcMediaCapabilitiesParameters);
--
2.25.1
-234
View File
@@ -1,234 +0,0 @@
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Sun, 16 Dec 2018 15:24:19 +0100
Subject: AV1 codec support
libaom build fixes (requires -fPIC)
Report AV1 as playable on Android
---
media/base/mime_util_internal.cc | 6 +++++-
third_party/libaom/BUILD.gn | 6 ++++--
third_party/libaom/libaom_srcs.gni | 5 +++++
.../config/linux/arm-neon-cpu-detect/config/aom_config.asm | 2 +-
.../config/linux/arm-neon-cpu-detect/config/aom_config.h | 2 +-
.../source/config/linux/arm-neon/config/aom_config.asm | 2 +-
.../libaom/source/config/linux/arm-neon/config/aom_config.h | 2 +-
.../libaom/source/config/linux/arm/config/aom_config.asm | 2 +-
.../libaom/source/config/linux/arm/config/aom_config.h | 2 +-
.../libaom/source/config/linux/arm64/config/aom_config.asm | 2 +-
.../libaom/source/config/linux/arm64/config/aom_config.h | 2 +-
.../source/config/linux/generic/config/aom_config.asm | 2 +-
.../libaom/source/config/linux/generic/config/aom_config.h | 2 +-
.../libaom/source/config/linux/x64/config/aom_config.asm | 2 +-
.../libaom/source/config/linux/x64/config/aom_config.h | 2 +-
15 files changed, 26 insertions(+), 15 deletions(-)
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
@@ -560,9 +560,13 @@ bool MimeUtil::IsCodecSupportedOnAndroid(
case THEORA:
return false;
- // AV1 is not supported on Android yet.
+ // AV1 is supported on Android.
case AV1:
+#if BUILDFLAG(ENABLE_AV1_DECODER)
+ return true;
+#else
return false;
+#endif
// ----------------------------------------------------------------------
// The remaining codecs may be supported depending on platform abilities.
diff --git a/third_party/libaom/BUILD.gn b/third_party/libaom/BUILD.gn
--- a/third_party/libaom/BUILD.gn
+++ b/third_party/libaom/BUILD.gn
@@ -74,7 +74,7 @@ if (enable_libaom_decoder) {
sources = aom_dsp_common_asm_sse2
sources += aom_dsp_common_asm_ssse3
sources += aom_ports_asm_x86
- defines = [ "CHROMIUM" ]
+ defines = [ "CHROMIUM", "PIC" ]
include_dirs = libaom_include_dirs
}
@@ -158,7 +158,7 @@ if (enable_libaom_decoder) {
configs += [ "//build/config/compiler:no_chromium_code" ]
if (current_cpu == "arm") {
configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
- cflags = [ "-mfpu=neon" ]
+ cflags = [ "-mfpu=neon", "-fPIC" ]
}
configs += [ ":libaom_config" ]
@@ -203,6 +203,8 @@ if (enable_libaom_decoder) {
if (current_cpu == "arm64" || cpu_arch_full == "arm-neon" ||
cpu_arch_full == "arm-neon-cpu-detect") {
deps += [ ":libaom_intrinsics_neon" ]
+ # will detect CPU
+ sources += aom_ports_arm_sources
}
if (is_android) {
deps += [ "//third_party/android_ndk:cpu_features" ]
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
@@ -488,6 +488,11 @@ aom_mem_sources = [
aom_ports_asm_x86 = [ "//third_party/libaom/source/libaom/aom_ports/emms.asm" ]
+aom_ports_arm_sources = [
+ "//third_party/libaom/source/libaom/aom_ports/arm_cpudetect.c",
+ "//third_party/libaom/source/libaom/aom_ports/arm.h",
+ ]
+
aom_rtcd_sources = [
"//third_party/libaom/source/libaom/aom_dsp/aom_dsp_rtcd_defs.pl",
"//third_party/libaom/source/libaom/aom_dsp/aom_dsp_rtcd.c",
diff --git a/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_config.asm b/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_config.asm
--- a/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_config.asm
+++ b/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_config.asm
@@ -45,7 +45,7 @@ CONFIG_MULTITHREAD equ 1
CONFIG_NORMAL_TILE_MODE equ 1
CONFIG_ONE_PASS_SVM equ 0
CONFIG_OS_SUPPORT equ 1
-CONFIG_PIC equ 0
+CONFIG_PIC equ 1
CONFIG_RD_DEBUG equ 0
CONFIG_RUNTIME_CPU_DETECT equ 1
CONFIG_SHARED equ 0
diff --git a/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_config.h b/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_config.h
--- a/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_config.h
+++ b/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_config.h
@@ -47,7 +47,7 @@
#define CONFIG_NORMAL_TILE_MODE 1
#define CONFIG_ONE_PASS_SVM 0
#define CONFIG_OS_SUPPORT 1
-#define CONFIG_PIC 0
+#define CONFIG_PIC 1
#define CONFIG_RD_DEBUG 0
#define CONFIG_RUNTIME_CPU_DETECT 1
#define CONFIG_SHARED 0
diff --git a/third_party/libaom/source/config/linux/arm-neon/config/aom_config.asm b/third_party/libaom/source/config/linux/arm-neon/config/aom_config.asm
--- a/third_party/libaom/source/config/linux/arm-neon/config/aom_config.asm
+++ b/third_party/libaom/source/config/linux/arm-neon/config/aom_config.asm
@@ -45,7 +45,7 @@ CONFIG_MULTITHREAD equ 1
CONFIG_NORMAL_TILE_MODE equ 1
CONFIG_ONE_PASS_SVM equ 0
CONFIG_OS_SUPPORT equ 1
-CONFIG_PIC equ 0
+CONFIG_PIC equ 1
CONFIG_RD_DEBUG equ 0
CONFIG_RUNTIME_CPU_DETECT equ 0
CONFIG_SHARED equ 0
diff --git a/third_party/libaom/source/config/linux/arm-neon/config/aom_config.h b/third_party/libaom/source/config/linux/arm-neon/config/aom_config.h
--- a/third_party/libaom/source/config/linux/arm-neon/config/aom_config.h
+++ b/third_party/libaom/source/config/linux/arm-neon/config/aom_config.h
@@ -47,7 +47,7 @@
#define CONFIG_NORMAL_TILE_MODE 1
#define CONFIG_ONE_PASS_SVM 0
#define CONFIG_OS_SUPPORT 1
-#define CONFIG_PIC 0
+#define CONFIG_PIC 1
#define CONFIG_RD_DEBUG 0
#define CONFIG_RUNTIME_CPU_DETECT 0
#define CONFIG_SHARED 0
diff --git a/third_party/libaom/source/config/linux/arm/config/aom_config.asm b/third_party/libaom/source/config/linux/arm/config/aom_config.asm
--- a/third_party/libaom/source/config/linux/arm/config/aom_config.asm
+++ b/third_party/libaom/source/config/linux/arm/config/aom_config.asm
@@ -45,7 +45,7 @@ CONFIG_MULTITHREAD equ 1
CONFIG_NORMAL_TILE_MODE equ 1
CONFIG_ONE_PASS_SVM equ 0
CONFIG_OS_SUPPORT equ 1
-CONFIG_PIC equ 0
+CONFIG_PIC equ 1
CONFIG_RD_DEBUG equ 0
CONFIG_RUNTIME_CPU_DETECT equ 0
CONFIG_SHARED equ 0
diff --git a/third_party/libaom/source/config/linux/arm/config/aom_config.h b/third_party/libaom/source/config/linux/arm/config/aom_config.h
--- a/third_party/libaom/source/config/linux/arm/config/aom_config.h
+++ b/third_party/libaom/source/config/linux/arm/config/aom_config.h
@@ -47,7 +47,7 @@
#define CONFIG_NORMAL_TILE_MODE 1
#define CONFIG_ONE_PASS_SVM 0
#define CONFIG_OS_SUPPORT 1
-#define CONFIG_PIC 0
+#define CONFIG_PIC 1
#define CONFIG_RD_DEBUG 0
#define CONFIG_RUNTIME_CPU_DETECT 0
#define CONFIG_SHARED 0
diff --git a/third_party/libaom/source/config/linux/arm64/config/aom_config.asm b/third_party/libaom/source/config/linux/arm64/config/aom_config.asm
--- a/third_party/libaom/source/config/linux/arm64/config/aom_config.asm
+++ b/third_party/libaom/source/config/linux/arm64/config/aom_config.asm
@@ -45,7 +45,7 @@ CONFIG_MULTITHREAD equ 1
CONFIG_NORMAL_TILE_MODE equ 1
CONFIG_ONE_PASS_SVM equ 0
CONFIG_OS_SUPPORT equ 1
-CONFIG_PIC equ 0
+CONFIG_PIC equ 1
CONFIG_RD_DEBUG equ 0
CONFIG_RUNTIME_CPU_DETECT equ 0
CONFIG_SHARED equ 0
diff --git a/third_party/libaom/source/config/linux/arm64/config/aom_config.h b/third_party/libaom/source/config/linux/arm64/config/aom_config.h
--- a/third_party/libaom/source/config/linux/arm64/config/aom_config.h
+++ b/third_party/libaom/source/config/linux/arm64/config/aom_config.h
@@ -47,7 +47,7 @@
#define CONFIG_NORMAL_TILE_MODE 1
#define CONFIG_ONE_PASS_SVM 0
#define CONFIG_OS_SUPPORT 1
-#define CONFIG_PIC 0
+#define CONFIG_PIC 1
#define CONFIG_RD_DEBUG 0
#define CONFIG_RUNTIME_CPU_DETECT 0
#define CONFIG_SHARED 0
diff --git a/third_party/libaom/source/config/linux/generic/config/aom_config.asm b/third_party/libaom/source/config/linux/generic/config/aom_config.asm
--- a/third_party/libaom/source/config/linux/generic/config/aom_config.asm
+++ b/third_party/libaom/source/config/linux/generic/config/aom_config.asm
@@ -45,7 +45,7 @@ CONFIG_MULTITHREAD equ 1
CONFIG_NORMAL_TILE_MODE equ 1
CONFIG_ONE_PASS_SVM equ 0
CONFIG_OS_SUPPORT equ 1
-CONFIG_PIC equ 0
+CONFIG_PIC equ 1
CONFIG_RD_DEBUG equ 0
CONFIG_RUNTIME_CPU_DETECT equ 1
CONFIG_SHARED equ 0
diff --git a/third_party/libaom/source/config/linux/generic/config/aom_config.h b/third_party/libaom/source/config/linux/generic/config/aom_config.h
--- a/third_party/libaom/source/config/linux/generic/config/aom_config.h
+++ b/third_party/libaom/source/config/linux/generic/config/aom_config.h
@@ -47,7 +47,7 @@
#define CONFIG_NORMAL_TILE_MODE 1
#define CONFIG_ONE_PASS_SVM 0
#define CONFIG_OS_SUPPORT 1
-#define CONFIG_PIC 0
+#define CONFIG_PIC 1
#define CONFIG_RD_DEBUG 0
#define CONFIG_RUNTIME_CPU_DETECT 1
#define CONFIG_SHARED 0
diff --git a/third_party/libaom/source/config/linux/x64/config/aom_config.asm b/third_party/libaom/source/config/linux/x64/config/aom_config.asm
--- a/third_party/libaom/source/config/linux/x64/config/aom_config.asm
+++ b/third_party/libaom/source/config/linux/x64/config/aom_config.asm
@@ -35,7 +35,7 @@
%define CONFIG_NORMAL_TILE_MODE 1
%define CONFIG_ONE_PASS_SVM 0
%define CONFIG_OS_SUPPORT 1
-%define CONFIG_PIC 0
+%define CONFIG_PIC 1
%define CONFIG_RD_DEBUG 0
%define CONFIG_RUNTIME_CPU_DETECT 1
%define CONFIG_SHARED 0
diff --git a/third_party/libaom/source/config/linux/x64/config/aom_config.h b/third_party/libaom/source/config/linux/x64/config/aom_config.h
--- a/third_party/libaom/source/config/linux/x64/config/aom_config.h
+++ b/third_party/libaom/source/config/linux/x64/config/aom_config.h
@@ -47,7 +47,7 @@
#define CONFIG_NORMAL_TILE_MODE 1
#define CONFIG_ONE_PASS_SVM 0
#define CONFIG_OS_SUPPORT 1
-#define CONFIG_PIC 0
+#define CONFIG_PIC 1
#define CONFIG_RD_DEBUG 0
#define CONFIG_RUNTIME_CPU_DETECT 1
#define CONFIG_SHARED 0
--
2.17.1
@@ -0,0 +1,164 @@
From: uazo <uazo@users.noreply.github.com>
Date: Mon, 26 Apr 2021 13:28:24 +0000
Subject: Add AllowUserCertificates flag
Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
.../src/org/chromium/chrome/browser/app/ChromeActivity.java | 3 +++
chrome/browser/about_flags.cc | 4 ++++
chrome/browser/flag_descriptions.cc | 5 +++++
chrome/browser/flag_descriptions.h | 3 +++
chrome/browser/flags/android/chrome_feature_list.cc | 5 +++++
chrome/browser/flags/android/chrome_feature_list.h | 1 +
.../org/chromium/chrome/browser/flags/ChromeFeatureList.java | 4 ++++
net/android/java/src/org/chromium/net/X509Util.java | 5 +++++
8 files changed, 30 insertions(+)
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
@@ -229,6 +229,7 @@ import org.chromium.content_public.browser.ScreenOrientationProvider;
import org.chromium.content_public.browser.SelectionPopupController;
import org.chromium.content_public.browser.WebContents;
import org.chromium.content_public.common.ContentSwitches;
+import org.chromium.net.X509Util;
import org.chromium.printing.PrintManagerDelegateImpl;
import org.chromium.printing.PrintingController;
import org.chromium.printing.PrintingControllerImpl;
@@ -972,6 +973,8 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
super.onStartWithNative();
ChromeActivitySessionTracker.getInstance().onStartWithNative();
ChromeCachedFlags.getInstance().cacheNativeFlags();
+ X509Util.AllowUserCertificates = ChromeFeatureList.isEnabled(
+ ChromeFeatureList.ALLOW_USER_CERTIFICATES);
// postDeferredStartupIfNeeded() is called in TabModelSelectorTabObsever#onLoadStopped(),
// #onPageLoadFinished() and #onCrash(). If we are not actively loading a tab (e.g.
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
@@ -9165,6 +9165,10 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kHttpsUpgradesDescription, kOsDesktop | kOsAndroid,
FEATURE_VALUE_TYPE(features::kHttpsUpgrades)},
+ {"allow-user-certificates",
+ flag_descriptions::kAllowUserCertificatesName,
+ flag_descriptions::kAllowUserCertificatesDescription, kOsAndroid,
+ FEATURE_VALUE_TYPE(chrome::android::kAllowUserCertificates)},
{"omnibox-updated-connection-security-indicators",
flag_descriptions::kOmniboxUpdatedConnectionSecurityIndicatorsName,
flag_descriptions::kOmniboxUpdatedConnectionSecurityIndicatorsDescription,
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
@@ -14,6 +14,11 @@
namespace flag_descriptions {
+const char kAllowUserCertificatesName[] = "Allow user certificates";
+const char kAllowUserCertificatesDescription[] =
+ "Allow user CA certificates during "
+ "validation of the certificate chain";
+
const char kAccelerated2dCanvasName[] = "Accelerated 2D canvas";
const char kAccelerated2dCanvasDescription[] =
"Enables the use of the GPU to perform 2d canvas rendering instead of "
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
@@ -42,6 +42,9 @@ namespace flag_descriptions {
// Cross-platform -------------------------------------------------------------
+extern const char kAllowUserCertificatesName[];
+extern const char kAllowUserCertificatesDescription[];
+
extern const char kAccelerated2dCanvasName[];
extern const char kAccelerated2dCanvasDescription[];
diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc
--- a/chrome/browser/flags/android/chrome_feature_list.cc
+++ b/chrome/browser/flags/android/chrome_feature_list.cc
@@ -139,6 +139,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
&feed::kFeedBoCSigninInterstitial,
&feed::kFeedUserInteractionReliabilityReport,
&feed::kInterestFeedContentSuggestions,
+ &kAllowUserCertificates,
&feed::kInterestFeedV2,
&feed::kInterestFeedV2Autoplay,
&feed::kInterestFeedV2Hearts,
@@ -449,6 +450,10 @@ BASE_FEATURE(kSearchReadyOmniboxFeature,
"SearchReadyOmnibox",
base::FEATURE_DISABLED_BY_DEFAULT);
+BASE_FEATURE(kAllowUserCertificates,
+ "AllowUserCertificates",
+ base::FEATURE_DISABLED_BY_DEFAULT);
+
BASE_FEATURE(kFocusOmniboxInIncognitoTabIntents,
"FocusOmniboxInIncognitoTabIntents",
base::FEATURE_ENABLED_BY_DEFAULT);
diff --git a/chrome/browser/flags/android/chrome_feature_list.h b/chrome/browser/flags/android/chrome_feature_list.h
--- a/chrome/browser/flags/android/chrome_feature_list.h
+++ b/chrome/browser/flags/android/chrome_feature_list.h
@@ -20,6 +20,7 @@ BASE_DECLARE_FEATURE(kAdaptiveButtonInTopToolbarCustomizationV2);
BASE_DECLARE_FEATURE(kAddToHomescreenIPH);
BASE_DECLARE_FEATURE(kAllowNewIncognitoTabIntents);
BASE_DECLARE_FEATURE(kAndroidAppIntegration);
+BASE_DECLARE_FEATURE(kAllowUserCertificates);
BASE_DECLARE_FEATURE(kAndroidWidgetFullscreenToast);
BASE_DECLARE_FEATURE(kAndroidSearchEngineChoiceNotification);
BASE_DECLARE_FEATURE(kAndroidImprovedBookmarks);
diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
--- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
+++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
@@ -98,6 +98,7 @@ public abstract class ChromeFeatureList {
}
/* Alphabetical: */
+ public static final String ALLOW_USER_CERTIFICATES = "AllowUserCertificates";
public static final String ADAPTIVE_BUTTON_IN_TOP_TOOLBAR = "AdaptiveButtonInTopToolbar";
public static final String ADAPTIVE_BUTTON_IN_TOP_TOOLBAR_TRANSLATE =
"AdaptiveButtonInTopToolbarTranslate";
@@ -483,6 +484,8 @@ public abstract class ChromeFeatureList {
public static final String XSURFACE_METRICS_REPORTING = "XsurfaceMetricsReporting";
/* Alphabetical: */
+ public static final CachedFlag sAllowUserCertificates =
+ new CachedFlag(ALLOW_USER_CERTIFICATES, false);
public static final CachedFlag sAppMenuMobileSiteOption =
new CachedFlag(APP_MENU_MOBILE_SITE_OPTION, false);
public static final CachedFlag sBackGestureActivityTabProvider =
@@ -605,6 +608,7 @@ public abstract class ChromeFeatureList {
public static final List<CachedFlag> sFlagsCachedFullBrowser = List.of(
// clang-format off
+ sAllowUserCertificates,
sAppMenuMobileSiteOption,
sBackGestureActivityTabProvider,
sBackGestureRefactorActivityAndroid,
diff --git a/net/android/java/src/org/chromium/net/X509Util.java b/net/android/java/src/org/chromium/net/X509Util.java
--- a/net/android/java/src/org/chromium/net/X509Util.java
+++ b/net/android/java/src/org/chromium/net/X509Util.java
@@ -508,6 +508,8 @@ public class X509Util {
return userRootBytes.toArray(new byte[0][]);
}
+ public static boolean AllowUserCertificates = false;
+
public static AndroidCertVerifyResult verifyServerCertificates(byte[][] certChain,
String authType,
String host)
@@ -594,6 +596,9 @@ public class X509Util {
isIssuedByKnownRoot = isKnownRoot(root);
}
+ if (AllowUserCertificates == false && isIssuedByKnownRoot == false)
+ return new AndroidCertVerifyResult(CertVerifyStatusAndroid.NO_TRUSTED_ROOT);
+
return new AndroidCertVerifyResult(CertVerifyStatusAndroid.OK,
isIssuedByKnownRoot, verifiedChain);
}
--
2.25.1
@@ -0,0 +1,23 @@
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Tue, 9 Mar 2021 19:43:00 +0100
Subject: Add Alt+D hotkey to focus address bar
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
.../java/src/org/chromium/chrome/browser/KeyboardShortcuts.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java b/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java
@@ -151,6 +151,8 @@ public class KeyboardShortcuts {
KeyEvent.KEYCODE_F, KeyEvent.META_CTRL_ON);
addShortcut(context, chromeFeatureShortcutGroup, R.string.keyboard_shortcut_address_bar,
KeyEvent.KEYCODE_L, KeyEvent.META_CTRL_ON);
+ addShortcut(context, chromeFeatureShortcutGroup, R.string.keyboard_shortcut_address_bar,
+ KeyEvent.KEYCODE_D, KeyEvent.META_ALT_ON);
shortcutGroups.add(chromeFeatureShortcutGroup);
KeyboardShortcutGroup webpageShortcutGroup = new KeyboardShortcutGroup(
--
2.25.1

Some files were not shown because too many files have changed in this diff Show More