Bug 1574963 - Add a policy for using legacy profiles on Windows. r=mossop

Differential Revision: https://phabricator.services.mozilla.com/D47841

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Michael Kaply 2019-10-02 18:25:29 +00:00
Родитель 976b757c89
Коммит 1ddd4cc6a3
3 изменённых файлов: 13 добавлений и 1 удалений

Просмотреть файл

@ -942,6 +942,10 @@ var Policies = {
},
},
LegacyProfiles: {
// Handled in nsToolkitProfileService.cpp (Windows only)
},
LocalFileLinks: {
onBeforeAddons(manager, param) {
// If there are existing capabilities, lock them with the policy pref.

Просмотреть файл

@ -477,6 +477,10 @@
}
},
"LegacyProfiles": {
"type": "boolean"
},
"LocalFileLinks": {
"type": "array",
"items": {

Просмотреть файл

@ -14,6 +14,7 @@
#ifdef XP_WIN
# include <windows.h>
# include <shlobj.h>
# include "mozilla/PolicyChecks.h"
#endif
#ifdef XP_UNIX
# include <unistd.h>
@ -1797,9 +1798,12 @@ bool nsToolkitProfileService::IsSnapEnvironment() {
* application versions to different locations, some application sandboxing
* systems as well as enterprise deployments. This environment variable provides
* a way to opt out of dedicated profiles for these cases.
*
* For Windows, we provide a policy to accomplish the same thing.
*/
bool nsToolkitProfileService::UseLegacyProfiles() {
return !!PR_GetEnv("MOZ_LEGACY_PROFILES");
return !!PR_GetEnv("MOZ_LEGACY_PROFILES") ||
PolicyCheckBoolean(L"LegacyProfiles");
}
struct FindInstallsClosure {