mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-12 18:50:08 +00:00
Bug 1570212 - Convert media.video_stats.enabled to a static pref. r=jya
Also remove HTMLVideoElement::InitStatics(), which is no longer needed. Differential Revision: https://phabricator.services.mozilla.com/D40340 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
581ca41a65
commit
98864cc3ec
@ -51,8 +51,6 @@ nsGenericHTMLElement* NS_NewHTMLVideoElement(
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
static bool sVideoStatsEnabled;
|
||||
|
||||
nsresult HTMLVideoElement::Clone(mozilla::dom::NodeInfo* aNodeInfo,
|
||||
nsINode** aResult) const {
|
||||
*aResult = nullptr;
|
||||
@ -417,14 +415,10 @@ bool HTMLVideoElement::SetVisualCloneSource(
|
||||
}
|
||||
|
||||
/* static */
|
||||
void HTMLVideoElement::InitStatics() {
|
||||
Preferences::AddBoolVarCache(&sVideoStatsEnabled,
|
||||
"media.video_stats.enabled");
|
||||
bool HTMLVideoElement::IsVideoStatsEnabled() {
|
||||
return StaticPrefs::media_video_stats_enabled();
|
||||
}
|
||||
|
||||
/* static */
|
||||
bool HTMLVideoElement::IsVideoStatsEnabled() { return sVideoStatsEnabled; }
|
||||
|
||||
double HTMLVideoElement::TotalPlayTime() const {
|
||||
double total = 0.0;
|
||||
|
||||
|
@ -44,8 +44,6 @@ class HTMLVideoElement final : public HTMLMediaElement {
|
||||
nsAttrValue& aResult) override;
|
||||
NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const override;
|
||||
|
||||
static void InitStatics();
|
||||
|
||||
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction()
|
||||
const override;
|
||||
|
||||
|
@ -265,8 +265,6 @@ nsresult nsLayoutStatics::Initialize() {
|
||||
nsCookieService::AppClearDataObserverInit();
|
||||
nsApplicationCacheService::AppClearDataObserverInit();
|
||||
|
||||
HTMLVideoElement::InitStatics();
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
nsMenuBarListener::InitializeStatics();
|
||||
#endif
|
||||
|
@ -5058,6 +5058,12 @@
|
||||
#endif
|
||||
mirror: always
|
||||
|
||||
# Are video stats enabled? (Disabling can help prevent fingerprinting.)
|
||||
- name: media.video_stats.enabled
|
||||
type: bool
|
||||
value: true
|
||||
mirror: always
|
||||
|
||||
# Opus
|
||||
- name: media.opus.enabled
|
||||
type: RelaxedAtomicBool
|
||||
|
@ -456,9 +456,6 @@ pref("media.video-queue.default-size", 10);
|
||||
// By default, send all of them.
|
||||
pref("media.video-queue.send-to-compositor-size", 9999);
|
||||
|
||||
// Whether to disable the video stats to prevent fingerprinting
|
||||
pref("media.video_stats.enabled", true);
|
||||
|
||||
// Log level for cubeb, the audio input/output system. Valid values are
|
||||
// "verbose", "normal" and "" (log disabled).
|
||||
pref("media.cubeb.logging_level", "");
|
||||
|
Loading…
x
Reference in New Issue
Block a user