We use the PolicyContainer to hold and inherit CSP, COOP, COEP, and ReferrerPolicy. Our integration with storage in history could be improved - we presently check for a history navigation type in DocumentWriter::begin and either use the history policy container from that or store the policy container. It would be nice to have an API for that. Additionally, we pass around a ContentSecurityPolicyResponseHeaders object which stores a CSP List as a vector of strings. That implementation can probably be improved to a more memory efficient representation for storing and parsing a CSPList on inheritance.
<rdar://problem/100240355>