Disable Glic WebUI when policy is disabled at runtime chrome://glic is already disabled by returning false from WebUIConfig::IsWebUIEnabled. However, due to crbug.com/389737044, if the policy is disabled at runtime, a successful navigation to chrome://glic before being disabled will have registered the Glic WebUIDataSource. In this state, navigations will successfully fetch resources, even if IsWebUIEnabled returns false. Mojo and API connections fail in this case but it results in a JS errored blank page. This CL more explicitly disables chrome://glic in the care where the policy is disabled at runtime by registering an empty WebUIDataSource, replacing the potentially real Glic data source. Navigations now result in a network failure, which is what happens if chrome://glic is navigated only when the policy is disabled. Bug: 382722218 Change-Id: I63d3b783294b82faf4332986a2309ce7acf47f9e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6187267 Commit-Queue: David Bokan <bokan@chromium.org> Reviewed-by: Dan H <harringtond@chromium.org> Reviewed-by: Rebekah Potter <rbpotter@chromium.org> Reviewed-by: Elly FJ <ellyjones@chromium.org> Cr-Commit-Position: refs/heads/main@{#1412411}
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.