Bug 1894239: Enable MOZ_SELECTABLE_PROFILES by default. r=jhirsch,omc-reviewers,niklas,emcminn,mconley
This also removes some tests of `MOZ_SELECTABLE_PROFILES` from `browser/components/profiles` files where the test is pointless because that test is excluded from the build if `MOZ_SELECTABLE_PROFILES` is unset. Differential Revision: https://phabricator.services.mozilla.com/D227372
This commit is contained in:
@@ -118,6 +118,13 @@ class SelectableProfileServiceClass {
|
||||
this.#asyncShutdownBlocker = () => this.uninit();
|
||||
}
|
||||
|
||||
get isEnabled() {
|
||||
return (
|
||||
Services.prefs.getBoolPref("browser.profiles.enabled", false) &&
|
||||
!!(this.#storeID || this.#groupToolkitProfile)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* For use in testing only, override the profile service with a mock version
|
||||
* and reset state accordingly.
|
||||
@@ -258,6 +265,10 @@ class SelectableProfileServiceClass {
|
||||
);
|
||||
}
|
||||
|
||||
if (!this.isEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If the storeID doesn't exist, we don't want to create the db until we
|
||||
// need to so we early return.
|
||||
if (!this.storeID) {
|
||||
|
||||
Reference in New Issue
Block a user