Bug 1416044 - Add telemetry probe for if userChrome.css is loaded. r=francois,jwatt

* New USER_CHROME_CSS_LOADED histogram
* Just log a boolean to reflect if the userChrome.css was successfully loaded at profile initialization, in the parent process.

MozReview-Commit-ID: 8ffSNUot43I

--HG--
extra : rebase_source : 11f43e832449952c83cdb104c61c9c33c1aaa123
This commit is contained in:
Sam Foster 2017-11-28 12:14:02 -08:00
Родитель edaec7544b
Коммит 97cfe92b81
2 изменённых файлов: 16 добавлений и 0 удалений

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

@ -13,6 +13,7 @@
#include "mozilla/Preferences.h" #include "mozilla/Preferences.h"
#include "mozilla/StyleSheet.h" #include "mozilla/StyleSheet.h"
#include "mozilla/StyleSheetInlines.h" #include "mozilla/StyleSheetInlines.h"
#include "mozilla/Telemetry.h"
#include "mozilla/css/Loader.h" #include "mozilla/css/Loader.h"
#include "mozilla/dom/SRIMetadata.h" #include "mozilla/dom/SRIMetadata.h"
#include "MainThreadUtils.h" #include "MainThreadUtils.h"
@ -441,6 +442,12 @@ nsLayoutStylesheetCache::InitFromProfile()
LoadSheetFile(contentFile, &mUserContentSheet, eUserSheetFeatures, eLogToConsole); LoadSheetFile(contentFile, &mUserContentSheet, eUserSheetFeatures, eLogToConsole);
LoadSheetFile(chromeFile, &mUserChromeSheet, eUserSheetFeatures, eLogToConsole); LoadSheetFile(chromeFile, &mUserChromeSheet, eUserSheetFeatures, eLogToConsole);
if (XRE_IsParentProcess()) {
// We're interested specifically in potential chrome customizations,
// so we only need data points from the parent process
Telemetry::Accumulate(Telemetry::USER_CHROME_CSS_LOADED, mUserChromeSheet != nullptr);
}
} }
void void

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

@ -13844,6 +13844,15 @@
"n_values": 64, "n_values": 64,
"description": "URL CLassifier-related (aka Safe Browsing) UI events. See nsIUrlClassifierUITelemetry.idl for the specific values." "description": "URL CLassifier-related (aka Safe Browsing) UI events. See nsIUrlClassifierUITelemetry.idl for the specific values."
}, },
"USER_CHROME_CSS_LOADED": {
"record_in_processes": ["main"],
"bug_numbers": [1416044],
"expires_in_version": "62",
"alert_emails": ["sfoster@mozilla.com"],
"kind": "boolean",
"releaseChannelCollection": "opt-out",
"description": "Was a userChrome.css stylesheet loaded when the profile was initialized?"
},
"WEBAUTHN_CREATE_CREDENTIAL_MS": { "WEBAUTHN_CREATE_CREDENTIAL_MS": {
"record_in_processes": ["main"], "record_in_processes": ["main"],
"alert_emails": ["seceng-telemetry@mozilla.com", "jjones@mozilla.com"], "alert_emails": ["seceng-telemetry@mozilla.com", "jjones@mozilla.com"],