1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 var EXPORTED_SYMBOLS = ["TransientPrefs"];
9 const { Preferences } = ChromeUtils.import(
10 "resource://gre/modules/Preferences.jsm"
13 var prefVisibility = new Map();
15 /* Use for preferences that should only be visible when they've been modified.
16 When reset to their default state, they remain visible until restarting the
19 var TransientPrefs = {
20 prefShouldBeVisible(prefName) {
21 if (Preferences.isSet(prefName)) {
22 prefVisibility.set(prefName, true);
25 return !!prefVisibility.get(prefName);