Commit 24237032 authored by Michael Kaply's avatar Michael Kaply
Browse files

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
parent 3aa390f8
......@@ -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,15 @@ 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");
bool legacyProfiles = !!PR_GetEnv("MOZ_LEGACY_PROFILES");
#ifdef XP_WIN
legacyProfiles |= PolicyCheckBoolean(L"LegacyProfiles");
#endif
return legacyProfiles;
}
struct FindInstallsClosure {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment