• Karandeep Bhatia's avatar
    DNR: Change where the static indexed ruleset is stored. · 28cf935c
    Karandeep Bhatia authored
    Currently the single static indexed ruleset for an extension is stored
    at $extension_path/_metadata/generated_indexed_ruleset. Since we plan to
    support multiple static rulesets, we need to store multiple indexed
    rulesets.
    
    This CL changes the static indexed ruleset location to
    $extension_path/_metadata/generated_indexed_rulesets/_ruleset$ruleset_id.
    This helps us move the code away from the assumption of a single static
    ruleset.
    
    As a result of this existing extensions with a DNR ruleset will
    initially fail to load the DNR ruleset. However the re-indexing logic
    should step in and ensure the extension works seamlessly. A side-effect
    for these extensions is that the old indexed ruleset will remain on
    disk. However this is ok since the API is still on beta and doesn't have
    significant usage yet. Furthermore, we do periodically clean up
    extension folders after extension updates.
    
    BUG=754526
    
    Change-Id: Id3bd6c1e25fde4ceb1a34f9f84c67bfa340790ef
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2094626
    Commit-Queue: Karan Bhatia <karandeepb@chromium.org>
    Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#751607}
    28cf935c
file_util.h 8.4 KB