review fedback

This commit is contained in:
Kendall Werts
2020-01-23 13:47:19 -06:00
parent 5b8cfa14ae
commit 0447e54b1c
5 changed files with 33 additions and 36 deletions
+8 -6
View File
@@ -49,6 +49,12 @@ const identityState = {
*/
async upgradeData() {
const identitiesList = await browser.contextualIdentities.query({});
for (const identity of identitiesList) {
// ensure all identities have an entry in local storage
await identityState.addUUID(identity.cookieStoreId);
}
const macConfigs = await this.area.get();
for(const configKey of Object.keys(macConfigs)) {
if (configKey.includes("identitiesState@@_")) {
@@ -61,16 +67,12 @@ const identityState = {
await this.remove(cookieStoreId);
continue;
}
console.log(macConfigs, configKey);
if (!macConfigs[configKey].macAddonUUID) {
await identityState.storageArea.get(cookieStoreId);
}
}
}
for (const identity of identitiesList) {
// ensure all identities have an entry in local storage
await identityState.addUUID(identity.cookieStoreId);
}
}
},
@@ -127,7 +129,7 @@ const identityState = {
cookieStoreId : "firefox-container-" + cookieStoreId;
const macConfigs = await this.storageArea.area.get();
for(const configKey of Object.keys(macConfigs)) {
if (configKey === this.getContainerStoreKey(cookieStoreIdKey)) {
if (configKey === this.storageArea.getContainerStoreKey(cookieStoreIdKey)) {
return macConfigs[configKey].macAddonUUID;
}
}