Reputation: 655
I created a firefox web extension that stores data describing search engines in storage sync. The data actually gets stored in a file named storage-sync.sqlite. I've noticed that browser.storage.sync.remove actually changes the hidden property "_status" from "created" to "deleted", but it doesn't actually delete a record.
Is it possible to permanently delete the entire record from js script in my web extension?
Upvotes: 0
Views: 255
Reputation: 3704
In short: no, the status is used for synchronisation purposes.
Kinto (the storage backend used by sync) sets the _status field so other browsers that sync to the current browser know "hey, I should remove this". I have no idea when it's actually removed, but I don't think it stays around forever.
A note on passwords from Kinto, which seems to confirm the function of _status for storage-sync.sqlite:
We detect kB changing by storing the current kB (as a hash) in the keyring record itself. We "update" this keyring record with the current kB hash on every call to sync(). kinto.js tries to track the status of the keyring in a field called _status -- it should be "synced" when it is the same as the version that we expect on the server, and it should be "updated" if we've changed it and haven't pushed it to the server. So after possibly updating the kB hash (or just replacing it with what it already is), we check if the keyring is "updated" and if so, try to upload it to the server. Because encryption happens "just-in-time", this causes the keyring to be reuploaded but encrypted by the new kB.
https://wiki.mozilla.org/CloudServices/Sync/ExtensionStorage_Design_Doc#Password_changes
Upvotes: 0