Backed out changeset 39e6a7e77cfb (bug 1927808) for causing multiple failures. CLOSED TREE
This commit is contained in:
@@ -754,27 +754,7 @@ let JSWINDOWACTORS = {
|
|||||||
},
|
},
|
||||||
matches: ["about:editprofile", "about:deleteprofile", "about:newprofile"],
|
matches: ["about:editprofile", "about:deleteprofile", "about:newprofile"],
|
||||||
remoteTypes: ["privilegedabout"],
|
remoteTypes: ["privilegedabout"],
|
||||||
onAddActor(register, unregister) {
|
enablePreference: "browser.profiles.enabled",
|
||||||
let registered = false;
|
|
||||||
|
|
||||||
const maybeRegister = () => {
|
|
||||||
let enabled = lazy.SelectableProfileService.isEnabled;
|
|
||||||
|
|
||||||
if (enabled && !registered) {
|
|
||||||
register();
|
|
||||||
} else if (!enabled && registered) {
|
|
||||||
unregister();
|
|
||||||
}
|
|
||||||
|
|
||||||
registered = enabled;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Update when the pref changes
|
|
||||||
Services.prefs.addObserver("browser.profiles.enabled", maybeRegister);
|
|
||||||
|
|
||||||
// Set the initial state.
|
|
||||||
maybeRegister();
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
Prompt: {
|
Prompt: {
|
||||||
|
|||||||
@@ -59,13 +59,13 @@ ChromeUtils.defineLazyGetter(lazy, "log", () => {
|
|||||||
* happens. An object for each policy should be defined, containing
|
* happens. An object for each policy should be defined, containing
|
||||||
* callback functions that will be called by the engine.
|
* callback functions that will be called by the engine.
|
||||||
*
|
*
|
||||||
* See the _callbacks object in EnterprisePoliciesParent.sys.mjs for the list of
|
* See the _callbacks object in EnterprisePolicies.js for the list of
|
||||||
* possible callbacks and an explanation of each.
|
* possible callbacks and an explanation of each.
|
||||||
*
|
*
|
||||||
* Each callback will be called with two parameters:
|
* Each callback will be called with two parameters:
|
||||||
* - manager
|
* - manager
|
||||||
* This is the EnterprisePoliciesManager singleton object from
|
* This is the EnterprisePoliciesManager singleton object from
|
||||||
* EnterprisePoliciesParent.sys.mjs
|
* EnterprisePolicies.js
|
||||||
*
|
*
|
||||||
* - param
|
* - param
|
||||||
* The parameter defined for this policy in policies-schema.json.
|
* The parameter defined for this policy in policies-schema.json.
|
||||||
@@ -365,12 +365,7 @@ export var Policies = {
|
|||||||
BlockAboutProfiles: {
|
BlockAboutProfiles: {
|
||||||
onBeforeUIStartup(manager, param) {
|
onBeforeUIStartup(manager, param) {
|
||||||
if (param) {
|
if (param) {
|
||||||
manager.disallowFeature("profileManagement");
|
|
||||||
blockAboutPage(manager, "about:profiles");
|
blockAboutPage(manager, "about:profiles");
|
||||||
blockAboutPage(manager, "about:profilemanager");
|
|
||||||
blockAboutPage(manager, "about:editprofile");
|
|
||||||
blockAboutPage(manager, "about:deleteprofile");
|
|
||||||
blockAboutPage(manager, "about:newprofile");
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -120,10 +120,6 @@ class SelectableProfileServiceClass {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get isEnabled() {
|
get isEnabled() {
|
||||||
if (!Services.policies.isAllowed("profileManagement")) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If a storeID has been assigned then profiles may have been created so force us on. Also
|
// If a storeID has been assigned then profiles may have been created so force us on. Also
|
||||||
// covers the case when the selector is shown at startup and we don't have preferences
|
// covers the case when the selector is shown at startup and we don't have preferences
|
||||||
// available.
|
// available.
|
||||||
|
|||||||
@@ -94,9 +94,7 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
|||||||
lazy,
|
lazy,
|
||||||
"browserProfilesEnabled",
|
"browserProfilesEnabled",
|
||||||
"browser.profiles.enabled",
|
"browser.profiles.enabled",
|
||||||
false,
|
false
|
||||||
null,
|
|
||||||
() => lazy.SelectableProfileService.isEnabled
|
|
||||||
);
|
);
|
||||||
XPCOMUtils.defineLazyPreferenceGetter(
|
XPCOMUtils.defineLazyPreferenceGetter(
|
||||||
lazy,
|
lazy,
|
||||||
|
|||||||
Reference in New Issue
Block a user