0
Files
src/extensions
Xinghui Lu ed00c05c79 Migrate kPrefBlocklist to kPrefBlocklistState at startup.
We plan to deprecate kPrefBlocklist and replace it with
kPrefBlocklistState. In order to make "kPrefBlocklistState ==  malware"
equivalent to "kPrefBlocklist == true", create a function
MigrateOldBlocklistPrefs to be called at startup. This function sets
kPrefBlocklistState to malware when kPrefBlocklist is true, and then
clears kPrefBlocklist. By doing this, we can safely replace all other
read/write usages of kPrefBlocklist with kPrefBlocklistState since
it's properly backfilled.

A nuance behavioral change is when DeleteExtensionPrefsIfPrefEmpty
is called. Previously, it is called only when the blocklist state is
changed from malware to not blocklisted. Now that we replaced with
the state pref, it will be called when other blocklist states (e.g.
policy violation) are changed to not blocklisted. This should be safe
as the DeleteExtensionPrefsIfPrefEmpty has an internal check to only
delete the pref when the extension pref is completely empty.

The next step would be removing kPrefBlocklist completely from the code
base in M97 (after three major milestones).

BYPASS_INCLUSIVE_LANGUAGE_REASON=Need to match the exact string of the
pref name. The code will be removed in a follow-up cleanup.

Bug: 1232243
Change-Id: I77b4d34a5227236d9764d051604b8486ef5e90b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3050834
Commit-Queue: Xinghui Lu <xinghuilu@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#912442}
2021-08-17 02:22:55 +00:00
..
2021-07-23 19:34:59 +00:00

This will become a reusable extensions module. It implements the core parts of Chrome's extension system, and can be used with any host of the content module.

Some extensions code that is not Chrome-specific still lives in //chrome/browser/extensions and will be moved here.

Technical Documentation: