Bug 1215303 - Part 2 - automatically enable broker when in permissive mode r=jld

This commit is contained in:
Julian Hector 2015-11-13 12:29:47 +00:00
parent 3e2ba29d41
commit 1abac3c923

View File

@ -5,6 +5,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "SandboxBrokerPolicyFactory.h"
#include "SandboxInfo.h"
#include "mozilla/ClearOnShutdown.h"
#include "mozilla/Preferences.h"
@ -29,6 +30,12 @@ SandboxBrokerPolicyFactory::IsSystemSupported() {
if (length > 0 && strcmp(hardware, "goldfish") == 0) {
return true;
}
// When broker is running in permissive mode, we enable it
// automatically regardless of the device.
if (SandboxInfo::Get().Test(SandboxInfo::kPermissive)) {
return true;
}
#endif
return false;
}