mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backout 1b195e9c5f9d (bug 741738) due to mochitest failures.
This commit is contained in:
parent
ef3b931869
commit
71ae43be56
@ -1593,38 +1593,15 @@
|
|||||||
<field name="_brandBundle" readonly="true">
|
<field name="_brandBundle" readonly="true">
|
||||||
Services.strings.createBundle("chrome://branding/locale/brand.properties");
|
Services.strings.createBundle("chrome://branding/locale/brand.properties");
|
||||||
</field>
|
</field>
|
||||||
<property name="_viewsLeftMap">
|
|
||||||
<getter><![CDATA[
|
|
||||||
let viewsLeftMap = {};
|
|
||||||
try {
|
|
||||||
viewsLeftMap = JSON.parse(Services.prefs.getCharPref("browser.syncPromoViewsLeftMap"));
|
|
||||||
} catch (ex) {
|
|
||||||
// If the old preference exists, migrate it to the new one.
|
|
||||||
try {
|
|
||||||
let oldPref = Services.prefs.getIntPref("browser.syncPromoViewsLeft");
|
|
||||||
Services.prefs.clearUserPref("browser.syncPromoViewsLeft");
|
|
||||||
viewsLeftMap.bookmarks = oldPref;
|
|
||||||
viewsLeftMap.passwords = oldPref;
|
|
||||||
Services.prefs.setCharPref("browser.syncPromoViewsLeftMap",
|
|
||||||
JSON.stringify(viewsLeftMap));
|
|
||||||
} catch (ex2) {}
|
|
||||||
}
|
|
||||||
return viewsLeftMap;
|
|
||||||
]]></getter>
|
|
||||||
</property>
|
|
||||||
<property name="_viewsLeft">
|
<property name="_viewsLeft">
|
||||||
<getter><![CDATA[
|
<getter><![CDATA[
|
||||||
let views = 5;
|
try {
|
||||||
if (this._viewsLeftMap[this._notificationType] !== undefined) {
|
return Services.prefs.getIntPref("browser.syncPromoViewsLeft");
|
||||||
views = this._viewsLeftMap[this._notificationType];
|
} catch(ex) {}
|
||||||
}
|
return 5;
|
||||||
return views;
|
|
||||||
]]></getter>
|
]]></getter>
|
||||||
<setter><![CDATA[
|
<setter><![CDATA[
|
||||||
let map = this._viewsLeftMap !== undefined ? this._viewsLeftMap : {};
|
Services.prefs.setIntPref("browser.syncPromoViewsLeft", val);
|
||||||
map[this._notificationType] = val;
|
|
||||||
Services.prefs.setCharPref("browser.syncPromoViewsLeftMap",
|
|
||||||
JSON.stringify(map));
|
|
||||||
return val;
|
return val;
|
||||||
]]></setter>
|
]]></setter>
|
||||||
</property>
|
</property>
|
||||||
|
Loading…
Reference in New Issue
Block a user