mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1520336 - Removed unused 'where' parameter from BrowserSearch.recordOneoffSearchInTelemetry. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D16617 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
0575720a12
commit
1619ba50da
@ -4155,10 +4155,8 @@ const BrowserSearch = {
|
||||
* allowed values.
|
||||
* @param type
|
||||
* (string) Indicates how the user selected the search item.
|
||||
* @param where
|
||||
* (string) Where was the search link opened (e.g. new tab, current tab, ..).
|
||||
*/
|
||||
recordOneoffSearchInTelemetry(engine, source, type, where) {
|
||||
recordOneoffSearchInTelemetry(engine, source, type) {
|
||||
try {
|
||||
const details = {type, isOneOff: true};
|
||||
BrowserUsageTelemetry.recordSearch(gBrowser, engine, source, details);
|
||||
|
@ -699,8 +699,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
[url, postData] =
|
||||
this._parseAndRecordSearchEngineLoad(selectedOneOff.engine,
|
||||
this.oneOffSearchQuery,
|
||||
event, where,
|
||||
openUILinkParams);
|
||||
event);
|
||||
} else if (action) {
|
||||
switch (action.type) {
|
||||
case "visiturl":
|
||||
@ -776,8 +775,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
action.params.engineName,
|
||||
action.params.searchSuggestion || action.params.searchQuery,
|
||||
event,
|
||||
where,
|
||||
openUILinkParams,
|
||||
actionDetails
|
||||
);
|
||||
break;
|
||||
@ -904,8 +901,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
<parameter name="engineOrEngineName"/>
|
||||
<parameter name="query"/>
|
||||
<parameter name="event"/>
|
||||
<parameter name="openUILinkWhere"/>
|
||||
<parameter name="openUILinkParams"/>
|
||||
<parameter name="searchActionDetails"/>
|
||||
<body><![CDATA[
|
||||
let engine =
|
||||
@ -913,7 +908,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
Services.search.getEngineByName(engineOrEngineName) :
|
||||
engineOrEngineName;
|
||||
let isOneOff = this.popup.oneOffSearchButtons
|
||||
.maybeRecordTelemetry(event, openUILinkWhere, openUILinkParams);
|
||||
.maybeRecordTelemetry(event);
|
||||
// Infer the type of the event which triggered the search.
|
||||
let eventType = "unknown";
|
||||
if (event instanceof KeyboardEvent) {
|
||||
|
@ -987,13 +987,9 @@ class SearchOneOffs {
|
||||
*
|
||||
* @param {Event} aEvent
|
||||
* An event, like a click on a one-off button.
|
||||
* @param {string} aOpenUILinkWhere
|
||||
* The "where" passed to openUILink.
|
||||
* @param {object} aOpenUILinkParams
|
||||
* The "params" passed to openUILink.
|
||||
* @returns {boolean} True if telemetry was recorded and false if not.
|
||||
*/
|
||||
maybeRecordTelemetry(aEvent, aOpenUILinkWhere, aOpenUILinkParams) {
|
||||
maybeRecordTelemetry(aEvent) {
|
||||
if (!aEvent) {
|
||||
return false;
|
||||
}
|
||||
@ -1029,11 +1025,7 @@ class SearchOneOffs {
|
||||
source += "-" + this.telemetryOrigin;
|
||||
}
|
||||
|
||||
let tabBackground = aOpenUILinkWhere == "tab" &&
|
||||
aOpenUILinkParams &&
|
||||
aOpenUILinkParams.inBackground;
|
||||
let where = tabBackground ? "tab-background" : aOpenUILinkWhere;
|
||||
BrowserSearch.recordOneoffSearchInTelemetry(engine, source, type, where);
|
||||
BrowserSearch.recordOneoffSearchInTelemetry(engine, source, type);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -304,7 +304,7 @@ class MozSearchbar extends MozXULElement {
|
||||
|
||||
if (!selection || (selection.index == -1)) {
|
||||
oneOffRecorded = this.textbox.popup.oneOffButtons
|
||||
.maybeRecordTelemetry(aEvent, aWhere, aParams);
|
||||
.maybeRecordTelemetry(aEvent);
|
||||
if (!oneOffRecorded) {
|
||||
let source = "unknown";
|
||||
let type = "unknown";
|
||||
@ -325,8 +325,7 @@ class MozSearchbar extends MozXULElement {
|
||||
if (!aEngine) {
|
||||
aEngine = this.currentEngine;
|
||||
}
|
||||
BrowserSearch.recordOneoffSearchInTelemetry(aEngine, source, type,
|
||||
aWhere);
|
||||
BrowserSearch.recordOneoffSearchInTelemetry(aEngine, source, type);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user