зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1465685 - Add login_form probe for Savant Shield study; r=MattN
This probe will register and record (for the duration of the study only): * When a login form is loaded * When a login form is submitted (excluding the case from unresolved bug 1287202) The login_form probe has an 'extra' field called 'flow_id'. This value associates actions that occur in the same tab. It should be noted that for several reasons, we should expect a higher than 1:1 ratio between 'load' and 'submit' events: * Some sites, like Google and Amazon, have a two-step login process, and each step fires its own 'load' event. Only the second step fires a 'submit' event. * Some sites, like Facebook and Twitter, fire multiple 'load' events on the same page. * A common pattern for unsuccessful logins is for the site to redirect to a page with a login form. This would be a 'load' --> 'submit' --> 'load' series. * Unlike 'load', the 'submit' event fires only when the Password Manager is enabled and the user is in a non-private window. 'Load' events will have a 'canRecordSubmit' key in the 'extra' field which will be true if a submit event for that form can be recorded. MozReview-Commit-ID: LOMDSN6tgRV --HG-- extra : rebase_source : d88dbf2ad97892e14c6a9378cae2559af9c40b92
This commit is contained in:
Родитель
920ce3f006
Коммит
e92b9595ff
|
@ -230,6 +230,7 @@ const listeners = {
|
|||
"RemoteLogins:insecureLoginFormPresent": ["LoginManagerParent"],
|
||||
// For Savant Shield study, bug 1465685. Study on desktop only.
|
||||
"LoginStats:LoginFillSuccessful": ["LoginManagerParent"],
|
||||
"LoginStats:LoginEncountered": ["LoginManagerParent"],
|
||||
// PLEASE KEEP THIS LIST IN SYNC WITH THE MOBILE LISTENERS IN BrowserCLH.js
|
||||
"WCCR:registerProtocolHandler": ["Feeds"],
|
||||
"WCCR:registerContentHandler": ["Feeds"],
|
||||
|
|
|
@ -438,8 +438,14 @@ var LoginManagerContent = {
|
|||
_fetchLoginsFromParentAndFillForm(form, window) {
|
||||
this._detectInsecureFormLikes(window);
|
||||
|
||||
const isPrivateWindow = PrivateBrowsingUtils.isContentWindowPrivate(window);
|
||||
|
||||
let messageManager = messageManagerFromWindow(window);
|
||||
messageManager.sendAsyncMessage("LoginStats:LoginEncountered");
|
||||
messageManager.sendAsyncMessage("LoginStats:LoginEncountered",
|
||||
{
|
||||
isPrivateWindow,
|
||||
isPwmgrEnabled: gEnabled,
|
||||
});
|
||||
|
||||
if (!gEnabled) {
|
||||
return;
|
||||
|
|
|
@ -94,6 +94,13 @@ var LoginManagerParent = {
|
|||
data.oldPasswordField,
|
||||
msg.objects.openerTopWindow,
|
||||
msg.target);
|
||||
|
||||
const flow_id = msg.target.ownerGlobal.gBrowser.getTabForBrowser(msg.target).linkedPanel;
|
||||
Services.telemetry.recordEvent("savant", "login_form", "submit", null,
|
||||
{
|
||||
subcategory: "encounter",
|
||||
flow_id,
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -122,6 +129,18 @@ var LoginManagerParent = {
|
|||
});
|
||||
break;
|
||||
}
|
||||
|
||||
case "LoginStats:LoginEncountered": {
|
||||
const canRecordSubmit = (!data.isPrivateWindow && data.isPwmgrEnabled).toString();
|
||||
const flow_id = msg.target.ownerGlobal.gBrowser.getTabForBrowser(msg.target).linkedPanel;
|
||||
Services.telemetry.recordEvent("savant", "login_form", "load", null,
|
||||
{
|
||||
subcategory: "encounter",
|
||||
flow_id,
|
||||
canRecordSubmit,
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
|
|
|
@ -255,6 +255,22 @@ savant:
|
|||
extra_keys:
|
||||
subcategory: The broad event category for this probe. E.g. navigation
|
||||
flow_id: A tab identifier to associate events occuring in the same tab
|
||||
login_form:
|
||||
objects: ["load", "submit"]
|
||||
release_channel_collection: opt-out
|
||||
record_in_processes: ["main"]
|
||||
description: >
|
||||
A login form has been loaded or submitted. Login form submit events only
|
||||
fire in non-private windows with Password Manager enabled.
|
||||
bug_numbers: [1457226, 1465685]
|
||||
notification_emails:
|
||||
- "bdanforth@mozilla.com"
|
||||
- "shong@mozilla.com"
|
||||
expiry_version: "65"
|
||||
extra_keys:
|
||||
subcategory: The broad event category for this probe. E.g. navigation
|
||||
flow_id: A tab identifier to associate events occuring in the same tab
|
||||
canRecordSubmit: True if a login form loads in a non-private window with Password Manager enabled.
|
||||
|
||||
# This category contains event entries used for Telemetry tests.
|
||||
# They will not be sent out with any pings.
|
||||
|
|
Загрузка…
Ссылка в новой задаче