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
Родитель 46f56a1f0e
Коммит 4b2655c8d9
1 изменённых файлов: 7 добавлений и 0 удалений

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

@ -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;
}