DNR: Queue certain API calls.
Queue updateDynamicRules and updateSessionRules API calls to ensure: 1. They only execute once the initial rulesets are loaded from disk. 2. Successive API calls for the same extension execute in a FIFO order. 3. Only one of these calls for an extension executes at a time. Requirement #3 is needed to implement a shared rules limit for session and dynamic rules. The first requirement is needed for only dynamic rules to ensure the initial state for dynamic rules is first loaded up. This replaces the existing base::OneShot mechanism for fulfilling requirement #1. To ensure consistency, we also do the same for updateEnabledRulesets API calls. Doc=https://docs.google.com/document/d/1FZuuQkG8Tl4ee_K3Ls37iFhjynqStfDjApPvB1N8qsw/edit?usp=sharing&resourcekey=0-kZHQzo1D3pIDAFgYoTSV5g BUG=1043200 Change-Id: I4efef10c6d917c600f90f985c105164aa141610b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2579716 Commit-Queue: Karan Bhatia <karandeepb@chromium.org> Reviewed-by:Devlin <rdevlin.cronin@chromium.org> Cr-Commit-Position: refs/heads/master@{#843232}
Showing
This diff is collapsed.
Please register or sign in to comment