Feature policy classes are currently implemented in the renderer, which has been acceptable so far. All of the features which we have implemented have decisions made in the renderer. New features, however, such as permission-based ones, require browser-side support. To facilitate this, we need to have an implementation of the policy objects available in the browser.
We can maintain a parallel policy object in the browser easily, as the browser is already aware of all of the relevant state, since it is being replicated for OOPIF. We should move the policy code into content/common, though, so that it can be shared between browser and renderer, rather than maintaining two separate implementations.
For ease of understanding, this will be done in stages. The current plan is:
1. Rename all of the classes to better reflect what data they contain. Current naming conflates effective policies with declared policies, and uses 'whitelist' to also refer to the mapping between whitelist and feature. This will make future work easier to understand.
2. Move all content side code into content/common/feature_policy and content/common/feature_policy
3. Construct a policy in the browser, and maintain it alongside the renderer policy.
4. Switch blink code to use the implementation in content/, with a small wrapper class.
5. Clean up unused code.
Comment 1 by bugdroid1@chromium.org
, Feb 2 2017