Bug 1354778 - Remove expired telemetry probes YOUTUBE_REWRITABLE_EMBED_SEEN and YOUTUBE_NONREWRITABLE_EMBED_SEEN. r=qdot
We know these rewritable YouTube Flash embeds are out there. We don't need to track that we're rewriting them. While only about 0.4% of browser sessions saw rewritable embeds in April 2017, compared to almost 2% in April 2016, is there any reason we would decide to stop rewriting these embeds?
If YouTube ever stops serving Flash video entirely, then we should remove the enablejsapi check (YOUTUBE_NONREWRITABLE_EMBED_SEEN) so users at least see a non-scriptable video instead of nothing.
MozReview-Commit-ID: IixKc6myvs6
--- a/dom/base/nsObjectLoadingContent.cpp
+++ b/dom/base/nsObjectLoadingContent.cpp
@@ -81,17 +81,16 @@
#include "mozilla/dom/Element.h"
#include "mozilla/dom/Event.h"
#include "mozilla/dom/ScriptSettings.h"
#include "mozilla/dom/PluginCrashedEvent.h"
#include "mozilla/AsyncEventDispatcher.h"
#include "mozilla/EventDispatcher.h"
#include "mozilla/EventStates.h"
#include "mozilla/IntegerPrintfMacros.h"
-#include "mozilla/Telemetry.h"
#include "mozilla/dom/HTMLObjectElementBinding.h"
#include "mozilla/dom/HTMLSharedObjectElement.h"
#include "mozilla/dom/HTMLObjectElement.h"
#include "nsChannelClassifier.h"
#ifdef XP_WIN
// Thanks so much, Microsoft! :(
#ifdef CreateEvent
@@ -1409,17 +1408,16 @@ nsObjectLoadingContent::MaybeRewriteYout
// See if requester is planning on using the JS API.
nsAutoCString uri;
nsresult rv = aURI->GetSpec(uri);
if (NS_FAILED(rv)) {
return;
}
if (uri.Find("enablejsapi=1", true, 0, -1) != kNotFound) {
- Telemetry::Accumulate(Telemetry::YOUTUBE_NONREWRITABLE_EMBED_SEEN, 1);
return;
}
// Some YouTube urls have parameters in path components, e.g.
// http://youtube.com/embed/7LcUOEP7Brc&start=35. These URLs work with flash,
// but break iframe/object embedding. If this situation occurs with rewritten
// URLs, convert the parameters to query in order to make the video load
// correctly as an iframe. In either case, warn about it in the
@@ -1429,20 +1427,16 @@ nsObjectLoadingContent::MaybeRewriteYout
if (ampIndex != -1) {
int32_t qmIndex = uri.FindChar('?', 0);
if (qmIndex == -1 ||
qmIndex > ampIndex) {
replaceQuery = true;
}
}
- // If we've made it this far, we've got a rewritable embed. Log it in
- // telemetry.
- Telemetry::Accumulate(Telemetry::YOUTUBE_REWRITABLE_EMBED_SEEN, 1);
-
// If we're pref'd off, return after telemetry has been logged.
if (!Preferences::GetBool(kPrefYoutubeRewrite)) {
return;
}
nsAutoString utf16OldURI = NS_ConvertUTF8toUTF16(uri);
// If we need to convert the URL, it means an ampersand comes first.
// Use the index we found earlier.
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -1,9 +1,8 @@
-
{
"A11Y_INSTANTIATED_FLAG": {
"expires_in_version": "never",
"kind": "flag",
"description": "has accessibility support been instantiated"
},
"A11Y_CONSUMERS": {
"expires_in_version": "default",
@@ -10689,32 +10688,16 @@
"WEB_NOTIFICATION_SENDERS": {
"releaseChannelCollection": "opt-out",
"alert_emails": ["firefox-dev@mozilla.org"],
"bug_numbers": [1219030],
"expires_in_version": "50",
"kind": "count",
"description": "Number of origins that have shown a web notification. Excludes system alerts like update reminders and add-ons."
},
- "YOUTUBE_REWRITABLE_EMBED_SEEN": {
- "alert_emails": ["cpeterson@mozilla.com"],
- "expires_in_version": "53",
- "kind": "flag",
- "bug_numbers": [1229971],
- "releaseChannelCollection": "opt-out",
- "description": "Flag activated whenever a rewritable youtube flash embed is seen during a session."
- },
- "YOUTUBE_NONREWRITABLE_EMBED_SEEN": {
- "alert_emails": ["cpeterson@mozilla.com"],
- "expires_in_version": "53",
- "kind": "flag",
- "bug_numbers": [1237401],
- "releaseChannelCollection": "opt-out",
- "description": "Flag activated whenever a non-rewritable (enablejsapi=1) youtube flash embed is seen during a session."
- },
"PLUGIN_DRAWING_MODEL": {
"alert_emails": ["danderson@mozilla.com"],
"expires_in_version": "never",
"kind": "enumerated",
"bug_numbers": [1229961],
"n_values": 12,
"description": "Plugin drawing model. 0 when windowed, otherwise NPDrawingModel + 1."
},