DescriptionImplement the ability to obliterate a storage partition from disk.
On the uninstall of an extension with isolated storage, we want to delete
all the data for the extension from disk as soon as possible. Because we
cannot know when when various objects with state on disk
(eg., FileSystemContext) have all be deleted, we do a best-effort delete
for any directory that we know isn't being used.
The way this gets projected into the content modulue is that each extension
defines one partition_domain. If an extension has a <webview> tag, it will
also have multiple StoragePartitions, each with a different partition_name.
If it doesn't have a <webview> tag, the partition_name is considered empty
which yields the default partition. The default partition, and all webview
partitions are peers inside the partition_domain's root directory.
This CL introduces a function that allows us to delete partiton domain.
Special care is taken to not accidentally instantiate a StoragePartition for
the domain if none current exists. This is necessary to allow us to actually
delete the whole partition domain directory.
BUG=85127
Patch Set 1 #Patch Set 2 : fix comments #Patch Set 3 : remove stale function #Patch Set 4 : Correctly delete all data. #
Total comments: 18
Patch Set 5 : Work around race on extension uninstall #
Total comments: 22
Patch Set 6 : Fix creis comments #Patch Set 7 : onditionals are hard, let's go shopping #
Total comments: 2
Patch Set 8 : source control is hard, let's go shopping! #Messages
Total messages: 18 (0 generated)
|