Bug 1124888 - Record the effect of the saved formSubmitURL on autofilling login forms. r=dolske

--HG--
extra : transplant_source : W%17%23%5D%7C%B4%26%A94%2B-9%9E%00%E1%92%0D%04%CD%06
extra : histedit_source : ddea6f12b2b67d71783e3e7c3ad05e968c581b50
This commit is contained in:
Matthew Noorenberghe 2015-02-20 16:21:05 -08:00
Родитель 1a4f6dfdb7
Коммит 393b29be58
2 изменённых файлов: 18 добавлений и 1 удалений

Просмотреть файл

@ -107,8 +107,9 @@ var LoginManagerParent = {
return;
}
let allLoginsCount = Services.logins.countLogins(formOrigin, "", null);
// If there are no logins for this site, bail out now.
if (!Services.logins.countLogins(formOrigin, "", null)) {
if (!allLoginsCount) {
target.sendAsyncMessage("RemoteLogins:loginsFound",
{ requestId: requestId, logins: [] });
return;
@ -152,6 +153,16 @@ var LoginManagerParent = {
var logins = Services.logins.findLogins({}, formOrigin, actionOrigin, null);
target.sendAsyncMessage("RemoteLogins:loginsFound",
{ requestId: requestId, logins: logins });
const PWMGR_FORM_ACTION_EFFECT = Services.telemetry.getHistogramById("PWMGR_FORM_ACTION_EFFECT");
if (logins.length == 0) {
PWMGR_FORM_ACTION_EFFECT.add(2);
} else if (logins.length == allLoginsCount) {
PWMGR_FORM_ACTION_EFFECT.add(0);
} else {
// logins.length < allLoginsCount
PWMGR_FORM_ACTION_EFFECT.add(1);
}
},
doAutocompleteSearch: function({ formOrigin, actionOrigin,

Просмотреть файл

@ -7360,6 +7360,12 @@
"extended_statistics_ok": true,
"description": "The number of sites for which the user has explicitly rejected saving logins"
},
"PWMGR_FORM_ACTION_EFFECT": {
"expires_in_version": "never",
"kind": "enumerated",
"n_values" : 5,
"description": "The effect of the form action on signon autofill. (0=No effect, 1=Fewer logins after considering the form action, 2=No logins match form origin and action."
},
"PWMGR_FORM_AUTOFILL_RESULT": {
"expires_in_version": "never",
"kind": "enumerated",