Use array to represent internal feature state of document policy
Previously, document policy class is designed to hold a field for each feature's policy value. Those fields are supposed to be generated from document_policy_features.json5. Such design minimizes both speed and memory overhead but adds complexity to the system by introducing code generation. This CL uses array to represent internal feature state, which still minimizes speed overhead as indexing into array is the same as indexing into memory, and adds very little memory overhead(Each PolicyValue instance contains extra information). Change-Id: I4bc5e9b4383c628018e2605ad896e31b17c9c0e9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2003436 Commit-Queue: Charlie Hu <chenleihu@google.com> Reviewed-by:Ian Clelland <iclelland@chromium.org> Cr-Commit-Position: refs/heads/master@{#732682}
Showing
Please register or sign in to comment