Bug 1284240 - Use boolean rather than flag for Sandboxing Telemetry. r=gfritzsche

MozReview-Commit-ID: EsXFAbEyxYs

--HG--
extra : rebase_source : 95bbfa30597490fb1b972056651b75f5a129daad
This commit is contained in:
Gian-Carlo Pascutto 2016-07-21 09:39:09 +02:00
Родитель 5efab66305
Коммит 0b8cfd1d36
2 изменённых файлов: 24 добавлений и 34 удалений

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

@ -259,28 +259,18 @@ SandboxInfo::ThreadingCheck()
SandboxInfo::SubmitTelemetry()
{
SandboxInfo sandboxInfo = Get();
if (sandboxInfo.Test(SandboxInfo::kHasSeccompBPF)) {
Telemetry::Accumulate(Telemetry::SANDBOX_CAPABILITIES_SECCOMP_BPF, true);
}
if (sandboxInfo.Test(SandboxInfo::kHasSeccompTSync)) {
Telemetry::Accumulate(Telemetry::SANDBOX_CAPABILITIES_SECCOMP_TSYNC, true);
}
if (sandboxInfo.Test(SandboxInfo::kHasPrivilegedUserNamespaces)) {
Telemetry::Accumulate(
Telemetry::SANDBOX_CAPABILITIES_USER_NAMESPACES_PRIVILEGED, true);
}
if (sandboxInfo.Test(SandboxInfo::kHasUserNamespaces)) {
Telemetry::Accumulate(
Telemetry::SANDBOX_CAPABILITIES_USER_NAMESPACES, true);
}
if (sandboxInfo.Test(SandboxInfo::kEnabledForContent)) {
Telemetry::Accumulate(
Telemetry::SANDBOX_CAPABILITIES_ENABLED_CONTENT, true);
}
if (sandboxInfo.Test(SandboxInfo::kEnabledForMedia)) {
Telemetry::Accumulate(
Telemetry::SANDBOX_CAPABILITIES_ENABLED_MEDIA, true);
}
Telemetry::Accumulate(Telemetry::SANDBOX_HAS_SECCOMP_BPF,
sandboxInfo.Test(SandboxInfo::kHasSeccompBPF));
Telemetry::Accumulate(Telemetry::SANDBOX_HAS_SECCOMP_TSYNC,
sandboxInfo.Test(SandboxInfo::kHasSeccompTSync));
Telemetry::Accumulate(Telemetry::SANDBOX_HAS_USER_NAMESPACES_PRIVILEGED,
sandboxInfo.Test(SandboxInfo::kHasPrivilegedUserNamespaces));
Telemetry::Accumulate(Telemetry::SANDBOX_HAS_USER_NAMESPACES,
sandboxInfo.Test(SandboxInfo::kHasUserNamespaces));
Telemetry::Accumulate(Telemetry::SANDBOX_CONTENT_ENABLED,
sandboxInfo.Test(SandboxInfo::kEnabledForContent));
Telemetry::Accumulate(Telemetry::SANDBOX_MEDIA_ENABLED,
sandboxInfo.Test(SandboxInfo::kEnabledForMedia));
}
} // namespace mozilla

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

@ -9829,51 +9829,51 @@
"kind": "boolean",
"description": "Result of call to SandboxBroker::Initialize"
},
"SANDBOX_CAPABILITIES_SECCOMP_BPF": {
"SANDBOX_HAS_SECCOMP_BPF": {
"alert_emails": ["gcp@mozilla.com"],
"bug_numbers": [1098428],
"expires_in_version": "55",
"kind": "flag",
"kind": "boolean",
"cpp_guard": "XP_LINUX",
"description": "Whether the system has seccomp-bpf capability"
},
"SANDBOX_CAPABILITIES_SECCOMP_TSYNC": {
"SANDBOX_HAS_SECCOMP_TSYNC": {
"alert_emails": ["gcp@mozilla.com"],
"bug_numbers": [1098428],
"expires_in_version": "55",
"kind": "flag",
"kind": "boolean",
"cpp_guard": "XP_LINUX",
"description": "Whether the system has seccomp-bpf thread-sync capability"
},
"SANDBOX_CAPABILITIES_USER_NAMESPACES": {
"SANDBOX_HAS_USER_NAMESPACES": {
"alert_emails": ["gcp@mozilla.com"],
"bug_numbers": [1098428],
"expires_in_version": "55",
"kind": "flag",
"kind": "boolean",
"cpp_guard": "XP_LINUX",
"description": "Whether our process succedeed in creating a user namespace"
},
"SANDBOX_CAPABILITIES_USER_NAMESPACES_PRIVILEGED": {
"SANDBOX_HAS_USER_NAMESPACES_PRIVILEGED": {
"alert_emails": ["gcp@mozilla.com"],
"bug_numbers": [1098428],
"expires_in_version": "55",
"kind": "flag",
"kind": "boolean",
"cpp_guard": "XP_LINUX",
"description": "Whether the system has the capability to create privileged user namespaces"
},
"SANDBOX_CAPABILITIES_ENABLED_MEDIA": {
"SANDBOX_MEDIA_ENABLED": {
"alert_emails": ["gcp@mozilla.com"],
"bug_numbers": [1098428],
"expires_in_version": "55",
"kind": "flag",
"kind": "boolean",
"cpp_guard": "XP_LINUX",
"description": "Whether the sandbox is enabled for media/GMP plugins"
},
"SANDBOX_CAPABILITIES_ENABLED_CONTENT": {
"SANDBOX_CONTENT_ENABLED": {
"alert_emails": ["gcp@mozilla.com"],
"bug_numbers": [1098428],
"expires_in_version": "55",
"kind": "flag",
"kind": "boolean",
"cpp_guard": "XP_LINUX",
"description": "Whether the sandbox is enabled for the content process"
},