DescriptionUse "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
Committed: https://crrev.com/e82f0728287f968b27d9fc9e54153df145a9fe1c
Cr-Commit-Position: refs/heads/master@{#322055}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Add tests #Patch Set 3 : Don't override existing new directory if migration fails #
Total comments: 2
Patch Set 4 : Fix typo #
Total comments: 2
Patch Set 5 : Make sure we're not keeping an object reference around #
Messages
Total messages: 15 (2 generated)
|