Bug 1715158 - Document how the IndexedDB 'snippets' store is used for more than just snippet data these days. r=pdahiya

Depends on D193856

Differential Revision: https://phabricator.services.mozilla.com/D193857
This commit is contained in:
Mike Conley 2023-12-06 16:15:16 +00:00
parent 15d11761c7
commit 610ebbabc9
2 changed files with 12 additions and 0 deletions

View file

@ -30,6 +30,12 @@ const { ActivityStreamStorage } = ChromeUtils.import(
);
const createStorage = async telemetryFeed => {
// "snippets" is the name of one storage space, but these days it is used
// not for snippet-related data (snippets were removed in bug 1715158),
// but storage for impression or session data for all ASRouter messages.
//
// We keep the name "snippets" to avoid having to do an IndexedDB database
// migration.
const dbStore = new ActivityStreamStorage({
storeNames: ["sectionPrefs", "snippets"],
telemetry: {

View file

@ -156,6 +156,12 @@ class Store {
}
async _initIndexedDB(telemetryKey) {
// "snippets" is the name of one storage space, but these days it is used
// not for snippet-related data (snippets were removed in bug 1715158),
// but storage for impression or session data for all ASRouter messages.
//
// We keep the name "snippets" to avoid having to do an IndexedDB database
// migration.
this.dbStorage = new ActivityStreamStorage({
storeNames: ["sectionPrefs", "snippets"],
});