commit | 5d6ed70687fb808dcadf78cfb4b718477f1c246a | [log] [tgz] |
---|---|---|
author | Devlin Cronin <rdevlin.cronin@chromium.org> | Fri Oct 27 23:13:06 2023 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Oct 27 23:13:06 2023 |
tree | a7d00a46768f363ed89f66a1013c9f8b25732ed8 | |
parent | 72517f83ab65c0fe99106bf71c3332c3fb40eaba [diff] |
[Extensions] Toggle registered user scripts according to dev mode The userScripts API is gated on the user being in developer mode. If the user exits developer mode, any registered user scripts should no longer run. Add support for disabling and re-enabling these user scripts when the user enters or exits dev mode. Note that this deliberately does *not* remove the scripts from the storage in `ExtensionUserScriptLoader::loaded_dynamic_scripts_` and only removes them from the base `UserScriptLoader` (which notifies all renderers appropriately). This ensures that when subsequent updates and writes occur, the user scripts are still correctly persisted in the database and makes re-enabling them simple. A future CL will properly initialize the enabled state of user scripts on browser startup and ExtensionUserScriptLoader initialization. Bug: 1495451 Change-Id: If0380b1df794f74567d3ff5e04497f68649ad01e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4984712 Commit-Queue: Devlin Cronin <rdevlin.cronin@chromium.org> Reviewed-by: Kelvin Jiang <kelvinjiang@chromium.org> Reviewed-by: Emilia Paz <emiliapaz@chromium.org> Cr-Commit-Position: refs/heads/main@{#1216434}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.