
Remove the kPdfOopif feature flag check from //extensions and //chrome/renderer/extensions. When the flag is disabled, GuestView PDF is enabled. There are three existing locations that check the feature flag: 1. ResourceRequestPolicy::CanRequestResource(). This flag is safe to remove, as GuestView PDF needs to allow the PDF extension frame and PDF content frame to request PDF extension resources. The code originally hidden by the flag wouldn't have been reached anyway, as the method already returns true earlier for GuestView PDF. 2. ScriptContextSet::ClassifyJavaScriptContext(). This flag is safe to remove, because GuestView PDF has to classify the extension as privileged anyway, and the code hidden by the flag won't be reached for GuestView PDF. 3. ExtensionInjectionHost::CanExecuteOnFrame(). For GuestView PDF, it allows allowlisted extensions to run content scripts in the content frame. Removing the flag check would disallow this. Other than that, the code behind the flag would block all other scripts, anyway. This will make it easier to introduce an enterprise policy for OOPIF PDF. The delegate lives in the renderer and would've required IPC with the browser to fetch the policy. Bug: 324637002 Change-Id: I5bad2947f201effa4919bb50a61b7884e06345e1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5448856 Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org> Commit-Queue: Andy Phan <andyphan@chromium.org> Cr-Commit-Position: refs/heads/main@{#1290059}
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: