diff --git a/app/renderer/components/preferences/payment/deletedSites.js b/app/renderer/components/preferences/payment/deletedSites.js
index 6342c30e1de..54a36cd9c40 100644
--- a/app/renderer/components/preferences/payment/deletedSites.js
+++ b/app/renderer/components/preferences/payment/deletedSites.js
@@ -33,16 +33,22 @@ class DeletedSitesContent extends ImmutableComponent {
return
,
value: ''
diff --git a/app/renderer/components/preferences/paymentsTab.js b/app/renderer/components/preferences/paymentsTab.js
index 02c847b0a09..187f35d16c2 100644
--- a/app/renderer/components/preferences/paymentsTab.js
+++ b/app/renderer/components/preferences/paymentsTab.js
@@ -144,7 +144,15 @@ class PaymentsTab extends ImmutableComponent {
}
if (['boolean', 'number'].includes(typeof granted)) {
- sites.push(hostPattern)
+ let siteName = null
+ if (value.has('siteName')) {
+ siteName = value.get('siteName')
+ }
+
+ sites.push({
+ siteName,
+ hostPattern
+ })
}
})
diff --git a/app/sessionStore.js b/app/sessionStore.js
index 0b8ffff70ba..e7c4887ef83 100644
--- a/app/sessionStore.js
+++ b/app/sessionStore.js
@@ -832,7 +832,12 @@ module.exports.runPreMigrations = (data) => {
// Force WidevineCdm to be upgraded when last app version <= 0.18.25
let runWidevineCleanup = false
- try { runWidevineCleanup = compareVersions(data.lastAppVersion, '0.18.25') < 1 } catch (e) {}
+ let formatPublishers = false
+
+ try {
+ runWidevineCleanup = compareVersions(data.lastAppVersion, '0.18.25') < 1
+ formatPublishers = compareVersions(data.lastAppVersion, '0.22.3') < 1
+ } catch (e) {}
if (runWidevineCleanup) {
const fs = require('fs-extra')
@@ -844,6 +849,23 @@ module.exports.runPreMigrations = (data) => {
})
}
+ if (formatPublishers) {
+ const publishers = data.ledger.synopsis.publishers
+
+ if (publishers && Object.keys(publishers).length > 0) {
+ Object.entries(publishers).forEach((item) => {
+ const publisherKey = item[0]
+ const publisher = item[1]
+ const siteKey = `https?://${publisherKey}`
+ if (data.siteSettings[siteKey] == null || publisher.faviconName == null) {
+ return
+ }
+
+ data.siteSettings[siteKey].siteName = publisher.faviconName
+ })
+ }
+ }
+
// Bookmark cache was generated wrongly on and before 0.20.25 from 0.19.x upgrades
let runCacheClean = false
try { runCacheClean = compareVersions(data.lastAppVersion, '0.20.25') < 1 } catch (e) {}
diff --git a/docs/state.md b/docs/state.md
index 18a8845f37c..1ef8bd450ef 100644
--- a/docs/state.md
+++ b/docs/state.md
@@ -514,6 +514,7 @@ AppStore
siteSettings: {
[hostPattern]: {
adControl: string, // (showBraveAds | blockAds | allowAdsAndTracking)
+ autoplay: boolean,
cookieControl: string, // (block3rdPartyCookie | allowAllCookies | blockAllCookies)
fingerprintingProtection: string, // (block3rdPartyFingerprinting | allowAllFingerprinting | blockAllFingerprinting)
flash: (number|boolean), // approval expiration time if allowed, false if never allow
@@ -532,14 +533,14 @@ AppStore
openExternalPermission: boolean,
pointerLockPermission: boolean,
protocolRegistrationPermission: boolean,
- skipSync: boolean, // Set for objects FETCHed by sync
runInsecureContent: boolean, // allow active mixed content
safeBrowsing: boolean,
+ siteName: string, // display name of the publisher
+ skipSync: boolean, // Set for objects FETCHed by sync
savePasswords: boolean, // only false or undefined/null
shieldsUp: boolean,
widevine: (number|boolean), // false = block widevine, 0 = allow once, 1 = allow always
- zoomLevel: number,
- autoplay: boolean,
+ zoomLevel: number
}
},
defaultSiteSettingsListImported: boolean,