mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 13:57:32 +00:00
Bug 1923741 - Add telemetry to measure how many users have read only system temporary folders. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D225139
This commit is contained in:
parent
70fc238b6b
commit
5085cff7f2
@ -1042,6 +1042,16 @@ void gfxPlatform::Init() {
|
||||
}
|
||||
}
|
||||
|
||||
static bool IsOsTempDirWritable() {
|
||||
nsCOMPtr<nsIFile> file;
|
||||
nsresult rv = NS_GetSpecialDirectory(NS_OS_TEMP_DIR, getter_AddRefs(file));
|
||||
NS_ENSURE_SUCCESS(rv, false);
|
||||
bool writable = false;
|
||||
rv = file->IsWritable(&writable);
|
||||
NS_ENSURE_SUCCESS(rv, false);
|
||||
return writable;
|
||||
}
|
||||
|
||||
void gfxPlatform::ReportTelemetry() {
|
||||
MOZ_RELEASE_ASSERT(XRE_IsParentProcess(),
|
||||
"GFX: Only allowed to be called from parent process.");
|
||||
@ -1064,6 +1074,9 @@ void gfxPlatform::ReportTelemetry() {
|
||||
supportsHDR |= screen->GetIsHDR();
|
||||
}
|
||||
Telemetry::ScalarSet(Telemetry::ScalarID::GFX_SUPPORTS_HDR, supportsHDR);
|
||||
|
||||
bool tmpWritable = IsOsTempDirWritable();
|
||||
Telemetry::ScalarSet(Telemetry::ScalarID::GFX_TMP_WRITABLE, tmpWritable);
|
||||
}
|
||||
|
||||
nsString adapterDesc;
|
||||
|
@ -4030,6 +4030,21 @@ gfx:
|
||||
record_in_processes:
|
||||
- 'main'
|
||||
release_channel_collection: opt-out
|
||||
tmp_writable:
|
||||
bug_numbers:
|
||||
- 1923741
|
||||
description: >
|
||||
Is the system temporary directory writable
|
||||
expires: "134"
|
||||
kind: boolean
|
||||
notification_emails:
|
||||
- gfx-telemetry-alerts@mozilla.com
|
||||
- aosmond@mozilla.com
|
||||
products:
|
||||
- 'firefox'
|
||||
record_in_processes:
|
||||
- 'main'
|
||||
release_channel_collection: opt-out
|
||||
|
||||
apz:
|
||||
scrollwheel_overshoot:
|
||||
|
Loading…
x
Reference in New Issue
Block a user