Use "database identifier" rather than raw origin as directory hash input
When we allow non-Service Workers to have access to the Cache Storage API we will want to match other storage systems and use a database identifier generated from a Blink SecurityOrigin object, rather than just the origin URL, as the key for per-origin storage. This change changes the computation of the directory name on disk (a hash) from using the origin to a database identifier, in anticipation of an identifier being passed in after some future CLs. Existing data is preserved by preceding the uses of the directory name (open, delete, or enumeration) with a directory rename from the "legacy" name computed from the origin to the "new" name computed from the directory identifier. The rename is done by posting a task to the cache task runner just before the actual task. After a few releases we remove the migration code. R=michaeln,jkarlin BUG=439389 Review URL: https://codereview.chromium.org/1020413002 Cr-Commit-Position: refs/heads/master@{#322055}
Showing
Please register or sign in to comment