Bug 1356181 - Gather telemetry about isindex usage in hope of justifying removal. r?Ehsan,francois
MozReview-Commit-ID: 9dDVvgxxZml
--- a/dom/html/HTMLFormSubmission.cpp
+++ b/dom/html/HTMLFormSubmission.cpp
@@ -30,16 +30,17 @@
#include "nsIMIMEInputStream.h"
#include "nsIMIMEService.h"
#include "nsIConsoleService.h"
#include "nsIScriptError.h"
#include "nsIStringBundle.h"
#include "nsCExternalHandlerService.h"
#include "nsIFileStreams.h"
#include "nsContentUtils.h"
+#include "mozilla/Telemetry.h"
#include "mozilla/dom/Directory.h"
#include "mozilla/dom/EncodingUtils.h"
#include "mozilla/dom/File.h"
namespace mozilla {
namespace dom {
@@ -183,16 +184,17 @@ FSURLEncoded::AddIsindex(const nsAString
{
// Encode value
nsCString convValue;
nsresult rv = URLEncode(aValue, convValue);
NS_ENSURE_SUCCESS(rv, rv);
// Append data to string
if (mQueryString.IsEmpty()) {
+ Telemetry::Accumulate(Telemetry::FORM_ISINDEX_USED, true);
mQueryString.Assign(convValue);
} else {
mQueryString += NS_LITERAL_CSTRING("&isindex=") + convValue;
}
return NS_OK;
}
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -5936,16 +5936,23 @@
"bug_numbers": [1334615],
"description": "The input method the user used to select a result in the searchbar. 'enter' => The user hit the Enter key without choosing a result in the popup. 'enterSelection' => The user chose a result and then hit the Enter key. 'click' => The user clicked a result with the mouse."
},
"INNERWINDOWS_WITH_MUTATION_LISTENERS": {
"expires_in_version": "never",
"kind": "boolean",
"description": "Deleted or to-be-reused innerwindow which has had mutation event listeners."
},
+ "FORM_ISINDEX_USED": {
+ "alert_emails": ["hsivonen@mozilla.com"],
+ "expires_in_version": "56",
+ "kind": "flag",
+ "bug_numbers": [1356181],
+ "description": "Whether there has been an isindex form submission in this session."
+ },
"CHARSET_OVERRIDE_SITUATION": {
"expires_in_version": "never",
"kind": "enumerated",
"n_values": 8,
"description": "Labeling status of top-level page when overriding charset (0: unlabeled file URL without detection, 1: unlabeled non-TLD-guessed non-file URL without detection, 2: unlabeled file URL with detection, 3: unlabeled non-file URL with detection, 4: labeled, 5: already overridden, 6: bug, 7: unlabeled with TLD guessing)"
},
"CHARSET_OVERRIDE_USED": {
"expires_in_version": "never",
--- a/toolkit/components/telemetry/histogram-whitelists.json
+++ b/toolkit/components/telemetry/histogram-whitelists.json
@@ -1982,16 +1982,17 @@
"FX_BROWSER_FULLSCREEN_USED",
"FX_CONTENT_CRASH_DUMP_UNAVAILABLE",
"FX_CONTENT_CRASH_NOT_SUBMITTED",
"FX_CONTENT_CRASH_PRESENTED",
"FX_SESSION_RESTORE_SEND_UPDATE_CAUSED_OOM",
"FX_TOUCH_USED",
"GEOLOCATION_ERROR",
"JS_TELEMETRY_ADDON_EXCEPTIONS",
+ "FORM_ISINDEX_USED",
"MASTER_PASSWORD_ENABLED",
"MEDIA_CODEC_USED",
"MEDIA_DECODING_PROCESS_CRASH",
"NETWORK_CONNECTION_COUNT",
"NUMBER_OF_PROFILES",
"ONBEFOREUNLOAD_PROMPT_COUNT",
"OPENGL_COMPOSITING_FAILURE_ID",
"PERMISSIONS_SQL_CORRUPTED",